#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; i < n, j < m;) {
    if (i != n) {
      ch3[i] = ch1[i];
      i++;
    } else {
      ch3[i + j] = ch2[j];
      j++;
    }
  }
  sort(ch3, n + m);
  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)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1338 <main+0x208>
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     1310 <main+0x1e0>
movslq -0x8(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x670(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1333 <main+0x203>
movslq -0xc(%rbp),%rax
mov    -0x350(%rbp,%rax,4),%ecx
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cltq
mov    %ecx,-0x670(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12d4 <main+0x1a4>
lea    -0x670(%rbp),%rdi
mov    -0x1c(%rbp),%esi
add    -0x18(%rbp),%esi
call   1040 <sort@plt>
lea    0xd1a(%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    1397 <main+0x267>
movslq -0x8(%rbp),%rax
mov    -0x670(%rbp,%rax,4),%esi
lea    0xcbe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    135f <main+0x22f>
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),%eax
test   %eax,%eax
jle    12fb <main+0x1bb>
lea    0xda7(%rip),%r14
xor    %ebx,%ebx
cs nopw 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),%rax
cmp    %rax,%rbx
jl     1290 <main+0x150>
mov    0x8(%rsp),%esi
test   %eax,%eax
jle    12ff <main+0x1bf>
xor    %edx,%edx
xor    %ecx,%ecx
jmp    12dd <main+0x19d>
nopw   0x0(%rax,%rax,1)
movslq %ecx,%rcx
mov    0x10(%rsp,%rcx,4),%edx
lea    (%rsi,%rcx,1),%edi
movslq %edi,%rdi
mov    %edx,0x330(%rsp,%rdi,4)
add    $0x1,%ecx
mov    %esi,%edx
cmp    %eax,%ecx
jge    12ff <main+0x1bf>
cmp    %esi,%edx
je     12c0 <main+0x180>
movslq %edx,%rdi
mov    0x1a0(%rsp,%rdi,4),%ebx
mov    %ebx,0x330(%rsp,%rdi,4)
add    $0x1,%edx
cmp    %eax,%ecx
jl     12dd <main+0x19d>
jmp    12ff <main+0x1bf>
mov    0x8(%rsp),%esi
add    %eax,%esi
lea    0x330(%rsp),%rdi
call   1050 <sort@plt>
lea    0xd41(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%eax
add    0xc(%rsp),%eax
jle    1357 <main+0x217>
lea    0xcfe(%rip),%r14
xor    %ebx,%ebx
nop
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     1330 <main+0x1f0>
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
br label %81
81: ; preds = %115, %80
%82 = load i32, i32* %2
%83 = load i32, i32* %7
%84 = icmp slt i32 %82, %83
%85 = zext i1 %84 to i32
%86 = load i32, i32* %3
%87 = load i32, i32* %6
%88 = icmp slt i32 %86, %87
br i1 %88, label %89, label %116
89: ; preds = %81
%90 = load i32, i32* %2
%91 = load i32, i32* %7
%92 = icmp ne i32 %90, %91
br i1 %92, label %93, label %103
93: ; preds = %89
%94 = load i32, i32* %2
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [100 x i32], [100 x i32]* %10, i64 0, i64 %95
%97 = load i32, i32* %96
%98 = load i32, i32* %2
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [200 x i32], [200 x i32]* %12, i64 0, i64 %99
store i32 %97, i32* %100
%101 = load i32, i32* %2
%102 = add nsw i32 %101, 1
store i32 %102, i32* %2
br label %115
103: ; preds = %89
%104 = load i32, i32* %3
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [100 x i32], [100 x i32]* %11, i64 0, i64 %105
%107 = load i32, i32* %106
%108 = load i32, i32* %2
%109 = load i32, i32* %3
%110 = add nsw i32 %108, %109
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [200 x i32], [200 x i32]* %12, i64 0, i64 %111
store i32 %107, i32* %112
%113 = load i32, i32* %3
%114 = add nsw i32 %113, 1
store i32 %114, i32* %3
br label %115
115: ; preds = %103, %93
br label %81
116: ; preds = %81
%117 = getelementptr inbounds [200 x i32], [200 x i32]* %12, i64 0, i64 0
%118 = load i32, i32* %7
%119 = load i32, i32* %6
%120 = add nsw i32 %118, %119
%121 = call i32 @sort(i32* %117, i32 %120)
%122 = 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 %123
123: ; preds = %135, %116
%124 = load i32, i32* %2
%125 = load i32, i32* %6
%126 = load i32, i32* %7
%127 = add nsw i32 %125, %126
%128 = icmp slt i32 %124, %127
br i1 %128, label %129, label %138
129: ; preds = %123
%130 = load i32, i32* %2
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [200 x i32], [200 x i32]* %12, i64 0, i64 %131
%133 = load i32, i32* %132
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %133)
br label %135
135: ; preds = %129
%136 = load i32, i32* %2
%137 = add nsw i32 %136, 1
store i32 %137, i32* %2
br label %123
138: ; preds = %123
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 = %54
%62 = load i32, i32* %2
br label %97
63: ; preds = %66
%64 = load i32, i32* %2
%65 = icmp sgt i32 %72, 0
br i1 %65, label %75, label %97
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 %63
75: ; preds = %63, %93
%76 = phi i32 [ %95, %93 ], [ 0, %63 ]
%77 = phi i32 [ %94, %93 ], [ 0, %63 ]
%78 = icmp eq i32 %76, %64
br i1 %78, label %85, label %79
79: ; preds = %75
%80 = sext i32 %76 to i64
%81 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %80
%82 = load i32, i32* %81
%83 = getelementptr inbounds [200 x i32], [200 x i32]* %5, i64 0, i64 %80
store i32 %82, i32* %83
%84 = add nsw i32 %76, 1
br label %93
85: ; preds = %75
%86 = sext i32 %77 to i64
%87 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %86
%88 = load i32, i32* %87
%89 = add nsw i32 %64, %77
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [200 x i32], [200 x i32]* %5, i64 0, i64 %90
store i32 %88, i32* %91
%92 = add nsw i32 %77, 1
br label %93
93: ; preds = %85, %79
%94 = phi i32 [ %77, %79 ], [ %92, %85 ]
%95 = phi i32 [ %84, %79 ], [ %64, %85 ]
%96 = icmp slt i32 %94, %72
br i1 %96, label %75, label %97
97: ; preds = %93, %61, %63
%98 = phi i32 [ %62, %61 ], [ %64, %63 ], [ %64, %93 ]
%99 = phi i32 [ %59, %61 ], [ %72, %63 ], [ %72, %93 ]
%100 = getelementptr inbounds [200 x i32], [200 x i32]* %5, i64 0, i64 0
%101 = add nsw i32 %98, %99
%102 = call i32 @sort(i32* %100, i32 %101)
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%104 = load i32, i32* %1
%105 = load i32, i32* %2
%106 = add nsw i32 %105, %104
%107 = icmp sgt i32 %106, 0
br i1 %107, label %108, label %119
108: ; preds = %97, %108
%109 = phi i64 [ %113, %108 ], [ 0, %97 ]
%110 = getelementptr inbounds [200 x i32], [200 x i32]* %5, i64 0, i64 %109
%111 = load i32, i32* %110
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %111)
%113 = add nuw nsw i64 %109, 1
%114 = load i32, i32* %1
%115 = load i32, i32* %2
%116 = add nsw i32 %115, %114
%117 = sext i32 %116 to i64
%118 = icmp slt i64 %113, %117
br i1 %118, label %108, label %119
119: ; preds = %108, %97
ret i32 0
}