// File: /workspace/github_cpp_makefile_star2_O2/bluesky466[P]ResourcesArscDemo/main.cpp
// Function: printValue(Res_value const*, ResStringPool_header, unsigned char*)
void printValue(const Res_value* value, struct ResStringPool_header globalStringPoolHeader, unsigned char* pGlobalStrings) {
    if (value->dataType == Res_value::TYPE_NULL) {
        printf("(null)\n");
    } else if (value->dataType == Res_value::TYPE_REFERENCE) {
		printf("(reference) 0x%08x\n",value->data);
    } else if (value->dataType == Res_value::TYPE_ATTRIBUTE) {
		printf("(attribute) 0x%08x\n",value->data);
    } else if (value->dataType == Res_value::TYPE_STRING) {
		printf("(string) ");
		printStringFromStringsPool(
				(uint32_t*)pGlobalStrings,
				(char*)pGlobalStrings + globalStringPoolHeader.stringsStart - sizeof(struct ResStringPool_header),
				value->data,
				globalStringPoolHeader.flags & ResStringPool_header::UTF8_FLAG
		);
    } else if (value->dataType == Res_value::TYPE_FLOAT) {
        printf("(float) %f\n",*(const float*)&value->data);
    } else if (value->dataType == Res_value::TYPE_DIMENSION) {
        printf("(dimension) ");
		printStringOfComplex(value->data, false);
    } else if (value->dataType == Res_value::TYPE_FRACTION) {
        printf("(fraction) ");
		printStringOfComplex(value->data, true);
    } else if (value->dataType >= Res_value::TYPE_FIRST_COLOR_INT
            && value->dataType <= Res_value::TYPE_LAST_COLOR_INT) {
		printf("(color) #%08x\n", value->data);
    } else if (value->dataType == Res_value::TYPE_INT_BOOLEAN) {
        printf("(boolean) %s\n",value->data ? "true" : "false");
    } else if (value->dataType >= Res_value::TYPE_FIRST_INT
            && value->dataType <= Res_value::TYPE_LAST_INT) {
        printf("(int) %d or %u\n", value->data, value->data);
    } else {
		printf("(unknown type)\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl 0x3(%rdi), %eax
cmpq $0x6, %rax
ja 0x2959
leaq 0x2732(%rip), %rcx      # 0x5004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2a6f(%rip), %rdi      # 0x5351
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21a0
cvtss2sd 0x4(%rbx), %xmm0
leaq 0x28ae(%rip), %rdi      # 0x51ab
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2030
movl 0x4(%rbx), %esi
leaq 0x2875(%rip), %rdi      # 0x518d
jmp 0x2979
movq %rsi, %r14
leaq 0x10(%rbp), %r15
leaq 0x2879(%rip), %rdi      # 0x51a1
xorl %eax, %eax
callq 0x2030
movl 0x14(%r15), %eax
leaq (%r14,%rax), %rsi
addq $-0x1c, %rsi
movl 0x4(%rbx), %edx
movl $0x100, %ecx            # imm = 0x100
andl 0x10(%r15), %ecx
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2856
movl %eax, %ecx
andb $-0x4, %cl
cmpb $0x1c, %cl
jne 0x29c2
movl 0x4(%rbx), %esi
leaq 0x2863(%rip), %rdi      # 0x51d0
jmp 0x2979
movl 0x4(%rbx), %esi
leaq 0x2800(%rip), %rdi      # 0x5179
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2030
leaq 0x2826(%rip), %rdi      # 0x51b7
xorl %eax, %eax
callq 0x2030
movl 0x4(%rbx), %edi
xorl %esi, %esi
jmp 0x29b3
leaq 0x281e(%rip), %rdi      # 0x51c4
xorl %eax, %eax
callq 0x2030
movl 0x4(%rbx), %edi
pushq $0x1
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2aad
cmpb $0x12, %al
jne 0x29f4
cmpl $0x0, 0x4(%rbx)
leaq 0x2821(%rip), %rax      # 0x51f2
leaq 0x2815(%rip), %rsi      # 0x51ed
cmoveq %rax, %rsi
leaq 0x27fc(%rip), %rdi      # 0x51df
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2030
andb $-0x10, %al
cmpb $0x10, %al
jne 0x2a17
movl 0x4(%rbx), %edx
leaq 0x27f4(%rip), %rdi      # 0x51f8
movl %edx, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2030
leaq 0x2924(%rip), %rdi      # 0x5342
jmp 0x28e2