#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*/ isxdigit(char);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
unsigned long strtol(char *, char **, int);
int main(int argc, char **argv) {
  char *flags;
  char hexChar[3];
  unsigned long int hexCharNum;
  unsigned long int i, j;
  unsigned long int flagsNum;
  int len;
  if ((argc != 2) || ((argc != 2) && strcmp(argv[1], "?"))) {
    printf("Usage: <flags (in hex w/o 0x)>\n");
    printf("    Decodes the eSeries dram eccStatus number, from the\n");
    printf("    \"print__11Ic1Detector\" shell command\n");
    printf("    output, into double bit ECC error, single bit ECC error, both "
           "single and double bit ECC errors,\n");
    printf("    or neither single nor double bit ECC errors.\n");
    printf("    Written by Jonathan Natale for Juniper Networks on "
           "20-Nov-2010.\n");
    return (1);
  }
  flags = argv[1];
  len = strlen(flags);
  for (i = 0; i < len; i++) {
    if (!isxdigit(flags[i])) {
      printf("Sorry, %s are not a valid flags.\n", flags);
      printf("       ");
      for (j = 0; j < i; j++) {
        printf(" ");
      }
      printf("^\n");
      printf("Please try again.  Exiting ...\n");
      return (3);
    }
  }
  flagsNum = 0;
  hexChar[1] = '\0';
  for (i = 0; i < len; i++) {
    flagsNum = flagsNum << 4;
    hexChar[0] = flags[i];
    hexCharNum = strtol(hexChar, (char **)NULL, 16);
    flagsNum = flagsNum | hexCharNum;
  }
  if ((((flagsNum >> 9) & 1) | ((flagsNum >> 25) & 1)) &&
      (((flagsNum >> 8) & 1) | ((flagsNum >> 24) & 1))) {
    printf("both single and double bit ECC errors\n");
  } else if (((flagsNum >> 8) & 1) | ((flagsNum >> 24) & 1)) {
    printf("only single bit ECC errors\n");
  } else if (((flagsNum >> 9) & 1) | ((flagsNum >> 25) & 1)) {
    printf("only double bit ECC errors\n");
  } else {
    printf("neither single nor double bit ECC errors\n");
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1198 <main+0x48>
cmpl   $0x2,-0x8(%rbp)
je     11f8 <main+0xa8>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe77(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     11f8 <main+0xa8>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf13(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1434 <main+0x2e4>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x44(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
cmp    %rcx,%rax
jae    12d6 <main+0x186>
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <isxdigit@plt>
cmp    $0x0,%eax
jne    12c0 <main+0x170>
mov    -0x18(%rbp),%rsi
lea    0xf13(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    1298 <main+0x148>
lea    0xf09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    126b <main+0x11b>
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x3,-0x4(%rbp)
jmp    1434 <main+0x2e4>
jmp    12c5 <main+0x175>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1218 <main+0xc8>
movq   $0x0,-0x40(%rbp)
movb   $0x0,-0x1a(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
cmp    %rcx,%rax
jae    1348 <main+0x1f8>
mov    -0x40(%rbp),%rax
shl    $0x4,%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1b(%rbp)
lea    -0x1b(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1060 <strtol@plt>
mov    %rax,-0x28(%rbp)
mov    -0x40(%rbp),%rax
or     -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    12ea <main+0x19a>
mov    -0x40(%rbp),%rax
shr    $0x9,%rax
and    $0x1,%rax
mov    -0x40(%rbp),%rcx
shr    $0x19,%rcx
and    $0x1,%rcx
or     %rcx,%rax
cmp    $0x0,%rax
je     13a5 <main+0x255>
mov    -0x40(%rbp),%rax
shr    $0x8,%rax
and    $0x1,%rax
mov    -0x40(%rbp),%rcx
shr    $0x18,%rcx
and    $0x1,%rcx
or     %rcx,%rax
cmp    $0x0,%rax
je     13a5 <main+0x255>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    142d <main+0x2dd>
mov    -0x40(%rbp),%rax
shr    $0x8,%rax
and    $0x1,%rax
mov    -0x40(%rbp),%rcx
shr    $0x18,%rcx
and    $0x1,%rcx
or     %rcx,%rax
cmp    $0x0,%rax
je     13dd <main+0x28d>
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1428 <main+0x2d8>
mov    -0x40(%rbp),%rax
shr    $0x9,%rax
and    $0x1,%rax
mov    -0x40(%rbp),%rcx
shr    $0x19,%rcx
and    $0x1,%rcx
or     %rcx,%rax
cmp    $0x0,%rax
je     1415 <main+0x2c5>
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1423 <main+0x2d3>
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1428 <main+0x2d8>
jmp    142d <main+0x2dd>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
cmp    $0x2,%edi
jne    120a <main+0xaa>
mov    0x8(%rsi),%r15
mov    %r15,%rdi
call   1050 <strlen@plt>
test   %eax,%eax
je     1257 <main+0xf7>
mov    %eax,%r14d
cltq
cmp    $0x2,%rax
mov    $0x1,%r12d
cmovae %rax,%r12
xor    %ebp,%ebp
xchg   %ax,%ax
movsbl (%r15,%rbp,1),%edi
call   1080 <isxdigit@plt>
test   %eax,%eax
je     12ab <main+0x14b>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    11a0 <main+0x40>
movb   $0x0,0xe(%rsp)
xor    %ebp,%ebp
test   %r14d,%r14d
je     125e <main+0xfe>
lea    0xd(%rsp),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
shl    $0x4,%rbp
movzbl (%r15,%rbx,1),%eax
mov    %al,0xd(%rsp)
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1070 <strtol@plt>
or     %rax,%rbp
add    $0x1,%rbx
cmp    %rbx,%r12
jne    11e0 <main+0x80>
jmp    125e <main+0xfe>
lea    0xebf(%rip),%rdi
call   1040 <puts@plt>
lea    0xed2(%rip),%rdi
call   1040 <puts@plt>
lea    0xefe(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf73(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%ebx
lea    0xf93(%rip),%rdi
jmp    12f8 <main+0x198>
movb   $0x0,0xe(%rsp)
xor    %ebp,%ebp
mov    %ebp,%eax
shr    $0x19,%eax
mov    %ebp,%ecx
shr    $0x9,%ecx
or     %eax,%ecx
mov    %rbp,%rax
shr    $0x8,%rax
shr    $0x18,%rbp
or     %rax,%rbp
test   $0x1,%cl
jne    1291 <main+0x131>
test   $0x1,%bpl
lea    0xda2(%rip),%rax
lea    0xddf(%rip),%rdi
jmp    12a3 <main+0x143>
test   $0x1,%bpl
lea    0xdb7(%rip),%rax
lea    0xde6(%rip),%rdi
cmove  %rax,%rdi
xor    %ebx,%ebx
jmp    12f8 <main+0x198>
lea    0xd4e(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd5f(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
test   %rbp,%rbp
je     12e0 <main+0x180>
nop
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbp
jne    12d0 <main+0x170>
lea    0xdc8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x3,%ebx
lea    0xdb9(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"?\00"
@.str.1 = [32 x i8] c"Usage: <flags (in hex w/o 0x)>\0A\00"
@.str.2 = [57 x i8] c" Decodes the eSeries dram eccStatus number, from the\0A\00"
@.str.3 = [42 x i8] c" \22print__11Ic1Detector\22 shell command\0A\00"
@.str.4 = [101 x i8] c" output, into double bit ECC error, single bit ECC error, both single and double bit ECC errors,\0A\00"
@.str.5 = [50 x i8] c" or neither single nor double bit ECC errors.\0A\00"
@.str.6 = [69 x i8] c" Written by Jonathan Natale for Juniper Networks on 20-Nov-2010.\0A\00"
@.str.7 = [34 x i8] c"Sorry, %s are not a valid flags.\0A\00"
@.str.8 = [8 x i8] c" \00"
@.str.9 = [2 x i8] c" \00"
@.str.10 = [3 x i8] c"^\0A\00"
@.str.11 = [32 x i8] c"Please try again. Exiting ...\0A\00"
@.str.12 = [39 x i8] c"both single and double bit ECC errors\0A\00"
@.str.13 = [28 x i8] c"only single bit ECC errors\0A\00"
@.str.14 = [28 x i8] c"only double bit ECC errors\0A\00"
@.str.15 = [42 x i8] c"neither single nor double bit ECC errors\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [3 x i8]
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 2
br i1 %14, label %24, label %15
15: ; preds = %2
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 2
br i1 %17, label %18, label %31
18: ; preds = %15
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %31
24: ; preds = %18, %2
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.4, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %3
br label %139
31: ; preds = %18, %15
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
store i8* %34, i8** %6
%35 = load i8*, i8** %6
%36 = call i32 @strlen(i8* %35)
store i32 %36, i32* %12
store i64 0, i64* %9
br label %37
37: ; preds = %66, %31
%38 = load i64, i64* %9
%39 = load i32, i32* %12
%40 = sext i32 %39 to i64
%41 = icmp ult i64 %38, %40
br i1 %41, label %42, label %69
42: ; preds = %37
%43 = load i8*, i8** %6
%44 = load i64, i64* %9
%45 = getelementptr inbounds i8, i8* %43, i64 %44
%46 = load i8, i8* %45
%47 = call i32 @isxdigit(i8 signext %46)
%48 = icmp ne i32 %47, 0
br i1 %48, label %65, label %49
49: ; preds = %42
%50 = load i8*, i8** %6
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), i8* %50)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
store i64 0, i64* %10
br label %53
53: ; preds = %59, %49
%54 = load i64, i64* %10
%55 = load i64, i64* %9
%56 = icmp ult i64 %54, %55
br i1 %56, label %57, label %62
57: ; preds = %53
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %59
59: ; preds = %57
%60 = load i64, i64* %10
%61 = add i64 %60, 1
store i64 %61, i64* %10
br label %53
62: ; preds = %53
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0))
store i32 3, i32* %3
br label %139
65: ; preds = %42
br label %66
66: ; preds = %65
%67 = load i64, i64* %9
%68 = add i64 %67, 1
store i64 %68, i64* %9
br label %37
69: ; preds = %37
store i64 0, i64* %11
%70 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 1
store i8 0, i8* %70
store i64 0, i64* %9
br label %71
71: ; preds = %89, %69
%72 = load i64, i64* %9
%73 = load i32, i32* %12
%74 = sext i32 %73 to i64
%75 = icmp ult i64 %72, %74
br i1 %75, label %76, label %92
76: ; preds = %71
%77 = load i64, i64* %11
%78 = shl i64 %77, 4
store i64 %78, i64* %11
%79 = load i8*, i8** %6
%80 = load i64, i64* %9
%81 = getelementptr inbounds i8, i8* %79, i64 %80
%82 = load i8, i8* %81
%83 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
store i8 %82, i8* %83
%84 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%85 = call i64 @strtol(i8* %84, i8** null, i32 16)
store i64 %85, i64* %8
%86 = load i64, i64* %11
%87 = load i64, i64* %8
%88 = or i64 %86, %87
store i64 %88, i64* %11
br label %89
89: ; preds = %76
%90 = load i64, i64* %9
%91 = add i64 %90, 1
store i64 %91, i64* %9
br label %71
92: ; preds = %71
%93 = load i64, i64* %11
%94 = lshr i64 %93, 9
%95 = and i64 %94, 1
%96 = load i64, i64* %11
%97 = lshr i64 %96, 25
%98 = and i64 %97, 1
%99 = or i64 %95, %98
%100 = icmp ne i64 %99, 0
br i1 %100, label %101, label %112
101: ; preds = %92
%102 = load i64, i64* %11
%103 = lshr i64 %102, 8
%104 = and i64 %103, 1
%105 = load i64, i64* %11
%106 = lshr i64 %105, 24
%107 = and i64 %106, 1
%108 = or i64 %104, %107
%109 = icmp ne i64 %108, 0
br i1 %109, label %110, label %112
110: ; preds = %101
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.12, i64 0, i64 0))
br label %138
112: ; preds = %101, %92
%113 = load i64, i64* %11
%114 = lshr i64 %113, 8
%115 = and i64 %114, 1
%116 = load i64, i64* %11
%117 = lshr i64 %116, 24
%118 = and i64 %117, 1
%119 = or i64 %115, %118
%120 = icmp ne i64 %119, 0
br i1 %120, label %121, label %123
121: ; preds = %112
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
br label %137
123: ; preds = %112
%124 = load i64, i64* %11
%125 = lshr i64 %124, 9
%126 = and i64 %125, 1
%127 = load i64, i64* %11
%128 = lshr i64 %127, 25
%129 = and i64 %128, 1
%130 = or i64 %126, %129
%131 = icmp ne i64 %130, 0
br i1 %131, label %132, label %134
132: ; preds = %123
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
br label %136
134: ; preds = %123
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0))
br label %136
136: ; preds = %134, %132
br label %137
137: ; preds = %136, %121
br label %138
138: ; preds = %137, %110
store i32 0, i32* %3
br label %139
139: ; preds = %138, %62, %24
%140 = load i32, i32* %3
ret i32 %140
}

LLVM IR (-O2):
@.str.7 = [34 x i8] c"Sorry, %s are not a valid flags.\0A\00"
@.str.8 = [8 x i8] c" \00"
@str = [41 x i8] c"neither single nor double bit ECC errors\00"
@str.16 = [27 x i8] c"only double bit ECC errors\00"
@str.17 = [27 x i8] c"only single bit ECC errors\00"
@str.18 = [38 x i8] c"both single and double bit ECC errors\00"
@str.19 = [2 x i8] c"^\00"
@str.20 = [31 x i8] c"Please try again. Exiting ...\00"
@str.21 = [31 x i8] c"Usage: <flags (in hex w/o 0x)>\00"
@str.22 = [56 x i8] c" Decodes the eSeries dram eccStatus number, from the\00"
@str.23 = [41 x i8] c" \22print__11Ic1Detector\22 shell command\00"
@str.24 = [100 x i8] c" output, into double bit ECC error, single bit ECC error, both single and double bit ECC errors,\00"
@str.25 = [49 x i8] c" or neither single nor double bit ECC errors.\00"
@str.26 = [68 x i8] c" Written by Jonathan Natale for Juniper Networks on 20-Nov-2010.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [3 x i8]
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 2
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.21, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.22, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.23, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @str.24, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.25, i64 0, i64 0))
br label %72
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32 @strlen(i8* %14)
%16 = sext i32 %15 to i64
%17 = icmp eq i32 %15, 0
br i1 %17, label %18, label %20
18: ; preds = %12
%19 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
store i8 0, i8* %19
br label %56
20: ; preds = %12
%21 = call i64 @llvm.umax.i64(i64 %16, i64 1)
br label %22
22: ; preds = %20, %39
%23 = phi i64 [ %40, %39 ], [ 0, %20 ]
%24 = getelementptr inbounds i8, i8* %14, i64 %23
%25 = load i8, i8* %24
%26 = tail call i32 @isxdigit(i8 signext %25)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %39
28: ; preds = %22
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), i8* %14)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%31 = icmp eq i64 %23, 0
br i1 %31, label %37, label %32
32: ; preds = %28, %32
%33 = phi i64 [ %35, %32 ], [ 0, %28 ]
%34 = tail call i32 @putchar(i32 32)
%35 = add nuw i64 %33, 1
%36 = icmp eq i64 %35, %23
br i1 %36, label %37, label %32
37: ; preds = %32, %28
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.19, i64 0, i64 0))
br label %72
39: ; preds = %22
%40 = add nuw i64 %23, 1
%41 = icmp eq i64 %40, %21
br i1 %41, label %42, label %22
42: ; preds = %39
%43 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
store i8 0, i8* %43
br i1 %17, label %56, label %44
44: ; preds = %42
%45 = call i64 @llvm.umax.i64(i64 %16, i64 1)
br label %46
46: ; preds = %44, %46
%47 = phi i64 [ %53, %46 ], [ 0, %44 ]
%48 = phi i64 [ %54, %46 ], [ 0, %44 ]
%49 = shl i64 %47, 4
%50 = getelementptr inbounds i8, i8* %14, i64 %48
%51 = load i8, i8* %50
store i8 %51, i8* %4
%52 = call i64 @strtol(i8* nocapture %4, i8** null, i32 16)
%53 = or i64 %52, %49
%54 = add nuw i64 %48, 1
%55 = icmp eq i64 %54, %45
br i1 %55, label %56, label %46
56: ; preds = %46, %18, %42
%57 = phi i64 [ 0, %42 ], [ 0, %18 ], [ %53, %46 ]
%58 = lshr i64 %57, 9
%59 = lshr i64 %57, 25
%60 = or i64 %58, %59
%61 = and i64 %60, 1
%62 = icmp eq i64 %61, 0
%63 = lshr i64 %57, 8
%64 = lshr i64 %57, 24
%65 = or i64 %63, %64
%66 = and i64 %65, 1
%67 = icmp eq i64 %66, 0
br i1 %62, label %70, label %68
68: ; preds = %56
%69 = select i1 %67, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.16, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @str.18, i64 0, i64 0)
br label %72
70: ; preds = %56
%71 = select i1 %67, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.17, i64 0, i64 0)
br label %72
72: ; preds = %70, %68, %37, %6
%73 = phi i8* [ getelementptr inbounds ([31 x i8], [31 x i8]* @str.20, i64 0, i64 0), %37 ], [ getelementptr inbounds ([68 x i8], [68 x i8]* @str.26, i64 0, i64 0), %6 ], [ %69, %68 ], [ %71, %70 ]
%74 = phi i32 [ 3, %37 ], [ 1, %6 ], [ 0, %68 ], [ 0, %70 ]
%75 = tail call i32 @puts(i8* dereferenceable(1) %73)
ret i32 %74
}