#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 */
unsigned int Get16Bit(unsigned char *);
int INNO_UAM_Transfers(unsigned char *, int, unsigned char *, unsigned int *,
                       unsigned short *);
int /*<<< orphan*/ memcpy(unsigned char *, char *, int);
int /*<<< orphan*/ printf(char *, ...);
int Card_SelectFile_2G(unsigned char *path, unsigned char pathLen,
                       unsigned int *fileSize, unsigned int *recordLen) {
  unsigned char cmd[8] = "\xa0\xa4\x00\x00\x02\xFF\xFF";
  unsigned char lpRes[256];
  unsigned int nResLen = 0;
  unsigned int nStatus = 0;
  unsigned char i;
  int ret = 0;
  printf("Card_SelectFile_2G\n");
  if (pathLen % 2 || pathLen == 0) {
    printf("Card_SelectFile_2G err\n");
    goto err;
  }
  for (i = 0; i < pathLen; i += 2) {
    cmd[5] = path[i];
    cmd[6] = path[i + 1];
    nStatus = 0;
    nResLen = 256;
    ret =
        INNO_UAM_Transfers(cmd, 7, lpRes, &nResLen, (unsigned short *)&nStatus);
    printf("Card_SelectFile ret = 0x%x\r\n", ret);
    if (ret < 0)
      goto err;
    if ((nStatus != 0x9000) && ((nStatus & 0x9F00) != 0x9F00))
      goto err;
  }
  printf("Card_SelectFile nStatus = 0x%x\r\n", nStatus);
  memcpy(cmd, "\xa0\xc0\x00\x00\x0f", 5);
  cmd[4] = (unsigned char)nStatus & 0xff;
  nResLen = 256;
  ret = INNO_UAM_Transfers(cmd, 5, lpRes, &nResLen, (unsigned short *)&nStatus);
  printf("Card_SelectFile getrsp nReslen= %d, ret = 0x%x\r\n", nResLen, ret);
  if (ret < 0)
    goto err;
  if (nResLen != cmd[4])
    goto err;
  if (nStatus == 0x9000) {
    *fileSize = Get16Bit(lpRes + 2);
    *recordLen = (unsigned int)lpRes[14];
  } else {
    *fileSize = 0;
    *recordLen = 0;
    goto err;
  }
  printf("Card_SelectFile:nStatus = 0x%x, filesize = %d, recordlen = %d\n",
         nStatus, *fileSize, *recordLen);
  goto out;
err:
  ret = -1;
out:
  return ret;
}


x86 assembly (clang, -O0):
<Card_SelectFile_2G>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x134(%rbp)
movl   $0x0,-0x138(%rbp)
movl   $0x0,-0x140(%rbp)
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzbl -0x9(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b6 <Card_SelectFile_2G+0x76>
movzbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    11c9 <Card_SelectFile_2G+0x89>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13db <Card_SelectFile_2G+0x29b>
movb   $0x0,-0x139(%rbp)
movzbl -0x139(%rbp),%eax
movzbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jge    12b3 <Card_SelectFile_2G+0x173>
mov    -0x8(%rbp),%rax
movzbl -0x139(%rbp),%ecx
mov    (%rax,%rcx,1),%al
mov    %al,-0x23(%rbp)
mov    -0x8(%rbp),%rax
movzbl -0x139(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x22(%rbp)
movl   $0x0,-0x138(%rbp)
movl   $0x100,-0x134(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x130(%rbp),%rdx
lea    -0x138(%rbp),%r8
mov    $0x7,%esi
lea    -0x134(%rbp),%rcx
call   1040 <INNO_UAM_Transfers@plt>
mov    %eax,-0x140(%rbp)
mov    -0x140(%rbp),%esi
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x140(%rbp)
jge    126e <Card_SelectFile_2G+0x12e>
jmp    13db <Card_SelectFile_2G+0x29b>
cmpl   $0x9000,-0x138(%rbp)
je     1299 <Card_SelectFile_2G+0x159>
mov    -0x138(%rbp),%eax
and    $0x9f00,%eax
cmp    $0x9f00,%eax
je     1299 <Card_SelectFile_2G+0x159>
jmp    13db <Card_SelectFile_2G+0x29b>
jmp    129e <Card_SelectFile_2G+0x15e>
movzbl -0x139(%rbp),%eax
add    $0x2,%eax
mov    %al,-0x139(%rbp)
jmp    11d0 <Card_SelectFile_2G+0x90>
mov    -0x138(%rbp),%esi
lea    0xd91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x28(%rbp),%rdi
lea    0xe10(%rip),%rsi
mov    $0x5,%edx
call   1060 <memcpy@plt>
mov    -0x138(%rbp),%eax
movzbl %al,%eax
and    $0xff,%eax
mov    %al,-0x24(%rbp)
movl   $0x100,-0x134(%rbp)
lea    -0x28(%rbp),%rdi
lea    -0x130(%rbp),%rdx
lea    -0x138(%rbp),%r8
mov    $0x5,%esi
lea    -0x134(%rbp),%rcx
call   1040 <INNO_UAM_Transfers@plt>
mov    %eax,-0x140(%rbp)
mov    -0x134(%rbp),%esi
mov    -0x140(%rbp),%edx
lea    0xd3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x140(%rbp)
jge    134c <Card_SelectFile_2G+0x20c>
jmp    13db <Card_SelectFile_2G+0x29b>
mov    -0x134(%rbp),%eax
movzbl -0x24(%rbp),%ecx
cmp    %ecx,%eax
je     1363 <Card_SelectFile_2G+0x223>
jmp    13db <Card_SelectFile_2G+0x29b>
cmpl   $0x9000,-0x138(%rbp)
jne    139d <Card_SelectFile_2G+0x25d>
lea    -0x130(%rbp),%rdi
add    $0x2,%rdi
call   1050 <Get16Bit@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movzbl -0x122(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    13b6 <Card_SelectFile_2G+0x276>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
jmp    13db <Card_SelectFile_2G+0x29b>
mov    -0x138(%rbp),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
lea    0xcd4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13e5 <Card_SelectFile_2G+0x2a5>
movl   $0xffffffff,-0x140(%rbp)
ff ff ff
mov    -0x140(%rbp),%eax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Card_SelectFile_2G>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %rcx,%r14
mov    %rdx,%rbp
mov    %esi,%r12d
mov    %rdi,%rbx
movabs $0xffff020000a4a0,%rax
mov    %rax,0x8(%rsp)
lea    0xf2b(%rip),%rdi
call   1030 <puts@plt>
test   %r12d,%r12d
je     1240 <Card_SelectFile_2G+0xf0>
mov    %r12d,%eax
and    $0x1,%al
jne    1240 <Card_SelectFile_2G+0xf0>
mov    %r14,0x10(%rsp)
mov    %rbp,0x18(%rsp)
lea    0xe53(%rip),%r14
xor    %r13d,%r13d
mov    $0xffffffff,%ebp
jmp    11cd <Card_SelectFile_2G+0x7d>
nopw   0x0(%rax,%rax,1)
add    $0x2,%r13b
cmp    %r12b,%r13b
jae    1265 <Card_SelectFile_2G+0x115>
movzbl %r13b,%eax
movzbl (%rbx,%rax,1),%ecx
mov    %cl,0xd(%rsp)
add    $0x1,%al
movzbl %al,%eax
movzbl (%rbx,%rax,1),%eax
mov    %al,0xe(%rsp)
movl   $0x0,(%rsp)
movl   $0x100,0x4(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x7,%esi
lea    0x20(%rsp),%rdx
lea    0x4(%rsp),%rcx
mov    %rsp,%r8
call   1050 <INNO_UAM_Transfers@plt>
mov    %eax,%r15d
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r15d,%r15d
js     1251 <Card_SelectFile_2G+0x101>
mov    (%rsp),%esi
cmp    $0x9000,%esi
je     11c0 <Card_SelectFile_2G+0x70>
mov    %esi,%eax
and    $0x9f00,%eax
cmp    $0x9f00,%eax
je     11c0 <Card_SelectFile_2G+0x70>
jmp    1251 <Card_SelectFile_2G+0x101>
lea    0xe7a(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdb1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe5e(%rip),%rsi
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x5,%edx
call   1070 <memcpy@plt>
mov    (%rsp),%al
mov    %al,0xc(%rsp)
movl   $0x100,0x4(%rsp)
lea    0x20(%rsp),%rdx
lea    0x4(%rsp),%rcx
mov    %rsp,%r8
mov    %rbx,%rdi
mov    $0x5,%esi
call   1050 <INNO_UAM_Transfers@plt>
mov    %eax,%ebx
mov    0x4(%rsp),%esi
lea    0xd7c(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
js     1251 <Card_SelectFile_2G+0x101>
movzbl 0xc(%rsp),%eax
cmp    %eax,0x4(%rsp)
jne    1251 <Card_SelectFile_2G+0x101>
cmpl   $0x9000,(%rsp)
jne    131e <Card_SelectFile_2G+0x1ce>
lea    0x22(%rsp),%rdi
call   1060 <Get16Bit@plt>
mov    0x18(%rsp),%rdx
mov    %eax,(%rdx)
movzbl 0x2e(%rsp),%ecx
mov    0x10(%rsp),%rax
mov    %ecx,(%rax)
mov    (%rsp),%esi
mov    (%rdx),%edx
lea    0xd5f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%ebp
jmp    1251 <Card_SelectFile_2G+0x101>
mov    0x18(%rsp),%rax
movl   $0x0,(%rax)
mov    0x10(%rsp),%rax
movl   $0x0,(%rax)
jmp    1251 <Card_SelectFile_2G+0x101>

LLVM IR (-O0):
@__const.Card_SelectFile_2G.cmd = [8 x i8] c"\A0\A4\00\00\02\FF\FF\00"
@.str = [20 x i8] c"Card_SelectFile_2G\0A\00"
@.str.1 = [24 x i8] c"Card_SelectFile_2G err\0A\00"
@.str.2 = [29 x i8] c"Card_SelectFile ret = 0x%x\0D\0A\00"
@.str.3 = [33 x i8] c"Card_SelectFile nStatus = 0x%x\0D\0A\00"
@.str.4 = [6 x i8] c"\A0\C0\00\00\0F\00"
@.str.5 = [49 x i8] c"Card_SelectFile getrsp nReslen= %d, ret = 0x%x\0D\0A\00"
@.str.6 = [63 x i8] c"Card_SelectFile:nStatus = 0x%x, filesize = %d, recordlen = %d\0A\00"
define i32 @Card_SelectFile_2G(i8* %0, i8 zeroext %1, i32* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca [8 x i8]
%10 = alloca [256 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8
%14 = alloca i32
store i8* %0, i8** %5
store i8 %1, i8* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%15 = bitcast [8 x i8]* %9 to i8*
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = srem i32 %18, 2
%20 = icmp ne i32 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %4
%22 = load i8, i8* %6
%23 = zext i8 %22 to i32
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %21, %4
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %122
27: ; preds = %21
store i8 0, i8* %13
br label %28
28: ; preds = %67, %27
%29 = load i8, i8* %13
%30 = zext i8 %29 to i32
%31 = load i8, i8* %6
%32 = zext i8 %31 to i32
%33 = icmp slt i32 %30, %32
br i1 %33, label %34, label %72
34: ; preds = %28
%35 = load i8*, i8** %5
%36 = load i8, i8* %13
%37 = zext i8 %36 to i64
%38 = getelementptr inbounds i8, i8* %35, i64 %37
%39 = load i8, i8* %38
%40 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 5
store i8 %39, i8* %40
%41 = load i8*, i8** %5
%42 = load i8, i8* %13
%43 = zext i8 %42 to i32
%44 = add nsw i32 %43, 1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %41, i64 %45
%47 = load i8, i8* %46
%48 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 6
store i8 %47, i8* %48
store i32 0, i32* %12
store i32 256, i32* %11
%49 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 0
%50 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%51 = bitcast i32* %12 to i16*
%52 = call i32 @INNO_UAM_Transfers(i8* %49, i32 7, i8* %50, i32* %11, i16* %51)
store i32 %52, i32* %14
%53 = load i32, i32* %14
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %53)
%55 = load i32, i32* %14
%56 = icmp slt i32 %55, 0
br i1 %56, label %57, label %58
57: ; preds = %34
br label %122
58: ; preds = %34
%59 = load i32, i32* %12
%60 = icmp ne i32 %59, 36864
br i1 %60, label %61, label %66
61: ; preds = %58
%62 = load i32, i32* %12
%63 = and i32 %62, 40704
%64 = icmp ne i32 %63, 40704
br i1 %64, label %65, label %66
65: ; preds = %61
br label %122
66: ; preds = %61, %58
br label %67
67: ; preds = %66
%68 = load i8, i8* %13
%69 = zext i8 %68 to i32
%70 = add nsw i32 %69, 2
%71 = trunc i32 %70 to i8
store i8 %71, i8* %13
br label %28
72: ; preds = %28
%73 = load i32, i32* %12
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %73)
%75 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 0
%76 = call i32 @memcpy(i8* %75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 5)
%77 = load i32, i32* %12
%78 = trunc i32 %77 to i8
%79 = zext i8 %78 to i32
%80 = and i32 %79, 255
%81 = trunc i32 %80 to i8
%82 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 4
store i8 %81, i8* %82
store i32 256, i32* %11
%83 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 0
%84 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%85 = bitcast i32* %12 to i16*
%86 = call i32 @INNO_UAM_Transfers(i8* %83, i32 5, i8* %84, i32* %11, i16* %85)
store i32 %86, i32* %14
%87 = load i32, i32* %11
%88 = load i32, i32* %14
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0), i32 %87, i32 %88)
%90 = load i32, i32* %14
%91 = icmp slt i32 %90, 0
br i1 %91, label %92, label %93
92: ; preds = %72
br label %122
93: ; preds = %72
%94 = load i32, i32* %11
%95 = getelementptr inbounds [8 x i8], [8 x i8]* %9, i64 0, i64 4
%96 = load i8, i8* %95
%97 = zext i8 %96 to i32
%98 = icmp ne i32 %94, %97
br i1 %98, label %99, label %100
99: ; preds = %93
br label %122
100: ; preds = %93
%101 = load i32, i32* %12
%102 = icmp eq i32 %101, 36864
br i1 %102, label %103, label %112
103: ; preds = %100
%104 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%105 = getelementptr inbounds i8, i8* %104, i64 2
%106 = call i32 @Get16Bit(i8* %105)
%107 = load i32*, i32** %7
store i32 %106, i32* %107
%108 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 14
%109 = load i8, i8* %108
%110 = zext i8 %109 to i32
%111 = load i32*, i32** %8
store i32 %110, i32* %111
br label %115
112: ; preds = %100
%113 = load i32*, i32** %7
store i32 0, i32* %113
%114 = load i32*, i32** %8
store i32 0, i32* %114
br label %122
115: ; preds = %103
%116 = load i32, i32* %12
%117 = load i32*, i32** %7
%118 = load i32, i32* %117
%119 = load i32*, i32** %8
%120 = load i32, i32* %119
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0), i32 %116, i32 %118, i32 %120)
br label %123
122: ; preds = %112, %99, %92, %65, %57, %25
store i32 -1, i32* %14
br label %123
123: ; preds = %122, %115
%124 = load i32, i32* %14
ret i32 %124
}

LLVM IR (-O2):
@.str.2 = [29 x i8] c"Card_SelectFile ret = 0x%x\0D\0A\00"
@.str.3 = [33 x i8] c"Card_SelectFile nStatus = 0x%x\0D\0A\00"
@.str.4 = [6 x i8] c"\A0\C0\00\00\0F\00"
@.str.5 = [49 x i8] c"Card_SelectFile getrsp nReslen= %d, ret = 0x%x\0D\0A\00"
@.str.6 = [63 x i8] c"Card_SelectFile:nStatus = 0x%x, filesize = %d, recordlen = %d\0A\00"
@str = [19 x i8] c"Card_SelectFile_2G\00"
@str.7 = [23 x i8] c"Card_SelectFile_2G err\00"
define i32 @Card_SelectFile_2G(i8* nocapture %0, i8 zeroext %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = alloca i64
%6 = bitcast i64* %5 to [8 x i8]*
%7 = alloca [256 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = bitcast i64* %5 to i8*
store i64 72056503116276896, i64* %5
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%12 = bitcast i32* %8 to i8*
%13 = bitcast i32* %9 to i8*
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%15 = and i8 %1, 1
%16 = icmp ne i8 %15, 0
%17 = icmp eq i8 %1, 0
%18 = or i1 %17, %16
br i1 %18, label %23, label %19
19: ; preds = %4
%20 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 5
%21 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 6
%22 = bitcast i32* %9 to i16*
br label %27
23: ; preds = %4
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.7, i64 0, i64 0))
br label %74
25: ; preds = %39
%26 = icmp ult i8 %45, %1
br i1 %26, label %27, label %46
27: ; preds = %19, %25
%28 = phi i8 [ 0, %19 ], [ %45, %25 ]
%29 = zext i8 %28 to i64
%30 = getelementptr inbounds i8, i8* %0, i64 %29
%31 = load i8, i8* %30
store i8 %31, i8* %20
%32 = or i8 %28, 1
%33 = zext i8 %32 to i64
%34 = getelementptr inbounds i8, i8* %0, i64 %33
%35 = load i8, i8* %34
store i8 %35, i8* %21
store i32 0, i32* %9
store i32 256, i32* %8
%36 = call i32 @INNO_UAM_Transfers(i8* %10, i32 7, i8* %11, i32* %8, i16* %22)
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %36)
%38 = icmp slt i32 %36, 0
br i1 %38, label %74, label %39
39: ; preds = %27
%40 = load i32, i32* %9
%41 = icmp eq i32 %40, 36864
%42 = and i32 %40, 40704
%43 = icmp eq i32 %42, 40704
%44 = or i1 %41, %43
%45 = add i8 %28, 2
br i1 %44, label %25, label %74
46: ; preds = %25
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %40)
%48 = call i32 @memcpy(i8* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 5)
%49 = load i32, i32* %9
%50 = trunc i32 %49 to i8
%51 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 4
store i8 %50, i8* %51
store i32 256, i32* %8
%52 = call i32 @INNO_UAM_Transfers(i8* %10, i32 5, i8* %11, i32* %8, i16* %22)
%53 = load i32, i32* %8
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0), i32 %53, i32 %52)
%55 = icmp slt i32 %52, 0
br i1 %55, label %74, label %56
56: ; preds = %46
%57 = load i32, i32* %8
%58 = load i8, i8* %51
%59 = zext i8 %58 to i32
%60 = icmp eq i32 %57, %59
br i1 %60, label %61, label %74
61: ; preds = %56
%62 = load i32, i32* %9
%63 = icmp eq i32 %62, 36864
br i1 %63, label %64, label %73
64: ; preds = %61
%65 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 2
%66 = call i32 @Get16Bit(i8* %65)
store i32 %66, i32* %2
%67 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 14
%68 = load i8, i8* %67
%69 = zext i8 %68 to i32
store i32 %69, i32* %3
%70 = load i32, i32* %9
%71 = load i32, i32* %2
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0), i32 %70, i32 %71, i32 %69)
br label %74
73: ; preds = %61
store i32 0, i32* %2
store i32 0, i32* %3
br label %74
74: ; preds = %27, %39, %23, %73, %46, %56, %64
%75 = phi i32 [ %52, %64 ], [ -1, %56 ], [ -1, %46 ], [ -1, %73 ], [ -1, %23 ], [ -1, %39 ], [ -1, %27 ]
ret i32 %75
}