// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/marsh.c
// Function: unmarshal_one
static const uint8_t *unmarshal_one(
    UnmarshalState *st,
    const uint8_t *data,
    Janet *out,
    int flags) {
    uint8_t lead;
    MARSH_STACKCHECK;
    MARSH_EOS(st, data);
    lead = data[0];
    if (lead < LB_REAL) {
        *out = janet_wrap_integer(readint(st, &data));
        return data;
    }
    switch (lead) {
        case LB_NIL:
            *out = janet_wrap_nil();
            return data + 1;
        case LB_FALSE:
            *out = janet_wrap_false();
            return data + 1;
        case LB_TRUE:
            *out = janet_wrap_true();
            return data + 1;
        case LB_INTEGER:
            /* Long integer */
            MARSH_EOS(st, data + 4);
            uint32_t ui = ((uint32_t)(data[4])) |
                          ((uint32_t)(data[3]) << 8) |
                          ((uint32_t)(data[2]) << 16) |
                          ((uint32_t)(data[1]) << 24);
            int32_t si = (int32_t)ui;
            *out = janet_wrap_integer(si);
            return data + 5;
        case LB_REAL:
            /* Real */
        {
            union {
                double d;
                uint8_t bytes[8];
            } u;
            MARSH_EOS(st, data + 8);
#ifdef JANET_BIG_ENDIAN
            u.bytes[0] = data[8];
            u.bytes[1] = data[7];
            u.bytes[2] = data[6];
            u.bytes[3] = data[5];
            u.bytes[4] = data[4];
            u.bytes[5] = data[3];
            u.bytes[6] = data[2];
            u.bytes[7] = data[1];
#else
            memcpy(&u.bytes, data + 1, sizeof(double));
#endif
            *out = janet_wrap_number_safe(u.d);
            janet_v_push(st->lookup, *out);
            return data + 9;
        }
        case LB_STRING:
        case LB_SYMBOL:
        case LB_BUFFER:
        case LB_KEYWORD:
        case LB_REGISTRY: {
            data++;
            int32_t len = readnat(st, &data);
            MARSH_EOS(st, data - 1 + len);
            if (lead == LB_STRING) {
                const uint8_t *str = janet_string(data, len);
                *out = janet_wrap_string(str);
            } else if (lead == LB_SYMBOL) {
                const uint8_t *str = janet_symbol(data, len);
                *out = janet_wrap_symbol(str);
            } else if (lead == LB_KEYWORD) {
                const uint8_t *str = janet_keyword(data, len);
                *out = janet_wrap_keyword(str);
            } else if (lead == LB_REGISTRY) {
                if (st->reg) {
                    Janet regkey = janet_symbolv(data, len);
                    *out = janet_table_get(st->reg, regkey);
                } else {
                    *out = janet_wrap_nil();
                }
            } else { /* (lead == LB_BUFFER) */
                JanetBuffer *buffer = janet_buffer(len);
                buffer->count = len;
                safe_memcpy(buffer->data, data, len);
                *out = janet_wrap_buffer(buffer);
            }
            janet_v_push(st->lookup, *out);
            return data + len;
        }
        case LB_FIBER: {
            JanetFiber *fiber;
            data = unmarshal_one_fiber(st, data + 1, &fiber, flags + 1);
            *out = janet_wrap_fiber(fiber);
            return data;
        }
        case LB_FUNCTION: {
            JanetFunction *func;
            JanetFuncDef *def;
            data++;
            int32_t len = readnat(st, &data);
            if (len > 255) {
                janet_panicf("invalid function - too many environments (%d)", len);
            }
            func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) +
                                 len * sizeof(JanetFuncEnv));
            func->def = NULL;
            for (int32_t i = 0; i < len; i++) {
                func->envs[i] = NULL;
            }
            *out = janet_wrap_function(func);
            janet_v_push(st->lookup, *out);
            data = unmarshal_one_def(st, data, &def, flags + 1);
            func->def = def;
            for (int32_t i = 0; i < len; i++) {
                data = unmarshal_one_env(st, data, &(func->envs[i]), flags + 1);
            }
            return data;
        }
        case LB_ABSTRACT: {
            data++;
            return unmarshal_one_abstract(st, data, out, flags);
        }
        case LB_REFERENCE:
        case LB_ARRAY:
        case LB_ARRAY_WEAK:
        case LB_TUPLE:
        case LB_STRUCT:
        case LB_STRUCT_PROTO:
        case LB_TABLE:
        case LB_TABLE_PROTO:
        case LB_TABLE_WEAKK:
        case LB_TABLE_WEAKV:
        case LB_TABLE_WEAKKV:
        case LB_TABLE_WEAKK_PROTO:
        case LB_TABLE_WEAKV_PROTO:
        case LB_TABLE_WEAKKV_PROTO:
            /* Things that open with integers */
        {
            data++;
            int32_t len = readnat(st, &data);
            /* DOS check */
            if (lead != LB_REFERENCE) {
                MARSH_EOS(st, data - 1 + len);
            }
            if (lead == LB_ARRAY || lead == LB_ARRAY_WEAK) {
                /* Array */
                JanetArray *array = (lead == LB_ARRAY_WEAK) ? janet_array_weak(len) : janet_array(len);
                array->count = len;
                *out = janet_wrap_array(array);
                janet_v_push(st->lookup, *out);
                for (int32_t i = 0; i < len; i++) {
                    data = unmarshal_one(st, data, array->data + i, flags + 1);
                }
            } else if (lead == LB_TUPLE) {
                /* Tuple */
                Janet *tup = janet_tuple_begin(len);
                int32_t flag = readint(st, &data);
                janet_tuple_flag(tup) |= flag << 16;
                for (int32_t i = 0; i < len; i++) {
                    data = unmarshal_one(st, data, tup + i, flags + 1);
                }
                *out = janet_wrap_tuple(janet_tuple_end(tup));
                janet_v_push(st->lookup, *out);
            } else if (lead == LB_STRUCT || lead == LB_STRUCT_PROTO) {
                /* Struct */
                JanetKV *struct_ = janet_struct_begin(len);
                if (lead == LB_STRUCT_PROTO) {
                    Janet proto;
                    data = unmarshal_one(st, data, &proto, flags + 1);
                    janet_asserttype(proto, JANET_STRUCT, st);
                    janet_struct_proto(struct_) = janet_unwrap_struct(proto);
                }
                for (int32_t i = 0; i < len; i++) {
                    Janet key, value;
                    data = unmarshal_one(st, data, &key, flags + 1);
                    data = unmarshal_one(st, data, &value, flags + 1);
                    janet_struct_put(struct_, key, value);
                }
                *out = janet_wrap_struct(janet_struct_end(struct_));
                janet_v_push(st->lookup, *out);
            } else if (lead == LB_REFERENCE) {
                if (len >= janet_v_count(st->lookup))
                    janet_panicf("invalid reference %d", len);
                *out = st->lookup[len];
            } else {
                /* Table */
                JanetTable *t;
                if (lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKK) {
                    t = janet_table_weakk(len);
                } else if (lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKV) {
                    t = janet_table_weakv(len);
                } else if (lead == LB_TABLE_WEAKKV_PROTO || lead == LB_TABLE_WEAKKV) {
                    t = janet_table_weakkv(len);
                } else {
                    t = janet_table(len);
                }
                *out = janet_wrap_table(t);
                janet_v_push(st->lookup, *out);
                if (lead == LB_TABLE_PROTO || lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKKV_PROTO) {
                    Janet proto;
                    data = unmarshal_one(st, data, &proto, flags + 1);
                    janet_asserttype(proto, JANET_TABLE, st);
                    t->proto = janet_unwrap_table(proto);
                }
                for (int32_t i = 0; i < len; i++) {
                    Janet key, value;
                    data = unmarshal_one(st, data, &key, flags + 1);
                    data = unmarshal_one(st, data, &value, flags + 1);
                    janet_table_put(t, key, value);
                }
            }
            return data;
        }
        case LB_UNSAFE_POINTER: {
            MARSH_EOS(st, data + sizeof(void *));
            data++;
            if (!(flags & JANET_MARSHAL_UNSAFE)) {
                janet_panicf("unsafe flag not given, "
                             "will not unmarshal raw pointer at index %d",
                             (int)(data - st->start));
            }
            union {
                void *ptr;
                uint8_t bytes[sizeof(void *)];
            } u;
            memcpy(u.bytes, data, sizeof(void *));
            data += sizeof(void *);
            *out = janet_wrap_pointer(u.ptr);
            janet_v_push(st->lookup, *out);
            return data;
        }
#ifdef JANET_EV
        case LB_POINTER_BUFFER: {
            data++;
            int32_t count = readnat(st, &data);
            int32_t capacity = readnat(st, &data);
            MARSH_EOS(st, data + sizeof(void *));
            union {
                void *ptr;
                uint8_t bytes[sizeof(void *)];
            } u;
            if (!(flags & JANET_MARSHAL_UNSAFE)) {
                janet_panicf("unsafe flag not given, "
                             "will not unmarshal raw pointer at index %d",
                             (int)(data - st->start));
            }
            memcpy(u.bytes, data, sizeof(void *));
            data += sizeof(void *);
            JanetBuffer *buffer = janet_pointer_buffer_unsafe(u.ptr, capacity, count);
            *out = janet_wrap_buffer(buffer);
            janet_v_push(st->lookup, *out);
            return data;
        }
#endif
        case LB_UNSAFE_CFUNCTION: {
            MARSH_EOS(st, data + sizeof(JanetCFunction));
            data++;
            if (!(flags & JANET_MARSHAL_UNSAFE)) {
                janet_panicf("unsafe flag not given, "
                             "will not unmarshal function pointer at index %d",
                             (int)(data - st->start));
            }
            union {
                JanetCFunction ptr;
                uint8_t bytes[sizeof(JanetCFunction)];
            } u;
            memcpy(u.bytes, data, sizeof(JanetCFunction));
            data += sizeof(JanetCFunction);
            *out = janet_wrap_cfunction(u.ptr);
            janet_v_push(st->lookup, *out);
            return data;
        }
#ifdef JANET_EV
        case LB_THREADED_ABSTRACT: {
            MARSH_EOS(st, data + sizeof(void *));
            data++;
            if (!(flags & JANET_MARSHAL_UNSAFE)) {
                janet_panicf("unsafe flag not given, "
                             "will not unmarshal threaded abstract pointer at index %d",
                             (int)(data - st->start));
            }
            union {
                void *ptr;
                uint8_t bytes[sizeof(void *)];
            } u;
            memcpy(u.bytes, data, sizeof(void *));
            data += sizeof(void *);

            if (flags & JANET_MARSHAL_DECREF) {
                /* Decrement immediately and don't bother putting into heap */
                janet_abstract_decref(u.ptr);
                *out = janet_wrap_nil();
            } else {
                *out = janet_wrap_abstract(u.ptr);
                Janet check = janet_table_get(&janet_vm.threaded_abstracts, *out);
                if (janet_checktype(check, JANET_NIL)) {
                    /* Transfers reference from threaded channel buffer to current heap */
                    janet_table_put(&janet_vm.threaded_abstracts, *out, janet_wrap_false());
                } else {
                    /* Heap reference already accounted for, remove threaded channel reference. */
                    janet_abstract_decref(u.ptr);
                }
            }

            janet_v_push(st->lookup, *out);
            return data;
        }
#endif
        default: {
            janet_panicf("unknown byte %x at index %d",
                         *data,
                         (int)(data - st->start));
            return NULL;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %ecx, %r13d
movq %rsi, -0x50(%rbp)
movzwl %r13w, %eax
cmpl $0x401, %eax            # imm = 0x401
jae 0x2ec76
movq %rsi, %r14
movq %rdi, %r12
movq 0xf0(%rdi), %rax
cmpq %rsi, %rax
jbe 0x2ec6a
movq %rdx, %rbx
movzbl (%r14), %r15d
cmpl $0xc7, %r15d
ja 0x2dce1
movq %rbx, %r14
leaq -0x50(%rbp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2da62
cvtsi2sd %eax, %xmm0
callq 0x4b471
movq %rax, (%r14)
movq (%rbx), %r14
movq %r14, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal -0xc8(%r15), %ecx
cmpl $0x20, %ecx
ja 0x2edae
leaq 0x2da58(%rip), %rdx     # 0x5b750
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
movq %r12, -0x40(%rbp)
jmpq *%rcx
movq %r13, -0x38(%rbp)
incq %r14
leaq -0x50(%rbp), %rsi
movq %r14, (%rsi)
movq %r12, %rdi
callq 0x2f64c
movl %eax, %r13d
movl %eax, %r14d
cmpl $0xda, %r15d
jne 0x2dd55
movq 0xc8(%r12), %rax
testq %rax, %rax
je 0x2eca6
cmpl -0x4(%rax), %r13d
jge 0x2eca6
movq (%rax,%r14,8), %rax
movq %rax, (%rbx)
movq -0x50(%rbp), %r14
jmp 0x2dccc
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
addq %r14, %rax
decq %rax
cmpq 0xf0(%r12), %rax
jae 0x2ec6a
leal -0xd1(%r15), %eax
cmpl $0x17, %eax
ja 0x2e99b
leaq 0x2da4c(%rip), %rcx     # 0x5b7d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %r13d, %edi
callq 0x42cb8
cmpl $0xdf, %r15d
movq %rbx, -0x48(%rbp)
jne 0x2e82f
movq -0x38(%rbp), %rcx
incl %ecx
leaq -0x98(%rbp), %rbx
movq %rax, %r15
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %rcx, -0x38(%rbp)
callq 0x2dc5b
movq %rax, %r14
movq %rax, -0x50(%rbp)
movq (%rbx), %rbx
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x2feb7
movq %rbx, %rdi
callq 0x4b1f1
movq %rax, -0x8(%r15)
jmp 0x2e840
movq %r14, %rax
movq %rbx, %r14
incq %rax
leaq -0x50(%rbp), %rbx
movq %rax, (%rbx)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2f64c
movl %eax, %r13d
movq (%rbx), %rax
movq %r12, %rcx
movl %r13d, %r12d
movq %rax, -0x30(%rbp)
addq %r12, %rax
decq %rax
cmpq 0xf0(%rcx), %rax
jae 0x2ec6a
cmpl $0xd8, %r15d
je 0x2e44e
cmpl $0xcf, %r15d
je 0x2e413
cmpl $0xd0, %r15d
je 0x2e42b
cmpl $0xce, %r15d
jne 0x2e492
movq -0x30(%rbp), %rdi
movl %r13d, %esi
callq 0x41116
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
jmp 0x2e441
movq %rbx, -0x48(%rbp)
movq %r12, %rbx
movl %r13d, %edi
callq 0x43bd4
jmp 0x2e9aa
movq %rbx, -0x48(%rbp)
movq %r12, %rbx
movl %r13d, %edi
callq 0x43bf9
jmp 0x2e9aa
movq %rbx, -0x48(%rbp)
movq %r12, %rbx
movl %r13d, %edi
callq 0x43baf
jmp 0x2e9aa
movq %rbx, -0x48(%rbp)
movabsq $-0x77fffffffffff, %rbx # imm = 0xFFF8800000000001
incq %r14
movq %r14, -0x98(%rbp)
pushq $0x7
popq %rdi
pushq $0x70
popq %rsi
callq 0x291a0
movq %rax, %r14
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x30(%rax)
movq %rbx, %rdi
callq 0x4b313
movq %rax, 0x40(%r14)
andl $0x0, 0x48(%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x50(%r14)
movq %r14, -0x30(%rbp)
movupd %xmm0, 0x60(%r14)
movq 0xc8(%r12), %r15
testq %r15, %r15
je 0x2df34
movl -0x4(%r15), %eax
leal 0x1(%rax), %ecx
cmpl -0x8(%r15), %ecx
jl 0x2df53
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x4799c
movq %rax, %r15
movq %rax, 0xc8(%r12)
movl -0x4(%rax), %eax
leal 0x1(%rax), %ecx
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
movl %ecx, -0x4(%r15)
movslq %eax, %r14
movq -0x30(%rbp), %rdi
callq 0x4b3ab
movq %rax, (%r15,%r14,8)
leaq -0x98(%rbp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x2da62
movl %eax, -0x70(%rbp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f64c
movl %eax, %ebx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f64c
movl %eax, %r14d
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f64c
movq %rax, -0xb0(%rbp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f64c
movl %eax, %ecx
movq %rbx, -0xa8(%rbp)
leal 0x4(%rbx), %eax
cmpl %r14d, %eax
movq -0xb0(%rbp), %rax
ja 0x2eccf
cmpl %eax, %r14d
ja 0x2eccf
cmpl %ecx, %eax
ja 0x2eccf
movl %ecx, -0x6c(%rbp)
movl %r14d, -0x64(%rbp)
leal 0xa(%rax), %r14d
movq -0x30(%rbp), %r15
movl %r14d, 0x20(%r15)
movl %eax, %eax
leaq 0x50(,%rax,8), %rdi
callq 0x12760
movq %rax, 0x30(%r15)
testq %rax, %rax
je 0x2ecdb
addq $0x40, %r15
movq %r15, -0xa0(%rbp)
xorl %r15d, %r15d
movq -0x30(%rbp), %rbx
movslq %r14d, %rax
cmpq %rax, %r15
jge 0x2e571
movq 0x30(%rbx), %r14
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4b313
movq %rax, (%r14,%r15,8)
incq %r15
movl 0x20(%rbx), %r14d
jmp 0x2e02c
leaq 0x4(%r14), %rcx
cmpq %rax, %rcx
jae 0x2ec6a
movl 0x1(%r14), %eax
bswapl %eax
cvtsi2sd %eax, %xmm0
callq 0x4b471
movq %rax, (%rbx)
addq $0x5, %r14
jmp 0x2dccc
leaq 0x8(%r14), %rcx
cmpq %rax, %rcx
jae 0x2ec6a
movsd 0x1(%r14), %xmm0
callq 0x4b55e
movq %rax, (%rbx)
movq 0xc8(%r12), %rax
testq %rax, %rax
je 0x2e0b3
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2e0cf
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x4799c
movq %rax, 0xc8(%r12)
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movq (%rbx), %rdx
movq %rdx, (%rax,%rcx,8)
addq $0x9, %r14
jmp 0x2dccc
movabsq $-0x7000000000000, %rdi # imm = 0xFFF9000000000000
jmp 0x2e10a
movabsq $-0x7000000000000, %rdi # imm = 0xFFF9000000000000
incq %rdi
jmp 0x2e10a
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4b313
movq %rax, (%rbx)
incq %r14
jmp 0x2dccc
movq %r14, %rsi
movq %rbx, %r14
incq %rsi
leal 0x1(%r13), %ecx
leaq -0x58(%rbp), %r15
movq %r12, %rdi
movq %r15, %rdx
callq 0x2dc5b
movq %rax, %rbx
movq (%r15), %rdi
callq 0x45691
testq %rax, %rax
je 0x2ecb7
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x2ed07
leaq -0x98(%rbp), %rdi
andq $0x0, (%rdi)
movq %r12, 0x8(%rdi)
movl %r13d, 0x10(%rdi)
movq %rbx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq *%rcx
testq %rax, %rax
je 0x2ed66
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
movq %rax, %rdi
callq 0x4b3ab
movq %rax, (%r14)
cmpq $0x0, -0x78(%rbp)
jne 0x2ed96
movq -0x80(%rbp), %r14
jmp 0x2dccc
movq %r14, %rax
movq %rbx, %r14
incq %rax
leaq -0x50(%rbp), %r15
movq %rax, (%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f64c
movl %eax, %ebx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f64c
movq (%r15), %rsi
leaq 0x8(%rsi), %rcx
cmpq 0xf0(%r12), %rcx
jae 0x2ec6a
btl $0x11, %r13d
jae 0x2ed13
movq %rcx, %r15
movq (%rsi), %rdi
movl %eax, %esi
movl %ebx, %edx
callq 0x15f0b
movabsq $-0x2800000000000, %rsi # imm = 0xFFFD800000000000
movq %rax, %rdi
callq 0x4b3ab
movq %rax, (%r14)
movq 0xc8(%r12), %rax
testq %rax, %rax
je 0x2e22a
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2e246
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x4799c
movq %rax, 0xc8(%r12)
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movq (%r14), %rdx
movq %rdx, (%rax,%rcx,8)
movq %r15, %r14
jmp 0x2dccc
leaq 0x8(%r14), %rcx
cmpq %rax, %rcx
jae 0x2ec6a
btl $0x11, %r13d
jae 0x2ed24
movq 0x1(%r14), %rdi
movabsq $-0x800000000000, %rsi  # imm = 0xFFFF800000000000
jmp 0x2e35e
leaq 0x8(%r14), %rcx
cmpq %rax, %rcx
jae 0x2ec6a
btl $0x11, %r13d
jae 0x2ed38
movq %rbx, %r15
movq 0x1(%r14), %rbx
btl $0x12, %r13d
jb 0x2eacf
movq %r14, %r13
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
movq %rbx, %rdi
callq 0x4b3ab
movq %rax, %r12
movq %r15, %r14
movq %rax, (%r15)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq %rax, %r15
addq $0x268, %r15            # imm = 0x268
movq %r15, %rdi
movq %r12, %rsi
callq 0x43c35
movabsq $-0x800000000000, %rcx  # imm = 0xFFFF800000000000
andq %rax, %rcx
movabsq $-0x77fffffffffff, %rax # imm = 0xFFF8800000000001
decq %rax
cmpq %rax, %rcx
jne 0x2ec53
movabsq $-0x7000000000000, %rdi # imm = 0xFFF9000000000000
callq 0x4b313
movq (%r14), %rsi
movq %r15, %rdi
movq %rax, %rdx
callq 0x43e19
jmp 0x2ec5b
leaq 0x8(%r14), %rcx
cmpq %rax, %rcx
jae 0x2ec6a
btl $0x11, %r13d
jae 0x2ed4c
movq 0x1(%r14), %rdi
movabsq $-0x1800000000000, %rsi # imm = 0xFFFE800000000000
callq 0x4b3ab
movq %rax, (%rbx)
movq 0xc8(%r12), %rax
testq %rax, %rax
je 0x2e37e
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2e39a
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x4799c
movq %rax, 0xc8(%r12)
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
addq $0x9, %r14
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movq (%rbx), %rdx
jmp 0x2e8ea
movq %r13, -0x38(%rbp)
movq %r12, %rdi
movq %rbx, %r12
incq %r14
leaq -0x50(%rbp), %rsi
movq %r14, (%rsi)
callq 0x2f64c
movl %eax, %r15d
cmpl $0x100, %eax            # imm = 0x100
jae 0x2ecc3
movl %r15d, %esi
shll $0x5, %esi
orl $0x18, %esi
pushq $0x9
popq %rdi
callq 0x291a0
movq %rax, %r13
andq $0x0, 0x10(%rax)
movq %rax, %rbx
addq $0x18, %rbx
movl %r15d, %r14d
xorl %eax, %eax
movq %r12, %r15
movq -0x40(%rbp), %r12
cmpq %rax, %r14
je 0x2e4c8
andq $0x0, 0x18(%r13,%rax,8)
incq %rax
jmp 0x2e3ff
movq -0x30(%rbp), %rdi
movl %r13d, %esi
callq 0x437eb
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
jmp 0x2e441
movq -0x30(%rbp), %rdi
movl %r13d, %esi
callq 0x437eb
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
movq %rax, %rdi
callq 0x4b366
jmp 0x2ebfd
movq -0x40(%rbp), %rbx
cmpq $0x0, 0xd0(%rbx)
je 0x2ebee
movq -0x30(%rbp), %rdi
movl %r13d, %esi
callq 0x437eb
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
movq %rax, %rdi
callq 0x4b366
movq 0xd0(%rbx), %rdi
movq %rax, %rsi
callq 0x43c35
jmp 0x2ebfd
movl %r13d, %edi
callq 0x15f78
movq %rax, %rbx
movl %r13d, 0x10(%rax)
movq 0x18(%rax), %rdi
movq -0x30(%rbp), %rsi
movq %r12, %rdx
callq 0x44ae2
movabsq $-0x2800000000000, %rsi # imm = 0xFFFD800000000000
movq %rbx, %rdi
callq 0x4b3ab
jmp 0x2ebfd
movabsq $-0x2000000000000, %rsi # imm = 0xFFFE000000000000
movq %r13, %rdi
callq 0x4b3ab
movq %rax, (%r15)
movq 0xc8(%r12), %rax
testq %rax, %rax
je 0x2e4f5
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2e511
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x4799c
movq %rax, 0xc8(%r12)
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movq (%r15), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %r15
incl %r15d
leaq -0x98(%rbp), %rdx
movq %r12, %rdi
movl %r15d, %ecx
callq 0x2f66b
movq %rax, %rsi
leaq -0x98(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x10(%r13)
subq $0x1, %r14
jb 0x2e569
movq %r12, %rdi
movq %rbx, %rdx
movl %r15d, %ecx
callq 0x2fcb4
movq %rax, %rsi
addq $0x8, %rbx
jmp 0x2e54c
movq %rsi, %r14
jmp 0x2dccc
addl $0x2, %r13d
movl -0x64(%rbp), %r14d
movq -0xa8(%rbp), %rax
movq %r13, -0x38(%rbp)
movl %eax, -0x5c(%rbp)
testl %eax, %eax
movq -0x30(%rbp), %rbx
je 0x2e730
andq $0x0, -0x58(%rbp)
movq %r12, %rdi
leaq -0x98(%rbp), %r15
movq %r15, %rsi
callq 0x2da62
movl %eax, -0x60(%rbp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f64c
movq %rax, -0xb8(%rbp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f64c
movl %eax, -0x68(%rbp)
movq 0x30(%rbx), %rax
movq %rax, -0xd8(%rbp)
movq -0x98(%rbp), %rsi
movq %r12, %rdi
leaq -0xe0(%rbp), %rdx
movl %r13d, %ecx
callq 0x2dc5b
movq %rax, %r15
movq -0xe0(%rbp), %rbx
movq %rbx, %rdi
pushq $0xc
popq %rsi
callq 0x2feb7
movq %rbx, %rdi
movl -0x60(%rbp), %r13d
callq 0x4b1f1
movq %rax, -0xd0(%rbp)
movq 0x10(%rax), %rdx
testl %r13d, %r13d
js 0x2e628
movq -0x38(%rbp), %rbx
jmp 0x2e64e
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq %r12, %rdi
movq %r15, %rsi
movq %rdx, %r15
leaq -0x58(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %rcx, %rbx
callq 0x2fcb4
movq %r15, %rdx
movq %rax, %r15
movl -0x5c(%rbp), %ecx
addl $-0x4, %r14d
movl %r14d, %eax
subl %ecx, %eax
cmpl %eax, 0x5c(%rdx)
jne 0x2ec9a
movl -0x68(%rbp), %eax
cmpl 0x70(%rdx), %eax
jge 0x2ec8e
movq %rdx, -0xc8(%rbp)
movl %r13d, -0x60(%rbp)
movq -0xb8(%rbp), %rax
addl $0x4, %eax
cmpl %ecx, %eax
ja 0x2ec82
movq %rbx, %r13
movl %ecx, %ebx
movslq %r14d, %r14
leaq (,%rbx,8), %r12
movq %rbx, -0xc0(%rbp)
cmpq %r14, %rbx
jge 0x2e6ce
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rdx
addq %r12, %rdx
movq -0x40(%rbp), %rdi
movq %r15, %rsi
movl %r13d, %ecx
callq 0x2dc5b
movq %rax, %r15
incq %rbx
addq $0x8, %r12
jmp 0x2e6a3
movq %r15, -0x98(%rbp)
movq -0x58(%rbp), %rax
movq -0xd8(%rbp), %rdx
movq -0xc0(%rbp), %rsi
movq %rax, -0x10(%rdx,%rsi,8)
movl -0x68(%rbp), %eax
shlq $0x2, %rax
movq -0xc8(%rbp), %rcx
addq 0x28(%rcx), %rax
movq %rax, -0x18(%rdx,%rsi,8)
movq -0xb8(%rbp), %rcx
movl %ecx, -0x8(%rdx,%rsi,8)
movl -0x60(%rbp), %eax
movl %eax, -0x4(%rdx,%rsi,8)
movq -0xd0(%rbp), %rax
movq %rax, -0x20(%rdx,%rsi,8)
movl -0x5c(%rbp), %r14d
movl %ecx, %eax
movq -0x40(%rbp), %r12
jmp 0x2e584
movl -0x70(%rbp), %r14d
btl $0x1e, %r14d
movq -0x98(%rbp), %rbx
jb 0x2eaf1
movq $0x0, -0x40(%rbp)
jmp 0x2eb2a
movq %rbx, %r15
movl %r13d, %edi
callq 0x13013
jmp 0x2e8fe
movq %rbx, -0x48(%rbp)
movl %r13d, %edi
callq 0x44648
movq %rax, %rbx
leaq -0x50(%rbp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x2da62
shll $0x10, %eax
orl %eax, -0x20(%rbx)
movq (%r15), %r13
movq -0x38(%rbp), %rax
incl %eax
movq %rax, -0x38(%rbp)
leaq (,%r14,8), %r14
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x2e7c1
leaq (%rbx,%r15), %rdx
movq -0x40(%rbp), %rdi
movq %r13, %rsi
movq -0x38(%rbp), %rcx
callq 0x2dc5b
movq %rax, %r13
addq $0x8, %r15
jmp 0x2e79f
movq %rbx, %rdi
callq 0x44674
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
movq %rax, %rdi
callq 0x4b366
movq -0x48(%rbp), %r12
movq %rax, (%r12)
movq -0x40(%rbp), %rax
movq 0xc8(%rax), %rax
testq %rax, %rax
je 0x2e7fe
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2e81d
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x4799c
movq -0x40(%rbp), %rcx
movq %rax, 0xc8(%rcx)
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movq %r13, %r14
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movq (%r12), %rdx
jmp 0x2e8ea
movq %rax, %r15
movq -0x38(%rbp), %rax
incl %eax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %r14
leaq -0x58(%rbp), %rbx
subl $0x1, %r13d
jb 0x2e88c
movq %r12, %rdi
movq %r14, %rsi
leaq -0x98(%rbp), %rdx
movq -0x38(%rbp), %r14
movl %r14d, %ecx
callq 0x2dc5b
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x2dc5b
movq %rax, %r14
movq -0x98(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %r15, %rdi
callq 0x4300f
jmp 0x2e844
movq %r15, %rdi
callq 0x4301e
movabsq $-0x3000000000000, %rsi # imm = 0xFFFD000000000000
movq %rax, %rdi
callq 0x4b366
movq -0x48(%rbp), %r15
movq %rax, (%r15)
movq 0xc8(%r12), %rax
testq %rax, %rax
je 0x2e8c5
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2e8e1
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x4799c
movq %rax, 0xc8(%r12)
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movq (%r15), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x2dccc
movq %rbx, %r15
movl %r13d, %edi
callq 0x12f68
movq %rax, %rbx
movl %r13d, 0x10(%rax)
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
movq %rax, %rdi
callq 0x4b3ab
movq %rax, (%r15)
movq 0xc8(%r12), %rax
testq %rax, %rax
je 0x2e932
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2e94e
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x4799c
movq %rax, 0xc8(%r12)
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movq -0x38(%rbp), %r13
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movq (%r15), %rdx
movq %rdx, (%rax,%rcx,8)
incl %r13d
leaq (,%r14,8), %r14
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x2e992
movq 0x18(%rbx), %rdx
addq %r15, %rdx
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movl %r13d, %ecx
callq 0x2dc5b
movq %rax, -0x30(%rbp)
addq $0x8, %r15
jmp 0x2e96d
movq -0x30(%rbp), %r14
jmp 0x2dccc
movq %rbx, -0x48(%rbp)
movq %r12, %rbx
movl %r13d, %edi
callq 0x43b8a
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
movq %rax, -0x40(%rbp)
movq %rax, %rdi
callq 0x4b3ab
movq -0x48(%rbp), %rcx
movq %rax, (%rcx)
movq 0xc8(%rbx), %rax
testq %rax, %rax
je 0x2e9de
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2e9f9
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x4799c
movq %rax, 0xc8(%rbx)
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movq -0x30(%rbp), %r14
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movq -0x48(%rbp), %rdx
movq (%rdx), %rdx
movq %rdx, (%rax,%rcx,8)
addl $0xffffff2c, %r15d      # imm = 0xFFFFFF2C
cmpl $0x13, %r15d
ja 0x2eac3
movl $0xe0001, %eax          # imm = 0xE0001
btl %r15d, %eax
jae 0x2eac3
movq -0x38(%rbp), %rcx
incl %ecx
leaq -0x98(%rbp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rcx, -0x38(%rbp)
callq 0x2dc5b
movq %rax, %r14
movq %rax, -0x50(%rbp)
movq (%r15), %r15
pushq $0x9
popq %rsi
movq %r15, %rdi
callq 0x2feb7
movq %r15, %rdi
callq 0x4b1f1
movq -0x40(%rbp), %rcx
movq %rax, 0x28(%rcx)
leaq -0x58(%rbp), %r15
subl $0x1, %r13d
jb 0x2dccc
movq %rbx, %rdi
movq %r14, %rsi
leaq -0x98(%rbp), %rdx
movq -0x38(%rbp), %r14
movl %r14d, %ecx
callq 0x2dc5b
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
movl %r14d, %ecx
callq 0x2dc5b
movq %rax, %r14
movq -0x98(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x40(%rbp), %rdi
callq 0x43e19
jmp 0x2ea76
movq -0x38(%rbp), %rax
incl %eax
movq %rax, -0x38(%rbp)
jmp 0x2ea72
movq %rbx, %rdi
callq 0x12f5a
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4b313
movq %r15, %rbx
movq %rax, (%r15)
jmp 0x2e366
andl $0xbfffffff, %r14d      # imm = 0xBFFFFFFF
leaq -0x58(%rbp), %r15
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x2dc5b
movq %rax, %rbx
movq (%r15), %r15
pushq $0x9
popq %rsi
movq %r15, %rdi
callq 0x2feb7
movq %r15, %rdi
callq 0x4b1f1
movq %rax, -0x40(%rbp)
btl $0x1d, %r14d
jb 0x2eb37
movq -0x30(%rbp), %r15
jmp 0x2eb74
andl $0xdfffffff, %r14d      # imm = 0xDFFFFFFF
leaq -0x58(%rbp), %r15
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x2dc5b
movq %rax, %rbx
movq (%r15), %r15
pushq $0x3
popq %rsi
movq %r15, %rdi
callq 0x2feb7
movq %r15, %rdi
callq 0x4b1f1
movq -0x30(%rbp), %r15
movq %rax, 0x38(%r15)
movq -0xa0(%rbp), %rdx
movq %r12, %rdi
movq %rbx, %rsi
movl %r13d, %ecx
callq 0x2dc5b
movq %rax, %rbx
movq -0xa8(%rbp), %rax
movl %eax, 0x14(%r15)
movl %r14d, 0x10(%r15)
movl -0x64(%rbp), %eax
movl %eax, 0x18(%r15)
movq -0xb0(%rbp), %rax
movl %eax, 0x1c(%r15)
movl -0x6c(%rbp), %eax
movl %eax, 0x24(%r15)
movq -0x40(%rbp), %rax
movq %rax, 0x28(%r15)
movq %r15, %rdi
callq 0x27553
cmpl $0x10, %eax
jae 0x2eda2
movq %r15, %rdi
movabsq $-0x6800000000000, %rsi # imm = 0xFFF9800000000000
callq 0x4b3ab
movq -0x48(%rbp), %rcx
movq %rax, (%rcx)
movq %rbx, %r14
jmp 0x2dccc
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4b313
movq %rax, (%r14)
movq -0x40(%rbp), %rax
movq 0xc8(%rax), %rax
testq %rax, %rax
je 0x2ec1b
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl -0x8(%rax), %edx
jl 0x2ec3a
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x4799c
movq -0x40(%rbp), %rcx
movq %rax, 0xc8(%rcx)
movl -0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, -0x4(%rax)
movslq %ecx, %rcx
movq (%r14), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %r14
addq %r12, %r14
jmp 0x2dccc
movq %rbx, %rdi
callq 0x12f5a
movq %r14, %rbx
movq -0x40(%rbp), %r12
movq %r13, %r14
jmp 0x2e366
leaq 0x2cf1b(%rip), %rdi     # 0x5bb8c
callq 0x177b1
leaq 0x2a276(%rip), %rdi     # 0x58ef3
callq 0x177b1
leaq 0x2d222(%rip), %rdi     # 0x5beab
callq 0x177b1
leaq 0x2d1f6(%rip), %rdi     # 0x5be8b
callq 0x177b1
leaq 0x2d1cb(%rip), %rdi     # 0x5be6c
callq 0x177b1
leaq 0x2d077(%rip), %rdi     # 0x5bd24
movl %r13d, %esi
xorl %eax, %eax
callq 0x176c9
leaq 0x2d2de(%rip), %rdi     # 0x5bf9c
callq 0x177b1
leaq 0x2d02c(%rip), %rdi     # 0x5bcf6
movl %r15d, %esi
jmp 0x2ecb0
leaq 0x2d176(%rip), %rdi     # 0x5be4c
callq 0x177b1
movq 0x5130e(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x1e318(%rip), %rsi     # 0x4d004
leaq 0x2cf2d(%rip), %rdx     # 0x5bc20
movl $0x458, %ecx            # imm = 0x458
xorl %eax, %eax
callq 0x125e0
pushq $0x1
popq %rdi
callq 0x12a60
leaq 0x2d2de(%rip), %rdi     # 0x5bfec
callq 0x177b1
subl 0xe8(%r12), %esi
leaq 0x2d017(%rip), %rdi     # 0x5bd39
jmp 0x2ecb0
incq %r14
subl 0xe8(%r12), %r14d
leaq 0x2d003(%rip), %rdi     # 0x5bd39
jmp 0x2ed5e
incq %r14
subl 0xe8(%r12), %r14d
leaq 0x2d078(%rip), %rdi     # 0x5bdc2
jmp 0x2ed5e
incq %r14
subl 0xe8(%r12), %r14d
leaq 0x2d01d(%rip), %rdi     # 0x5bd7b
movl %r14d, %esi
jmp 0x2ecb0
movq 0x51283(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x21299(%rip), %rsi     # 0x50010
leaq 0x2cea2(%rip), %rcx     # 0x5bc20
leaq 0x2d22d(%rip), %r8      # 0x5bfb2
movl $0x516, %edx            # imm = 0x516
xorl %eax, %eax
callq 0x125e0
callq 0x12100
leaq 0x2d22b(%rip), %rdi     # 0x5bfc8
callq 0x177b1
leaq 0x2d136(%rip), %rdi     # 0x5bedf
callq 0x177b1
subl 0xe8(%r12), %r14d
leaq 0x2d055(%rip), %rdi     # 0x5be12
movl %r15d, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x176c9