#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int read_adc(int /*<<< orphan*/);
int /*<<< orphan*/ restore_io();
int /*<<< orphan*/ setup_gpio();
int /*<<< orphan*/ setup_io();
int /*<<< orphan*/ setup_spi();
int /*<<< orphan*/ short_wait();
int /*<<< orphan*/ write_dac(int, int);
void main(void) {
  int d, dac_val, v, s, i;
  printf("These are the connections for the digital to analogue to digital "
         "test:\n");
  printf("jumper connecting GP11 to SCLK\n");
  printf("jumper connecting GP10 to MOSI\n");
  printf("jumper connecting GP9 to MISO\n");
  printf("jumper connecting GP8 to CSnA\n");
  printf("jumper connecting GP7 to CSnB\n");
  printf("jumper connecting DA1 on J29 to AD0 on J28\n");
  printf("When ready hit enter.\n");
  (void)getchar();
  setup_io();
  setup_gpio();
  setup_spi();
  printf("dig ana\n");
  for (d = 0; d <= 256; d += 32) {
    if (d == 256)
      dac_val = 255 * 16;
    else
      dac_val = d * 16;
    write_dac(1, dac_val);
    v = read_adc(0);
    s = v >> 4;
    printf("%3x %04d ", dac_val, v);
    for (i = 0; i < s; i++)
      putchar('#');
    for (i = 0; i < 64 - s; i++)
      putchar(' ');
    putchar('\n');
    short_wait();
  }
  for (d = 224; d >= 0; d -= 32) {
    dac_val = d * 16;
    write_dac(1, dac_val);
    v = read_adc(0);
    s = v >> 4;
    printf("%3x %04d ", dac_val, v);
    for (i = 0; i < s; i++)
      putchar('#');
    for (i = 0; i < 64 - s; i++)
      putchar(' ');
    putchar('\n');
    short_wait();
  }
  printf("\n");
  restore_io();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <getchar@plt>
mov    $0x0,%al
call   10b0 <setup_io@plt>
mov    $0x0,%al
call   1030 <setup_gpio@plt>
mov    $0x0,%al
call   1090 <setup_spi@plt>
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jg     1328 <main+0x188>
cmpl   $0x100,-0x4(%rbp)
jne    126f <main+0xcf>
movl   $0xff0,-0x8(%rbp)
jmp    1278 <main+0xd8>
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x1,%edi
call   1060 <write_dac@plt>
xor    %edi,%edi
call   10a0 <read_adc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12d7 <main+0x137>
mov    $0x23,%edi
call   1040 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12b3 <main+0x113>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x40,%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    1309 <main+0x169>
mov    $0x20,%edi
call   1040 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12de <main+0x13e>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    $0x0,%al
call   1070 <short_wait@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1249 <main+0xa9>
movl   $0xe0,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     13f2 <main+0x252>
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x1,%edi
call   1060 <write_dac@plt>
xor    %edi,%edi
call   10a0 <read_adc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xdc2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    13a1 <main+0x201>
mov    $0x23,%edi
call   1040 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    137d <main+0x1dd>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x40,%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    13d3 <main+0x233>
mov    $0x20,%edi
call   1040 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13a8 <main+0x208>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    $0x0,%al
call   1070 <short_wait@plt>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    132f <main+0x18f>
lea    0xd2d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10c0 <restore_io@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe48(%rip),%rdi
call   1050 <puts@plt>
lea    0xe83(%rip),%rdi
call   1050 <puts@plt>
lea    0xe96(%rip),%rdi
call   1050 <puts@plt>
lea    0xea9(%rip),%rdi
call   1050 <puts@plt>
lea    0xebb(%rip),%rdi
call   1050 <puts@plt>
lea    0xecd(%rip),%rdi
call   1050 <puts@plt>
lea    0xedf(%rip),%rdi
call   1050 <puts@plt>
lea    0xefe(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1090 <getchar@plt>
xor    %eax,%eax
call   10c0 <setup_io@plt>
xor    %eax,%eax
call   1030 <setup_gpio@plt>
xor    %eax,%eax
call   10a0 <setup_spi@plt>
lea    0xeec(%rip),%rdi
call   1050 <puts@plt>
mov    $0xff0,%r15d
lea    0xdb0(%rip),%r14
xor    %r13d,%r13d
jmp    1285 <main+0xd5>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
call   1080 <short_wait@plt>
lea    0x20(%r13),%eax
cmp    $0xe1,%r13d
mov    %eax,%r13d
jae    1324 <main+0x174>
mov    %r13d,%ebx
shl    $0x4,%ebx
cmp    $0x100,%r13d
cmove  %r15d,%ebx
mov    $0x1,%edi
mov    %ebx,%esi
call   1070 <write_dac@plt>
xor    %edi,%edi
call   10b0 <read_adc@plt>
mov    %eax,%ebp
mov    %eax,%r12d
sar    $0x4,%r12d
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0x10,%ebp
jl     12fb <main+0x14b>
cmp    $0x2,%r12d
mov    $0x1,%ebx
cmovge %r12d,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x23,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    12e0 <main+0x130>
cmp    $0x3ff,%ebp
jg     1260 <main+0xb0>
mov    $0x40,%ebx
sub    %r12d,%ebx
cmp    $0x2,%ebx
mov    $0x1,%eax
cmovl  %eax,%ebx
xchg   %ax,%ax
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    1310 <main+0x160>
jmp    1260 <main+0xb0>
mov    $0xe0,%r12d
mov    $0x1,%r15d
lea    0xcc9(%rip),%r14
jmp    1362 <main+0x1b2>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
call   1080 <short_wait@plt>
lea    -0x20(%r12),%eax
test   %r12d,%r12d
mov    %eax,%r12d
je     13f4 <main+0x244>
mov    %r12d,%ebx
shl    $0x4,%ebx
mov    $0x1,%edi
mov    %ebx,%esi
call   1070 <write_dac@plt>
xor    %edi,%edi
call   10b0 <read_adc@plt>
mov    %eax,%ebp
mov    %eax,%r13d
sar    $0x4,%r13d
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0x10,%ebp
jl     13cb <main+0x21b>
cmp    $0x2,%r13d
mov    $0x1,%ebx
cmovge %r13d,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x23,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    13b0 <main+0x200>
cmp    $0x3ff,%ebp
jg     1340 <main+0x190>
mov    $0x40,%ebx
sub    %r13d,%ebx
cmp    $0x2,%ebx
cmovl  %r15d,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    13e0 <main+0x230>
jmp    1340 <main+0x190>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10d0 <restore_io@plt>

LLVM IR (-O0):
@.str = [72 x i8] c"These are the connections for the digital to analogue to digital test:\0A\00"
@.str.1 = [32 x i8] c"jumper connecting GP11 to SCLK\0A\00"
@.str.2 = [32 x i8] c"jumper connecting GP10 to MOSI\0A\00"
@.str.3 = [31 x i8] c"jumper connecting GP9 to MISO\0A\00"
@.str.4 = [31 x i8] c"jumper connecting GP8 to CSnA\0A\00"
@.str.5 = [31 x i8] c"jumper connecting GP7 to CSnB\0A\00"
@.str.6 = [44 x i8] c"jumper connecting DA1 on J29 to AD0 on J28\0A\00"
@.str.7 = [23 x i8] c"When ready hit enter.\0A\00"
@.str.8 = [9 x i8] c"dig ana\0A\00"
@.str.9 = [10 x i8] c"%3x %04d \00"
@.str.10 = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%14 = call i32 (...) @getchar()
%15 = call i32 (...) @setup_io()
%16 = call i32 (...) @setup_gpio()
%17 = call i32 (...) @setup_spi()
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %1
br label %19
19: ; preds = %61, %0
%20 = load i32, i32* %1
%21 = icmp sle i32 %20, 256
br i1 %21, label %22, label %64
22: ; preds = %19
%23 = load i32, i32* %1
%24 = icmp eq i32 %23, 256
br i1 %24, label %25, label %26
25: ; preds = %22
store i32 4080, i32* %2
br label %29
26: ; preds = %22
%27 = load i32, i32* %1
%28 = mul nsw i32 %27, 16
store i32 %28, i32* %2
br label %29
29: ; preds = %26, %25
%30 = load i32, i32* %2
%31 = call i32 @write_dac(i32 1, i32 %30)
%32 = call i32 @read_adc(i32 0)
store i32 %32, i32* %3
%33 = load i32, i32* %3
%34 = ashr i32 %33, 4
store i32 %34, i32* %4
%35 = load i32, i32* %2
%36 = load i32, i32* %3
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %35, i32 %36)
store i32 0, i32* %5
br label %38
38: ; preds = %44, %29
%39 = load i32, i32* %5
%40 = load i32, i32* %4
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %47
42: ; preds = %38
%43 = call i32 @putchar(i8 signext 35)
br label %44
44: ; preds = %42
%45 = load i32, i32* %5
%46 = add nsw i32 %45, 1
store i32 %46, i32* %5
br label %38
47: ; preds = %38
store i32 0, i32* %5
br label %48
48: ; preds = %55, %47
%49 = load i32, i32* %5
%50 = load i32, i32* %4
%51 = sub nsw i32 64, %50
%52 = icmp slt i32 %49, %51
br i1 %52, label %53, label %58
53: ; preds = %48
%54 = call i32 @putchar(i8 signext 32)
br label %55
55: ; preds = %53
%56 = load i32, i32* %5
%57 = add nsw i32 %56, 1
store i32 %57, i32* %5
br label %48
58: ; preds = %48
%59 = call i32 @putchar(i8 signext 10)
%60 = call i32 (...) @short_wait()
br label %61
61: ; preds = %58
%62 = load i32, i32* %1
%63 = add nsw i32 %62, 32
store i32 %63, i32* %1
br label %19
64: ; preds = %19
store i32 224, i32* %1
br label %65
65: ; preds = %102, %64
%66 = load i32, i32* %1
%67 = icmp sge i32 %66, 0
br i1 %67, label %68, label %105
68: ; preds = %65
%69 = load i32, i32* %1
%70 = mul nsw i32 %69, 16
store i32 %70, i32* %2
%71 = load i32, i32* %2
%72 = call i32 @write_dac(i32 1, i32 %71)
%73 = call i32 @read_adc(i32 0)
store i32 %73, i32* %3
%74 = load i32, i32* %3
%75 = ashr i32 %74, 4
store i32 %75, i32* %4
%76 = load i32, i32* %2
%77 = load i32, i32* %3
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %76, i32 %77)
store i32 0, i32* %5
br label %79
79: ; preds = %85, %68
%80 = load i32, i32* %5
%81 = load i32, i32* %4
%82 = icmp slt i32 %80, %81
br i1 %82, label %83, label %88
83: ; preds = %79
%84 = call i32 @putchar(i8 signext 35)
br label %85
85: ; preds = %83
%86 = load i32, i32* %5
%87 = add nsw i32 %86, 1
store i32 %87, i32* %5
br label %79
88: ; preds = %79
store i32 0, i32* %5
br label %89
89: ; preds = %96, %88
%90 = load i32, i32* %5
%91 = load i32, i32* %4
%92 = sub nsw i32 64, %91
%93 = icmp slt i32 %90, %92
br i1 %93, label %94, label %99
94: ; preds = %89
%95 = call i32 @putchar(i8 signext 32)
br label %96
96: ; preds = %94
%97 = load i32, i32* %5
%98 = add nsw i32 %97, 1
store i32 %98, i32* %5
br label %89
99: ; preds = %89
%100 = call i32 @putchar(i8 signext 10)
%101 = call i32 (...) @short_wait()
br label %102
102: ; preds = %99
%103 = load i32, i32* %1
%104 = sub nsw i32 %103, 32
store i32 %104, i32* %1
br label %65
105: ; preds = %65
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%107 = call i32 (...) @restore_io()
ret void
}

LLVM IR (-O2):
@.str.9 = [10 x i8] c"%3x %04d \00"
@str = [71 x i8] c"These are the connections for the digital to analogue to digital test:\00"
@str.11 = [31 x i8] c"jumper connecting GP11 to SCLK\00"
@str.12 = [31 x i8] c"jumper connecting GP10 to MOSI\00"
@str.13 = [30 x i8] c"jumper connecting GP9 to MISO\00"
@str.14 = [30 x i8] c"jumper connecting GP8 to CSnA\00"
@str.15 = [30 x i8] c"jumper connecting GP7 to CSnB\00"
@str.16 = [43 x i8] c"jumper connecting DA1 on J29 to AD0 on J28\00"
@str.17 = [22 x i8] c"When ready hit enter.\00"
@str.18 = [8 x i8] c"dig ana\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.11, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.12, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 (...) @getchar()
%10 = tail call i32 (...) @setup_io()
%11 = tail call i32 (...) @setup_gpio()
%12 = tail call i32 (...) @setup_spi()
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.18, i64 0, i64 0))
br label %14
14: ; preds = %0, %41
%15 = phi i32 [ 0, %0 ], [ %44, %41 ]
%16 = icmp eq i32 %15, 256
%17 = shl nuw nsw i32 %15, 4
%18 = select i1 %16, i32 4080, i32 %17
%19 = tail call i32 @write_dac(i32 1, i32 %18)
%20 = tail call i32 @read_adc(i32 0)
%21 = ashr i32 %20, 4
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %18, i32 %20)
%23 = icmp sgt i32 %20, 15
br i1 %23, label %24, label %28
24: ; preds = %14
%25 = call i32 @llvm.smax.i32(i32 %21, i32 1)
br label %31
26: ; preds = %31
%27 = icmp slt i32 %20, 1024
br i1 %27, label %28, label %41
28: ; preds = %14, %26
%29 = sub nsw i32 64, %21
%30 = call i32 @llvm.smax.i32(i32 %29, i32 1)
br label %36
31: ; preds = %24, %31
%32 = phi i32 [ %34, %31 ], [ 0, %24 ]
%33 = tail call i32 @putchar(i8 signext 35)
%34 = add nuw nsw i32 %32, 1
%35 = icmp eq i32 %34, %25
br i1 %35, label %26, label %31
36: ; preds = %28, %36
%37 = phi i32 [ %39, %36 ], [ 0, %28 ]
%38 = tail call i32 @putchar(i8 signext 32)
%39 = add nuw nsw i32 %37, 1
%40 = icmp eq i32 %39, %30
br i1 %40, label %41, label %36
41: ; preds = %36, %26
%42 = tail call i32 @putchar(i8 signext 10)
%43 = tail call i32 (...) @short_wait()
%44 = add nuw nsw i32 %15, 32
%45 = icmp ult i32 %15, 225
br i1 %45, label %14, label %46
46: ; preds = %41, %71
%47 = phi i32 [ %74, %71 ], [ 224, %41 ]
%48 = shl nsw i32 %47, 4
%49 = tail call i32 @write_dac(i32 1, i32 %48)
%50 = tail call i32 @read_adc(i32 0)
%51 = ashr i32 %50, 4
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %48, i32 %50)
%53 = icmp sgt i32 %50, 15
br i1 %53, label %54, label %58
54: ; preds = %46
%55 = call i32 @llvm.smax.i32(i32 %51, i32 1)
br label %61
56: ; preds = %61
%57 = icmp slt i32 %50, 1024
br i1 %57, label %58, label %71
58: ; preds = %46, %56
%59 = sub nsw i32 64, %51
%60 = call i32 @llvm.smax.i32(i32 %59, i32 1)
br label %66
61: ; preds = %54, %61
%62 = phi i32 [ %64, %61 ], [ 0, %54 ]
%63 = tail call i32 @putchar(i8 signext 35)
%64 = add nuw nsw i32 %62, 1
%65 = icmp eq i32 %64, %55
br i1 %65, label %56, label %61
66: ; preds = %58, %66
%67 = phi i32 [ %69, %66 ], [ 0, %58 ]
%68 = tail call i32 @putchar(i8 signext 32)
%69 = add nuw nsw i32 %67, 1
%70 = icmp eq i32 %69, %60
br i1 %70, label %71, label %66
71: ; preds = %66, %56
%72 = tail call i32 @putchar(i8 signext 10)
%73 = tail call i32 (...) @short_wait()
%74 = add nsw i32 %47, -32
%75 = icmp eq i32 %47, 0
br i1 %75, label %76, label %46
76: ; preds = %71
%77 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
%78 = tail call i32 (...) @restore_io()
ret void
}