#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  printf("Robert Judka\nCS 350-01\nLab 03 - Other Bases and Data\n\n\n");
  printf("Welcome to the Super Cool Extravagent Base Converter Tool*!\n");
  printf("\t\t*limited to base 36");
  int value;
  int base;
  printf("\n\nEnter an integer (must be >= 1): ");
  scanf("%d", &value);
  printf("Enter a base term (must be >= 2 & <= 36): ");
  scanf("%d", &base);
  int ogValue = value;
  int ogBase = base;
  while (value >= 1 && (base >= 2 && base <= 36)) {
    if (ogValue > 2147483647) {
      printf("Oh Snap :( You expect too much of me");
      printf(" \t %d is too large of a number to convert", ogValue);
    } else {
      int toConvert = value;
      int counter = 0;
      int remainder = 0;
      int digits[32];
      int i = 0;
      do {
        toConvert = toConvert / base;
        counter++;
      } while (toConvert != 0);
      do {
        remainder = value % base;
        value = value / base;
        digits[i] = remainder;
        i++;
      } while (i < counter);
      char prt_digits[36] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
      printf("\n\t%d in base %d is: ", ogValue, ogBase);
      for (int i = counter - 1; i >= 0; i--) {
        printf("%c", prt_digits[digits[i]]);
      }
      printf("\n\n\nEnter an integer (must be >= 1): ");
      scanf("%d", &value);
      printf("Enter a base term (must be >= 2 & <= 36): ");
      scanf("%d", &base);
      ogValue = value;
      ogBase = base;
    }
  }
  printf("\nYou have now left the Converter Tool. Have a great day!\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0xd5(%rbp)
jl     11f1 <main+0xc1>
xor    %eax,%eax
cmpl   $0x2,-0xc(%rbp)
mov    %al,-0xd6(%rbp)
jl     11e5 <main+0xb5>
cmpl   $0x24,-0xc(%rbp)
setle  %al
mov    %al,-0xd6(%rbp)
mov    -0xd6(%rbp),%al
mov    %al,-0xd5(%rbp)
mov    -0xd5(%rbp),%al
test   $0x1,%al
jne    1204 <main+0xd4>
jmp    1383 <main+0x253>
cmpl   $0x7fffffff,-0x10(%rbp)
jle    1235 <main+0x105>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    137e <main+0x24e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0xa4(%rbp)
mov    -0x18(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1253 <main+0x123>
jmp    1275 <main+0x145>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x20(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x20(%rbp),%ecx
movslq -0xa4(%rbp),%rax
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     1275 <main+0x145>
lea    -0xd0(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xd4(%rbp)
cmpl   $0x0,-0xd4(%rbp)
jl     1336 <main+0x206>
movslq -0xd4(%rbp),%rax
movslq -0xa0(%rbp,%rax,4),%rax
ff
movsbl -0xd0(%rbp,%rax,1),%esi
ff
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xd4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xd4(%rbp)
jmp    12f0 <main+0x1c0>
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd40(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xd33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd22(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11b4 <main+0x84>
lea    0xdbb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
lea    0xf26(%rip),%rdi
call   1040 <puts@plt>
lea    0xf51(%rip),%rdi
call   1040 <puts@plt>
lea    0xe90(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe8a(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xe79(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
mov    0x8(%rsp),%esi
test   %esi,%esi
jle    12cc <main+0x18c>
mov    0xc(%rsp),%ecx
lea    0xf65(%rip),%r14
lea    0xe44(%rip),%r12
lea    0xe40(%rip),%r13
lea    0xc(%rsp),%r15
xchg   %ax,%ax
lea    -0x2(%rcx),%eax
cmp    $0x22,%eax
ja     12cc <main+0x18c>
xor    %edi,%edi
mov    $0x1,%edx
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edx,%ebp
cltd
idiv   %ecx
add    $0x1,%edi
lea    0x1(%rbp),%edx
test   %eax,%eax
jne    1200 <main+0xc0>
cmp    $0x1,%edi
jne    1220 <main+0xe0>
xor    %ebx,%ebx
mov    %esi,%eax
jmp    1247 <main+0x107>
nopw   0x0(%rax,%rax,1)
and    $0xfffffffe,%ebp
xor    %ebx,%ebx
mov    %esi,%eax
nopw   0x0(%rax,%rax,1)
cltd
idiv   %ecx
mov    %edx,0x10(%rsp,%rbx,4)
cltd
idiv   %ecx
mov    %edx,0x14(%rsp,%rbx,4)
add    $0x2,%rbx
cmp    %rbx,%rbp
jne    1230 <main+0xf0>
mov    %edi,%ebp
test   $0x1,%bpl
je     1256 <main+0x116>
cltd
idiv   %ecx
mov    %edx,0x10(%rsp,%rbx,4)
mov    %eax,0x8(%rsp)
lea    0xde3(%rip),%rdi
mov    %ecx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rbp),%rbx
movslq 0xc(%rsp,%rbp,4),%rax
movsbl (%rax,%r14,1),%edi
call   1030 <putchar@plt>
cmp    $0x1,%rbp
mov    %rbx,%rbp
jg     1270 <main+0x130>
lea    0xdc6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%ecx
test   %esi,%esi
jg     11e0 <main+0xa0>
lea    0xe1e(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [56 x i8] c"Robert Judka\0ACS 350-01\0ALab 03 - Other Bases and Data\0A\0A\0A\00"
@.str.1 = [61 x i8] c"Welcome to the Super Cool Extravagent Base Converter Tool*!\0A\00"
@.str.2 = [22 x i8] c"\09\09*limited to base 36\00"
@.str.3 = [36 x i8] c"\0A\0AEnter an integer (must be >= 1): \00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [43 x i8] c"Enter a base term (must be >= 2 & <= 36): \00"
@.str.6 = [37 x i8] c"Oh Snap :( You expect too much of me\00"
@.str.7 = [42 x i8] c" \09 %d is too large of a number to convert\00"
@__const.main.prt_digits = [36 x i8] c"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@.str.8 = [21 x i8] c"\0A\09%d in base %d is: \00"
@.str.9 = [3 x i8] c"%c\00"
@.str.10 = [37 x i8] c"\0A\0A\0AEnter an integer (must be >= 1): \00"
@.str.11 = [58 x i8] c"\0AYou have now left the Converter Tool. Have a great day!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [32 x i32]
%10 = alloca i32
%11 = alloca [36 x i8]
%12 = alloca i32
store i32 0, i32* %1
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %2)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %3)
%20 = load i32, i32* %2
store i32 %20, i32* %4
%21 = load i32, i32* %3
store i32 %21, i32* %5
br label %22
22: ; preds = %101, %0
%23 = load i32, i32* %2
%24 = icmp sge i32 %23, 1
br i1 %24, label %25, label %33
25: ; preds = %22
%26 = load i32, i32* %3
%27 = icmp sge i32 %26, 2
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = load i32, i32* %3
%30 = icmp sle i32 %29, 36
br label %31
31: ; preds = %28, %25
%32 = phi i1 [ false, %25 ], [ %30, %28 ]
br label %33
33: ; preds = %31, %22
%34 = phi i1 [ false, %22 ], [ %32, %31 ]
br i1 %34, label %35, label %102
35: ; preds = %33
%36 = load i32, i32* %4
%37 = icmp sgt i32 %36, 2147483647
br i1 %37, label %38, label %42
38: ; preds = %35
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0))
%40 = load i32, i32* %4
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), i32 %40)
br label %101
42: ; preds = %35
%43 = load i32, i32* %2
store i32 %43, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %10
br label %44
44: ; preds = %50, %42
%45 = load i32, i32* %6
%46 = load i32, i32* %3
%47 = sdiv i32 %45, %46
store i32 %47, i32* %6
%48 = load i32, i32* %7
%49 = add nsw i32 %48, 1
store i32 %49, i32* %7
br label %50
50: ; preds = %44
%51 = load i32, i32* %6
%52 = icmp ne i32 %51, 0
br i1 %52, label %44, label %53
53: ; preds = %50
br label %54
54: ; preds = %67, %53
%55 = load i32, i32* %2
%56 = load i32, i32* %3
%57 = srem i32 %55, %56
store i32 %57, i32* %8
%58 = load i32, i32* %2
%59 = load i32, i32* %3
%60 = sdiv i32 %58, %59
store i32 %60, i32* %2
%61 = load i32, i32* %8
%62 = load i32, i32* %10
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [32 x i32], [32 x i32]* %9, i64 0, i64 %63
store i32 %61, i32* %64
%65 = load i32, i32* %10
%66 = add nsw i32 %65, 1
store i32 %66, i32* %10
br label %67
67: ; preds = %54
%68 = load i32, i32* %10
%69 = load i32, i32* %7
%70 = icmp slt i32 %68, %69
br i1 %70, label %54, label %71
71: ; preds = %67
%72 = bitcast [36 x i8]* %11 to i8*
%73 = load i32, i32* %4
%74 = load i32, i32* %5
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 %73, i32 %74)
%76 = load i32, i32* %7
%77 = sub nsw i32 %76, 1
store i32 %77, i32* %12
br label %78
78: ; preds = %91, %71
%79 = load i32, i32* %12
%80 = icmp sge i32 %79, 0
br i1 %80, label %81, label %94
81: ; preds = %78
%82 = load i32, i32* %12
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [32 x i32], [32 x i32]* %9, i64 0, i64 %83
%85 = load i32, i32* %84
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [36 x i8], [36 x i8]* %11, i64 0, i64 %86
%88 = load i8, i8* %87
%89 = sext i8 %88 to i32
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 %89)
br label %91
91: ; preds = %81
%92 = load i32, i32* %12
%93 = add nsw i32 %92, -1
store i32 %93, i32* %12
br label %78
94: ; preds = %78
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
%96 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %2)
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%98 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %3)
%99 = load i32, i32* %2
store i32 %99, i32* %4
%100 = load i32, i32* %3
store i32 %100, i32* %5
br label %101
101: ; preds = %94, %38
br label %22
102: ; preds = %33
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0))
%104 = load i32, i32* %1
ret i32 %104
}

LLVM IR (-O2):
@.str.2 = [22 x i8] c"\09\09*limited to base 36\00"
@.str.3 = [36 x i8] c"\0A\0AEnter an integer (must be >= 1): \00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [43 x i8] c"Enter a base term (must be >= 2 & <= 36): \00"
@__const.main.prt_digits = [36 x i8] c"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@.str.8 = [21 x i8] c"\0A\09%d in base %d is: \00"
@.str.10 = [37 x i8] c"\0A\0A\0AEnter an integer (must be >= 1): \00"
@str = [55 x i8] c"Robert Judka\0ACS 350-01\0ALab 03 - Other Bases and Data\0A\0A\00"
@str.12 = [60 x i8] c"Welcome to the Super Cool Extravagent Base Converter Tool*!\00"
@str.13 = [57 x i8] c"\0AYou have now left the Converter Tool. Have a great day!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [32 x i32]
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.12, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%7 = bitcast i32* %1 to i8*
%8 = bitcast i32* %2 to i8*
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %2)
%13 = load i32, i32* %1
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %81
15: ; preds = %0
%16 = load i32, i32* %2
%17 = bitcast [32 x i32]* %3 to i8*
br label %18
18: ; preds = %15, %62
%19 = phi i32 [ %16, %15 ], [ %68, %62 ]
%20 = phi i32 [ %13, %15 ], [ %67, %62 ]
%21 = add i32 %19, -2
%22 = icmp ult i32 %21, 35
br i1 %22, label %23, label %81
23: ; preds = %18
br label %24
24: ; preds = %24, %23
%25 = phi i32 [ %20, %23 ], [ %27, %24 ]
%26 = phi i32 [ 0, %23 ], [ %28, %24 ]
%27 = sdiv i32 %25, %19
%28 = add nuw i32 %26, 1
%29 = icmp eq i32 %27, 0
br i1 %29, label %30, label %24
30: ; preds = %24
%31 = zext i32 %28 to i64
%32 = and i64 %31, 1
%33 = icmp eq i32 %26, 0
br i1 %33, label %50, label %34
34: ; preds = %30
%35 = and i64 %31, 4294967294
br label %36
36: ; preds = %36, %34
%37 = phi i64 [ 0, %34 ], [ %47, %36 ]
%38 = phi i32 [ %20, %34 ], [ %45, %36 ]
%39 = phi i64 [ 0, %34 ], [ %48, %36 ]
%40 = srem i32 %38, %19
%41 = sdiv i32 %38, %19
%42 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 %37
store i32 %40, i32* %42
%43 = or i64 %37, 1
%44 = srem i32 %41, %19
%45 = sdiv i32 %41, %19
%46 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 %43
store i32 %44, i32* %46
%47 = add nuw nsw i64 %37, 2
%48 = add i64 %39, 2
%49 = icmp eq i64 %48, %35
br i1 %49, label %50, label %36
50: ; preds = %36, %30
%51 = phi i32 [ undef, %30 ], [ %45, %36 ]
%52 = phi i64 [ 0, %30 ], [ %47, %36 ]
%53 = phi i32 [ %20, %30 ], [ %45, %36 ]
%54 = icmp eq i64 %32, 0
br i1 %54, label %59, label %55
55: ; preds = %50
%56 = srem i32 %53, %19
%57 = sdiv i32 %53, %19
%58 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 %52
store i32 %56, i32* %58
br label %59
59: ; preds = %50, %55
%60 = phi i32 [ %51, %50 ], [ %57, %55 ]
store i32 %60, i32* %1
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 %20, i32 %19)
br label %70
62: ; preds = %70
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
%64 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%66 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %2)
%67 = load i32, i32* %1
%68 = load i32, i32* %2
%69 = icmp sgt i32 %67, 0
br i1 %69, label %18, label %81
70: ; preds = %59, %70
%71 = phi i64 [ %31, %59 ], [ %72, %70 ]
%72 = add nsw i64 %71, -1
%73 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 %72
%74 = load i32, i32* %73
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [36 x i8], [36 x i8]* @__const.main.prt_digits, i64 0, i64 %75
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = call i32 @putchar(i32 %78)
%80 = icmp sgt i64 %71, 1
br i1 %80, label %70, label %62
81: ; preds = %18, %62, %0
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.13, i64 0, i64 0))
ret i32 0
}