// File: /workspace/github_cpp_makefile_star2_O1/Fohlen[P]cubescript-standalone/command.cpp
// Function: compileval(vector<unsigned int>&, int, char*, int)
static inline void compileval(vector<uint> &code, int wordtype, char *word, int wordlen)
{
    switch(wordtype)
    {
        case VAL_STR: compilestr(code, word, wordlen, true); break;
        case VAL_ANY: compilestr(code, word, wordlen); break;
        case VAL_FLOAT: compilefloat(code, word); break;
        case VAL_INT: compileint(code, word); break;
        case VAL_CODE: 
        {
            int start = code.length();
            code.add(CODE_BLOCK);
            code.add(CODE_OFFSET|((start+2)<<8));
            const char *p = word;
            compilestatements(code, p, VAL_ANY);
            code.add(CODE_EXIT|RET_STR);
            code[start] |= uint(code.length() - (start + 1))<<8;
            break;
        }
        case VAL_IDENT: compileident(code, word); break;
        default:
            break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
decl %esi
cmpl $0x6, %esi
ja 0x10cd3
movl %ecx, %r15d
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x5f7d(%rip), %rax      # 0x1697c
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
testq %r14, %r14
je 0x10bf0
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2050
movq %rax, %r14
jmp 0x10bf3
movl %r15d, %eax
shll $0x8, %eax
orl $0x7, %eax
leaq -0x30(%rbp), %r12
movl %eax, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x12c34
movslq %r15d, %r13
movl %r15d, %edx
sarl $0x2, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12cf0
andl $0x3, %r15d
movl $0x0, (%r12)
addq %r14, %r13
subq %r15, %r13
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2130
jmp 0x10cb8
testq %r14, %r14
je 0x10bd0
movq %r14, %rdi
movl $0x20, %esi
callq 0x3e2e
jmp 0x10bd7
testq %r14, %r14
je 0x10c37
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
callq 0x2120
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x10abe
jnp 0x10c3c
cvtsd2ss %xmm0, %xmm0
jmp 0x10c6b
cmpl $0x3, %r15d
jle 0x10b9f
movl %r15d, %eax
shll $0x8, %eax
orl $0xc5, %eax
leaq -0x30(%rbp), %r12
movl %eax, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x12c34
movl %r15d, %r13d
shrl $0x2, %r15d
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x12cf0
movl %r13d, %edx
andl $0x3, %edx
movl $0x0, (%r12)
addq %r13, %r14
subq %rdx, %r14
leaq -0x30(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2130
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x10cce
movslq 0xc(%rbx), %r12
leaq -0x30(%rbp), %r15
movl $0x9, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x12c34
movl %r12d, %eax
shll $0x8, %eax
addl $0x201, %eax            # imm = 0x201
movl %eax, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x12c34
movq %r14, (%r15)
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xdc02
leaq -0x34(%rbp), %rsi
movl $0xc4, (%rsi)
movq %rbx, %rdi
callq 0x12c34
movl %r12d, %eax
notl %eax
addl 0xc(%rbx), %eax
shll $0x8, %eax
movq (%rbx), %rcx
orl %eax, (%rcx,%r12,4)
jmp 0x10cd3
testl %r15d, %r15d
jle 0x10cc0
movl %r15d, %edx
movl $0xc6, %eax
movl $0x8, %ecx
xorl %esi, %esi
movzbl (%r14,%rsi), %edi
shll %cl, %edi
incq %rsi
orl %edi, %eax
addl $0x8, %ecx
cmpq %rsi, %rdx
jne 0x10bb7
jmp 0x10cc5
movq 0xdab9(%rip), %rax      # 0x1e690
movl 0x3c(%rax), %eax
xorl %ecx, %ecx
cmpl $0x19, %eax
setl %cl
shll $0x8, %eax
leal (%rax,%rcx,2), %eax
addl $0xd, %eax
jmp 0x10cc5
xorl %r14d, %r14d
leal 0x800000(%r14), %eax
cmpl $0xffffff, %eax         # imm = 0xFFFFFF
ja 0x10c15
shll $0x8, %r14d
orl $0x46, %r14d
leaq -0x30(%rbp), %rsi
movl %r14d, (%rsi)
jmp 0x10ccb
leaq -0x30(%rbp), %r15
movl $0x45, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x12c34
movl %r14d, (%r15)
leaq -0x30(%rbp), %rsi
jmp 0x10ccb
xorps %xmm0, %xmm0
jmp 0x10c6b
movq -0x30(%rbp), %rax
cmpq %r14, %rax
je 0x10abe
movzbl (%rax), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x10abe
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2050
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss 0x5ea5(%rip), %xmm1     # 0x16b18
ucomiss %xmm0, %xmm1
jb 0x10c9d
ucomiss 0x5e9d(%rip), %xmm0     # 0x16b1c
jb 0x10c9d
cvttps2dq %xmm0, %xmm1
cvtdq2ps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x10c9d
jp 0x10c9d
cvttss2si %xmm0, %eax
shll $0x8, %eax
orl $0x86, %eax
jmp 0x10cc5
leaq -0x30(%rbp), %r14
movss %xmm0, (%r14)
leaq -0x34(%rbp), %rsi
movl $0x85, (%rsi)
movq %rbx, %rdi
callq 0x12c34
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x10cce
movl $0xc6, %eax
leaq -0x30(%rbp), %rsi
movl %eax, (%rsi)
movq %rbx, %rdi
callq 0x12c34
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq