// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: optimize_expression
static opt_t optimize_expression(s7_scheme *sc, s7_pointer expr, int32_t hop, s7_pointer e, bool export_ok)
                {
                    s7_pointer car_expr;
#if OPTIMIZE_PRINT
                    fprintf(stderr, "optimize_expression %s %d %s\n", DISPLAY(expr), hop, DISPLAY(e));
#endif
                    set_checked(expr);
                    car_expr = car(expr);

                    if (is_symbol(car_expr))
                    {
                        s7_pointer slot;
                        if (is_syntactic_symbol(car_expr))
                        {
                            if (!is_pair(cdr(expr)))
                                return(OPT_OOPS);
                            return(optimize_syntax(sc, expr, T_Syn(slot_value(global_slot(car_expr))), hop, e, export_ok));
                        }

                        slot = find_uncomplicated_symbol(sc, car_expr, e); /* local vars (recursive calls too??) are considered "complicated" */
#if OPTIMIZE_PRINT
                        if (!is_slot(slot)) fprintf(stderr, "  %s is not simple\n", DISPLAY(expr));
#endif
                        if (is_slot(slot))
                        {
                            s7_pointer func;
                            func = slot_value(slot);
                            if (is_syntax(func))                           /* 12-8-16 was is_syntactic, but that is only appropriate above -- here we have the value */
                            {
                                if (!is_pair(cdr(expr)))
                                    return(OPT_OOPS);
                                return(optimize_syntax(sc, expr, func, hop, e, export_ok));  /* e can be extended via set-cdr! here */
                            }
                            if (is_any_macro(func)) return(OPT_F);

                            /* we miss implicit indexing here because at this time, the data are not set */
                            if ((is_t_procedure(func)) ||
                                    /* (is_c_function(func)) || */
                                    (is_safe_procedure(func)))                 /* built-in applicable objects like vectors */
                            {
                                int32_t pairs = 0, symbols = 0, args = 0, bad_pairs = 0, quotes = 0, orig_hop;
                                s7_pointer p;
                                orig_hop = hop;

                                if ((hop != 0) &&
                                        ((is_any_closure(func)) ||             /* see use-redef in s7test -- I'm not sure about this */
                                         ((!is_global(car_expr)) &&
                                          ((!is_slot(global_slot(car_expr))) ||
                                           (slot_value(global_slot(car_expr)) != func)))) &&
                                        (!is_immutable(car_expr)) && /* list|apply-values -- can't depend on opt1 here because it might not be global, or might be redefined locally */
                                        (!is_immutable(slot)))       /* (define-constant...) */
                                {
                                    /* (let () (define (f2 a) (+ a 1)) (define (f1 a) (f2 a)) (define (f2 a) (- a)) (f1 12))
                                     * (let () (define (f2 a) (+ a 1)) (define (f1 a) (f2 a)) (define (f2 a) (- a 1)) (f1 12))
                                     * and similar define* cases
                                     */
                                    hop = 0;
                                    /* this is very tricky!  See s7test for some cases.  Basically, we need to protect a recursive call
                                     *   of the current function being optimized from being confused with some previous definition
                                     *   of the same name.  But method lists have global names so the global bit is off even though the
                                     *   thing is actually a safe global.  But no closure can be considered safe in the hop sense --
                                     *   even a global function might be redefined at any time, and previous uses of it in other functions
                                     *   need to reflect its new value.
                                     *   So, closures are always checked, but built-in functions are used as if never redefined until that redefinition.
                                     * Syntax handling is already impure in s7, so the special handling of built-in functions doesn't
                                     *   offend me much.  Consider each a sort of reader macro until someone redefines it -- previous
                                     *   uses may not be affected because they might have been optimized away -- the result depends on the
                                     *   current optimizer.
                                     * Another case (from K Matheussen):
                                     *   (define (call-func func arg1 arg2) (define (call) (func arg1 arg2)) (call)) (call-func + 1 2.5) (call-func - 5 2)
                                     *   when we get here originally "func" is +, hop=1, but just checking for !is_global(car_expr) is
                                     *   not good enough -- if we load mockery.scm, nothing is global!
                                     * Yet another case (define (test-abs) (define (abs x) (+ x 1)) (format *stderr* "abs ~A~%" (abs -1)))
                                     *   when optimize_syntax sees the (define abs ...), it inserts abs into e so that the caller's e is extended (set-cdr!)
                                     *   so that find_uncomplicated_symbol above will be unhappy when we reach (abs -1) as the format arg.
                                     *   This can be confused if lambda is redefined at some point, but...
                                     */
                                }

                                for (p = cdr(expr); is_pair(p); p = cdr(p), args++) /* check the args (the calling expression) */
                                {
                                    s7_pointer car_p;
                                    car_p = car(p);
                                    if (is_normal_symbol(car_p)) /* for opt func */
                                        symbols++;
                                    else
                                    {
                                        if (is_pair(car_p))
                                        {
                                            pairs++;
                                            if (!is_checked(car_p))
                                            {
                                                opt_t res;
                                                res = optimize_expression(sc, car_p, orig_hop, e, false);
                                                if (res == OPT_F)
                                                {
                                                    bad_pairs++;
                                                    if (is_proper_quote(sc, car_p))
                                                        quotes++;
                                                }
                                                else
                                                {
                                                    if (res == OPT_OOPS)
                                                        return(OPT_OOPS);
                                                }
                                            }
                                            else
                                            {
                                                if ((!is_optimized(car_p)) ||
                                                        (is_unsafe(car_p)))
                                                {
                                                    bad_pairs++;
                                                    if (is_proper_quote(sc, car_p))
                                                        quotes++;
                                                }}}}}
                                if (is_null(p))                    /* if not null, dotted list of args? */
                                {
                                    switch (args)
                                    {
                                        case 0:  return(optimize_thunk(sc, expr, func, hop, e));
                                        case 1:  return(optimize_func_one_arg(sc, expr, func, hop, pairs, symbols, quotes, bad_pairs, e));
                                        case 2:  return(optimize_func_two_args(sc, expr, func, hop, pairs, symbols, quotes, bad_pairs, e));
                                        case 3:  return(optimize_func_three_args(sc, expr, func, hop, pairs, symbols, quotes, bad_pairs, e));
                                        default: return(optimize_func_many_args(sc, expr, func, hop, args, pairs, symbols, quotes, bad_pairs, e));
                                    }
                                }
                                return(OPT_F);
                            }
                        }
                        else
                        {
                            if ((sc->undefined_identifier_warnings) &&
                                    (slot == sc->undefined) &&           /* car_expr is not in e or global */
                                    (symbol_tag(car_expr) == 0))         /*    and we haven't looked it up earlier */
                            {
                                s7_pointer p;
                                p = sc->input_port;
                                if ((is_input_port(p)) &&
                                        (port_file(p) != stdin) &&
                                        (!port_is_closed(p)) &&
                                        (port_filename(p)))
                                    s7_warn(sc, 1024, "%s might be undefined (%s %u)\n", DISPLAY(car_expr), port_filename(p), port_line_number(p));
                                else s7_warn(sc, 1024, "; %s might be undefined\n", DISPLAY(car_expr));
                                symbol_set_tag(car_expr, 1);             /* one warning is enough */
                            }
                        }
#if OPTIMIZE_PRINT
                        fprintf(stderr, "  at line %d for %s\n", __LINE__, DISPLAY(car_expr));
#endif
                        /* car_expr is a symbol but it's not a built-in procedure or a "safe" case = vector etc */
                        {
                            /* else maybe it's something like a let variable binding: (sqrtfreq (sqrt frequency)) */
                            s7_pointer p;
                            int32_t len = 0, pairs = 0, symbols = 0;

                            for (p = cdr(expr); is_pair(p); p = cdr(p), len++)
                            {
                                s7_pointer car_p;
                                car_p = car(p);
                                if (is_pair(car_p))
                                {
                                    pairs++;
                                    if ((!is_checked(car_p)) &&
                                            (optimize_expression(sc, car_p, hop, e, false) == OPT_OOPS))
                                        return(OPT_OOPS);
                                }
                                else
                                {
                                    if (is_symbol(car_p))
                                        symbols++;
                                }
                            }

                            if ((is_null(p)) &&              /* (+ 1 . 2) */
                                    (!is_optimized(expr)))
                            {
                                /* len=0 case is almost entirely arglists */
                                set_opt1_con(expr, sc->unused);

                                if (pairs == 0)
                                {
                                    if (len == 0)
                                    {
                                        /* hoping to catch object application here, as in readers in Snd */
                                        set_unsafe_optimize_op(expr, OP_UNKNOWN);
                                        return(OPT_F);
                                    }

                                    if (len == 1)
                                    {
                                        if (car_expr != sc->quote_symbol) /* !! quote can be redefined locally, unsetting the T_SYNTACTIC flag -- can this happen elsewhere? */
                                            set_unsafe_optimize_op(expr, OP_UNKNOWN_G);
                                        return(OPT_F);
                                    }

                                    if (len == 2)
                                    {
                                        set_unsafely_optimized(expr);
                                        set_optimize_op(expr, OP_UNKNOWN_GG);
                                        return(OPT_F);
                                    }

                                    if ((len >= 3) &&
                                            (len == symbols))
                                    {
                                        set_unsafe_optimize_op(expr, OP_UNKNOWN_ALL_S);
                                        set_opt3_arglen(expr, make_permanent_integer(len));
                                        return(OPT_F);
                                    }
                                }
                                else /* pairs != 0 */
                                {
                                    s7_pointer arg1;
                                    arg1 = cadr(expr);
                                    if (pairs == 1)
                                    {
                                        if (len == 1)
                                        {

                                            if ((car(expr) == sc->quote_symbol) &&
                                                    (direct_memq(sc->quote_symbol, e)))
                                                return(OPT_OOPS);

                                            if (is_fxable(sc, arg1))
                                            {
                                                set_opt3_arglen(expr, small_int(1));
                                                annotate_arg(sc, cdr(expr), e);
                                                set_unsafe_optimize_op(expr, OP_UNKNOWN_A);
                                                return(OPT_F);
                                            }
                                        }
                                        else
                                        {
                                            if (len == 2)
                                            {
                                                if ((is_fxable(sc, arg1)) &&
                                                        (is_fxable(sc, caddr(expr))))
                                                {
                                                    set_opt3_arglen(expr, small_int(2));
                                                    set_unsafe_optimize_op(expr, OP_UNKNOWN_AA);
                                                    return(OPT_F);
                                                }}}}

                                    if ((len == 2) &&
                                            (is_fxable(sc, arg1)) &&
                                            (is_fxable(sc, caddr(expr))))
                                    {
                                        set_opt3_arglen(expr, small_int(2));
                                        set_unsafe_optimize_op(expr, OP_UNKNOWN_AA);
                                        return(OPT_F);
                                    }

                                    if ((fx_count(sc, expr) == len) &&
                                            (len < GC_TRIGGER_SIZE))
                                    {
                                        if ((len == 1) &&
                                                (car(expr) == sc->quote_symbol) &&
                                                (direct_memq(sc->quote_symbol, e)))
                                            return(OPT_OOPS);

                                        set_unsafe_optimize_op(expr, (len == 1) ? OP_UNKNOWN_A : OP_UNKNOWN_FX);
                                        set_opt3_arglen(expr, make_permanent_integer(len));
                                        if (len == 1)
                                            annotate_arg(sc, cdr(expr), e);
                                        return(OPT_F);
                                    }}}}
                    }
                    else
                    {
                        /* car(expr) is not a symbol, but there might be interesting stuff here */
                        /* (define (hi a) (case 1 ((1) (if (> a 2) a 2)))) */
                        s7_pointer p;

                        for (p = expr; is_pair(p); p = cdr(p))
                        {
                            if ((is_pair(car(p))) &&
                                    (!is_checked(car(p))) &&
                                    (optimize_expression(sc, car(p), hop, e, false) == OPT_OOPS))
                                return(OPT_OOPS);
                        }

                        if ((is_proper_list_1(sc, cdr(expr))) &&
                                (is_pair(car_expr)) &&
                                (car(car_expr) == sc->if_symbol) &&
                                (is_pair(cdr(car_expr))) &&
                                (is_pair(cddr(car_expr))) &&
                                (is_symbol(caddr(car_expr))) &&
                                (is_pair(cdddr(car_expr))) &&
                                (is_symbol(cadddr(car_expr))) &&
                                (is_fxable(sc, cadr(car_expr))) &&
                                (is_fxable(sc, cadr(expr))))
                        {
                            s7_pointer ptrue;
                            ptrue = find_uncomplicated_symbol(sc, caddr(car_expr), e);
                            if (is_slot(ptrue))
                            {
                                ptrue = slot_value(ptrue);
                                if ((is_c_function(ptrue)) &&
                                        (is_safe_procedure(ptrue)))
                                {
                                    s7_pointer pfalse;
                                    pfalse = find_uncomplicated_symbol(sc, cadddr(car_expr), e);
                                    if (is_slot(pfalse))
                                    {
                                        pfalse = slot_value(pfalse);
                                        if ((is_c_function(pfalse)) &&
                                                (is_safe_procedure(pfalse)))
                                        {
                                            set_opt1_con(expr, ptrue);
                                            set_opt2_con(expr, pfalse);
                                            set_safe_optimize_op(expr, OP_opIF_A_SSq_A);
                                            annotate_arg(sc, cdr(car_expr), e);
                                            annotate_arg(sc, cdr(expr), e);
                                            return(OPT_T);
                                        }}}}}
                    }
                    return(OPT_F);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movl %edx, 0xc(%rsp)
movq %rsi, %rbx
movq %rdi, %r12
movq (%rsi), %rax
movq 0x8(%rsi), %r13
movq %rax, %rcx
orq $0x400000, %rcx         # imm = 0x400000
movq %rcx, (%rsi)
cmpb $0xa, (%r13)
jne 0xd9c3d
movl %r8d, %ebp
cmpw $0x20a, (%r13)          # imm = 0x20A
jne 0xd9dd9
movq 0x10(%rbx), %rax
movl $0x2, %edx
cmpb $0x1, (%rax)
jne 0xda39c
movq 0x10(%r13), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rdx
movzbl %bpl, %r9d
movq %r12, %rdi
movq %rbx, %rsi
movl 0xc(%rsp), %ecx
movq %r15, %r8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xda48b
cmpb $0x1, %al
jne 0xd9c78
movq %rbx, %r14
movq 0x8(%r14), %rsi
cmpb $0x1, (%rsi)
jne 0xd9c6e
testb $0x40, 0x2(%rsi)
jne 0xd9c6e
movq %r12, %rdi
movl 0xc(%rsp), %edx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0xd9bb5
cmpl $0x2, %eax
je 0xda397
movq 0x10(%r14), %r14
cmpb $0x1, (%r14)
je 0xd9c44
movq 0x10(%rbx), %r14
xorl %edx, %edx
cmpb $0x1, (%r14)
jne 0xda39c
movq 0x10(%r14), %rax
cmpq 0x110(%r12), %rax
jne 0xda39c
cmpb $0x1, (%r13)
jne 0xda39c
movq 0x8(%r13), %rax
cmpq 0x17e8(%r12), %rax
jne 0xda39c
movq 0x10(%r13), %rax
cmpb $0x1, (%rax)
jne 0xda39c
movq 0x10(%rax), %rcx
cmpb $0x1, (%rcx)
jne 0xda39c
movq %r12, %rbp
movq 0x8(%rcx), %r12
cmpb $0xa, (%r12)
jne 0xda39c
movq 0x10(%rcx), %rcx
cmpb $0x1, (%rcx)
jne 0xda39c
movq 0x8(%rcx), %rcx
cmpb $0xa, (%rcx)
jne 0xda39c
movq 0x8(%rax), %rsi
movq %rbp, %rdi
movq %rbp, 0x10(%rsp)
callq 0xcd0e8
testb %al, %al
je 0xd9fcf
movq 0x8(%r14), %rsi
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0xcd0e8
testb %al, %al
je 0xd9fcf
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xdb624
cmpb $0x20, (%rax)
jne 0xd9fcf
movq 0x10(%rax), %r14
cmpb $0x30, (%r14)
jb 0xd9fcf
testb $0x20, 0x2(%r14)
je 0xd9fcf
movq 0x10(%r13), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
movq %rbp, %rdi
movq %r15, %rdx
callq 0xdb624
cmpb $0x20, (%rax)
jne 0xd9fcf
movq 0x10(%rax), %rax
cmpb $0x30, (%rax)
jb 0xd9fcf
testb $0x20, 0x2(%rax)
movl $0x0, %edx
je 0xda39c
movq %r14, 0x18(%rbx)
movq %rax, 0x20(%rbx)
orb $0x8, 0x1(%rbx)
movw $0x167, 0x4(%rbx)       # imm = 0x167
movq 0x10(%r13), %rsi
movq %rbp, %rdi
movq %r15, %rdx
callq 0xcd131
movq 0x10(%rbx), %rsi
movq %rbp, %rdi
movq %r15, %rdx
callq 0xcd131
movl $0x1, %edx
jmp 0xda39c
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xdb624
cmpb $0x20, (%rax)
jne 0xd9e18
movq 0x10(%rax), %rdi
movzbl (%rdi), %ecx
cmpq $0x9, %rcx
jne 0xd9eb7
movq 0x10(%rbx), %rax
movl $0x2, %edx
cmpb $0x1, (%rax)
jne 0xda39c
movq 0x10(%rdi), %rdx
jmp 0xd9c19
cmpb $0x1, 0x218c(%r12)
jne 0xd9f4e
cmpq 0x128(%r12), %rax
jne 0xd9f4e
cmpl $0x0, 0x2c(%r13)
jne 0xd9f4e
movq 0x170(%r12), %r14
cmpb $0x23, (%r14)
jne 0xd9f1f
movq 0x8(%r14), %rax
movq 0x8(%rax), %rcx
movq 0x6c177(%rip), %rdx     # 0x145fd8
cmpq (%rdx), %rcx
je 0xd9f1f
cmpb $0x0, 0x2(%rax)
jne 0xd9f1f
cmpq $0x0, 0x10(%rax)
je 0xd9f1f
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x37a4c
movq 0x10(%rax), %rcx
movq 0x8(%r14), %rax
movq 0x10(%rax), %r8
movl 0x20(%rax), %r9d
leaq 0x3e106(%rip), %rdx     # 0x117fa9
movl $0x400, %esi            # imm = 0x400
movq %r12, %rdi
xorl %eax, %eax
callq 0xeea2
jmp 0xd9f46
leaq 0x724b2(%rip), %rdx     # 0x14c370
cmpb $0x0, (%rcx,%rdx)
jne 0xd9fcf
leaq 0x72461(%rip), %rdx     # 0x14c330
cmpb $0x0, (%rcx,%rdx)
jne 0xd9edb
testb $0x20, 0x2(%rdi)
je 0xd9f4e
xorl %r10d, %r10d
movl $0x0, %esi
cmpl $0x0, 0xc(%rsp)
je 0xda10b
leaq 0x78ceb(%rip), %rsi     # 0x152be0
movq (%r13), %rdx
cmpb $0x0, (%rcx,%rsi)
je 0xda0dd
movl $0x1, %esi
btl $0x18, %edx
jb 0xda10b
movl (%rax), %esi
shrl $0x18, %esi
andl $0x1, %esi
jmp 0xda10b
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x37a4c
movq 0x10(%rax), %rcx
leaq 0x3e091(%rip), %rdx     # 0x117fc8
movl $0x400, %esi            # imm = 0x400
movq %r12, %rdi
xorl %eax, %eax
callq 0xeea2
movl $0x1, 0x2c(%r13)
movq %r12, 0x10(%rsp)
movq %r15, 0x20(%rsp)
movq 0x10(%rbx), %r12
cmpb $0x1, (%r12)
jne 0xd9fb9
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %ebp, %ebp
movq 0x8(%r12), %rsi
movzbl (%rsi), %eax
cmpl $0xa, %eax
je 0xd9fa6
cmpl $0x1, %eax
jne 0xd9fa9
incl %r15d
testb $0x40, 0x2(%rsi)
jne 0xd9fa9
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %edx
movq 0x20(%rsp), %rcx
xorl %r8d, %r8d
callq 0xd9bb5
cmpl $0x2, %eax
jne 0xd9fa9
jmp 0xda397
incl %r14d
incl %ebp
movq 0x10(%r12), %r12
cmpb $0x1, (%r12)
je 0xd9f6b
jmp 0xd9fc1
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x10(%rsp), %rcx
cmpq 0x110(%rcx), %r12
je 0xd9fd6
xorl %edx, %edx
jmp 0xda39c
cmpw $0x801, (%rbx)          # imm = 0x801
movl $0x0, %edx
je 0xda39c
movq 0x140(%rcx), %rax
movq %rax, 0x18(%rbx)
testl %r15d, %r15d
je 0xda09e
movq 0x10(%rbx), %r14
movq 0x8(%r14), %r12
cmpl $0x1, %r15d
jne 0xda0ca
cmpl $0x2, %ebp
je 0xda28e
cmpl $0x1, %ebp
movq 0x10(%rsp), %r15
jne 0xda301
movq 0x8(%rbx), %rax
cmpq 0x17b0(%r15), %rax
jne 0xda052
movq 0x20(%rsp), %rcx
cmpb $0x1, (%rcx)
jne 0xda052
movq 0x20(%rsp), %rcx
cmpq %rax, 0x8(%rcx)
je 0xda397
movq 0x10(%rcx), %rcx
cmpb $0x1, (%rcx)
je 0xda03f
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0xcd0e8
testb %al, %al
je 0xda0ca
movq 0x6c8ee(%rip), %rax     # 0x146958
movq %rax, 0x28(%r14)
movq 0x10(%rbx), %rax
andq $-0x40001, (%rax)       # imm = 0xFFFBFFFF
movq 0x10(%rbx), %rsi
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rdx
callq 0xcd131
orq $0x800800, (%rbx)       # imm = 0x800800
movw $0x184, 0x4(%rbx)       # imm = 0x184
jmp 0xd9fcf
cmpl $0x2, %ebp
je 0xda3c5
cmpl $0x1, %ebp
je 0xda3ad
testl %ebp, %ebp
jne 0xda3d4
orq $0x800800, (%rbx)       # imm = 0x800800
movw $0x17f, 0x4(%rbx)       # imm = 0x17F
jmp 0xda39c
cmpl $0x2, %ebp
movq 0x10(%rsp), %r15
je 0xda2b6
jmp 0xda301
movl $0x1, %esi
btl $0x10, %edx
jb 0xda10b
movq 0x10(%r13), %rcx
cmpb $0x20, (%rcx)
jne 0xd9f03
cmpq %rdi, 0x10(%rcx)
setne %cl
btl $0x18, %edx
setae %dl
testb %dl, %cl
jne 0xd9f12
movl %esi, 0x28(%rsp)
movq %rdi, 0x30(%rsp)
movq 0x10(%rbx), %r14
cmpb $0x1, (%r14)
jne 0xda22c
xorl %r9d, %r9d
xorl %r11d, %r11d
xorl %r13d, %r13d
movq $0x0, 0x18(%rsp)
xorl %r10d, %r10d
movq 0x8(%r14), %rbp
movzbl (%rbp), %eax
cmpl $0x1, %eax
je 0xda166
cmpl $0xa, %eax
jne 0xda154
movb 0x6(%rbp), %al
andb $-0x80, %al
cmpb $0x1, %al
adcl $0x0, %r11d
incl %r13d
movq 0x10(%r14), %r14
cmpb $0x1, (%r14)
je 0xda137
jmp 0xda23e
incl %r9d
movq (%rbp), %rax
btl $0x16, %eax
jb 0xda1b6
movl %r9d, 0x2c(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x10(%rsp)
movq %r12, %rdi
movq %rbp, %rsi
movl 0xc(%rsp), %edx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0xd9bb5
testl %eax, %eax
je 0xda1cf
movl %eax, %edx
cmpl $0x2, %eax
movq 0x10(%rsp), %r10
movq 0x20(%rsp), %r11
movl 0x2c(%rsp), %r9d
jne 0xda154
jmp 0xda39c
movl %eax, %ecx
andl $0x80ffff, %ecx         # imm = 0x80FFFF
cmpl $0x801, %ecx            # imm = 0x801
je 0xda154
incl %r10d
cmpb $0x1, %al
jne 0xda154
jmp 0xda1eb
movq 0x10(%rsp), %r10
incl %r10d
cmpb $0x1, (%rbp)
movq 0x20(%rsp), %r11
movl 0x2c(%rsp), %r9d
jne 0xda154
movq 0x8(%rbp), %rax
cmpq 0x17b0(%r12), %rax
jne 0xda154
movq 0x10(%rbp), %rax
cmpb $0x1, (%rax)
jne 0xda154
movq 0x110(%r12), %rcx
xorl %edx, %edx
cmpq %rcx, 0x10(%rax)
sete %dl
movq 0x18(%rsp), %rax
addl %edx, %eax
movq %rax, 0x18(%rsp)
jmp 0xda154
movq $0x0, 0x18(%rsp)
xorl %r13d, %r13d
xorl %r11d, %r11d
xorl %r9d, %r9d
cmpq 0x110(%r12), %r14
jne 0xd9fcf
cmpl $0x3, %r13d
ja 0xda461
movl %r13d, %eax
leaq 0x2e7d4(%rip), %rcx     # 0x108a34
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq 0x30(%rsp), %rdx
movl 0x28(%rsp), %ecx
jmpq *%rax
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %r8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdb70d
movq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0xcd0e8
testb %al, %al
je 0xda2b6
movq 0x10(%r14), %rax
movq 0x8(%rax), %rsi
movq %r15, %rdi
callq 0xcd0e8
testb %al, %al
jne 0xda2d9
movq %r15, %rdi
movq %r12, %rsi
callq 0xcd0e8
testb %al, %al
je 0xda301
movq 0x10(%r14), %rax
movq 0x8(%rax), %rsi
movq %r15, %rdi
callq 0xcd0e8
testb %al, %al
je 0xda301
movq 0x6c680(%rip), %rax     # 0x146960
movq %rax, 0x28(%r14)
movq 0x10(%rbx), %rax
andq $-0x40001, (%rax)       # imm = 0xFFFBFFFF
orq $0x800800, (%rbx)       # imm = 0x800800
movw $0x185, 0x4(%rbx)       # imm = 0x185
jmp 0xd9fcf
movq %r15, %rdi
movq %rbx, %rsi
callq 0xe067a
cmpl $0x3f, %ebp
ja 0xd9fcf
cmpl %ebp, %eax
movl $0x0, %edx
jne 0xda39c
movw $0x181, %ax             # imm = 0x181
cmpl $0x1, %ebp
movq 0x20(%rsp), %r14
jne 0xda355
movq 0x8(%rbx), %rcx
movw $0x184, %ax             # imm = 0x184
cmpq 0x17b0(%r15), %rcx
jne 0xda355
cmpb $0x1, (%r14)
jne 0xda355
movq %r14, %rdx
cmpq %rcx, 0x8(%rdx)
je 0xda397
movq 0x10(%rdx), %rdx
cmpb $0x1, (%rdx)
je 0xda346
orq $0x800800, (%rbx)       # imm = 0x800800
movw %ax, 0x4(%rbx)
movl %ebp, %edi
callq 0xe05f3
movq 0x10(%rbx), %rcx
movq %rax, 0x28(%rcx)
movq 0x10(%rbx), %rax
andq $-0x40001, (%rax)       # imm = 0xFFFBFFFF
cmpl $0x1, %ebp
jne 0xd9fcf
movq 0x10(%rbx), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0xcd131
jmp 0xd9fcf
movl $0x2, %edx
movl %edx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq 0x17b0(%rcx), %r13
je 0xda39c
orq $0x800800, (%rbx)       # imm = 0x800800
movw $0x182, 0x4(%rbx)       # imm = 0x182
jmp 0xda39c
orq $0x800800, (%rbx)       # imm = 0x800800
movw $0x183, 0x4(%rbx)       # imm = 0x183
jmp 0xda39c
cmpl %r14d, %ebp
jne 0xda39c
orq $0x800800, (%rbx)       # imm = 0x800800
movw $0x180, 0x4(%rbx)       # imm = 0x180
movl %ebp, %edi
callq 0xe05f3
xorl %edx, %edx
movq 0x10(%rbx), %rcx
movq %rax, 0x28(%rcx)
movq 0x10(%rbx), %rax
andq $-0x40001, (%rax)       # imm = 0xFFFBFFFF
jmp 0xda39c
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, %rsi
movl %r9d, %r8d
movl %r11d, %r9d
pushq %r15
pushq %r10
pushq 0x30(%rsp)
callq 0xdc827
jmp 0xda482
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, %rsi
movl %r9d, %r8d
movl %r11d, %r9d
pushq %r15
pushq %r10
pushq 0x30(%rsp)
callq 0xdebfe
jmp 0xda482
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, %rsi
movl %r9d, %r8d
movl %r11d, %r9d
pushq %r15
pushq %r10
pushq 0x30(%rsp)
callq 0xdb9a5
jmp 0xda482
movq %r12, %rdi
movq %rbx, %rsi
movq 0x30(%rsp), %rdx
movl 0x28(%rsp), %ecx
movl %r13d, %r8d
pushq %r15
pushq %r10
pushq 0x28(%rsp)
pushq %r11
callq 0xdfdd5
addq $0x58, %rsp
jmp 0xda3a2