#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 atoi(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int seq[13] = {12, 16, 22, 30, 35, 39, 42, 45, 48, 50, 53, 55, 56};
  int *left = seq;
  int *right = seq + 13;
  int k = 4;
  int index = -1;
  int found = 0;
  int i;
  int number = atoi(argv[1]);
  for (i = 0; i < 13; i++) {
    printf("%d ", seq[i]);
    if (seq[i] == number) {
      index = i;
    }
  }
  printf("\nnumber: %d\n", number);
  left = seq + index - 1;
  right = seq + index + 1;
  while (found != k && right - left < 13) {
    if (left < seq) {
      printf(" %d ", *right++);
      found++;
      continue;
    }
    if (right >= seq + 13) {
      printf(" %d ", *left--);
      found++;
      continue;
    }
    if ((seq[index] - *left) < (*right - seq[index])) {
      printf(" %d ", *left--);
      found++;
    } else if ((seq[index] - *left) > (*right - seq[index])) {
      printf(" %d ", *right++);
      found++;
    } else {
      printf(" %d  %d", *left--, *right++);
      found += 2;
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeac(%rip),%rsi
mov    $0x34,%edx
call   1040 <memcpy@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    -0x50(%rbp),%rax
add    $0x34,%rax
mov    %rax,-0x60(%rbp)
movl   $0x4,-0x64(%rbp)
movl   $0xffffffff,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x74(%rbp)
movl   $0x0,-0x70(%rbp)
cmpl   $0xd,-0x70(%rbp)
jge    11e8 <main+0xb8>
movslq -0x70(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%esi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x70(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%eax
cmp    -0x74(%rbp),%eax
jne    11d5 <main+0xa5>
mov    -0x70(%rbp),%eax
mov    %eax,-0x68(%rbp)
jmp    11da <main+0xaa>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    119e <main+0x6e>
mov    -0x74(%rbp),%esi
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x50(%rbp),%rax
movslq -0x68(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x58(%rbp)
lea    -0x50(%rbp),%rax
movslq -0x68(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x4,%rax
mov    %rax,-0x60(%rbp)
mov    -0x6c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x64(%rbp),%ecx
mov    %al,-0x75(%rbp)
je     1251 <main+0x121>
mov    -0x60(%rbp),%rax
mov    -0x58(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
cmp    $0xd,%rax
setl   %al
mov    %al,-0x75(%rbp)
mov    -0x75(%rbp),%al
test   $0x1,%al
jne    1261 <main+0x131>
jmp    13c6 <main+0x296>
mov    -0x58(%rbp),%rax
lea    -0x50(%rbp),%rcx
cmp    %rcx,%rax
jae    129f <main+0x16f>
mov    -0x60(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x60(%rbp)
mov    (%rax),%esi
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1227 <main+0xf7>
mov    -0x60(%rbp),%rax
lea    -0x50(%rbp),%rcx
add    $0x34,%rcx
cmp    %rcx,%rax
jb     12e1 <main+0x1b1>
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x58(%rbp)
mov    (%rax),%esi
lea    0xd75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1227 <main+0xf7>
movslq -0x68(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%eax
mov    -0x58(%rbp),%rcx
sub    (%rcx),%eax
mov    -0x60(%rbp),%rcx
mov    (%rcx),%ecx
movslq -0x68(%rbp),%rdx
sub    -0x50(%rbp,%rdx,4),%ecx
cmp    %ecx,%eax
jge    1332 <main+0x202>
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x58(%rbp)
mov    (%rax),%esi
lea    0xd24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    13c1 <main+0x291>
movslq -0x68(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%eax
mov    -0x58(%rbp),%rcx
sub    (%rcx),%eax
mov    -0x60(%rbp),%rcx
mov    (%rcx),%ecx
movslq -0x68(%rbp),%rdx
sub    -0x50(%rbp,%rdx,4),%ecx
cmp    %ecx,%eax
jle    1383 <main+0x253>
mov    -0x60(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x60(%rbp)
mov    (%rax),%esi
lea    0xcd3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    13bc <main+0x28c>
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x58(%rbp)
mov    (%rax),%esi
mov    -0x60(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x60(%rbp)
mov    (%rax),%edx
lea    0xc9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x6c(%rbp)
jmp    13c1 <main+0x291>
jmp    1227 <main+0xf7>
lea    0xc72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    0xeec(%rip),%eax
mov    %eax,0x50(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
lea    0xec4(%rip),%r14
mov    %r14,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %ebp,%ebp
cmp    $0xc,%ebx
setne  %bpl
neg    %rbp
mov    %r14,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x16,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x1e,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x23,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x27,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x30,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x32,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x35,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x37,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x38,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xde0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x10,%ebx
mov    $0x1,%eax
cmovne %rbp,%rax
cmp    $0x16,%ebx
mov    $0x2,%ecx
cmovne %rax,%rcx
cmp    $0x1e,%ebx
mov    $0x3,%eax
cmovne %rcx,%rax
cmp    $0x23,%ebx
mov    $0x4,%ecx
cmovne %rax,%rcx
cmp    $0x27,%ebx
mov    $0x5,%eax
cmovne %rcx,%rax
cmp    $0x2a,%ebx
mov    $0x6,%ecx
cmovne %rax,%rcx
cmp    $0x2d,%ebx
mov    $0x7,%eax
cmovne %rcx,%rax
cmp    $0x30,%ebx
mov    $0x8,%ecx
cmovne %rax,%rcx
cmp    $0x32,%ebx
mov    $0x9,%eax
cmovne %rcx,%rax
cmp    $0x35,%ebx
mov    $0xa,%ecx
cmovne %rax,%rcx
cmp    $0x37,%ebx
mov    $0xb,%eax
cmovne %rcx,%rax
cmp    $0x38,%ebx
mov    $0xc,%ecx
cmovne %rax,%rcx
lea    0x20(%rsp,%rcx,4),%rax
mov    %rax,0x18(%rsp)
lea    0x1c(%rsp,%rcx,4),%rax
mov    %rax,0x8(%rsp)
lea    (%rsp,%rcx,4),%rbp
add    $0x24,%rbp
lea    0x20(%rsp),%r13
lea    0xd2c(%rip),%rbx
xor    %eax,%eax
mov    %rax,0x10(%rsp)
mov    %rbp,%r15
mov    0x8(%rsp),%r12
sub    %r12,%rbp
add    $0x4,%rbp
mov    0x10(%rsp),%rax
lea    0x1(%rax),%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    %r13,%r12
jb     1390 <main+0x260>
lea    0x54(%rsp),%rax
cmp    %rax,%r15
jb     13b0 <main+0x280>
mov    (%r12),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x4,%r14d
je     143f <main+0x30f>
add    $0xfffffffffffffffc,%r12
lea    0x4(%rbp),%rax
add    $0x1,%r14d
cmp    $0x34,%rbp
mov    %rax,%rbp
jl     1340 <main+0x210>
jmp    143f <main+0x30f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15),%esi
add    $0x4,%r15
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14d,%eax
mov    %r12,0x8(%rsp)
jmp    1420 <main+0x2f0>
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rax
mov    (%rax),%eax
mov    0x8(%rsp),%rdi
mov    (%rdi),%esi
mov    (%r15),%edx
mov    %edx,%ecx
sub    %eax,%ecx
sub    %esi,%eax
cmp    %ecx,%eax
jge    13d9 <main+0x2a9>
add    $0xfffffffffffffffc,%rdi
mov    %rdi,0x8(%rsp)
mov    %rbx,%rdi
jmp    13e4 <main+0x2b4>
jle    13f5 <main+0x2c5>
add    $0x4,%r15
mov    %rbx,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%rax
add    $0x1,%eax
jmp    1420 <main+0x2f0>
add    $0xfffffffffffffffc,%rdi
mov    %rdi,0x8(%rsp)
add    $0x4,%r15
lea    0xc3d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%rax
add    $0x2,%eax
nopl   0x0(%rax,%rax,1)
mov    %rax,0x10(%rsp)
cmp    $0x4,%eax
je     143f <main+0x30f>
mov    %r15,%rax
sub    0x8(%rsp),%rax
mov    %r15,%rbp
cmp    $0x34,%rax
jl     131f <main+0x1ef>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@__const.main.seq = [13 x i32] [i32 12, i32 16, i32 22, i32 30, i32 35, i32 39, i32 42, i32 45, i32 48, i32 50, i32 53, i32 55, i32 56]
@.str = [4 x i8] c"%d \00"
@.str.1 = [13 x i8] c"\0Anumber: %d\0A\00"
@.str.2 = [5 x i8] c" %d \00"
@.str.3 = [8 x i8] c" %d %d\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [13 x i32]
%4 = bitcast [13 x i32]* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = getelementptr inbounds [13 x i32], [13 x i32]* %3, i64 0, i64 0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 12)
%10 = icmp ne i32 %7, 12
%11 = sext i1 %10 to i64
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 16)
%13 = icmp eq i32 %7, 16
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 22)
%15 = icmp eq i32 %7, 22
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 30)
%17 = icmp eq i32 %7, 30
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 35)
%19 = icmp eq i32 %7, 35
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 39)
%21 = icmp eq i32 %7, 39
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 42)
%23 = icmp eq i32 %7, 42
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 45)
%25 = icmp eq i32 %7, 45
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 48)
%27 = icmp eq i32 %7, 48
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 50)
%29 = icmp eq i32 %7, 50
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 53)
%31 = icmp eq i32 %7, 53
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 55)
%33 = icmp eq i32 %7, 55
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 56)
%35 = icmp eq i32 %7, 56
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%37 = select i1 %13, i64 1, i64 %11
%38 = select i1 %15, i64 2, i64 %37
%39 = select i1 %17, i64 3, i64 %38
%40 = select i1 %19, i64 4, i64 %39
%41 = select i1 %21, i64 5, i64 %40
%42 = select i1 %23, i64 6, i64 %41
%43 = select i1 %25, i64 7, i64 %42
%44 = select i1 %27, i64 8, i64 %43
%45 = select i1 %29, i64 9, i64 %44
%46 = select i1 %31, i64 10, i64 %45
%47 = select i1 %33, i64 11, i64 %46
%48 = select i1 %35, i64 12, i64 %47
%49 = getelementptr inbounds [13 x i32], [13 x i32]* %3, i64 0, i64 %48
%50 = getelementptr inbounds i32, i32* %49, i64 -1
%51 = getelementptr inbounds i32, i32* %49, i64 1
%52 = ptrtoint i32* %51 to i64
%53 = getelementptr inbounds [13 x i32], [13 x i32]* %3, i64 0, i64 13
br label %54
54: ; preds = %2, %69
%55 = phi i64 [ %52, %2 ], [ %73, %69 ]
%56 = phi i32* [ %50, %2 ], [ %72, %69 ]
%57 = phi i32 [ 0, %2 ], [ %71, %69 ]
%58 = phi i32* [ %51, %2 ], [ %70, %69 ]
%59 = icmp ult i32* %58, %53
br label %60
60: ; preds = %54, %80
%61 = phi i32* [ %56, %54 ], [ %81, %80 ]
%62 = phi i32 [ %57, %54 ], [ %84, %80 ]
%63 = icmp ult i32* %61, %8
br i1 %63, label %64, label %79
64: ; preds = %60
%65 = getelementptr inbounds i32, i32* %58, i64 1
%66 = load i32, i32* %58
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %66)
%68 = add nsw i32 %62, 1
br label %69
69: ; preds = %97, %107, %103, %64
%70 = phi i32* [ %65, %64 ], [ %58, %97 ], [ %104, %103 ], [ %109, %107 ]
%71 = phi i32 [ %68, %64 ], [ %100, %97 ], [ %106, %103 ], [ %111, %107 ]
%72 = phi i32* [ %61, %64 ], [ %98, %97 ], [ %56, %103 ], [ %108, %107 ]
%73 = ptrtoint i32* %70 to i64
%74 = icmp ne i32 %71, 4
%75 = ptrtoint i32* %72 to i64
%76 = sub i64 %73, %75
%77 = icmp slt i64 %76, 52
%78 = select i1 %74, i1 %77, i1 false
br i1 %78, label %54, label %112
79: ; preds = %60
br i1 %59, label %90, label %80
80: ; preds = %79
%81 = getelementptr inbounds i32, i32* %61, i64 -1
%82 = load i32, i32* %61
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %82)
%84 = add nsw i32 %62, 1
%85 = icmp ne i32 %84, 4
%86 = ptrtoint i32* %81 to i64
%87 = sub i64 %55, %86
%88 = icmp slt i64 %87, 52
%89 = select i1 %85, i1 %88, i1 false
br i1 %89, label %60, label %112
90: ; preds = %79
%91 = load i32, i32* %49
%92 = load i32, i32* %56
%93 = sub nsw i32 %91, %92
%94 = load i32, i32* %58
%95 = sub nsw i32 %94, %91
%96 = icmp slt i32 %93, %95
br i1 %96, label %97, label %101
97: ; preds = %90
%98 = getelementptr inbounds i32, i32* %56, i64 -1
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %92)
%100 = add nsw i32 %57, 1
br label %69
101: ; preds = %90
%102 = icmp sgt i32 %93, %95
br i1 %102, label %103, label %107
103: ; preds = %101
%104 = getelementptr inbounds i32, i32* %58, i64 1
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %94)
%106 = add nsw i32 %57, 1
br label %69
107: ; preds = %101
%108 = getelementptr inbounds i32, i32* %56, i64 -1
%109 = getelementptr inbounds i32, i32* %58, i64 1
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %92, i32 %94)
%111 = add nsw i32 %57, 2
br label %69
112: ; preds = %69, %80
%113 = call i32 @putchar(i32 10)
ret i32 0
}