// File: jimmiebergmann[P]fbx-file/examples/example1.cpp
// Function: printRecord(Fbx::Record const*, unsigned long)
void printRecord(const Fbx::Record * record, size_t level = 0)
{
    std::cout << std::string(level * 3, ' ') << "Rec: " << record->name() << std::endl;

    for (auto p : record->properties())
    {
        std::cout << std::string((level + 1) * 3, ' ') << "Prop - " << p->code() << ": " << p->string() << std::endl;
    }
    for (auto r : *record)
    {
        printRecord(r, level + 1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq (%rax,%rax,2), %rax
movq %rax, -0xe0(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x3570
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rcx
leaq -0x30(%rbp), %rdi
movl $0x20, %edx
callq 0x31e0
jmp 0x339a0
movq 0x11629(%rip), %rdi     # 0x44fd0
leaq -0x30(%rbp), %rsi
callq 0x32b0
movq %rax, -0xe8(%rbp)
jmp 0x339b9
movq -0xe8(%rbp), %rdi
leaq 0x3911(%rip), %rsi      # 0x372d8
callq 0x32f0
movq %rax, -0xf0(%rbp)
jmp 0x339d5
movq -0x8(%rbp), %rdi
callq 0x23530
movq %rax, -0xf8(%rbp)
jmp 0x339e7
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdi
callq 0x32b0
movq %rax, -0x100(%rbp)
jmp 0x33a03
movq -0x100(%rbp), %rdi
movq 0x1159f(%rip), %rsi     # 0x44fb0
callq 0x3320
jmp 0x33a18
leaq -0x30(%rbp), %rdi
callq 0x31c0
leaq -0x31(%rbp), %rdi
callq 0x3340
movq -0x8(%rbp), %rdi
callq 0x241f0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x217a0
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0x21800
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x29120
testb $0x1, %al
jne 0x33a67
jmp 0x33c35
leaq -0x58(%rbp), %rdi
callq 0x29150
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
leaq 0x3(%rax,%rax,2), %rax
movq %rax, -0x110(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x3570
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rcx
leaq -0x88(%rbp), %rdi
movl $0x20, %edx
callq 0x31e0
jmp 0x33abb
movq 0x1150e(%rip), %rdi     # 0x44fd0
leaq -0x88(%rbp), %rsi
callq 0x32b0
movq %rax, -0x118(%rbp)
jmp 0x33ad7
movq -0x118(%rbp), %rdi
leaq 0x37f9(%rip), %rsi      # 0x372de
callq 0x32f0
movq %rax, -0x120(%rbp)
jmp 0x33af3
movq -0x68(%rbp), %rdi
callq 0x21030
movb %al, -0x121(%rbp)
jmp 0x33b04
movq -0x120(%rbp), %rdi
movb -0x121(%rbp), %al
movzbl %al, %esi
callq 0x3470
movq %rax, -0x130(%rbp)
jmp 0x33b22
movq -0x130(%rbp), %rdi
leaq 0x37ab(%rip), %rsi      # 0x372db
callq 0x32f0
movq %rax, -0x138(%rbp)
jmp 0x33b3e
movq -0x68(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x21190
jmp 0x33b50
movq -0x138(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x32b0
movq %rax, -0x140(%rbp)
jmp 0x33b6c
movq -0x140(%rbp), %rdi
movq 0x11436(%rip), %rsi     # 0x44fb0
callq 0x3320
jmp 0x33b81
leaq -0xb0(%rbp), %rdi
callq 0x31c0
leaq -0x88(%rbp), %rdi
callq 0x31c0
leaq -0x89(%rbp), %rdi
callq 0x3340
leaq -0x58(%rbp), %rdi
callq 0x29180
jmp 0x33a51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x33bd6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x31c0
leaq -0x31(%rbp), %rdi
callq 0x3340
jmp 0x33cc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x33c24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x33c18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x31c0
leaq -0x88(%rbp), %rdi
callq 0x31c0
leaq -0x89(%rbp), %rdi
callq 0x3340
jmp 0x33cc0
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x25e80
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x25eb0
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x29520
testb $0x1, %al
jne 0x33c7f
jmp 0x33cb7
leaq -0xc0(%rbp), %rdi
callq 0x29060
movq (%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1, %rsi
callq 0x33950
leaq -0xc0(%rbp), %rdi
callq 0x29090
jmp 0x33c66
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x3560
nopl (%rax)