#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*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ errno;
scalar_t__ isxdigit(char);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int read(int, char *, int);
char *strerror(int /*<<< orphan*/);
scalar_t__ strtol(char *, int /*<<< orphan*/ *, int);
void readBuf(char *file_name) {
  char buf[(32)] = {0};
  char tmp_buf[3] = {0};
  int rval = 0;
  int i = 0;
  int j = 0;
  int fd = open(file_name, O_RDONLY);
  if (fd == -1) {
    printf("%s\n", strerror(errno));
    goto boil_out;
  }
  while (1) {
    rval = read(fd, tmp_buf, 2);
    if (rval <= 0) {
      printf("%s\n", rval == 0 ? "End of file" : strerror(errno));
      if (rval == 0) {
        break;
      }
      goto boil_out;
    }
    if (tmp_buf[0] != '\n' && !(isxdigit(tmp_buf[0]) && isxdigit(tmp_buf[1]))) {
      printf("only hex character are allowed:%c, %c\n", tmp_buf[0], tmp_buf[1]);
      goto boil_out;
    }
    buf[i++] = (char)strtol(tmp_buf, NULL, 16);
  }
  for (i = 0; i < (32) / 8; i++) {
    for (j = 0; j < 8; j++) {
      printf("%c", isxdigit(buf[i * 8 + j]) ? buf[i * 8 + j] : '.');
    }
    for (j = 0; j < 8; j++) {
      printf(" %.2x", buf[i * 8 + j]);
    }
    printf("\n");
  }
boil_out:
  if (fd) {
    close(fd);
  }
}


x86 assembly (clang, -O0):
<readBuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x33(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1040 <memset@plt>
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e1c(%rip),%rax
mov    (%rax),%esi
call   1080 <open@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0xffffffff,-0x44(%rbp)
jne    1204 <readBuf+0x84>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
mov    %rax,%rsi
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13d4 <readBuf+0x254>
jmp    1209 <readBuf+0x89>
mov    -0x44(%rbp),%edi
lea    -0x33(%rbp),%rsi
mov    $0x2,%edx
call   1060 <read@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
jg     1279 <readBuf+0xf9>
cmpl   $0x0,-0x38(%rbp)
jne    1241 <readBuf+0xc1>
lea    0xdcc(%rip),%rax
mov    %rax,-0x50(%rbp)
jmp    1253 <readBuf+0xd3>
mov    0x2d90(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xda2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x38(%rbp)
jne    1274 <readBuf+0xf4>
jmp    12f1 <readBuf+0x171>
jmp    13d4 <readBuf+0x254>
movsbl -0x33(%rbp),%eax
cmp    $0xa,%eax
je     12c7 <readBuf+0x147>
movsbl -0x33(%rbp),%edi
call   1090 <isxdigit@plt>
cmp    $0x0,%rax
je     12ac <readBuf+0x12c>
movsbl -0x32(%rbp),%edi
call   1090 <isxdigit@plt>
cmp    $0x0,%rax
jne    12c7 <readBuf+0x147>
movsbl -0x33(%rbp),%esi
movsbl -0x32(%rbp),%edx
lea    0xd55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13d4 <readBuf+0x254>
lea    -0x33(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1070 <strtol@plt>
mov    %al,%cl
mov    -0x3c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x3c(%rbp)
cltq
mov    %cl,-0x30(%rbp,%rax,1)
jmp    1209 <readBuf+0x89>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x4,-0x3c(%rbp)
jge    13cf <readBuf+0x24f>
movl   $0x0,-0x40(%rbp)
cmpl   $0x8,-0x40(%rbp)
jge    1376 <readBuf+0x1f6>
mov    -0x3c(%rbp),%eax
shl    $0x3,%eax
add    -0x40(%rbp),%eax
cltq
movsbl -0x30(%rbp,%rax,1),%edi
call   1090 <isxdigit@plt>
cmp    $0x0,%rax
je     134a <readBuf+0x1ca>
mov    -0x3c(%rbp),%eax
shl    $0x3,%eax
add    -0x40(%rbp),%eax
cltq
movsbl -0x30(%rbp,%rax,1),%eax
mov    %eax,-0x54(%rbp)
jmp    1357 <readBuf+0x1d7>
mov    $0x2e,%eax
mov    %eax,-0x54(%rbp)
jmp    1357 <readBuf+0x1d7>
mov    -0x54(%rbp),%esi
lea    0xcd6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1309 <readBuf+0x189>
movl   $0x0,-0x40(%rbp)
cmpl   $0x8,-0x40(%rbp)
jge    13b3 <readBuf+0x233>
mov    -0x3c(%rbp),%eax
shl    $0x3,%eax
add    -0x40(%rbp),%eax
cltq
movsbl -0x30(%rbp,%rax,1),%esi
lea    0xc9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    137d <readBuf+0x1fd>
lea    0xc7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12f8 <readBuf+0x178>
jmp    13d4 <readBuf+0x254>
cmpl   $0x0,-0x44(%rbp)
je     13e6 <readBuf+0x266>
mov    -0x44(%rbp),%edi
call   1050 <close@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readBuf>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movb   $0x0,0xa(%rsp)
movw   $0x0,0x8(%rsp)
mov    0x2e2a(%rip),%rax
mov    (%rax),%esi
call   1090 <open@plt>
mov    %eax,%r12d
cmp    $0xffffffff,%eax
je     1289 <readBuf+0xf9>
lea    0x8(%rsp),%rsi
mov    %r12d,%edi
mov    $0x2,%edx
call   1070 <read@plt>
test   %eax,%eax
mov    %r12d,0xc(%rsp)
jle    126a <readBuf+0xda>
lea    0x20(%rsp),%rbx
lea    0x8(%rsp),%r14
jmp    1229 <readBuf+0x99>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1080 <strtol@plt>
mov    %al,(%rbx)
mov    %r12d,%edi
mov    %r14,%rsi
mov    $0x2,%edx
call   1070 <read@plt>
add    $0x1,%rbx
test   %eax,%eax
jle    126a <readBuf+0xda>
movsbl 0x8(%rsp),%ebp
cmp    $0xa,%ebp
je     1200 <readBuf+0x70>
mov    %ebp,%edi
call   10a0 <isxdigit@plt>
movsbl 0x9(%rsp),%r15d
test   %rax,%rax
je     1252 <readBuf+0xc2>
mov    %r15d,%edi
call   10a0 <isxdigit@plt>
test   %rax,%rax
jne    1200 <readBuf+0x70>
lea    0xdb3(%rip),%rdi
mov    %ebp,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1448 <readBuf+0x2b8>
test   %eax,%eax
je     12a4 <readBuf+0x114>
mov    0x2d63(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
jmp    1448 <readBuf+0x2b8>
mov    0x2d48(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
jmp    1452 <readBuf+0x2c2>
lea    0xd55(%rip),%rdi
call   1040 <puts@plt>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl 0x20(%rsp,%rbp,8),%ebx
mov    %ebx,0x1c(%rsp)
mov    %ebx,%edi
call   10a0 <isxdigit@plt>
test   %rax,%rax
mov    $0x2e,%eax
cmove  %eax,%ebx
mov    $0x2e,%r14d
mov    %ebx,%edi
call   1030 <putchar@plt>
movsbl 0x21(%rsp,%rbp,8),%ebx
mov    %ebx,0x18(%rsp)
mov    %ebx,%edi
call   10a0 <isxdigit@plt>
test   %rax,%rax
cmove  %r14d,%ebx
mov    %ebx,%edi
call   1030 <putchar@plt>
movsbl 0x22(%rsp,%rbp,8),%ebx
mov    %ebx,0x14(%rsp)
mov    %ebx,%edi
call   10a0 <isxdigit@plt>
test   %rax,%rax
mov    $0x2e,%r14d
cmove  %r14d,%ebx
mov    %ebx,%edi
call   1030 <putchar@plt>
movsbl 0x23(%rsp,%rbp,8),%ebx
mov    %ebx,0x10(%rsp)
mov    %ebx,%edi
call   10a0 <isxdigit@plt>
test   %rax,%rax
mov    %ebx,%edi
cmove  %r14d,%edi
mov    $0x2e,%ebx
call   1030 <putchar@plt>
movsbl 0x24(%rsp,%rbp,8),%r14d
mov    %r14d,%edi
call   10a0 <isxdigit@plt>
test   %rax,%rax
mov    %r14d,%edi
cmove  %ebx,%edi
call   1030 <putchar@plt>
movsbl 0x25(%rsp,%rbp,8),%r15d
mov    %r15d,%edi
call   10a0 <isxdigit@plt>
test   %rax,%rax
mov    %r15d,%edi
cmove  %ebx,%edi
call   1030 <putchar@plt>
movsbl 0x26(%rsp,%rbp,8),%r12d
mov    %r12d,%edi
call   10a0 <isxdigit@plt>
test   %rax,%rax
mov    %r12d,%edi
cmove  %ebx,%edi
call   1030 <putchar@plt>
movsbl 0x27(%rsp,%rbp,8),%r13d
mov    %r13d,%edi
call   10a0 <isxdigit@plt>
test   %rax,%rax
mov    %r13d,%edi
cmove  %ebx,%edi
call   1030 <putchar@plt>
lea    0xc6f(%rip),%rbx
mov    %rbx,%rdi
mov    0x1c(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    0x18(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    0x14(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    0x10(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    $0x4,%rbp
jne    12c0 <readBuf+0x130>
mov    0xc(%rsp),%r12d
test   %r12d,%r12d
je     1468 <readBuf+0x2d8>
mov    %r12d,%edi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <close@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@errno = global i32 0
@.str.1 = [12 x i8] c"End of file\00"
@.str.2 = [39 x i8] c"only hex character are allowed:%c, %c\0A\00"
@.str.3 = [3 x i8] c"%c\00"
@.str.4 = [6 x i8] c" %.2x\00"
@.str.5 = [2 x i8] c"\0A\00"
define void @readBuf(i8* %0) {
%2 = alloca i8*
%3 = alloca [32 x i8]
%4 = alloca [3 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %2
%9 = bitcast [32 x i8]* %3 to i8*
%10 = bitcast [3 x i8]* %4 to i8*
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%11 = load i8*, i8** %2
%12 = load i32, i32* @O_RDONLY
%13 = call i32 @open(i8* %11, i32 %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %20
16: ; preds = %1
%17 = load i32, i32* @errno
%18 = call i8* @strerror(i32 %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
br label %129
20: ; preds = %1
br label %21
21: ; preds = %20, %64
%22 = load i32, i32* %8
%23 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%24 = call i32 @read(i32 %22, i8* %23, i32 2)
store i32 %24, i32* %5
%25 = load i32, i32* %5
%26 = icmp sle i32 %25, 0
br i1 %26, label %27, label %41
27: ; preds = %21
%28 = load i32, i32* %5
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %27
br label %34
31: ; preds = %27
%32 = load i32, i32* @errno
%33 = call i8* @strerror(i32 %32)
br label %34
34: ; preds = %31, %30
%35 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), %30 ], [ %33, %31 ]
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %35)
%37 = load i32, i32* %5
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %34
br label %72
40: ; preds = %34
br label %129
41: ; preds = %21
%42 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp ne i32 %44, 10
br i1 %45, label %46, label %64
46: ; preds = %41
%47 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%48 = load i8, i8* %47
%49 = call i64 @isxdigit(i8 signext %48)
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %56
51: ; preds = %46
%52 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 1
%53 = load i8, i8* %52
%54 = call i64 @isxdigit(i8 signext %53)
%55 = icmp ne i64 %54, 0
br i1 %55, label %64, label %56
56: ; preds = %51, %46
%57 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 1
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %59, i32 %62)
br label %129
64: ; preds = %51, %41
%65 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%66 = call i64 @strtol(i8* %65, i32* null, i32 16)
%67 = trunc i64 %66 to i8
%68 = load i32, i32* %6
%69 = add nsw i32 %68, 1
store i32 %69, i32* %6
%70 = sext i32 %68 to i64
%71 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 %70
store i8 %67, i8* %71
br label %21
72: ; preds = %39
store i32 0, i32* %6
br label %73
73: ; preds = %125, %72
%74 = load i32, i32* %6
%75 = icmp slt i32 %74, 4
br i1 %75, label %76, label %128
76: ; preds = %73
store i32 0, i32* %7
br label %77
77: ; preds = %103, %76
%78 = load i32, i32* %7
%79 = icmp slt i32 %78, 8
br i1 %79, label %80, label %106
80: ; preds = %77
%81 = load i32, i32* %6
%82 = mul nsw i32 %81, 8
%83 = load i32, i32* %7
%84 = add nsw i32 %82, %83
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 %85
%87 = load i8, i8* %86
%88 = call i64 @isxdigit(i8 signext %87)
%89 = icmp ne i64 %88, 0
br i1 %89, label %90, label %99
90: ; preds = %80
%91 = load i32, i32* %6
%92 = mul nsw i32 %91, 8
%93 = load i32, i32* %7
%94 = add nsw i32 %92, %93
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 %95
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
br label %100
99: ; preds = %80
br label %100
100: ; preds = %99, %90
%101 = phi i32 [ %98, %90 ], [ 46, %99 ]
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %101)
br label %103
103: ; preds = %100
%104 = load i32, i32* %7
%105 = add nsw i32 %104, 1
store i32 %105, i32* %7
br label %77
106: ; preds = %77
store i32 0, i32* %7
br label %107
107: ; preds = %120, %106
%108 = load i32, i32* %7
%109 = icmp slt i32 %108, 8
br i1 %109, label %110, label %123
110: ; preds = %107
%111 = load i32, i32* %6
%112 = mul nsw i32 %111, 8
%113 = load i32, i32* %7
%114 = add nsw i32 %112, %113
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 %115
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %118)
br label %120
120: ; preds = %110
%121 = load i32, i32* %7
%122 = add nsw i32 %121, 1
store i32 %122, i32* %7
br label %107
123: ; preds = %107
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %125
125: ; preds = %123
%126 = load i32, i32* %6
%127 = add nsw i32 %126, 1
store i32 %127, i32* %6
br label %73
128: ; preds = %73
br label %129
129: ; preds = %128, %56, %40, %16
%130 = load i32, i32* %8
%131 = icmp ne i32 %130, 0
br i1 %131, label %132, label %135
132: ; preds = %129
%133 = load i32, i32* %8
%134 = call i32 @close(i32 %133)
br label %135
135: ; preds = %132, %129
ret void
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@errno = global i32 0
@.str.1 = [12 x i8] c"End of file\00"
@.str.2 = [39 x i8] c"only hex character are allowed:%c, %c\0A\00"
@.str.4 = [6 x i8] c" %.2x\00"
define void @readBuf(i8* nocapture %0) {
%2 = alloca [32 x i8]
%3 = alloca [3 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%6 = load i32, i32* @O_RDONLY
%7 = tail call i32 @open(i8* %0, i32 %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %14, label %9
9: ; preds = %1
%10 = call i32 @read(i32 %7, i8* %5, i32 2)
%11 = icmp slt i32 %10, 1
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
br label %25
14: ; preds = %1
%15 = load i32, i32* @errno
%16 = tail call i8* @strerror(i32 %15)
%17 = tail call i32 @puts(i8* dereferenceable(1) %16)
br label %128
18: ; preds = %40, %9
%19 = phi i32 [ %10, %9 ], [ %45, %40 ]
%20 = icmp eq i32 %19, 0
br i1 %20, label %47, label %21
21: ; preds = %18
%22 = load i32, i32* @errno
%23 = tail call i8* @strerror(i32 %22)
%24 = tail call i32 @puts(i8* dereferenceable(1) %23)
br label %126
25: ; preds = %12, %40
%26 = phi i64 [ 0, %12 ], [ %43, %40 ]
%27 = load i8, i8* %5
%28 = icmp eq i8 %27, 10
br i1 %28, label %40, label %29
29: ; preds = %25
%30 = tail call i64 @isxdigit(i8 signext %27)
%31 = icmp eq i64 %30, 0
%32 = load i8, i8* %13
br i1 %31, label %36, label %33
33: ; preds = %29
%34 = tail call i64 @isxdigit(i8 signext %32)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %40
36: ; preds = %33, %29
%37 = sext i8 %27 to i32
%38 = sext i8 %32 to i32
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %37, i32 %38)
br label %126
40: ; preds = %33, %25
%41 = call i64 @strtol(i8* nocapture %5, i32* null, i32 16)
%42 = trunc i64 %41 to i8
%43 = add nuw i64 %26, 1
%44 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %26
store i8 %42, i8* %44
%45 = call i32 @read(i32 %7, i8* %5, i32 2)
%46 = icmp slt i32 %45, 1
br i1 %46, label %18, label %25
47: ; preds = %18
%48 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %49
49: ; preds = %47, %49
%50 = phi i64 [ 0, %47 ], [ %124, %49 ]
%51 = shl nsw i64 %50, 3
%52 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %51
%53 = load i8, i8* %52
%54 = tail call i64 @isxdigit(i8 signext %53)
%55 = icmp eq i64 %54, 0
%56 = sext i8 %53 to i32
%57 = select i1 %55, i32 46, i32 %56
%58 = tail call i32 @putchar(i32 %57)
%59 = or i64 %51, 1
%60 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %59
%61 = load i8, i8* %60
%62 = tail call i64 @isxdigit(i8 signext %61)
%63 = icmp eq i64 %62, 0
%64 = sext i8 %61 to i32
%65 = select i1 %63, i32 46, i32 %64
%66 = tail call i32 @putchar(i32 %65)
%67 = or i64 %51, 2
%68 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %67
%69 = load i8, i8* %68
%70 = tail call i64 @isxdigit(i8 signext %69)
%71 = icmp eq i64 %70, 0
%72 = sext i8 %69 to i32
%73 = select i1 %71, i32 46, i32 %72
%74 = tail call i32 @putchar(i32 %73)
%75 = or i64 %51, 3
%76 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %75
%77 = load i8, i8* %76
%78 = tail call i64 @isxdigit(i8 signext %77)
%79 = icmp eq i64 %78, 0
%80 = sext i8 %77 to i32
%81 = select i1 %79, i32 46, i32 %80
%82 = tail call i32 @putchar(i32 %81)
%83 = or i64 %51, 4
%84 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %83
%85 = load i8, i8* %84
%86 = tail call i64 @isxdigit(i8 signext %85)
%87 = icmp eq i64 %86, 0
%88 = sext i8 %85 to i32
%89 = select i1 %87, i32 46, i32 %88
%90 = tail call i32 @putchar(i32 %89)
%91 = or i64 %51, 5
%92 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %91
%93 = load i8, i8* %92
%94 = tail call i64 @isxdigit(i8 signext %93)
%95 = icmp eq i64 %94, 0
%96 = sext i8 %93 to i32
%97 = select i1 %95, i32 46, i32 %96
%98 = tail call i32 @putchar(i32 %97)
%99 = or i64 %51, 6
%100 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %99
%101 = load i8, i8* %100
%102 = tail call i64 @isxdigit(i8 signext %101)
%103 = icmp eq i64 %102, 0
%104 = sext i8 %101 to i32
%105 = select i1 %103, i32 46, i32 %104
%106 = tail call i32 @putchar(i32 %105)
%107 = or i64 %51, 7
%108 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 %107
%109 = load i8, i8* %108
%110 = tail call i64 @isxdigit(i8 signext %109)
%111 = icmp eq i64 %110, 0
%112 = sext i8 %109 to i32
%113 = select i1 %111, i32 46, i32 %112
%114 = tail call i32 @putchar(i32 %113)
%115 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %56)
%116 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %64)
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %72)
%118 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %80)
%119 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %88)
%120 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %96)
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %104)
%122 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %112)
%123 = tail call i32 @putchar(i32 10)
%124 = add nuw nsw i64 %50, 1
%125 = icmp eq i64 %124, 4
br i1 %125, label %126, label %49
126: ; preds = %49, %21, %36
%127 = icmp eq i32 %7, 0
br i1 %127, label %130, label %128
128: ; preds = %14, %126
%129 = tail call i32 @close(i32 %7)
br label %130
130: ; preds = %128, %126
ret void
}