; ModuleID = 'example.txt'
source_filename = "example.txt"

@0 = private unnamed_addr constant [4 x i8] c"%i\0A\00", align 1

define i32 @main() {
entry:
  %a = alloca i32, align 4
  %b = alloca i32, align 4
  %t = alloca i32, align 4
  br label %body

body:                                             ; preds = %entry
  store i32 1071, ptr %a, align 4
  store i32 462, ptr %b, align 4
  br label %_while

_while:                                           ; preds = %_do, %body
  %b1 = load i32, ptr %b, align 4
  %foo = icmp ne i32 %b1, 0
  br i1 %foo, label %_do, label %_done

_do:                                              ; preds = %_while
  %a2 = load i32, ptr %a, align 4
  %b3 = load i32, ptr %b, align 4
  %foo4 = srem i32 %a2, %b3
  store i32 %foo4, ptr %t, align 4
  %b5 = load i32, ptr %b, align 4
  store i32 %b5, ptr %a, align 4
  %t6 = load i32, ptr %t, align 4
  store i32 %t6, ptr %b, align 4
  br label %_while

_done:                                            ; preds = %_while
  %a7 = load i32, ptr %a, align 4
  %0 = call i32 (ptr, ...) @printf(ptr @0, i32 %a7)
  ret i32 0
}

declare i32 @printf(ptr, ...)
