#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() {
  int i, length1, length2, final_length;
  printf("Enter the length of the first array: ");
  scanf("%d", &length1);
  int arr1[length1];
  printf("Enter %d elements of the first array: \n", length1);
  for (i = 0; i < length1; i++)
    scanf("%d", &arr1[i]);
  printf("Enter the length of the second array: ");
  scanf("%d", &length2);
  int arr2[length2];
  printf("Enter %d elements of the second array: \n", length2);
  for (i = 0; i < length2; i++)
    scanf("%d", &arr2[i]);
  final_length = length1 + length2;
  int finArr[final_length];
  for (i = 0; i < length1; i++)
    finArr[i] = arr1[i];
  for (i = 0; i < length2; i++)
    finArr[i + length1] = arr2[i];
  printf("First array: \n{");
  for (i = 0; i < length1; i++)
    printf(" %d", arr1[i]);
  printf("}\n");
  printf("\nSecond array: \n{");
  for (i = 0; i < length2; i++)
    printf(" %d", arr2[i]);
  printf("}\n");
  printf("\nMerged array: \n{");
  for (i = 0; i < final_length; i++)
    printf(" %d", finArr[i]);
  printf("}\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf6b(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11c1 <main+0xa1>
mov    -0x40(%rbp),%rsi
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xf01(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118c <main+0x6c>
lea    0xe86(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    124c <main+0x12c>
mov    -0x48(%rbp),%rsi
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe76(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1217 <main+0xf7>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12ae <main+0x18e>
mov    -0x50(%rbp),%rax
mov    -0x40(%rbp),%rcx
movslq -0x8(%rbp),%rdx
mov    (%rcx,%rdx,4),%edx
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    127e <main+0x15e>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12ea <main+0x1ca>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq -0x8(%rbp),%rdx
mov    (%rcx,%rdx,4),%edx
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12b5 <main+0x195>
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1332 <main+0x212>
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12ff <main+0x1df>
lea    0xd79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1388 <main+0x268>
mov    -0x48(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1355 <main+0x235>
lea    0xd23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13de <main+0x2be>
mov    -0x50(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xce5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13ab <main+0x28b>
lea    0xccd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xea8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf49(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1060 <scanf@plt>
mov    %rsp,-0x48(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    -0x2c(%rbp),%esi
lea    0xe91(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    11cc <main+0x8c>
xor    %r14d,%r14d
lea    0xf03(%rip),%r15
mov    %r12,%rbx
nop
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
add    $0x1,%r14
movslq -0x2c(%rbp),%rax
add    $0x4,%rbx
cmp    %rax,%r14
jl     11b0 <main+0x70>
mov    %r12,-0x38(%rbp)
lea    0xe77(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x30(%rbp),%esi
mov    %rsp,%r15
lea    0xf(,%rsi,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
lea    0xe68(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x30(%rbp),%r14d
test   %r14d,%r14d
jle    124c <main+0x10c>
xor    %r13d,%r13d
lea    0xe88(%rip),%r12
mov    %r15,%rbx
nopw   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
add    $0x1,%r13
movslq -0x30(%rbp),%r14
add    $0x4,%rbx
cmp    %r14,%r13
jl     1230 <main+0xf0>
mov    -0x2c(%rbp),%ebx
lea    (%rbx,%r14,1),%eax
mov    %rax,-0x40(%rbp)
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
test   %ebx,%ebx
jle    1284 <main+0x144>
lea    0x0(,%rbx,4),%rdx
mov    %r12,%rdi
mov    -0x38(%rbp),%rsi
call   1050 <memcpy@plt>
test   %r14d,%r14d
jle    129f <main+0x15f>
movslq %ebx,%rax
lea    (%r12,%rax,4),%rdi
mov    %r14d,%edx
shl    $0x2,%rdx
mov    %r15,%rsi
call   1050 <memcpy@plt>
lea    0xdf8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,-0x2c(%rbp)
mov    -0x38(%rbp),%r13
jle    12dc <main+0x19c>
lea    0xdf0(%rip),%r14
xor    %ebx,%ebx
mov    0x0(%r13,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
movslq -0x2c(%rbp),%rax
cmp    %rax,%rbx
jl     12c0 <main+0x180>
lea    0xdf3(%rip),%rdi
call   1030 <puts@plt>
lea    0xdc3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,-0x30(%rbp)
jle    132b <main+0x1eb>
lea    0xdab(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
movslq -0x30(%rbp),%rax
cmp    %rax,%rbx
jl     1310 <main+0x1d0>
lea    0xda4(%rip),%rdi
call   1030 <puts@plt>
lea    0xd86(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x40(%rbp),%r15
test   %r15d,%r15d
jle    1377 <main+0x237>
lea    0xd59(%rip),%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r12,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1360 <main+0x220>
lea    0xd58(%rip),%rdi
call   1030 <puts@plt>
mov    -0x48(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [38 x i8] c"Enter the length of the first array: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [40 x i8] c"Enter %d elements of the first array: \0A\00"
@.str.3 = [39 x i8] c"Enter the length of the second array: \00"
@.str.4 = [41 x i8] c"Enter %d elements of the second array: \0A\00"
@.str.5 = [16 x i8] c"First array: \0A{\00"
@.str.6 = [4 x i8] c" %d\00"
@.str.8 = [18 x i8] c"\0ASecond array: \0A{\00"
@.str.9 = [18 x i8] c"\0AMerged array: \0A{\00"
@str.11 = [2 x i8] c"}\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
%10 = alloca i32, i64 %8
%11 = bitcast i32* %10 to i8*
%12 = load i32, i32* %1
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %1
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %24
16: ; preds = %0, %16
%17 = phi i64 [ %20, %16 ], [ 0, %0 ]
%18 = getelementptr inbounds i32, i32* %10, i64 %17
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %18)
%20 = add nuw nsw i64 %17, 1
%21 = load i32, i32* %1
%22 = sext i32 %21 to i64
%23 = icmp slt i64 %20, %22
br i1 %23, label %16, label %24
24: ; preds = %16, %0
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%27 = load i32, i32* %2
%28 = zext i32 %27 to i64
%29 = alloca i32, i64 %28
%30 = bitcast i32* %29 to i8*
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), i32 %27)
%32 = load i32, i32* %2
%33 = icmp sgt i32 %32, 0
br i1 %33, label %34, label %42
34: ; preds = %24, %34
%35 = phi i64 [ %38, %34 ], [ 0, %24 ]
%36 = getelementptr inbounds i32, i32* %29, i64 %35
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %36)
%38 = add nuw nsw i64 %35, 1
%39 = load i32, i32* %2
%40 = sext i32 %39 to i64
%41 = icmp slt i64 %38, %40
br i1 %41, label %34, label %42
42: ; preds = %34, %24
%43 = phi i32 [ %32, %24 ], [ %39, %34 ]
%44 = load i32, i32* %1
%45 = add i32 %44, %43
%46 = zext i32 %45 to i64
%47 = alloca i32, i64 %46
%48 = icmp sgt i32 %44, 0
br i1 %48, label %49, label %53
49: ; preds = %42
%50 = bitcast i32* %47 to i8*
%51 = zext i32 %44 to i64
%52 = shl nuw nsw i64 %51, 2
br label %53
53: ; preds = %49, %42
%54 = icmp sgt i32 %43, 0
br i1 %54, label %55, label %61
55: ; preds = %53
%56 = sext i32 %44 to i64
%57 = getelementptr i32, i32* %47, i64 %56
%58 = bitcast i32* %57 to i8*
%59 = zext i32 %43 to i64
%60 = shl nuw nsw i64 %59, 2
br label %61
61: ; preds = %55, %53
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%63 = load i32, i32* %1
%64 = icmp sgt i32 %63, 0
br i1 %64, label %65, label %74
65: ; preds = %61, %65
%66 = phi i64 [ %70, %65 ], [ 0, %61 ]
%67 = getelementptr inbounds i32, i32* %10, i64 %66
%68 = load i32, i32* %67
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %68)
%70 = add nuw nsw i64 %66, 1
%71 = load i32, i32* %1
%72 = sext i32 %71 to i64
%73 = icmp slt i64 %70, %72
br i1 %73, label %65, label %74
74: ; preds = %65, %61
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.11, i64 0, i64 0))
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
%77 = load i32, i32* %2
%78 = icmp sgt i32 %77, 0
br i1 %78, label %79, label %88
79: ; preds = %74, %79
%80 = phi i64 [ %84, %79 ], [ 0, %74 ]
%81 = getelementptr inbounds i32, i32* %29, i64 %80
%82 = load i32, i32* %81
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %82)
%84 = add nuw nsw i64 %80, 1
%85 = load i32, i32* %2
%86 = sext i32 %85 to i64
%87 = icmp slt i64 %84, %86
br i1 %87, label %79, label %88
88: ; preds = %79, %74
%89 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.11, i64 0, i64 0))
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%91 = icmp sgt i32 %45, 0
br i1 %91, label %92, label %99
92: ; preds = %88, %92
%93 = phi i64 [ %97, %92 ], [ 0, %88 ]
%94 = getelementptr inbounds i32, i32* %47, i64 %93
%95 = load i32, i32* %94
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %95)
%97 = add nuw nsw i64 %93, 1
%98 = icmp eq i64 %97, %46
br i1 %98, label %99, label %92
99: ; preds = %92, %88
%100 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.11, i64 0, i64 0))
ret i32 0
}