#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 fetchIndexableByte(int, int);
int fetchIndexableByteLength(int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ putchar(char);
void deepInspectIndexableBytes(int op, int depth, int level) {
  int indexableByteLength = fetchIndexableByteLength(op);
  if (indexableByteLength == 0) {
    return;
  }
  for (int index = 0; index < indexableByteLength; ++index) {
    for (int i = 0; i < level; ++i)
      putchar(' ');
    printf("- byte %d: %d\n", index + 1, fetchIndexableByte(op, index));
  }
}


x86 assembly (clang, -O0):
<deepInspectIndexableBytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <fetchIndexableByteLength@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    116b <deepInspectIndexableBytes+0x2b>
jmp    11dc <deepInspectIndexableBytes+0x9c>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11dc <deepInspectIndexableBytes+0x9c>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11a9 <deepInspectIndexableBytes+0x69>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1185 <deepInspectIndexableBytes+0x45>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1060 <fetchIndexableByte@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
lea    0xe37(%rip),%rdi
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1172 <deepInspectIndexableBytes+0x32>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deepInspectIndexableBytes>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edx,%r13d
mov    %edi,%r14d
call   1040 <fetchIndexableByteLength@plt>
test   %eax,%eax
jle    11b1 <deepInspectIndexableBytes+0x71>
mov    %eax,%r12d
xor    %ebp,%ebp
lea    0xe9a(%rip),%r15
jmp    1190 <deepInspectIndexableBytes+0x50>
nopl   0x0(%rax,%rax,1)
lea    0x1(%rbp),%ebx
mov    %r14d,%edi
mov    %ebp,%esi
call   1060 <fetchIndexableByte@plt>
mov    %r15,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1050 <printf@plt>
mov    %ebx,%ebp
cmp    %r12d,%ebx
je     11b1 <deepInspectIndexableBytes+0x71>
mov    %r13d,%ebx
test   %r13d,%r13d
jle    1170 <deepInspectIndexableBytes+0x30>
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    11a0 <deepInspectIndexableBytes+0x60>
jmp    1170 <deepInspectIndexableBytes+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"- byte %d: %d\0A\00"
define void @deepInspectIndexableBytes(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %4
%11 = call i32 @fetchIndexableByteLength(i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
br label %40
15: ; preds = %3
store i32 0, i32* %8
br label %16
16: ; preds = %37, %15
%17 = load i32, i32* %8
%18 = load i32, i32* %7
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %40
20: ; preds = %16
store i32 0, i32* %9
br label %21
21: ; preds = %27, %20
%22 = load i32, i32* %9
%23 = load i32, i32* %6
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = call i32 @putchar(i8 signext 32)
br label %27
27: ; preds = %25
%28 = load i32, i32* %9
%29 = add nsw i32 %28, 1
store i32 %29, i32* %9
br label %21
30: ; preds = %21
%31 = load i32, i32* %8
%32 = add nsw i32 %31, 1
%33 = load i32, i32* %4
%34 = load i32, i32* %8
%35 = call i32 @fetchIndexableByte(i32 %33, i32 %34)
%36 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %32, i32 %35)
br label %37
37: ; preds = %30
%38 = load i32, i32* %8
%39 = add nsw i32 %38, 1
store i32 %39, i32* %8
br label %16
40: ; preds = %14, %16
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"- byte %d: %d\0A\00"
define void @deepInspectIndexableBytes(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @fetchIndexableByteLength(i32 %0)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %20
6: ; preds = %3
%7 = icmp sgt i32 %2, 0
br label %8
8: ; preds = %6, %10
%9 = phi i32 [ 0, %6 ], [ %11, %10 ]
br i1 %7, label %15, label %10
10: ; preds = %15, %8
%11 = add nuw nsw i32 %9, 1
%12 = tail call i32 @fetchIndexableByte(i32 %0, i32 %9)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
%14 = icmp eq i32 %11, %4
br i1 %14, label %20, label %8
15: ; preds = %8, %15
%16 = phi i32 [ %18, %15 ], [ 0, %8 ]
%17 = tail call i32 @putchar(i8 signext 32)
%18 = add nuw nsw i32 %16, 1
%19 = icmp eq i32 %18, %2
br i1 %19, label %10, label %15
20: ; preds = %10, %3
ret void
}