// File: /workspace/github_c_makefile_star2_O3/mruby-zest[P]osc-bridge/rtosc/rtosc.c
// Function: extract_arg
static rtosc_arg_t extract_arg(const uint8_t *arg_pos, char type)
{
    rtosc_arg_t result = {0};
    //trivial case
    if(!has_reserved(type)) {
        switch(type)
        {
            case 'T':
                result.T = true;
                break;
            case 'F':
                result.T = false;
                break;
            default:
                ;
        }
    } else {
        switch(type)
        {
            case 'h':
            case 't':
            case 'd':
                result.t |= (((uint64_t)*arg_pos++) << 56);
                result.t |= (((uint64_t)*arg_pos++) << 48);
                result.t |= (((uint64_t)*arg_pos++) << 40);
                result.t |= (((uint64_t)*arg_pos++) << 32);
                result.t |= (((uint64_t)*arg_pos++) << 24);
                result.t |= (((uint64_t)*arg_pos++) << 16);
                result.t |= (((uint64_t)*arg_pos++) << 8);
                result.t |= (((uint64_t)*arg_pos++));
                break;
            case 'r':
            case 'f':
            case 'c':
            case 'i':
                result.i |= (*arg_pos++ << 24);
                result.i |= (*arg_pos++ << 16);
                result.i |= (*arg_pos++ << 8);
                result.i |= (*arg_pos++);
                break;
            case 'm':
                result.m[0] = *arg_pos++;
                result.m[1] = *arg_pos++;
                result.m[2] = *arg_pos++;
                result.m[3] = *arg_pos++;
                break;
            case 'b':
                result.b.len |= (*arg_pos++ << 24);
                result.b.len |= (*arg_pos++ << 16);
                result.b.len |= (*arg_pos++ << 8);
                result.b.len |= (*arg_pos++);
                result.b.data = (unsigned char *)arg_pos;
                break;
            case 'S':
            case 's':
                result.s = (char *)arg_pos;
                break;
        }
    }

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
addl $-0x53, %eax
cmpl $0x21, %eax
ja 0x70cf
movabsq $0x3846b8001, %rcx      # imm = 0x3846B8001
btq %rax, %rcx
jae 0x70cf
movsbl %sil, %r10d
xorl %edx, %edx
xorl %eax, %eax
xorl %ecx, %ecx
leal -0x62(%r10), %esi
cmpl $0x12, %esi
ja 0x7099
leaq 0x29ac(%rip), %r8       # 0x99e4
movslq (%r8,%rsi,4), %r10
addq %r8, %r10
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
jmpq *%r10
movb (%rdi), %r9b
movb 0x1(%rdi), %cl
movb 0x2(%rdi), %sil
movb 0x3(%rdi), %r8b
xorl %eax, %eax
jmp 0x706f
movl (%rdi), %eax
bswapl %eax
movb 0x4(%rdi), %r9b
movb 0x5(%rdi), %cl
movb 0x6(%rdi), %sil
movb 0x7(%rdi), %r8b
xorl %edx, %edx
movzbl %r9b, %edi
shll $0x18, %edi
movzbl %cl, %ecx
shll $0x10, %ecx
orl %edi, %ecx
movzbl %sil, %esi
shll $0x8, %esi
orl %ecx, %esi
movzbl %r8b, %ecx
orq %rsi, %rcx
shlq $0x20, %rax
orq %rcx, %rax
popq %rbp
retq
movl $0x0, %esi
movl $0x0, %r8d
movl $0x0, %r9d
cmpl $0x53, %r10d
jne 0x7071
movl %edi, %esi
shrl $0x8, %esi
movl %edi, %ecx
shrl $0x10, %ecx
movl %edi, %r9d
shrl $0x18, %r9d
movq %rdi, %rax
shrq $0x20, %rax
xorl %edx, %edx
movl %edi, %r8d
jmp 0x7071
cmpb $0x54, %sil
sete %r8b
xorl %ecx, %ecx
xorl %esi, %esi
xorl %eax, %eax
xorl %edx, %edx
xorl %r9d, %r9d
jmp 0x7071
movb (%rdi), %r8b
movb 0x1(%rdi), %sil
movb 0x2(%rdi), %cl
movb 0x3(%rdi), %r9b
jmp 0x7058
movb (%rdi), %r9b
movb 0x1(%rdi), %cl
movb 0x2(%rdi), %sil
movb 0x3(%rdi), %r8b
addq $0x4, %rdi
xorl %eax, %eax
movq %rdi, %rdx
jmp 0x7071