#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 */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int get_u16(int /*<<< orphan*/ const *);
int get_u32(int /*<<< orphan*/ const *);
char *indent(int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, int);
void mp4tree_box_ctab_print(const uint8_t *p, size_t len, int depth) {
  printf("%s  Color Table Seed   %x\n", indent(depth, 0), get_u32(p));
  printf("%s  Color Table Flags  %u\n", indent(depth, 0), get_u16(p + 4));
  printf("%s  Color Table Size   %u\n", indent(depth, 0), get_u16(p + 6));
}


x86 assembly (clang, -O0):
<mp4tree_box_ctab_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
xor    %esi,%esi
call   1050 <indent@plt>
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_u32@plt>
mov    -0x30(%rbp),%rsi
mov    %eax,%edx
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
xor    %esi,%esi
call   1050 <indent@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
call   1060 <get_u16@plt>
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
xor    %esi,%esi
call   1050 <indent@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
call   1060 <get_u16@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp4tree_box_ctab_print>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rdi,%rbx
mov    %edx,%edi
xor    %esi,%esi
call   1050 <indent@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <get_u32@plt>
lea    0xe9c(%rip),%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1050 <indent@plt>
mov    %rax,%r14
lea    0x10(%rbx),%rdi
call   1060 <get_u16@plt>
lea    0xe91(%rip),%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1050 <indent@plt>
mov    %rax,%rbp
add    $0x18,%rbx
mov    %rbx,%rdi
call   1060 <get_u16@plt>
lea    0xe83(%rip),%rdi
mov    %rbp,%rsi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"%s Color Table Seed %x\0A\00"
@.str.1 = [27 x i8] c"%s Color Table Flags %u\0A\00"
@.str.2 = [27 x i8] c"%s Color Table Size %u\0A\00"
define void @mp4tree_box_ctab_print(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = call i8* @indent(i32 %7, i32 0)
%9 = load i32*, i32** %4
%10 = call i32 @get_u32(i32* %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %10)
%12 = load i32, i32* %6
%13 = call i8* @indent(i32 %12, i32 0)
%14 = load i32*, i32** %4
%15 = getelementptr inbounds i32, i32* %14, i64 4
%16 = call i32 @get_u16(i32* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %13, i32 %16)
%18 = load i32, i32* %6
%19 = call i8* @indent(i32 %18, i32 0)
%20 = load i32*, i32** %4
%21 = getelementptr inbounds i32, i32* %20, i64 6
%22 = call i32 @get_u16(i32* %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %19, i32 %22)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"%s Color Table Seed %x\0A\00"
@.str.1 = [27 x i8] c"%s Color Table Flags %u\0A\00"
@.str.2 = [27 x i8] c"%s Color Table Size %u\0A\00"
define void @mp4tree_box_ctab_print(i32* %0, i64 %1, i32 %2) {
%4 = tail call i8* @indent(i32 %2, i32 0)
%5 = tail call i32 @get_u32(i32* %0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %5)
%7 = tail call i8* @indent(i32 %2, i32 0)
%8 = getelementptr inbounds i32, i32* %0, i64 4
%9 = tail call i32 @get_u16(i32* %8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %7, i32 %9)
%11 = tail call i8* @indent(i32 %2, i32 0)
%12 = getelementptr inbounds i32, i32* %0, i64 6
%13 = tail call i32 @get_u16(i32* %12)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %11, i32 %13)
ret void
}