#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 */
scalar_t__ ebp();
scalar_t__ esp();
int /*<<< orphan*/ munkle_print(unsigned char *, unsigned char *);
int /*<<< orphan*/ print_up(unsigned char *, unsigned char *);
int /*<<< orphan*/ printf(char *, ...);
void fn(char *str) {
  char buf[32] = {0};
  char *cp = buf;
  unsigned char *sp = (char *)esp();
  unsigned char *bp = (char *)ebp();
  int i;
  for (i = 8; i > (sp - bp); i--) {
    printf("%02x", bp[i - 1]);
    if ((255 + i) % 32 == 0)
      printf("\n");
    else if ((255 + i) % 8 == 0)
      printf("   ");
    else if ((255 + i) % 4 == 0)
      printf(" ");
  }
  printf("\n----------------\n");
  munkle_print(sp, bp);
  printf("\n----------------\n");
  print_up(sp, bp);
  printf(" SP+8 to BP-8 \n");
  print_up(sp - 8, bp + 8);
  printf("\n----------------\n");
  print_up(sp, bp - 8);
  printf("BP to SP\n");
  print_up(bp, sp);
  while (*str && *str != ' ') {
    *cp++ = *str++;
  }
  for (cp = buf; *cp; cp++) {
    printf("%02x", (unsigned char)*cp);
    if (((unsigned long)cp + 1) % 16 == 0) {
      printf("\n");
    } else if (((unsigned long)cp + 1) % 8 == 0) {
      printf("   ");
    } else if (((unsigned long)cp + 1) % 4 == 0) {
      printf(" ");
    }
  }
  printf("\n");
  printf("%016lx\n", *(unsigned long *)&buf[40]);
}


x86 assembly (clang, -O0):
<fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1060 <memset@plt>
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x0,%al
call   1050 <esp@plt>
mov    %rax,-0x40(%rbp)
mov    $0x0,%al
call   1080 <ebp@plt>
mov    %rax,-0x48(%rbp)
movl   $0x8,-0x4c(%rbp)
movslq -0x4c(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%rdx
sub    %rdx,%rcx
cmp    %rcx,%rax
jle    1274 <fn+0x114>
mov    -0x48(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4c(%rbp),%eax
add    $0xff,%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1204 <fn+0xa4>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1261 <fn+0x101>
mov    -0x4c(%rbp),%eax
add    $0xff,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1230 <fn+0xd0>
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    125c <fn+0xfc>
mov    -0x4c(%rbp),%eax
add    $0xff,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1257 <fn+0xf7>
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    125c <fn+0xfc>
jmp    1261 <fn+0x101>
jmp    1266 <fn+0x106>
mov    -0x4c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4c(%rbp)
jmp    11a1 <fn+0x41>
lea    0xd8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   1030 <munkle_print@plt>
lea    0xd73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   1070 <print_up@plt>
lea    0xd6b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%rdi
add    $0xfffffffffffffff8,%rdi
mov    -0x48(%rbp),%rsi
add    $0x8,%rsi
call   1070 <print_up@plt>
lea    0xd35(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rsi
add    $0xfffffffffffffff8,%rsi
call   1070 <print_up@plt>
lea    0xd39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%rdi
mov    -0x40(%rbp),%rsi
call   1070 <print_up@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x4d(%rbp)
je     132c <fn+0x1cc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
setne  %al
mov    %al,-0x4d(%rbp)
mov    -0x4d(%rbp),%al
test   $0x1,%al
jne    133c <fn+0x1dc>
jmp    1363 <fn+0x203>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x38(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x38(%rbp)
mov    %cl,(%rax)
jmp    1307 <fn+0x1a7>
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmpb   $0x0,(%rax)
je     1423 <fn+0x2c3>
mov    -0x38(%rbp),%rax
movzbl (%rax),%esi
lea    0xc7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
and    $0xf,%rax
cmp    $0x0,%rax
jne    13b6 <fn+0x256>
lea    0xc80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    140d <fn+0x2ad>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
and    $0x7,%rax
cmp    $0x0,%rax
jne    13df <fn+0x27f>
lea    0xc32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1408 <fn+0x2a8>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
and    $0x3,%rax
cmp    $0x0,%rax
jne    1403 <fn+0x2a3>
lea    0xc0b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1408 <fn+0x2a8>
jmp    140d <fn+0x2ad>
jmp    1412 <fn+0x2b2>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    136b <fn+0x20b>
lea    0xc00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xbfa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%r15
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1070 <esp@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1090 <ebp@plt>
mov    %rax,%rbx
mov    %rbp,0x8(%rsp)
sub    %rax,%rbp
cmp    $0x7,%rbp
jg     121c <fn+0xac>
mov    $0x8,%r14d
lea    0xe43(%rip),%r12
jmp    11d3 <fn+0x63>
nop
lea    0xe3e(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
cmp    %r14,%rbp
jge    121c <fn+0xac>
mov    %r14,%r13
add    $0xffffffffffffffff,%r14
movzbl -0x1(%rbx,%r13,1),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0xff,%r13
test   $0x1f,%r13b
je     1210 <fn+0xa0>
test   $0x7,%r13b
je     11c0 <fn+0x50>
test   $0x3,%r13b
jne    11ce <fn+0x5e>
mov    $0x20,%edi
jmp    1215 <fn+0xa5>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11ce <fn+0x5e>
lea    0xdfd(%rip),%r12
mov    %r12,%rdi
call   1050 <puts@plt>
mov    0x8(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1040 <munkle_print@plt>
mov    %r12,%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1080 <print_up@plt>
lea    0xdbc(%rip),%rdi
call   1050 <puts@plt>
mov    %rbp,%rdi
add    $0xfffffffffffffff8,%rdi
lea    0x8(%rbx),%rsi
call   1080 <print_up@plt>
mov    %r12,%rdi
call   1050 <puts@plt>
mov    %rbx,%rsi
add    $0xfffffffffffffff8,%rsi
mov    %rbp,%rdi
call   1080 <print_up@plt>
lea    0xdaa(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <print_up@plt>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movzbl (%r15,%rax,1),%ecx
test   $0xdf,%cl
je     12b4 <fn+0x144>
mov    %cl,0x10(%rsp,%rax,1)
add    $0x1,%rax
jmp    12a0 <fn+0x130>
mov    0x10(%rsp),%al
test   %al,%al
je     132c <fn+0x1bc>
lea    0x11(%rsp),%rbx
lea    0xd38(%rip),%r15
lea    0xd36(%rip),%r14
mov    %rbx,%rbp
jmp    12f9 <fn+0x189>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movzbl (%rbx),%eax
add    $0x1,%rbp
add    $0x1,%rbx
test   %al,%al
je     132c <fn+0x1bc>
movzbl %al,%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
test   $0xf,%bpl
je     1320 <fn+0x1b0>
test   $0x7,%bpl
je     12e0 <fn+0x170>
test   $0x3,%bpl
jne    12ea <fn+0x17a>
mov    $0x20,%edi
jmp    1325 <fn+0x1b5>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    12ea <fn+0x17a>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x38(%rsp),%rsi
lea    0xcc7(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%02x\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [4 x i8] c" \00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [19 x i8] c"\0A----------------\0A\00"
@.str.5 = [16 x i8] c" SP+8 to BP-8 \0A\00"
@.str.6 = [10 x i8] c"BP to SP\0A\00"
@.str.7 = [8 x i8] c"%016lx\0A\00"
define void @fn(i8* %0) {
%2 = alloca i8*
%3 = alloca [32 x i8]
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %2
%8 = bitcast [32 x i8]* %3 to i8*
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
store i8* %9, i8** %4
%10 = call i64 (...) @esp()
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = call i64 (...) @ebp()
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %6
store i32 8, i32* %7
br label %14
14: ; preds = %55, %1
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = load i8*, i8** %5
%18 = load i8*, i8** %6
%19 = ptrtoint i8* %17 to i64
%20 = ptrtoint i8* %18 to i64
%21 = sub i64 %19, %20
%22 = icmp sgt i64 %16, %21
br i1 %22, label %23, label %58
23: ; preds = %14
%24 = load i8*, i8** %6
%25 = load i32, i32* %7
%26 = sub nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %24, i64 %27
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %7
%33 = add nsw i32 255, %32
%34 = srem i32 %33, 32
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %23
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %54
38: ; preds = %23
%39 = load i32, i32* %7
%40 = add nsw i32 255, %39
%41 = srem i32 %40, 8
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %38
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %53
45: ; preds = %38
%46 = load i32, i32* %7
%47 = add nsw i32 255, %46
%48 = srem i32 %47, 4
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %45
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %52
52: ; preds = %50, %45
br label %53
53: ; preds = %52, %43
br label %54
54: ; preds = %53, %36
br label %55
55: ; preds = %54
%56 = load i32, i32* %7
%57 = add nsw i32 %56, -1
store i32 %57, i32* %7
br label %14
58: ; preds = %14
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%60 = load i8*, i8** %5
%61 = load i8*, i8** %6
%62 = call i32 @munkle_print(i8* %60, i8* %61)
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%64 = load i8*, i8** %5
%65 = load i8*, i8** %6
%66 = call i32 @print_up(i8* %64, i8* %65)
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%68 = load i8*, i8** %5
%69 = getelementptr inbounds i8, i8* %68, i64 -8
%70 = load i8*, i8** %6
%71 = getelementptr inbounds i8, i8* %70, i64 8
%72 = call i32 @print_up(i8* %69, i8* %71)
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%74 = load i8*, i8** %5
%75 = load i8*, i8** %6
%76 = getelementptr inbounds i8, i8* %75, i64 -8
%77 = call i32 @print_up(i8* %74, i8* %76)
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%79 = load i8*, i8** %6
%80 = load i8*, i8** %5
%81 = call i32 @print_up(i8* %79, i8* %80)
br label %82
82: ; preds = %94, %58
%83 = load i8*, i8** %2
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp ne i32 %85, 0
br i1 %86, label %87, label %92
87: ; preds = %82
%88 = load i8*, i8** %2
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = icmp ne i32 %90, 32
br label %92
92: ; preds = %87, %82
%93 = phi i1 [ false, %82 ], [ %91, %87 ]
br i1 %93, label %94, label %100
94: ; preds = %92
%95 = load i8*, i8** %2
%96 = getelementptr inbounds i8, i8* %95, i32 1
store i8* %96, i8** %2
%97 = load i8, i8* %95
%98 = load i8*, i8** %4
%99 = getelementptr inbounds i8, i8* %98, i32 1
store i8* %99, i8** %4
store i8 %97, i8* %98
br label %82
100: ; preds = %92
%101 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
store i8* %101, i8** %4
br label %102
102: ; preds = %137, %100
%103 = load i8*, i8** %4
%104 = load i8, i8* %103
%105 = icmp ne i8 %104, 0
br i1 %105, label %106, label %140
106: ; preds = %102
%107 = load i8*, i8** %4
%108 = load i8, i8* %107
%109 = zext i8 %108 to i32
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %109)
%111 = load i8*, i8** %4
%112 = ptrtoint i8* %111 to i64
%113 = add i64 %112, 1
%114 = urem i64 %113, 16
%115 = icmp eq i64 %114, 0
br i1 %115, label %116, label %118
116: ; preds = %106
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %136
118: ; preds = %106
%119 = load i8*, i8** %4
%120 = ptrtoint i8* %119 to i64
%121 = add i64 %120, 1
%122 = urem i64 %121, 8
%123 = icmp eq i64 %122, 0
br i1 %123, label %124, label %126
124: ; preds = %118
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %135
126: ; preds = %118
%127 = load i8*, i8** %4
%128 = ptrtoint i8* %127 to i64
%129 = add i64 %128, 1
%130 = urem i64 %129, 4
%131 = icmp eq i64 %130, 0
br i1 %131, label %132, label %134
132: ; preds = %126
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %134
134: ; preds = %132, %126
br label %135
135: ; preds = %134, %124
br label %136
136: ; preds = %135, %116
br label %137
137: ; preds = %136
%138 = load i8*, i8** %4
%139 = getelementptr inbounds i8, i8* %138, i32 1
store i8* %139, i8** %4
br label %102
140: ; preds = %102
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%142 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 40
%143 = bitcast i8* %142 to i64*
%144 = load i64, i64* %143
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i64 %144)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
@.str.2 = [4 x i8] c" \00"
@.str.7 = [8 x i8] c"%016lx\0A\00"
@str.9 = [15 x i8] c" SP+8 to BP-8 \00"
@str.10 = [18 x i8] c"\0A----------------\00"
@str.11 = [9 x i8] c"BP to SP\00"
define void @fn(i8* nocapture %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = tail call i64 (...) @esp()
%5 = inttoptr i64 %4 to i8*
%6 = tail call i64 (...) @ebp()
%7 = inttoptr i64 %6 to i8*
%8 = sub i64 %4, %6
%9 = icmp slt i64 %8, 8
br i1 %9, label %10, label %35
10: ; preds = %1, %33
%11 = phi i64 [ %12, %33 ], [ 8, %1 ]
%12 = add nsw i64 %11, -1
%13 = getelementptr inbounds i8, i8* %7, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = trunc i64 %11 to i32
%18 = add i32 %17, 255
%19 = and i32 %18, 31
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %10
%22 = tail call i32 @putchar(i32 10)
br label %33
23: ; preds = %10
%24 = and i32 %18, 7
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %33
28: ; preds = %23
%29 = and i32 %18, 3
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = tail call i32 @putchar(i32 32)
br label %33
33: ; preds = %21, %28, %31, %26
%34 = icmp slt i64 %8, %12
br i1 %34, label %10, label %35
35: ; preds = %33, %1
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.10, i64 0, i64 0))
%37 = tail call i32 @munkle_print(i8* %5, i8* %7)
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.10, i64 0, i64 0))
%39 = tail call i32 @print_up(i8* %5, i8* %7)
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.9, i64 0, i64 0))
%41 = getelementptr inbounds i8, i8* %5, i64 -8
%42 = getelementptr inbounds i8, i8* %7, i64 8
%43 = tail call i32 @print_up(i8* %41, i8* %42)
%44 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.10, i64 0, i64 0))
%45 = getelementptr inbounds i8, i8* %7, i64 -8
%46 = tail call i32 @print_up(i8* %5, i8* %45)
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.11, i64 0, i64 0))
%48 = tail call i32 @print_up(i8* %7, i8* %5)
br label %49
49: ; preds = %53, %35
%50 = phi i8* [ %3, %35 ], [ %55, %53 ]
%51 = phi i8* [ %0, %35 ], [ %54, %53 ]
%52 = load i8, i8* %51
switch i8 %52, label %53 [
i8 0, label %56
i8 32, label %56
]
53: ; preds = %49
%54 = getelementptr inbounds i8, i8* %51, i64 1
%55 = getelementptr inbounds i8, i8* %50, i64 1
store i8 %52, i8* %50
br label %49
56: ; preds = %49, %49
%57 = load i8, i8* %3
%58 = icmp eq i8 %57, 0
br i1 %58, label %84, label %59
59: ; preds = %56, %80
%60 = phi i8 [ %82, %80 ], [ %57, %56 ]
%61 = phi i8* [ %81, %80 ], [ %3, %56 ]
%62 = zext i8 %60 to i32
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %62)
%64 = ptrtoint i8* %61 to i64
%65 = add i64 %64, 1
%66 = and i64 %65, 15
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %59
%69 = call i32 @putchar(i32 10)
br label %80
70: ; preds = %59
%71 = and i64 %65, 7
%72 = icmp eq i64 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %70
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %80
75: ; preds = %70
%76 = and i64 %65, 3
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %75
%79 = call i32 @putchar(i32 32)
br label %80
80: ; preds = %68, %75, %78, %73
%81 = getelementptr inbounds i8, i8* %61, i64 1
%82 = load i8, i8* %81
%83 = icmp eq i8 %82, 0
br i1 %83, label %84, label %59
84: ; preds = %80, %56
%85 = call i32 @putchar(i32 10)
%86 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 40
%87 = bitcast i8* %86 to i64*
%88 = load i64, i64* %87
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i64 %88)
ret void
}