// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/core/marsh.c
// Function: marshal_one
static void marshal_one(MarshalState *st, Janet x, int flags) {
    MARSH_STACKCHECK;
    JanetType type = janet_type(x);

    /* Check simple primitives (non reference types, no benefit from memoization) */
    switch (type) {
        default:
            break;
        case JANET_NIL:
            pushbyte(st, LB_NIL);
            return;
        case JANET_BOOLEAN:
            pushbyte(st, janet_unwrap_boolean(x) ? LB_TRUE : LB_FALSE);
            return;
        case JANET_NUMBER: {
            double xval = janet_unwrap_number(x);
            if (janet_checkintrange(xval)) {
                pushint(st, (int32_t) xval);
                return;
            }
            break;
        }
    }

    /* Check reference and registry value */
    {
        Janet check;
        if (st->maybe_cycles) {
            check = janet_table_get(&st->seen, x);
            if (janet_checkint(check)) {
                pushbyte(st, LB_REFERENCE);
                pushint(st, janet_unwrap_integer(check));
                return;
            }
        }
        if (st->rreg) {
            check = janet_table_get(st->rreg, x);
            if (janet_checktype(check, JANET_SYMBOL)) {
                MARK_SEEN();
                const uint8_t *regname = janet_unwrap_symbol(check);
                pushbyte(st, LB_REGISTRY);
                pushint(st, janet_string_length(regname));
                pushbytes(st, regname, janet_string_length(regname));
                return;
            }
        }
    }

    /* Reference types */
    switch (type) {
        case JANET_NUMBER: {
            union {
                double d;
                uint8_t bytes[8];
            } u;
            u.d = janet_unwrap_number(x);
#ifdef JANET_BIG_ENDIAN
            /* Swap byte order */
            uint8_t temp;
            temp = u.bytes[7];
            u.bytes[7] = u.bytes[0];
            u.bytes[0] = temp;
            temp = u.bytes[6];
            u.bytes[6] = u.bytes[1];
            u.bytes[1] = temp;
            temp = u.bytes[5];
            u.bytes[5] = u.bytes[2];
            u.bytes[2] = temp;
            temp = u.bytes[4];
            u.bytes[4] = u.bytes[3];
            u.bytes[3] = temp;
#endif
            pushbyte(st, LB_REAL);
            pushbytes(st, u.bytes, 8);
            MARK_SEEN();
            return;
        }
        case JANET_STRING:
        case JANET_SYMBOL:
        case JANET_KEYWORD: {
            const uint8_t *str = janet_unwrap_string(x);
            int32_t length = janet_string_length(str);
            /* Record reference */
            MARK_SEEN();
            uint8_t lb = (type == JANET_STRING) ? LB_STRING :
                         (type == JANET_SYMBOL) ? LB_SYMBOL :
                         LB_KEYWORD;
            pushbyte(st, lb);
            pushint(st, length);
            pushbytes(st, str, length);
            return;
        }
        case JANET_BUFFER: {
            JanetBuffer *buffer = janet_unwrap_buffer(x);
            /* Record reference */
            MARK_SEEN();
#ifdef JANET_EV
            if ((flags & JANET_MARSHAL_UNSAFE) &&
                    (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
                pushbyte(st, LB_POINTER_BUFFER);
                pushint(st, buffer->count);
                pushint(st, buffer->capacity);
                pushpointer(st, buffer->data);
                return;
            }
#endif
            pushbyte(st, LB_BUFFER);
            pushint(st, buffer->count);
            pushbytes(st, buffer->data, buffer->count);
            return;
        }
        case JANET_ARRAY: {
            int32_t i;
            JanetArray *a = janet_unwrap_array(x);
            MARK_SEEN();
            enum JanetMemoryType memtype = janet_gc_type(a);
            pushbyte(st, memtype == JANET_MEMORY_ARRAY_WEAK ? LB_ARRAY_WEAK : LB_ARRAY);
            pushint(st, a->count);
            for (i = 0; i < a->count; i++)
                marshal_one(st, a->data[i], flags + 1);
            return;
        }
        case JANET_TUPLE: {
            int32_t i, count, flag;
            const Janet *tup = janet_unwrap_tuple(x);
            count = janet_tuple_length(tup);
            flag = janet_tuple_flag(tup) >> 16;
            pushbyte(st, LB_TUPLE);
            pushint(st, count);
            pushint(st, flag);
            for (i = 0; i < count; i++)
                marshal_one(st, tup[i], flags + 1);
            /* Mark as seen AFTER marshaling */
            MARK_SEEN();
            return;
        }
        case JANET_TABLE: {
            JanetTable *t = janet_unwrap_table(x);
            MARK_SEEN();
            enum JanetMemoryType memtype = janet_gc_type(t);
            if (memtype == JANET_MEMORY_TABLE_WEAKK) {
                pushbyte(st, t->proto ? LB_TABLE_WEAKK_PROTO : LB_TABLE_WEAKK);
            } else if (memtype == JANET_MEMORY_TABLE_WEAKV) {
                pushbyte(st, t->proto ? LB_TABLE_WEAKV_PROTO : LB_TABLE_WEAKV);
            } else if (memtype == JANET_MEMORY_TABLE_WEAKKV) {
                pushbyte(st, t->proto ? LB_TABLE_WEAKKV_PROTO : LB_TABLE_WEAKKV);
            } else {
                pushbyte(st, t->proto ? LB_TABLE_PROTO : LB_TABLE);
            }
            pushint(st, t->count);
            if (t->proto)
                marshal_one(st, janet_wrap_table(t->proto), flags + 1);
            for (int32_t i = 0; i < t->capacity; i++) {
                if (janet_checktype(t->data[i].key, JANET_NIL))
                    continue;
                marshal_one(st, t->data[i].key, flags + 1);
                marshal_one(st, t->data[i].value, flags + 1);
            }
            return;
        }
        case JANET_STRUCT: {
            int32_t count;
            const JanetKV *struct_ = janet_unwrap_struct(x);
            count = janet_struct_length(struct_);
            pushbyte(st, janet_struct_proto(struct_) ? LB_STRUCT_PROTO : LB_STRUCT);
            pushint(st, count);
            if (janet_struct_proto(struct_))
                marshal_one(st, janet_wrap_struct(janet_struct_proto(struct_)), flags + 1);
            for (int32_t i = 0; i < janet_struct_capacity(struct_); i++) {
                if (janet_checktype(struct_[i].key, JANET_NIL))
                    continue;
                marshal_one(st, struct_[i].key, flags + 1);
                marshal_one(st, struct_[i].value, flags + 1);
            }
            /* Mark as seen AFTER marshaling */
            MARK_SEEN();
            return;
        }
        case JANET_ABSTRACT: {
            marshal_one_abstract(st, x, flags);
            return;
        }
        case JANET_FUNCTION: {
            pushbyte(st, LB_FUNCTION);
            JanetFunction *func = janet_unwrap_function(x);
            pushint(st, func->def->environments_length);
            /* Mark seen before reading def */
            MARK_SEEN();
            marshal_one_def(st, func->def, flags);
            for (int32_t i = 0; i < func->def->environments_length; i++)
                marshal_one_env(st, func->envs[i], flags + 1);
            return;
        }
        case JANET_FIBER: {
            MARK_SEEN();
            pushbyte(st, LB_FIBER);
            marshal_one_fiber(st, janet_unwrap_fiber(x), flags + 1);
            return;
        }
        case JANET_CFUNCTION: {
            if (!(flags & JANET_MARSHAL_UNSAFE)) goto no_registry;
            MARK_SEEN();
            pushbyte(st, LB_UNSAFE_CFUNCTION);
            JanetCFunction cfn = janet_unwrap_cfunction(x);
            pushbytes(st, (uint8_t *) &cfn, sizeof(JanetCFunction));
            return;
        }
        case JANET_POINTER: {
            if (!(flags & JANET_MARSHAL_UNSAFE)) goto no_registry;
            MARK_SEEN();
            pushbyte(st, LB_UNSAFE_POINTER);
            pushpointer(st, janet_unwrap_pointer(x));
            return;
        }
    no_registry:
        default: {
            janet_panicf("no registry value and cannot marshal %p", x);
        }
    }
#undef MARK_SEEN
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movzwl %dx, %eax
cmpl $0x401, %eax            # imm = 0x401
jae 0x304ce
movq %rsi, %r15
movq %rsi, %xmm0
movq %rsi, %rax
shrq $0x2f, %rax
andl $0xf, %eax
xorl %r13d, %r13d
ucomisd %xmm0, %xmm0
cmovpl %eax, %r13d
testl %r13d, %r13d
je 0x2fbfa
cmpl $0x2, %r13d
je 0x2fbd2
cmpl $0x1, %r13d
jne 0x2fc2c
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movl $0xc9, %esi
jmp 0x2fbe7
andl $0x1, %r15d
movq -0x30(%rbp), %rax
movq (%rax), %rdi
orl $0xca, %r15d
movl %r15d, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x179a7
ucomisd 0x23876(%rip), %xmm0    # 0x53478
jb 0x2fc2c
movsd 0x23874(%rip), %xmm1    # 0x53480
ucomisd %xmm0, %xmm1
jb 0x2fc2c
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2fc2c
jp 0x2fc2c
cvttsd2si %xmm0, %esi
movq -0x30(%rbp), %rdi
jmp 0x2fc72
movq -0x30(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x2fc85
movq -0x30(%rbp), %rax
leaq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x47f51
movq %rax, %r12
movq %rax, %rdi
callq 0x4a41f
testl %eax, %eax
je 0x2fc85
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xda, %esi
callq 0x179a7
movq %r12, %xmm0
cvttsd2si %xmm0, %esi
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2fa79
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rdi
testq %rdi, %rdi
je 0x2fd18
movq %r15, %rsi
callq 0x47f51
movq %rax, %r12
shrq $0x2f, %rax
cmpl $0x1fff5, %eax          # imm = 0x1FFF5
jne 0x2fd18
movq -0x30(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x2fce1
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %r14
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
movq %r12, %rdi
callq 0x4f838
movq %rax, %r14
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xd8, %esi
callq 0x179a7
movl -0x8(%r14), %esi
movq %rbx, %rdi
callq 0x2fa79
movl -0x8(%r14), %edx
movq (%rbx), %rdi
movq %r14, %rsi
jmp 0x2fe8a
cmpl $0xf, %r13d
ja 0x304da
movl %r13d, %eax
leaq 0x309e4(%rip), %rcx     # 0x60710
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
callq 0x4f838
movq %rax, %r14
movl -0x8(%rax), %r12d
movq -0x30(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x2fd79
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %rbx
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
cmpl $0x5, %r13d
sete %al
movb $-0x30, %cl
subb %al, %cl
cmpl $0x4, %r13d
movzbl %cl, %eax
movl $0xce, %ecx
cmovnel %eax, %ecx
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movzbl %cl, %esi
callq 0x179a7
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2fa79
movq (%rbx), %rdi
movq %r14, %rsi
movl %r12d, %edx
jmp 0x2fe8a
btl $0x11, -0x38(%rbp)
jae 0x304da
movq -0x30(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x2fdfb
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %r14
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xdd, %esi
jmp 0x301d8
movq %r15, %rdi
callq 0x4f838
movq %rax, %r12
movq -0x30(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x2fe4c
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %r13
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
btl $0x11, -0x38(%rbp)
jae 0x2fe5f
testb $0x1, 0x2(%r12)
jne 0x3038d
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xd6, %esi
callq 0x179a7
movl 0x10(%r12), %esi
movq %rbx, %rdi
callq 0x2fa79
movq 0x18(%r12), %rsi
movl 0x10(%r12), %edx
movq (%rbx), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17925
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq -0x38(%rbp), %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x317e8
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xd7, %esi
callq 0x179a7
movq %r15, %rdi
callq 0x4f838
movq %rax, %r12
movq 0x10(%rax), %rax
movl 0x74(%rax), %esi
movq %rbx, %rdi
callq 0x2fa79
cmpl $0x0, 0x54(%rbx)
je 0x2ff17
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %r13
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
movq 0x10(%r12), %rsi
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
callq 0x318f4
movq 0x10(%r12), %rax
cmpl $0x0, 0x74(%rax)
jle 0x304bf
movq -0x38(%rbp), %rax
incl %eax
movq %rax, -0x38(%rbp)
xorl %r15d, %r15d
movq 0x18(%r12,%r15,8), %rsi
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
callq 0x31c12
incq %r15
movq 0x10(%r12), %rax
movslq 0x74(%rax), %rax
cmpq %rax, %r15
jl 0x2ff45
jmp 0x304bf
movq %r15, %rdi
callq 0x4f838
movslq -0x10(%rax), %r13
movq %rax, -0x40(%rbp)
movswl -0x1e(%rax), %r14d
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xd2, %esi
callq 0x179a7
movq %rbx, %rdi
movl %r13d, %esi
callq 0x2fa79
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2fa79
testq %r13, %r13
jle 0x300d8
movq -0x38(%rbp), %rax
incl %eax
movq %rax, -0x38(%rbp)
xorl %r12d, %r12d
movq -0x40(%rbp), %rax
movq (%rax,%r12,8), %rsi
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
callq 0x2fb6f
incq %r12
cmpq %r12, %r13
jne 0x2ffbf
jmp 0x300d8
movq %r15, %rdi
callq 0x4f838
movq %rax, %r13
movl -0x18(%rax), %r12d
cmpq $0x0, -0x8(%rax)
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xd5, %eax
movl $0xdf, %esi
cmovel %eax, %esi
callq 0x179a7
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2fa79
movq %r13, -0x40(%rbp)
movq -0x8(%r13), %rdi
testq %rdi, %rdi
je 0x30048
movabsq $-0x3000000000000, %rsi # imm = 0xFFFD000000000000
callq 0x4f9ad
movq -0x38(%rbp), %rcx
leal 0x1(%rcx), %edx
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x2fb6f
movq -0x40(%rbp), %rcx
cmpl $0x0, -0x10(%rcx)
jle 0x300d8
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
movabsq $-0x7800000000000, %rdi # imm = 0xFFF8800000000000
movq -0x38(%rbp), %rax
incl %eax
movq %rax, -0x38(%rbp)
movq %rcx, %r12
addq $0x8, %r12
xorl %r13d, %r13d
movq -0x30(%rbp), %rbx
movq -0x38(%rbp), %r14
movq -0x8(%r12), %rsi
movq %rsi, %rax
andq %rdx, %rax
cmpq %rdi, %rax
je 0x300c8
movq %rbx, %rdi
movl %r14d, %edx
callq 0x2fb6f
movq (%r12), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x2fb6f
movabsq $-0x7800000000000, %rdi # imm = 0xFFF8800000000000
movabsq $-0x800000000000, %rdx  # imm = 0xFFFF800000000000
movq -0x40(%rbp), %rcx
incq %r13
movslq -0x10(%rcx), %rax
addq $0x10, %r12
cmpq %rax, %r13
jl 0x30086
movq -0x30(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x304bf
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %r14
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x481b3
movq -0x30(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x30154
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %r12
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xcc, %esi
callq 0x179a7
movq %r15, %rdi
callq 0x4f838
movq -0x38(%rbp), %rdx
incl %edx
movq %rbx, %rdi
movq %rax, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31e1e
btl $0x11, -0x38(%rbp)
jae 0x304da
movq -0x30(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x301cc
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %r14
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xde, %esi
callq 0x179a7
movq %r15, %rdi
callq 0x4f838
leaq -0x48(%rbp), %rsi
movq %rax, (%rsi)
movq (%rbx), %rdi
movl $0x8, %edx
callq 0x17925
jmp 0x304bf
leaq -0x48(%rbp), %r14
movq %r15, (%r14)
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xc8, %esi
callq 0x179a7
movq (%rbx), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x17925
cmpl $0x0, 0x54(%rbx)
je 0x304bf
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %r14
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
jmp 0x304bf
movq %r15, %rdi
callq 0x4f838
movq %rax, %r12
movq -0x30(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x302a0
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %r13
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
movzbl (%r12), %ecx
movq 0x28(%r12), %rax
movq -0x30(%rbp), %rdx
movq (%rdx), %rdi
cmpl $0x10, %ecx
je 0x303d4
cmpl $0xf, %ecx
je 0x303c2
cmpl $0xe, %ecx
jne 0x303e6
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
leal (%rcx,%rcx,2), %eax
addl $0xe2, %eax
jmp 0x303ee
movq %r15, %rdi
callq 0x4f838
movq %rax, %r12
movq -0x30(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x30321
movq -0x30(%rbp), %rdx
leaq 0x8(%rdx), %r13
movl 0x50(%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%rdx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x4fab8
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x481b3
cmpb $0x11, (%r12)
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xe8, %eax
movl $0xd1, %esi
cmovel %eax, %esi
callq 0x179a7
movl 0x10(%r12), %esi
movq %rbx, %rdi
callq 0x2fa79
cmpl $0x0, 0x10(%r12)
jle 0x304bf
movq -0x38(%rbp), %rax
incl %eax
movq %rax, -0x38(%rbp)
xorl %r15d, %r15d
movq 0x18(%r12), %rax
movq (%rax,%r15,8), %rsi
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
callq 0x2fb6f
incq %r15
movslq 0x10(%r12), %rax
cmpq %rax, %r15
jl 0x30365
jmp 0x304bf
movq -0x30(%rbp), %rbx
movq (%rbx), %rdi
movl $0xe1, %esi
callq 0x179a7
movl 0x10(%r12), %esi
movq %rbx, %rdi
callq 0x2fa79
movl 0x14(%r12), %esi
movq %rbx, %rdi
callq 0x2fa79
movq 0x18(%r12), %rax
jmp 0x301e5
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
leal (%rcx,%rcx,2), %eax
addl $0xe3, %eax
jmp 0x303ee
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
leal (%rcx,%rcx,2), %eax
addl $0xe4, %eax
jmp 0x303ee
cmpq $0x1, %rax
movb $-0x2c, %al
sbbb $0x0, %al
movzbl %al, %esi
callq 0x179a7
movl 0x10(%r12), %esi
movq -0x30(%rbp), %rdi
callq 0x2fa79
movq 0x28(%r12), %rdi
testq %rdi, %rdi
je 0x30430
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x4f9f2
movq -0x38(%rbp), %rcx
leal 0x1(%rcx), %edx
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x2fb6f
cmpl $0x0, 0x14(%r12)
jle 0x304bf
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
movabsq $-0x7800000000000, %rdx # imm = 0xFFF8800000000000
movq -0x38(%rbp), %rax
incl %eax
movq %rax, -0x38(%rbp)
xorl %r15d, %r15d
xorl %r13d, %r13d
movq -0x30(%rbp), %r14
movq -0x38(%rbp), %rbx
movq 0x20(%r12), %rax
movq (%rax,%r15), %rsi
movq %rsi, %rax
andq %rcx, %rax
cmpq %rdx, %rax
je 0x304ae
movq %r14, %rdi
movl %ebx, %edx
callq 0x2fb6f
movq 0x20(%r12), %rax
movq 0x8(%rax,%r15), %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x2fb6f
movabsq $-0x7800000000000, %rdx # imm = 0xFFF8800000000000
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
incq %r13
movslq 0x14(%r12), %rax
addq $0x10, %r15
cmpq %rax, %r13
jl 0x30468
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2da1e(%rip), %rdi     # 0x5def3
callq 0x19263
leaq 0x30765(%rip), %rdi     # 0x60c46
movq %r15, %rsi
xorl %eax, %eax
callq 0x1917b