// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/specials.c
// Function: janetc_fn
static JanetSlot janetc_fn(JanetFopts opts, int32_t argn, const Janet *argv) {
    JanetCompiler *c = opts.compiler;
    JanetFuncDef *def;
    JanetSlot ret;
    Janet head;
    JanetScope fnscope;
    int32_t paramcount, argi, parami, arity, min_arity = 0, max_arity, defindex, i;
    JanetFopts subopts = janetc_fopts_default(c);
    const Janet *params;
    const char *errmsg = NULL;

    /* Function flags */
    int vararg = 0;
    int structarg = 0;
    int allow_extra = 0;
    int selfref = 0;
    int hasname = 0;
    int seenamp = 0;
    int seenopt = 0;
    int namedargs = 0;

    /* Begin function */
    c->scope->flags |= JANET_SCOPE_CLOSURE;
    janetc_scope(&fnscope, c, JANET_SCOPE_FUNCTION, "function");

    if (argn == 0) {
        errmsg = "expected at least 1 argument to function literal";
        goto error;
    }

    /* Read function parameters */
    parami = 0;
    head = argv[0];
    if (janet_checktype(head, JANET_SYMBOL)) {
        selfref = 1;
        hasname = 1;
        parami = 1;
    } else if (janet_checktype(head, JANET_KEYWORD)) {
        hasname = 1;
        parami = 1;
    }
    if (parami >= argn || !janet_checktype(argv[parami], JANET_TUPLE)) {
        errmsg = "expected function parameters";
        goto error;
    }

    /* Keep track of destructured parameters */
    JanetSlot *destructed_params = NULL;
    JanetSlot *named_params = NULL;
    JanetTable *named_table = NULL;
    JanetSlot named_slot;

    /* Compile function parameters */
    params = janet_unwrap_tuple(argv[parami]);
    paramcount = janet_tuple_length(params);
    arity = paramcount;
    for (i = 0; i < paramcount; i++) {
        Janet param = params[i];
        if (namedargs) {
            arity--;
            if (!janet_checktype(param, JANET_SYMBOL)) {
                errmsg = "only named arguments can follow &named";
                goto error;
            }
            Janet key = janet_wrap_keyword(janet_unwrap_symbol(param));
            janet_table_put(named_table, key, param);
            janet_v_push(named_params, janetc_farslot(c));
        } else if (janet_checktype(param, JANET_SYMBOL)) {
            /* Check for varargs and unfixed arity */
            const uint8_t *sym = janet_unwrap_symbol(param);
            if (sym[0] == '&') {
                if (!janet_cstrcmp(sym, "&")) {
                    if (seenamp) {
                        errmsg = "& in unexpected location";
                        goto error;
                    } else if (i == paramcount - 1) {
                        allow_extra = 1;
                        arity--;
                    } else if (i == paramcount - 2) {
                        vararg = 1;
                        arity -= 2;
                    } else {
                        errmsg = "& in unexpected location";
                        goto error;
                    }
                    seenamp = 1;
                } else if (!janet_cstrcmp(sym, "&opt")) {
                    if (seenopt) {
                        errmsg = "only one &opt allowed";
                        goto error;
                    } else if (i == paramcount - 1) {
                        errmsg = "&opt cannot be last item in parameter list";
                        goto error;
                    }
                    min_arity = i;
                    arity--;
                    seenopt = 1;
                } else if (!janet_cstrcmp(sym, "&keys")) {
                    if (seenamp) {
                        errmsg = "&keys in unexpected location";
                        goto error;
                    } else if (i == paramcount - 2) {
                        vararg = 1;
                        structarg = 1;
                        arity -= 2;
                    } else {
                        errmsg = "&keys in unexpected location";
                        goto error;
                    }
                    seenamp = 1;
                } else if (!janet_cstrcmp(sym, "&named")) {
                    if (seenamp) {
                        errmsg = "&named in unexpected location";
                        goto error;
                    }
                    vararg = 1;
                    structarg = 1;
                    arity--;
                    seenamp = 1;
                    namedargs = 1;
                    named_table = janet_table(10);
                    named_slot = janetc_farslot(c);
                } else {
                    janetc_nameslot(c, sym, janetc_farslot(c));
                }
            } else {
                janetc_nameslot(c, sym, janetc_farslot(c));
            }
        } else {
            janet_v_push(destructed_params, janetc_farslot(c));
        }
    }

    /* Compile destructed params */
    int32_t j = 0;
    for (i = 0; i < paramcount; i++) {
        Janet param = params[i];
        if (!janet_checktype(param, JANET_SYMBOL)) {
            janet_assert(janet_v_count(destructed_params) > j, "out of bounds");
            JanetSlot reg = destructed_params[j++];
            destructure(c, param, reg, defleaf, NULL);
            janetc_freeslot(c, reg);
        }
    }
    janet_v_free(destructed_params);

    /* Compile named arguments */
    if (namedargs) {
        Janet param = janet_wrap_table(named_table);
        destructure(c, param, named_slot, defleaf, NULL);
        janetc_freeslot(c, named_slot);
        janet_v_free(named_params);
    }

    max_arity = (vararg || allow_extra) ? INT32_MAX : arity;
    if (!seenopt) min_arity = arity;

    /* Check for self ref (also avoid if arguments shadow own name) */
    if (selfref) {
        /* Check if the parameters shadow the function name. If so, don't
         * emit JOP_LOAD_SELF and add a binding since that most users
         * seem to expect that function parameters take precedence over the
         * function name */
        const uint8_t *sym = janet_unwrap_symbol(head);
        int32_t len = janet_v_count(c->scope->syms);
        int found = 0;
        for (int32_t i = 0; i < len; i++) {
            if (c->scope->syms[i].sym == sym) {
                found = 1;
            }
        }
        if (!found) {
            JanetSlot slot = janetc_farslot(c);
            slot.flags = JANET_SLOT_NAMED | JANET_FUNCTION;
            janetc_emit_s(c, JOP_LOAD_SELF, slot, 1);
            janetc_nameslot(c, sym, slot);
        }
    }

    /* Compile function body */
    if (parami + 1 == argn) {
        janetc_emit(c, JOP_RETURN_NIL);
    } else {
        for (argi = parami + 1; argi < argn; argi++) {
            subopts.flags = (argi == (argn - 1)) ? JANET_FOPTS_TAIL : JANET_FOPTS_DROP;
            janetc_value(subopts, argv[argi]);
            if (c->result.status == JANET_COMPILE_ERROR)
                goto error2;
        }
    }

    /* Build function */
    def = janetc_pop_funcdef(c);
    def->arity = arity;
    def->min_arity = min_arity;
    def->max_arity = max_arity;
    if (vararg) def->flags |= JANET_FUNCDEF_FLAG_VARARG;
    if (structarg) def->flags |= JANET_FUNCDEF_FLAG_STRUCTARG;

    if (hasname) def->name = janet_unwrap_symbol(head); /* Also correctly unwraps keyword */
    janet_def_addflags(def);
    defindex = janetc_addfuncdef(c, def);

    /* Ensure enough slots for vararg function. */
    if (arity + vararg > def->slotcount) def->slotcount = arity + vararg;

    /* Instantiate closure */
    ret = janetc_gettarget(opts);
    janetc_emit_su(c, JOP_CLOSURE, ret, defindex, 1);
    return ret;

error:
    janetc_cerror(c, errmsg);
error2:
    janetc_popscope(c);
    return janetc_cslot(janet_wrap_nil());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdi, -0x298(%rbp)
movq %rdi, -0x290(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x288(%rbp)
movl %esi, -0x4(%rbp)
movq %rdx, -0x10(%rbp)
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc4(%rbp)
movq -0x18(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x1fed0
movq $0x0, -0x108(%rbp)
movl $0x0, -0x10c(%rbp)
movl $0x0, -0x110(%rbp)
movl $0x0, -0x114(%rbp)
movl $0x0, -0x118(%rbp)
movl $0x0, -0x11c(%rbp)
movl $0x0, -0x120(%rbp)
movl $0x0, -0x124(%rbp)
movl $0x0, -0x128(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x6c(%rax), %ecx
orl $0x10, %ecx
movl %ecx, 0x6c(%rax)
movq -0x18(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
movl $0x1, %edx
leaq 0x29d0c(%rip), %rcx     # 0x8919a
callq 0x204d0
cmpl $0x0, -0x4(%rbp)
jne 0x5f4ac
leaq 0x369e6(%rip), %rax     # 0x95e86
movq %rax, -0x108(%rbp)
jmp 0x602eb
movl $0x0, -0xbc(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x5f4c9
jmp 0x5f4ef
movsd -0x40(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5f4db
jmp 0x5f50c
movq -0x40(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x5f50c
jmp 0x5f52c
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x40(%rbp), %rax
movabsq $-0x5800000000000, %rcx # imm = 0xFFFA800000000000
cmpq %rcx, %rax
jne 0x5f52c
movl $0x1, -0x118(%rbp)
movl $0x1, -0x11c(%rbp)
movl $0x1, -0xbc(%rbp)
jmp 0x5f58d
xorl %eax, %eax
testb $0x1, %al
jne 0x5f534
jmp 0x5f55a
movsd -0x40(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5f546
jmp 0x5f577
movq -0x40(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x5f577
jmp 0x5f58b
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x40(%rbp), %rax
movabsq $-0x5000000000000, %rcx # imm = 0xFFFB000000000000
cmpq %rcx, %rax
jne 0x5f58b
movl $0x1, -0x11c(%rbp)
movl $0x1, -0xbc(%rbp)
jmp 0x5f58d
movl -0xbc(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x5f604
xorl %eax, %eax
testb $0x1, %al
jne 0x5f5a0
jmp 0x5f5dc
movq -0x10(%rbp), %rax
movslq -0xbc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5f5bd
jmp 0x5f617
movq -0x10(%rbp), %rax
movslq -0xbc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x5f617
jmp 0x5f604
movq -0x10(%rbp), %rcx
movslq -0xbc(%rbp), %rdx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq (%rcx,%rdx,8), %rax
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
cmpq %rcx, %rax
je 0x5f617
leaq 0x368ac(%rip), %rax     # 0x95eb7
movq %rax, -0x108(%rbp)
jmp 0x602eb
movq $0x0, -0x130(%rbp)
movq $0x0, -0x138(%rbp)
movq $0x0, -0x140(%rbp)
movq -0x10(%rbp), %rax
movslq -0xbc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x7b260
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movl -0x10(%rax), %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, -0xc0(%rbp)
movl $0x0, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
cmpl -0xb4(%rbp), %eax
jge 0x5fc9f
movq -0x100(%rbp), %rax
movslq -0xd0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x160(%rbp)
cmpl $0x0, -0x128(%rbp)
je 0x5f810
movl -0xc0(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc0(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x5f6c8
jmp 0x5f6f4
movsd -0x160(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5f6dd
jmp 0x5f727
movq -0x160(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x5f727
jmp 0x5f714
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x160(%rbp), %rax
movabsq $-0x5800000000000, %rcx # imm = 0xFFFA800000000000
cmpq %rcx, %rax
je 0x5f727
leaq 0x367b9(%rip), %rax     # 0x95ed4
movq %rax, -0x108(%rbp)
jmp 0x602eb
movq -0x160(%rbp), %rdi
callq 0x7b260
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x168(%rbp)
movq -0x140(%rbp), %rdi
movq -0x168(%rbp), %rsi
movq -0x160(%rbp), %rdx
callq 0x697e0
cmpq $0x0, -0x138(%rbp)
je 0x5f789
movq -0x138(%rbp), %rax
movl -0x4(%rax), %eax
addl $0x1, %eax
movq -0x138(%rbp), %rcx
cmpl -0x8(%rcx), %eax
jl 0x5f7a8
movq -0x138(%rbp), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq 0x70760
movq %rax, -0x138(%rbp)
jmp 0x5f7aa
jmp 0x5f7aa
movq -0x138(%rbp), %rax
movq -0x138(%rbp), %rdx
movl -0x4(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x4(%rdx)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x2a0(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0x20470
movq -0x2a0(%rbp), %rax
movq -0x180(%rbp), %rcx
movq %rcx, (%rax)
movq -0x178(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x170(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x5fc89
xorl %eax, %eax
testb $0x1, %al
jne 0x5f818
jmp 0x5f847
movsd -0x160(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5f82d
jmp 0x5f86b
movq -0x160(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x5f86b
jmp 0x5fbe2
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x160(%rbp), %rax
movabsq $-0x5800000000000, %rcx # imm = 0xFFFA800000000000
cmpq %rcx, %rax
jne 0x5fbe2
movq -0x160(%rbp), %rdi
callq 0x7b260
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x26, %eax
jne 0x5fb81
movq -0x188(%rbp), %rdi
leaq 0x2b713(%rip), %rsi     # 0x8afb2
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x5f94b
cmpl $0x0, -0x120(%rbp)
je 0x5f8c9
leaq 0x3663e(%rip), %rax     # 0x95efb
movq %rax, -0x108(%rbp)
jmp 0x602eb
movl -0xd0(%rbp), %eax
movl -0xb4(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x5f8f7
movl $0x1, -0x114(%rbp)
movl -0xc0(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x5f93a
movl -0xd0(%rbp), %eax
movl -0xb4(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0x5f925
movl $0x1, -0x10c(%rbp)
movl -0xc0(%rbp), %eax
subl $0x2, %eax
movl %eax, -0xc0(%rbp)
jmp 0x5f938
leaq 0x365cf(%rip), %rax     # 0x95efb
movq %rax, -0x108(%rbp)
jmp 0x602eb
jmp 0x5f93a
jmp 0x5f93c
movl $0x1, -0x120(%rbp)
jmp 0x5fb7f
movq -0x188(%rbp), %rdi
leaq 0x365bb(%rip), %rsi     # 0x95f14
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x5f9d1
cmpl $0x0, -0x124(%rbp)
je 0x5f97f
leaq 0x365a6(%rip), %rax     # 0x95f19
movq %rax, -0x108(%rbp)
jmp 0x602eb
movl -0xd0(%rbp), %eax
movl -0xb4(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x5f9a5
leaq 0x36596(%rip), %rax     # 0x95f2f
movq %rax, -0x108(%rbp)
jmp 0x602eb
jmp 0x5f9a7
movl -0xd0(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0xc0(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc0(%rbp)
movl $0x1, -0x124(%rbp)
jmp 0x5fb7d
movq -0x188(%rbp), %rdi
leaq 0x3657b(%rip), %rsi     # 0x95f5a
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x5fa61
cmpl $0x0, -0x120(%rbp)
je 0x5fa05
leaq 0x36567(%rip), %rax     # 0x95f60
movq %rax, -0x108(%rbp)
jmp 0x602eb
movl -0xd0(%rbp), %eax
movl -0xb4(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0x5fa3d
movl $0x1, -0x10c(%rbp)
movl $0x1, -0x110(%rbp)
movl -0xc0(%rbp), %eax
subl $0x2, %eax
movl %eax, -0xc0(%rbp)
jmp 0x5fa50
leaq 0x3651c(%rip), %rax     # 0x95f60
movq %rax, -0x108(%rbp)
jmp 0x602eb
jmp 0x5fa52
movl $0x1, -0x120(%rbp)
jmp 0x5fb7b
movq -0x188(%rbp), %rdi
leaq 0x36485(%rip), %rsi     # 0x95ef4
callq 0x6b2b0
cmpl $0x0, %eax
jne 0x5fb1d
cmpl $0x0, -0x120(%rbp)
je 0x5fa99
leaq 0x364f0(%rip), %rax     # 0x95f7d
movq %rax, -0x108(%rbp)
jmp 0x602eb
movl $0x1, -0x10c(%rbp)
movl $0x1, -0x110(%rbp)
movl -0xc0(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc0(%rbp)
movl $0x1, -0x120(%rbp)
movl $0x1, -0x128(%rbp)
movl $0xa, %edi
callq 0x692f0
movq %rax, -0x140(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
callq 0x20470
movq -0x1a0(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0x148(%rbp)
jmp 0x5fb79
movq -0x18(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
callq 0x20470
movq -0x2b0(%rbp), %rdi
movq -0x2a8(%rbp), %rsi
leaq -0x1b8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20330
jmp 0x5fb7b
jmp 0x5fb7d
jmp 0x5fb7f
jmp 0x5fbdd
movq -0x18(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0x2b8(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x20470
movq -0x2c0(%rbp), %rdi
movq -0x2b8(%rbp), %rsi
leaq -0x1d0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20330
jmp 0x5fc87
cmpq $0x0, -0x130(%rbp)
je 0x5fc05
movq -0x130(%rbp), %rax
movl -0x4(%rax), %eax
addl $0x1, %eax
movq -0x130(%rbp), %rcx
cmpl -0x8(%rcx), %eax
jl 0x5fc24
movq -0x130(%rbp), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq 0x70760
movq %rax, -0x130(%rbp)
jmp 0x5fc26
jmp 0x5fc26
movq -0x130(%rbp), %rax
movq -0x130(%rbp), %rdx
movl -0x4(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x4(%rdx)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x2c8(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x1e8(%rbp), %rdi
callq 0x20470
movq -0x2c8(%rbp), %rax
movq -0x1e8(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1e0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x1d8(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x5fc89
jmp 0x5fc8b
movl -0xd0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd0(%rbp)
jmp 0x5f679
movl $0x0, -0x1ec(%rbp)
movl $0x0, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
cmpl -0xb4(%rbp), %eax
jge 0x5fe61
movq -0x100(%rbp), %rax
movslq -0xd0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1f8(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x5fce6
jmp 0x5fd19
movsd -0x1f8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x5fcfe
jmp 0x5fe4b
movq -0x1f8(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x5fe4b
jmp 0x5fd3d
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x1f8(%rbp), %rax
movabsq $-0x5800000000000, %rcx # imm = 0xFFFA800000000000
cmpq %rcx, %rax
je 0x5fe4b
jmp 0x5fd3f
cmpq $0x0, -0x130(%rbp)
je 0x5fd5b
movq -0x130(%rbp), %rax
movl -0x4(%rax), %eax
movl %eax, -0x2cc(%rbp)
jmp 0x5fd65
xorl %eax, %eax
movl %eax, -0x2cc(%rbp)
jmp 0x5fd65
movl -0x2cc(%rbp), %eax
cmpl -0x1ec(%rbp), %eax
jg 0x5fda5
jmp 0x5fd75
movq 0x50274(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x2128e(%rip), %rsi     # 0x81014
movl $0x41a, %edx            # imm = 0x41A
leaq 0x35f4b(%rip), %rcx     # 0x95cdd
leaq 0x292ec(%rip), %r8      # 0x89085
movb $0x0, %al
callq 0x125f0
callq 0x12100
jmp 0x5fda7
movq -0x130(%rbp), %rax
movl -0x1ec(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1ec(%rbp)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x210(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x208(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x200(%rbp)
movq -0x18(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
leaq -0x210(%rbp), %rax
leaq 0x306e(%rip), %rdx      # 0x62e70
xorl %ecx, %ecx
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x622b0
movq -0x18(%rbp), %rdi
leaq -0x210(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x202e0
jmp 0x5fe4d
movl -0xd0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd0(%rbp)
jmp 0x5fcb3
cmpq $0x0, -0x130(%rbp)
je 0x5fe7d
movq -0x130(%rbp), %rdi
addq $-0x8, %rdi
callq 0x3acb0
jmp 0x5fe7f
jmp 0x5fe7f
cmpl $0x0, -0x128(%rbp)
je 0x5ff29
movq -0x140(%rbp), %rdi
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x7b610
movq %rax, -0x218(%rbp)
movq -0x18(%rbp), %rdi
movq -0x218(%rbp), %rsi
leaq -0x158(%rbp), %rax
leaq 0x2fae(%rip), %rdx      # 0x62e70
xorl %ecx, %ecx
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x622b0
movq -0x18(%rbp), %rdi
leaq -0x158(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x202e0
cmpq $0x0, -0x138(%rbp)
je 0x5ff27
movq -0x138(%rbp), %rdi
addq $-0x8, %rdi
callq 0x3acb0
jmp 0x5ff29
jmp 0x5ff29
cmpl $0x0, -0x10c(%rbp)
jne 0x5ff3b
cmpl $0x0, -0x114(%rbp)
je 0x5ff48
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x2d0(%rbp)
jmp 0x5ff54
movl -0xc0(%rbp), %eax
movl %eax, -0x2d0(%rbp)
movl -0x2d0(%rbp), %eax
movl %eax, -0xc8(%rbp)
cmpl $0x0, -0x124(%rbp)
jne 0x5ff75
movl -0xc0(%rbp), %eax
movl %eax, -0xc4(%rbp)
cmpl $0x0, -0x118(%rbp)
je 0x600b9
movq -0x40(%rbp), %rdi
callq 0x7b260
movq %rax, -0x220(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x5ffb6
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movl -0x4(%rax), %eax
movl %eax, -0x2d4(%rbp)
jmp 0x5ffc0
xorl %eax, %eax
movl %eax, -0x2d4(%rbp)
jmp 0x5ffc0
movl -0x2d4(%rbp), %eax
movl %eax, -0x224(%rbp)
movl $0x0, -0x228(%rbp)
movl $0x0, -0x22c(%rbp)
movl -0x22c(%rbp), %eax
cmpl -0x224(%rbp), %eax
jge 0x60031
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movslq -0x22c(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
cmpq -0x220(%rbp), %rax
jne 0x6001e
movl $0x1, -0x228(%rbp)
jmp 0x60020
movl -0x22c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x22c(%rbp)
jmp 0x5ffe0
cmpl $0x0, -0x228(%rbp)
jne 0x600b7
movq -0x18(%rbp), %rsi
leaq -0x248(%rbp), %rdi
callq 0x20470
movl $0x2000c, -0x238(%rbp)  # imm = 0x2000C
movq -0x18(%rbp), %rdi
movl $0x2e, %esi
leaq -0x248(%rbp), %rax
movl $0x1, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29990
movq -0x18(%rbp), %rdi
movq -0x220(%rbp), %rsi
leaq -0x248(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20330
jmp 0x600b9
movl -0xbc(%rbp), %eax
addl $0x1, %eax
cmpl -0x4(%rbp), %eax
jne 0x600da
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x29410
jmp 0x6017e
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x6017c
movl -0xb8(%rbp), %edx
movl -0x4(%rbp), %esi
subl $0x1, %esi
movl $0x40000, %eax          # imm = 0x40000
movl $0x10000, %ecx          # imm = 0x10000
cmpl %esi, %edx
cmovel %ecx, %eax
movl %eax, -0xd8(%rbp)
movq -0x10(%rbp), %rax
movslq -0xb8(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0xd8(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0xf8(%rbp), %xmm0
movups -0xe8(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x260(%rbp), %rdi
callq 0x21590
movq -0x18(%rbp), %rax
cmpl $0x1, 0x48(%rax)
jne 0x60166
jmp 0x602fb
jmp 0x60168
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x600e9
jmp 0x6017e
movq -0x18(%rbp), %rdi
callq 0x23340
movq %rax, -0x20(%rbp)
movl -0xc0(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x60(%rax)
movl -0xc4(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x64(%rax)
movl -0xc8(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x68(%rax)
cmpl $0x0, -0x10c(%rbp)
je 0x601cb
movq -0x20(%rbp), %rax
movl 0x58(%rax), %ecx
orl $0x10000, %ecx          # imm = 0x10000
movl %ecx, 0x58(%rax)
cmpl $0x0, -0x110(%rbp)
je 0x601e4
movq -0x20(%rbp), %rax
movl 0x58(%rax), %ecx
orl $0x1000000, %ecx        # imm = 0x1000000
movl %ecx, 0x58(%rax)
cmpl $0x0, -0x11c(%rbp)
je 0x60201
movq -0x40(%rbp), %rdi
callq 0x7b260
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x20(%rbp), %rdi
callq 0x23200
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x63670
movl %eax, -0xcc(%rbp)
movl -0xc0(%rbp), %eax
addl -0x10c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jle 0x60245
movl -0xc0(%rbp), %ecx
addl -0x10c(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x5c(%rax)
movq -0x288(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x278(%rbp), %rdi
callq 0x213c0
movq -0x278(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x270(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x268(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movl -0xcc(%rbp), %eax
movl $0x30, %esi
leaq -0x38(%rbp), %rdx
movl $0x1, %ecx
movq (%rdx), %r8
movq %r8, (%rsp)
movq 0x8(%rdx), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rdx), %rdx
movq %rdx, 0x10(%rsp)
movzwl %ax, %edx
callq 0x29e30
movq -0x298(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x6032d
movq -0x18(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0x1fff0
movq -0x18(%rbp), %rdi
callq 0x20600
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq -0x298(%rbp), %rdi
movq %rax, -0x280(%rbp)
movq -0x280(%rbp), %rsi
callq 0x1ff40
movq -0x290(%rbp), %rax
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
nopl (%rax)