#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*/ perror(char *);
int power_up_iso(int, char *);
int /*<<< orphan*/ printf(char *, ...);
int read_binary(int, int, char, char *);
scalar_t__ select_file(int, int);
scalar_t__ send_num_mask(int, char *);
int /*<<< orphan*/ serial_deinit(int);
int serial_init(char *);
int main() {
  int fd, atrlen, i, j, len;
  char mask[100], atr[100], data[300];
  fd = serial_init("/dev/smartpoll");
  if (send_num_mask(fd, mask) < 0) {
    perror("send_num_mask failed");
    return -1;
  }
  printf("Mask is : %s\n", mask);
  if ((atrlen = power_up_iso(fd, atr)) < 0) {
    perror("power_up_iso failed");
    return -1;
  }
  printf("ATR: ");
  for (i = 0; i < atrlen; i++)
    printf("%x ", (unsigned char)atr[i]);
  printf("\n");
  if (select_file(fd, 0x3f00) < 0) {
    printf("Select file failed\n");
    return -1;
  }
  printf("Selected file 0x3f00\n");
  if (select_file(fd, 0x2030) < 0) {
    printf("Select file failed\n");
    return -1;
  }
  printf("Selected file 0x2030\n");
  if ((len = read_binary(fd, 0, 1, data)) < 0) {
    printf("read binary failed\n");
    return -1;
  }
  if ((len = read_binary(fd, 1, data[0], data + 1)) < 0) {
    printf("read_binary failed\n");
    return -1;
  }
  printf("Data (read from card) (%d): ", data[0]);
  for (i = 0; i < len; i++)
    printf("%x ", (unsigned char)data[i + 1]);
  printf("\n");
  serial_deinit(fd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe67(%rip),%rdi
call   10a0 <serial_init@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x80(%rbp),%rsi
call   1060 <send_num_mask@plt>
cmp    $0x0,%rax
jge    11cf <main+0x4f>
lea    0xe51(%rip),%rdi
call   1090 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d6 <main+0x256>
lea    -0x80(%rbp),%rsi
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
lea    -0xf0(%rbp),%rsi
call   1050 <power_up_iso@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1214 <main+0x94>
lea    0xe2f(%rip),%rdi
call   1090 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d6 <main+0x256>
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    125d <main+0xdd>
movslq -0x10(%rbp),%rax
movzbl -0xf0(%rbp,%rax,1),%esi
ff
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1229 <main+0xa9>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
mov    $0x3f00,%esi
call   1070 <select_file@plt>
cmp    $0x0,%rax
jge    129c <main+0x11c>
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d6 <main+0x256>
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
mov    $0x2030,%esi
call   1070 <select_file@plt>
cmp    $0x0,%rax
jge    12db <main+0x15b>
lea    0xd88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d6 <main+0x256>
lea    0xd98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
lea    -0x220(%rbp),%rcx
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <read_binary@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    1325 <main+0x1a5>
lea    0xd7e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d6 <main+0x256>
mov    -0x8(%rbp),%edi
mov    -0x220(%rbp),%al
lea    -0x220(%rbp),%rcx
add    $0x1,%rcx
mov    $0x1,%esi
movsbl %al,%edx
call   1030 <read_binary@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    136c <main+0x1ec>
lea    0xd4b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13d6 <main+0x256>
movsbl -0x220(%rbp),%esi
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    13c0 <main+0x240>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
cltq
movzbl -0x220(%rbp,%rax,1),%esi
ff
lea    0xca1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1388 <main+0x208>
lea    0xcb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1080 <serial_deinit@plt>
mov    -0x4(%rbp),%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x210,%rsp
lea    0xe4a(%rip),%rdi
call   10c0 <serial_init@plt>
mov    %eax,%r12d
lea    0x70(%rsp),%rsi
mov    %eax,%edi
call   1080 <send_num_mask@plt>
test   %rax,%rax
js     1366 <main+0x1c6>
lea    0xe4a(%rip),%rdi
lea    0x70(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rsp,%rsi
mov    %r12d,%edi
call   1070 <power_up_iso@plt>
test   %eax,%eax
js     136f <main+0x1cf>
mov    %eax,%ebp
lea    0xe44(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
test   %ebp,%ebp
je     1237 <main+0x97>
mov    %ebp,%ebx
lea    0xe36(%rip),%r14
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movzbl (%rsp,%rbp,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1220 <main+0x80>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r12d,%edi
mov    $0x3f00,%esi
call   1090 <select_file@plt>
test   %rax,%rax
js     132f <main+0x18f>
lea    0xe0f(%rip),%rdi
call   1050 <puts@plt>
mov    %r12d,%edi
mov    $0x2030,%esi
call   1090 <select_file@plt>
test   %rax,%rax
js     132f <main+0x18f>
lea    0xe02(%rip),%rdi
call   1050 <puts@plt>
lea    0xe0(%rsp),%rcx
mov    %r12d,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <read_binary@plt>
test   %eax,%eax
js     1354 <main+0x1b4>
movsbl 0xe0(%rsp),%edx
lea    0xe1(%rsp),%rcx
mov    %r12d,%edi
mov    $0x1,%esi
call   1030 <read_binary@plt>
test   %eax,%eax
js     135d <main+0x1bd>
mov    %eax,%r14d
movsbl 0xe0(%rsp),%esi
lea    0xd75(%rip),%rdi
xor    %r15d,%r15d
xor    %eax,%eax
call   1060 <printf@plt>
test   %r14d,%r14d
je     131b <main+0x17b>
mov    %r14d,%ebx
lea    0xd58(%rip),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movzbl 0xe1(%rsp,%rbp,1),%esi
add    $0x1,%rbp
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
cmp    %rbp,%rbx
jne    1300 <main+0x160>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r12d,%edi
call   10a0 <serial_deinit@plt>
jmp    1341 <main+0x1a1>
lea    0xd87(%rip),%rdi
call   1050 <puts@plt>
mov    $0xffffffff,%r15d
mov    %r15d,%eax
add    $0x210,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd4f(%rip),%rdi
jmp    1336 <main+0x196>
lea    0xd33(%rip),%rdi
jmp    1336 <main+0x196>
lea    0xca2(%rip),%rdi
jmp    1376 <main+0x1d6>
lea    0xcbc(%rip),%rdi
call   10b0 <perror@plt>
jmp    133b <main+0x19b>

LLVM IR (-O0):
@.str = [15 x i8] c"/dev/smartpoll\00"
@.str.1 = [21 x i8] c"send_num_mask failed\00"
@.str.2 = [14 x i8] c"Mask is : %s\0A\00"
@.str.3 = [20 x i8] c"power_up_iso failed\00"
@.str.4 = [6 x i8] c"ATR: \00"
@.str.5 = [4 x i8] c"%x \00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [20 x i8] c"Select file failed\0A\00"
@.str.8 = [22 x i8] c"Selected file 0x3f00\0A\00"
@.str.9 = [22 x i8] c"Selected file 0x2030\0A\00"
@.str.10 = [20 x i8] c"read binary failed\0A\00"
@.str.11 = [20 x i8] c"read_binary failed\0A\00"
@.str.12 = [29 x i8] c"Data (read from card) (%d): \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [100 x i8]
%8 = alloca [100 x i8]
%9 = alloca [300 x i8]
store i32 0, i32* %1
%10 = call i32 @serial_init(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%13 = call i64 @send_num_mask(i32 %11, i8* %12)
%14 = icmp slt i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
17: ; preds = %0
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %18)
%20 = load i32, i32* %2
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%22 = call i32 @power_up_iso(i32 %20, i8* %21)
store i32 %22, i32* %3
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %17
%25 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
26: ; preds = %17
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %4
br label %28
28: ; preds = %39, %26
%29 = load i32, i32* %4
%30 = load i32, i32* %3
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %42
32: ; preds = %28
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %32
%40 = load i32, i32* %4
%41 = add nsw i32 %40, 1
store i32 %41, i32* %4
br label %28
42: ; preds = %28
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%44 = load i32, i32* %2
%45 = call i64 @select_file(i32 %44, i32 16128)
%46 = icmp slt i64 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %42
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
49: ; preds = %42
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0))
%51 = load i32, i32* %2
%52 = call i64 @select_file(i32 %51, i32 8240)
%53 = icmp slt i64 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %49
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
56: ; preds = %49
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%58 = load i32, i32* %2
%59 = getelementptr inbounds [300 x i8], [300 x i8]* %9, i64 0, i64 0
%60 = call i32 @read_binary(i32 %58, i32 0, i8 signext 1, i8* %59)
store i32 %60, i32* %6
%61 = icmp slt i32 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %56
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
64: ; preds = %56
%65 = load i32, i32* %2
%66 = getelementptr inbounds [300 x i8], [300 x i8]* %9, i64 0, i64 0
%67 = load i8, i8* %66
%68 = getelementptr inbounds [300 x i8], [300 x i8]* %9, i64 0, i64 0
%69 = getelementptr inbounds i8, i8* %68, i64 1
%70 = call i32 @read_binary(i32 %65, i32 1, i8 signext %67, i8* %69)
store i32 %70, i32* %6
%71 = icmp slt i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %64
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
74: ; preds = %64
%75 = getelementptr inbounds [300 x i8], [300 x i8]* %9, i64 0, i64 0
%76 = load i8, i8* %75
%77 = sext i8 %76 to i32
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), i32 %77)
store i32 0, i32* %4
br label %79
79: ; preds = %91, %74
%80 = load i32, i32* %4
%81 = load i32, i32* %6
%82 = icmp slt i32 %80, %81
br i1 %82, label %83, label %94
83: ; preds = %79
%84 = load i32, i32* %4
%85 = add nsw i32 %84, 1
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [300 x i8], [300 x i8]* %9, i64 0, i64 %86
%88 = load i8, i8* %87
%89 = zext i8 %88 to i32
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %89)
br label %91
91: ; preds = %83
%92 = load i32, i32* %4
%93 = add nsw i32 %92, 1
store i32 %93, i32* %4
br label %79
94: ; preds = %79
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%96 = load i32, i32* %2
%97 = call i32 @serial_deinit(i32 %96)
br label %98
98: ; preds = %94, %72, %62, %54, %47, %24, %15
%99 = load i32, i32* %1
ret i32 %99
}

LLVM IR (-O2):
@.str = [15 x i8] c"/dev/smartpoll\00"
@.str.1 = [21 x i8] c"send_num_mask failed\00"
@.str.2 = [14 x i8] c"Mask is : %s\0A\00"
@.str.3 = [20 x i8] c"power_up_iso failed\00"
@.str.4 = [6 x i8] c"ATR: \00"
@.str.5 = [4 x i8] c"%x \00"
@.str.12 = [29 x i8] c"Data (read from card) (%d): \00"
@str = [21 x i8] c"Selected file 0x3f00\00"
@str.13 = [21 x i8] c"Selected file 0x2030\00"
@str.14 = [19 x i8] c"read_binary failed\00"
@str.15 = [19 x i8] c"read binary failed\00"
@str.17 = [19 x i8] c"Select file failed\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [300 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%7 = tail call i32 @serial_init(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = call i64 @send_num_mask(i32 %7, i8* %4)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %74
12: ; preds = %0
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%14 = call i32 @power_up_iso(i32 %7, i8* %5)
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %74
18: ; preds = %12
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i32 %14, 0
br i1 %20, label %31, label %21
21: ; preds = %18
%22 = zext i32 %14 to i64
br label %23
23: ; preds = %21, %23
%24 = phi i64 [ 0, %21 ], [ %29, %23 ]
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %27)
%29 = add nuw nsw i64 %24, 1
%30 = icmp eq i64 %29, %22
br i1 %30, label %31, label %23
31: ; preds = %23, %18
%32 = call i32 @putchar(i32 10)
%33 = call i64 @select_file(i32 %7, i32 16128)
%34 = icmp slt i64 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.17, i64 0, i64 0))
br label %74
37: ; preds = %31
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%39 = call i64 @select_file(i32 %7, i32 8240)
%40 = icmp slt i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.17, i64 0, i64 0))
br label %74
43: ; preds = %37
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.13, i64 0, i64 0))
%45 = call i32 @read_binary(i32 %7, i32 0, i8 signext 1, i8* %6)
%46 = icmp slt i32 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.15, i64 0, i64 0))
br label %74
49: ; preds = %43
%50 = load i8, i8* %6
%51 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 1
%52 = call i32 @read_binary(i32 %7, i32 1, i8 signext %50, i8* %51)
%53 = icmp slt i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %49
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.14, i64 0, i64 0))
br label %74
56: ; preds = %49
%57 = load i8, i8* %6
%58 = sext i8 %57 to i32
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), i32 %58)
%60 = icmp eq i32 %52, 0
br i1 %60, label %71, label %61
61: ; preds = %56
%62 = zext i32 %52 to i64
br label %63
63: ; preds = %61, %63
%64 = phi i64 [ 0, %61 ], [ %65, %63 ]
%65 = add nuw nsw i64 %64, 1
%66 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 %65
%67 = load i8, i8* %66
%68 = zext i8 %67 to i32
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %68)
%70 = icmp eq i64 %65, %62
br i1 %70, label %71, label %63
71: ; preds = %63, %56
%72 = call i32 @putchar(i32 10)
%73 = call i32 @serial_deinit(i32 %7)
br label %74
74: ; preds = %71, %54, %47, %41, %35, %16, %10
%75 = phi i32 [ -1, %10 ], [ -1, %16 ], [ -1, %35 ], [ -1, %41 ], [ -1, %47 ], [ -1, %54 ], [ 0, %71 ]
ret i32 %75
}