; ModuleID = 'Moj modul'
source_filename = "Moj modul"

define i32 @faktorijel(i32 %n) {
entry:
  %tmpcmp = icmp eq i32 %n, 0
  br i1 %tmpcmp, label %ifcont, label %else

else:                                             ; preds = %entry
  %tmpsub = add i32 %n, -1
  %calltmp = call i32 @faktorijel(i32 %tmpsub)
  %tmpmul = mul i32 %calltmp, %n
  br label %ifcont

ifcont:                                           ; preds = %entry, %else
  %iftmp = phi i32 [ %tmpmul, %else ], [ 1, %entry ]
  ret i32 %iftmp
}

define void @main() {
entry:
  %calltmp = call i32 @faktorijel(i32 5)
  call void @printi(i32 %calltmp)
  ret void
}

declare void @printi(i32)
