#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 /*<<< orphan*/ sort(int *, int);
int main() {
  int i, j, k, l, m, n, a, b;
  int ch1[100], ch2[100], ch3[200];
  printf("Imput first array item:");
  scanf("%d", &n);
  printf("Imput array number:\n");
  for (i = 0; i < n; i++)
    scanf("%d", &ch1[i]);
  sort(ch1, n);
  printf("sort 1st array:");
  for (i = 0; i < n; i++)
    printf("%d ", ch1[i]);
  printf("\nImput 2nd array item:");
  scanf("%d", &m);
  printf("Imput array number:\n");
  for (i = 0; i < m; i++)
    scanf("%d", &ch2[i]);
  sort(ch2, m);
  printf("sort 2nd array:");
  for (i = 0; i < m; i++)
    printf("%d ", ch2[i]);
  for (i = 0, j = 0, k = 0; i < m + n; k++) {
    if (ch1[i] >= ch2[j]) {
      ch3[k] = ch2[j];
      j++;
    } else if (ch1[i] < ch2[j]) {
      ch3[k] = ch1[i];
      i++;
    }
  }
  printf("\nNew array:");
  for (i = 0; i < m + n; i++)
    printf("%d ", ch3[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x670,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11ad <main+0x7d>
movslq -0x8(%rbp),%rax
lea    -0x1c0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe7e(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1175 <main+0x45>
lea    -0x1c0(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <sort@plt>
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1204 <main+0xd4>
movslq -0x8(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d1 <main+0xa1>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdff(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    126f <main+0x13f>
movslq -0x8(%rbp),%rax
lea    -0x350(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xdbc(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1237 <main+0x107>
lea    -0x350(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1040 <sort@plt>
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12c6 <main+0x196>
movslq -0x8(%rbp),%rax
mov    -0x350(%rbp,%rax,4),%esi
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1293 <main+0x163>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jge    137f <main+0x24f>
movslq -0x8(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%eax
movslq -0xc(%rbp),%rcx
cmp    -0x350(%rbp,%rcx,4),%eax
jl     132c <main+0x1fc>
movslq -0xc(%rbp),%rax
mov    -0x350(%rbp,%rax,4),%ecx
movslq -0x10(%rbp),%rax
mov    %ecx,-0x670(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    136c <main+0x23c>
movslq -0x8(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%eax
movslq -0xc(%rbp),%rcx
cmp    -0x350(%rbp,%rcx,4),%eax
jge    1367 <main+0x237>
movslq -0x8(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%ecx
movslq -0x10(%rbp),%rax
mov    %ecx,-0x670(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    136c <main+0x23c>
jmp    1371 <main+0x241>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12db <main+0x1ab>
lea    0xce5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jge    13cc <main+0x29c>
movslq -0x8(%rbp),%rax
mov    -0x670(%rbp,%rax,4),%esi
lea    0xc89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1394 <main+0x264>
xor    %eax,%eax
add    $0x670,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x650,%rsp
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%esi
test   %esi,%esi
jle    11ad <main+0x6d>
lea    0x1a0(%rsp),%r15
xor    %ebx,%ebx
lea    0xe88(%rip),%r14
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rsi
add    $0x4,%r15
cmp    %rsi,%rbx
jl     1190 <main+0x50>
lea    0x1a0(%rsp),%rdi
call   1050 <sort@plt>
lea    0xe5a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,0x8(%rsp)
jle    11ff <main+0xbf>
lea    0xe55(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x1a0(%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rax
cmp    %rax,%rbx
jl     11e0 <main+0xa0>
lea    0xe29(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe04(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xe3d(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%esi
test   %esi,%esi
jle    125d <main+0x11d>
lea    0x10(%rsp),%r15
xor    %ebx,%ebx
lea    0xdd8(%rip),%r14
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rsi
add    $0x4,%r15
cmp    %rsi,%rbx
jl     1240 <main+0x100>
lea    0x10(%rsp),%rdi
call   1050 <sort@plt>
lea    0xdd8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%r8d
test   %r8d,%r8d
jle    12ac <main+0x16c>
lea    0xda5(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%r8
cmp    %r8,%rbx
jl     1290 <main+0x150>
add    0x8(%rsp),%r8d
jle    12f1 <main+0x1b1>
xor    %ecx,%ecx
lea    0x330(%rsp),%rdx
xor    %esi,%esi
nop
mov    %ecx,%edi
mov    0x1a0(%rsp,%rdi,4),%r9d
mov    %esi,%ebx
mov    0x10(%rsp,%rbx,4),%ebx
xor    %eax,%eax
xor    %edi,%edi
cmp    %ebx,%r9d
setl   %al
setge  %dil
cmovl  %r9d,%ebx
add    %edi,%esi
add    %eax,%ecx
mov    %ebx,(%rdx)
add    $0x4,%rdx
cmp    %r8d,%ecx
jl     12c0 <main+0x180>
lea    0xd5e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%eax
add    0xc(%rsp),%eax
jle    1347 <main+0x207>
lea    0xd1b(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x330(%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
movslq 0x8(%rsp),%rcx
add    %rax,%rcx
cmp    %rcx,%rbx
jl     1320 <main+0x1e0>
xor    %eax,%eax
add    $0x650,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"Imput first array item:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [16 x i8] c"sort 1st array:\00"
@.str.4 = [4 x i8] c"%d \00"
@.str.5 = [23 x i8] c"\0AImput 2nd array item:\00"
@.str.6 = [16 x i8] c"sort 2nd array:\00"
@.str.7 = [12 x i8] c"\0ANew array:\00"
@str.8 = [20 x i8] c"Imput array number:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i32]
%4 = alloca [100 x i32]
%5 = alloca [200 x i32]
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast [100 x i32]* %3 to i8*
%9 = bitcast [100 x i32]* %4 to i8*
%10 = bitcast [200 x i32]* %5 to i8*
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.8, i64 0, i64 0))
%14 = load i32, i32* %2
%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 [100 x i32], [100 x i32]* %3, i64 0, 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* %2
%22 = sext i32 %21 to i64
%23 = icmp slt i64 %20, %22
br i1 %23, label %16, label %24
24: ; preds = %16, %0
%25 = phi i32 [ %14, %0 ], [ %21, %16 ]
%26 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%27 = call i32 @sort(i32* %26, i32 %25)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%29 = load i32, i32* %2
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %40
31: ; preds = %24, %31
%32 = phi i64 [ %36, %31 ], [ 0, %24 ]
%33 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %34)
%36 = add nuw nsw i64 %32, 1
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = icmp slt i64 %36, %38
br i1 %39, label %31, label %40
40: ; preds = %31, %24
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%42 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.8, i64 0, i64 0))
%44 = load i32, i32* %1
%45 = icmp sgt i32 %44, 0
br i1 %45, label %46, label %54
46: ; preds = %40, %46
%47 = phi i64 [ %50, %46 ], [ 0, %40 ]
%48 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %47
%49 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %48)
%50 = add nuw nsw i64 %47, 1
%51 = load i32, i32* %1
%52 = sext i32 %51 to i64
%53 = icmp slt i64 %50, %52
br i1 %53, label %46, label %54
54: ; preds = %46, %40
%55 = phi i32 [ %44, %40 ], [ %51, %46 ]
%56 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%57 = call i32 @sort(i32* %56, i32 %55)
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%59 = load i32, i32* %1
%60 = icmp sgt i32 %59, 0
br i1 %60, label %66, label %61
61: ; preds = %66, %54
%62 = phi i32 [ %59, %54 ], [ %72, %66 ]
%63 = load i32, i32* %2
%64 = add nsw i32 %63, %62
%65 = icmp sgt i32 %64, 0
br i1 %65, label %75, label %95
66: ; preds = %54, %66
%67 = phi i64 [ %71, %66 ], [ 0, %54 ]
%68 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %67
%69 = load i32, i32* %68
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %69)
%71 = add nuw nsw i64 %67, 1
%72 = load i32, i32* %1
%73 = sext i32 %72 to i64
%74 = icmp slt i64 %71, %73
br i1 %74, label %66, label %61
75: ; preds = %61, %75
%76 = phi i64 [ %93, %75 ], [ 0, %61 ]
%77 = phi i32 [ %91, %75 ], [ 0, %61 ]
%78 = phi i32 [ %89, %75 ], [ 0, %61 ]
%79 = zext i32 %77 to i64
%80 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %79
%81 = load i32, i32* %80
%82 = zext i32 %78 to i64
%83 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = icmp slt i32 %81, %84
%86 = select i1 %85, i32 %81, i32 %84
%87 = xor i1 %85, true
%88 = zext i1 %87 to i32
%89 = add nuw nsw i32 %78, %88
%90 = zext i1 %85 to i32
%91 = add nuw nsw i32 %77, %90
%92 = getelementptr inbounds [200 x i32], [200 x i32]* %5, i64 0, i64 %76
store i32 %86, i32* %92
%93 = add nuw i64 %76, 1
%94 = icmp slt i32 %91, %64
br i1 %94, label %75, label %95
95: ; preds = %75, %61
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%97 = load i32, i32* %1
%98 = load i32, i32* %2
%99 = add nsw i32 %98, %97
%100 = icmp sgt i32 %99, 0
br i1 %100, label %101, label %112
101: ; preds = %95, %101
%102 = phi i64 [ %106, %101 ], [ 0, %95 ]
%103 = getelementptr inbounds [200 x i32], [200 x i32]* %5, i64 0, i64 %102
%104 = load i32, i32* %103
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %104)
%106 = add nuw nsw i64 %102, 1
%107 = load i32, i32* %1
%108 = load i32, i32* %2
%109 = add nsw i32 %108, %107
%110 = sext i32 %109 to i64
%111 = icmp slt i64 %106, %110
br i1 %111, label %101, label %112
112: ; preds = %101, %95
ret i32 0
}