#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 base5(int);
int pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int n, i, j, k, range[10][5], i5;
  printf("Enter number of variables: ");
  scanf("%d", &n);
  printf("Enter range of each variable: (min max)\n");
  for (i = 0; i < n; i++) {
    printf("Var %d:\t", i + 1);
    scanf("%d %d", &range[i][0], &range[i][4]);
    range[i][2] = (range[i][4] - range[i][0]) / 2 + range[i][0];
    range[i][1] = range[i][0] + 1;
    range[i][3] = range[i][4] - 1;
  }
  printf("\nId\t");
  for (i = 0; i < n; i++)
    printf("Var %d\t", i);
  printf("\n");
  for (i = 0; i < pow(5, n); i++) {
    printf("%d\t", i + 1);
    i5 = base5(i);
    for (j = 0; j < n; j++) {
      printf("%d\t", range[j][i5 % 10]);
      i5 /= 10;
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12a0 <main+0x160>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0xc(%rbp),%rax
lea    -0xe0(%rbp),%rsi
imul   $0x14,%rax,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
lea    -0xe0(%rbp),%rdx
imul   $0x14,%rax,%rax
add    %rax,%rdx
add    $0x10,%rdx
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
movslq -0xc(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%eax
movslq -0xc(%rbp),%rdx
lea    -0xe0(%rbp),%rcx
imul   $0x14,%rdx,%rdx
add    %rdx,%rcx
sub    (%rcx),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
movslq -0xc(%rbp),%rdx
lea    -0xe0(%rbp),%rax
imul   $0x14,%rdx,%rdx
add    %rdx,%rax
add    (%rax),%ecx
movslq -0xc(%rbp),%rdx
lea    -0xe0(%rbp),%rax
imul   $0x14,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,0x8(%rax)
movslq -0xc(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%ecx
add    $0x1,%ecx
movslq -0xc(%rbp),%rdx
lea    -0xe0(%rbp),%rax
imul   $0x14,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,0x4(%rax)
movslq -0xc(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%ecx
sub    $0x1,%ecx
movslq -0xc(%rbp),%rdx
lea    -0xe0(%rbp),%rax
imul   $0x14,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,0xc(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1187 <main+0x47>
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12e0 <main+0x1a0>
mov    -0xc(%rbp),%esi
lea    0xd8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12b5 <main+0x175>
lea    0xd5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0xe8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x5,%edi
call   1060 <pow@plt>
mov    %eax,%ecx
mov    -0xe8(%rbp),%eax
cmp    %ecx,%eax
jge    13d0 <main+0x290>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
lea    0xd35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%edi
call   1040 <base5@plt>
mov    %eax,-0xe4(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13b4 <main+0x274>
movslq -0x10(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0xf0(%rbp)
mov    -0xe4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xf0(%rbp),%rax
movslq %edx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xcd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xe4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xe4(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1344 <main+0x204>
lea    0xc88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12f5 <main+0x1b5>
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
lea    0xe88(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea2(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
lea    0xe9f(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0xc(%rsp)
jle    1212 <main+0xb2>
lea    0x20(%rsp),%rbx
lea    0xe6b(%rip),%r14
lea    0xe6d(%rip),%r15
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x10(%rbx),%rsi
mov    %r15,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <scanf@plt>
mov    -0x10(%rbx),%eax
mov    (%rbx),%ecx
mov    %ecx,%edx
sub    %eax,%edx
mov    %edx,%esi
shr    $0x1f,%esi
add    %edx,%esi
sar    %esi
add    %eax,%esi
mov    %esi,-0x8(%rbx)
add    $0x1,%eax
mov    %eax,-0xc(%rbx)
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbx)
movslq 0xc(%rsp),%rax
add    $0x14,%rbx
cmp    %rax,%rbp
jl     11c0 <main+0x60>
lea    0xe12(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1245 <main+0xe5>
lea    0xe02(%rip),%rbx
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jl     1230 <main+0xd0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%esi
mov    $0x5,%edi
call   1080 <pow@plt>
test   %eax,%eax
jle    1318 <main+0x1b8>
lea    0xdc8(%rip),%r12
lea    0x10(%rsp),%r15
xor    %r14d,%r14d
jmp    129d <main+0x13d>
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%esi
mov    $0x5,%edi
call   1080 <pow@plt>
cmp    %eax,%r14d
jge    1318 <main+0x1b8>
mov    %r14d,%ebp
lea    0x1(%rbp),%r14d
mov    %r12,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,%edi
call   1060 <base5@plt>
cmpl   $0x0,0xc(%rsp)
jle    1280 <main+0x120>
mov    %eax,%ebp
mov    %r15,%r13
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movslq %ebp,%rax
imul   $0x66666667,%rax,%rbp
mov    %rbp,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rbp
add    %ecx,%ebp
lea    0x0(%rbp,%rbp,1),%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
cltq
mov    0x0(%r13,%rax,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
add    $0x14,%r13
cmp    %rax,%rbx
jl     12d0 <main+0x170>
jmp    1280 <main+0x120>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Enter number of variables: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [41 x i8] c"Enter range of each variable: (min max)\0A\00"
@.str.3 = [9 x i8] c"Var %d:\09\00"
@.str.4 = [6 x i8] c"%d %d\00"
@.str.5 = [5 x i8] c"\0AId\09\00"
@.str.6 = [8 x i8] c"Var %d\09\00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [4 x i8] c"%d\09\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [10 x [5 x i32]]
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %11
11: ; preds = %70, %0
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %73
15: ; preds = %11
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %20
%22 = getelementptr inbounds [5 x i32], [5 x i32]* %21, i64 0, i64 0
%23 = load i32, i32* %3
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %24
%26 = getelementptr inbounds [5 x i32], [5 x i32]* %25, i64 0, i64 4
%27 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32* %22, i32* %26)
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %29
%31 = getelementptr inbounds [5 x i32], [5 x i32]* %30, i64 0, i64 4
%32 = load i32, i32* %31
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %34
%36 = getelementptr inbounds [5 x i32], [5 x i32]* %35, i64 0, i64 0
%37 = load i32, i32* %36
%38 = sub nsw i32 %32, %37
%39 = sdiv i32 %38, 2
%40 = load i32, i32* %3
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %41
%43 = getelementptr inbounds [5 x i32], [5 x i32]* %42, i64 0, i64 0
%44 = load i32, i32* %43
%45 = add nsw i32 %39, %44
%46 = load i32, i32* %3
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %47
%49 = getelementptr inbounds [5 x i32], [5 x i32]* %48, i64 0, i64 2
store i32 %45, i32* %49
%50 = load i32, i32* %3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %51
%53 = getelementptr inbounds [5 x i32], [5 x i32]* %52, i64 0, i64 0
%54 = load i32, i32* %53
%55 = add nsw i32 %54, 1
%56 = load i32, i32* %3
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %57
%59 = getelementptr inbounds [5 x i32], [5 x i32]* %58, i64 0, i64 1
store i32 %55, i32* %59
%60 = load i32, i32* %3
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %61
%63 = getelementptr inbounds [5 x i32], [5 x i32]* %62, i64 0, i64 4
%64 = load i32, i32* %63
%65 = sub nsw i32 %64, 1
%66 = load i32, i32* %3
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %67
%69 = getelementptr inbounds [5 x i32], [5 x i32]* %68, i64 0, i64 3
store i32 %65, i32* %69
br label %70
70: ; preds = %15
%71 = load i32, i32* %3
%72 = add nsw i32 %71, 1
store i32 %72, i32* %3
br label %11
73: ; preds = %11
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %3
br label %75
75: ; preds = %82, %73
%76 = load i32, i32* %3
%77 = load i32, i32* %2
%78 = icmp slt i32 %76, %77
br i1 %78, label %79, label %85
79: ; preds = %75
%80 = load i32, i32* %3
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 %80)
br label %82
82: ; preds = %79
%83 = load i32, i32* %3
%84 = add nsw i32 %83, 1
store i32 %84, i32* %3
br label %75
85: ; preds = %75
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %3
br label %87
87: ; preds = %119, %85
%88 = load i32, i32* %3
%89 = load i32, i32* %2
%90 = call i32 @pow(i32 5, i32 %89)
%91 = icmp slt i32 %88, %90
br i1 %91, label %92, label %122
92: ; preds = %87
%93 = load i32, i32* %3
%94 = add nsw i32 %93, 1
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %94)
%96 = load i32, i32* %3
%97 = call i32 @base5(i32 %96)
store i32 %97, i32* %7
store i32 0, i32* %4
br label %98
98: ; preds = %114, %92
%99 = load i32, i32* %4
%100 = load i32, i32* %2
%101 = icmp slt i32 %99, %100
br i1 %101, label %102, label %117
102: ; preds = %98
%103 = load i32, i32* %4
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %6, i64 0, i64 %104
%106 = load i32, i32* %7
%107 = srem i32 %106, 10
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [5 x i32], [5 x i32]* %105, i64 0, i64 %108
%110 = load i32, i32* %109
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %110)
%112 = load i32, i32* %7
%113 = sdiv i32 %112, 10
store i32 %113, i32* %7
br label %114
114: ; preds = %102
%115 = load i32, i32* %4
%116 = add nsw i32 %115, 1
store i32 %116, i32* %4
br label %98
117: ; preds = %98
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %119
119: ; preds = %117
%120 = load i32, i32* %3
%121 = add nsw i32 %120, 1
store i32 %121, i32* %3
br label %87
122: ; preds = %87
%123 = load i32, i32* %1
ret i32 %123
}

LLVM IR (-O2):
@.str = [28 x i8] c"Enter number of variables: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [9 x i8] c"Var %d:\09\00"
@.str.4 = [6 x i8] c"%d %d\00"
@.str.5 = [5 x i8] c"\0AId\09\00"
@.str.6 = [8 x i8] c"Var %d\09\00"
@.str.8 = [4 x i8] c"%d\09\00"
@str = [40 x i8] c"Enter range of each variable: (min max)\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [5 x i32]]
%3 = bitcast i32* %1 to i8*
%4 = bitcast [10 x [5 x i32]]* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %31
10: ; preds = %0, %10
%11 = phi i64 [ %12, %10 ], [ 0, %0 ]
%12 = add nuw nsw i64 %11, 1
%13 = trunc i64 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %2, i64 0, i64 %11, i64 0
%16 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %2, i64 0, i64 %11, i64 4
%17 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32* %15, i32* %16)
%18 = load i32, i32* %16
%19 = load i32, i32* %15
%20 = sub nsw i32 %18, %19
%21 = sdiv i32 %20, 2
%22 = add nsw i32 %21, %19
%23 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %2, i64 0, i64 %11, i64 2
store i32 %22, i32* %23
%24 = add nsw i32 %19, 1
%25 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %2, i64 0, i64 %11, i64 1
store i32 %24, i32* %25
%26 = add nsw i32 %18, -1
%27 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %2, i64 0, i64 %11, i64 3
store i32 %26, i32* %27
%28 = load i32, i32* %1
%29 = sext i32 %28 to i64
%30 = icmp slt i64 %12, %29
br i1 %30, label %10, label %31
31: ; preds = %10, %0
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%33 = load i32, i32* %1
%34 = icmp sgt i32 %33, 0
br i1 %34, label %35, label %41
35: ; preds = %31, %35
%36 = phi i32 [ %38, %35 ], [ 0, %31 ]
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 %36)
%38 = add nuw nsw i32 %36, 1
%39 = load i32, i32* %1
%40 = icmp slt i32 %38, %39
br i1 %40, label %35, label %41
41: ; preds = %35, %31
%42 = call i32 @putchar(i32 10)
%43 = load i32, i32* %1
%44 = call i32 @pow(i32 5, i32 %43)
%45 = icmp sgt i32 %44, 0
br i1 %45, label %46, label %71
46: ; preds = %41, %66
%47 = phi i32 [ %48, %66 ], [ 0, %41 ]
%48 = add nuw nsw i32 %47, 1
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %48)
%50 = call i32 @base5(i32 %47)
%51 = load i32, i32* %1
%52 = icmp sgt i32 %51, 0
br i1 %52, label %53, label %66
53: ; preds = %46, %53
%54 = phi i64 [ %62, %53 ], [ 0, %46 ]
%55 = phi i32 [ %61, %53 ], [ %50, %46 ]
%56 = srem i32 %55, 10
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [10 x [5 x i32]], [10 x [5 x i32]]* %2, i64 0, i64 %54, i64 %57
%59 = load i32, i32* %58
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 %59)
%61 = sdiv i32 %55, 10
%62 = add nuw nsw i64 %54, 1
%63 = load i32, i32* %1
%64 = sext i32 %63 to i64
%65 = icmp slt i64 %62, %64
br i1 %65, label %53, label %66
66: ; preds = %53, %46
%67 = call i32 @putchar(i32 10)
%68 = load i32, i32* %1
%69 = call i32 @pow(i32 5, i32 %68)
%70 = icmp slt i32 %48, %69
br i1 %70, label %46, label %71
71: ; preds = %66, %41
ret i32 0
}