// File: /workspace/github_cpp_makefile_star2_O3/joncampbell123[P]haxcc/haxpp.cpp
// Function: accept_tokens(__gnu_cxx::__normal_iterator<token*, std::vector<token, std::allocator<token>>> const&, __gnu_cxx::__normal_iterator<token*, std::vector<token, std::allocator<token>>> const&)
bool accept_tokens(const token_string::iterator &tib,const token_string::iterator &tie) {
    bool pass = pp_pass();
    auto ti = tib;

    /* we're only looking for #preprocessor directives here that control conditional inclusion */
    if (ti != tie && tokenit_next_match_inc(ti,tie,token::PREPROC)) {
        if (tokenit_next_match_inc(ti,tie,token::IF)) {
            pp_cond_t pc; pc.on_if(pp_if_eval(ti,tie),pass);
            pp_cond_stack.push(move(pc));
        }
        else if (tokenit_next_match_inc(ti,tie,token::ELIF)) {
            if (!pp_cond_stack.empty()) {
                pp_cond_stack.top().on_elif(pp_if_eval(ti,tie));
            }
            else {
                throw invalid_argument("#else not allowed here");
            }
        }
        else if (tokenit_next_match_inc(ti,tie,token::IFDEF)) {
            const string &ident = tokenit_next_identifier(ti,tie); /* will throw exception if not! */
            pp_cond_t pc; pc.on_ifdef(is_macro(ident),pass);
            pp_cond_stack.push(move(pc));
        }
        else if (tokenit_next_match_inc(ti,tie,token::IFNDEF)) {
            const string &ident = tokenit_next_identifier(ti,tie); /* will throw exception if not! */
            pp_cond_t pc; pc.on_ifdef(!is_macro(ident),pass);
            pp_cond_stack.push(move(pc));
        }
        else if (tokenit_next_match_inc(ti,tie,token::DEFINE)) { /* some preprocessing done by the parse token code */
            const string &ident = tokenit_next_identifier(ti,tie); /* will throw exception if not! */
            macro_t macro;

            if (tokenit_next_match_inc(ti,tie,token::OPEN_PARENS)) {
                macro.parens = true;
                /* parameter list, IDENTIFIER. Final one may be __VA_ARGS__ */
                do {
                    if (ti == tie) throw invalid_argument("#define macro param list expected close parens");
                    if ((*ti).tval == token::IDENTIFIER) {
                        if (find(macro.param.begin(),macro.param.end(),(*ti).sval) == macro.param.end()) {
                            macro.param.push_back((*ti).sval);
                            ti++;
                        }
                        else {
                            throw invalid_argument(string("parameter specified more than once ") + (*ti).sval);
                        }

                        if (ti == tie) throw invalid_argument("#define macro param cut off suddenly");

                        /* allow older style param... */
                        if (tokenit_next_match_inc(ti,tie,token::DOTDOTDOT)) {
                            macro.last_param_variadic = true;
                            macro.last_param_optional = false;

                            /* this must be the last param! */
                            if (!tokenit_next_match_inc(ti,tie,token::CLOSE_PARENS))
                                throw invalid_argument("#define macro param list expected close parens after ...");

                            break;
                        }
                        else if (tokenit_next_match_inc(ti,tie,token::CLOSE_PARENS)) {
                            break;
                        }
                        else if (tokenit_next_match_inc(ti,tie,token::COMMA)) {
                            /* OK */
                        }
                    }
                    else if (tokenit_next_match_inc(ti,tie,token::DOTDOTDOT)) {
                        macro.param.push_back("__VA_ARGS__");
                        macro.last_param_variadic = true;
                        macro.last_param_optional = true;

                        /* this must be the last param! */
                        if (!tokenit_next_match_inc(ti,tie,token::CLOSE_PARENS))
                            throw invalid_argument("#define macro param list expected close parens after ...");

                        break;
                    }
                    else if (tokenit_next_match_inc(ti,tie,token::CLOSE_PARENS)) {
                        break;
                    }
                    else {
                        throw invalid_argument(string("unexpected token in macro parameter list ") + to_string(*ti));
                    }
                } while (1);
            }

            /* the tokens from here are MACROSUBST, MACROPARAM, __VA_ARGS__, __VA_OPT__ ( MACROSUBST ), STRINGIFY, AND TOKEN_PASTE.
             * There will never be an IDENTIFIER because the parameter matching has already been done. */
            while (ti != tie) {
                if ((*ti).tval == token::MACROSUBST ||
                    (*ti).tval == token::VA_ARGS ||
                    (*ti).tval == token::VA_OPT ||
                    (*ti).tval == token::COMMA ||
                    (*ti).tval == token::STRINGIFY ||
                    (*ti).tval == token::TOKEN_PASTE ||
                    (*ti).tval == token::OPEN_PARENS ||
                    (*ti).tval == token::CLOSE_PARENS) {
                    macro.subst.push_back(*ti);
                    ti++;
                }
                else if ((*ti).tval == token::MACROPARAM) {
                    if ((*ti).i.u >= (unsigned long long)macro.param.size()) throw runtime_error("macro param out of range");
                    macro.subst.push_back(*ti);
                    ti++;
                }
                else {
                    throw invalid_argument(string("unexpected token in the body of a macro ") + to_string(*ti));
                }
            }

            {
                auto mi = macro_store.find(ident);
                if (mi != macro_store.end()) {
                    if (mi->second == macro)
                        macro_store[ident] = macro;
                    else
                        fprintf(stderr,"WARNING: Macro '%s' redefinition\n",ident.c_str());
                }
                else {
                    macro_store[ident] = macro;
                }
            }
        }
        else if (tokenit_next_match_inc(ti,tie,token::UNDEF)) {
            const string &ident = tokenit_next_identifier(ti,tie); /* will throw exception if not! */

            {
                auto mi = macro_store.find(ident);
                if (mi != macro_store.end())
                    macro_store.erase(mi);
            }
        }
        else if (tokenit_next_match_inc(ti,tie,token::ELSE)) {
            if (!pp_cond_stack.empty()) {
                pp_cond_stack.top().on_else();
            }
            else {
                throw invalid_argument("#else not allowed here");
            }
        }
        else if (tokenit_next_match_inc(ti,tie,token::ENDIF)) {
            if (!pp_cond_stack.empty()) {
                pp_cond_stack.pop();
                pass = pp_pass();
            }
            else {
                throw invalid_argument("too many #endif");
            }
        }
    }

    return pass;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq 0xd398(%rip), %r15      # 0x1a360
movq 0xd371(%rip), %rax      # 0x1a340
cmpq %rax, %r15
je 0xcff8
movq %r15, %rcx
cmpq 0xd38a(%rip), %r15      # 0x1a368
jne 0xcff0
movq 0xd391(%rip), %rdx      # 0x1a378
movl $0x200, %ecx            # imm = 0x200
addq -0x8(%rdx), %rcx
movb -0x3(%rcx), %bl
andb -0x4(%rcx), %bl
jmp 0xcffa
movb $0x1, %bl
movq (%rdi), %rcx
movq (%r14), %rsi
cmpq %rcx, %rsi
je 0xd14f
cmpl $0x2, (%rcx)
jne 0xd14f
leaq 0x70(%rcx), %rdx
cmpq %rsi, %rdx
je 0xd14f
cmpl $0x60, (%rdx)
jne 0xd05d
addq $0xe0, %rcx
leaq 0x8(%rsp), %rdi
movq %rcx, (%rdi)
leaq 0x50(%rsp), %r15
movl $0x1010000, (%r15)      # imm = 0x1010000
movq %r14, %rsi
callq 0xce6b
movb %bl, 0x1(%r15)
movb %al, (%r15)
leaq 0xd2db(%rip), %rdi      # 0x1a330
movq %r15, %rsi
jmp 0xd14a
cmpl $0x61, (%rdx)
jne 0xd0b2
addq $0xe0, %rcx
movq %rcx, 0x8(%rsp)
cmpq %rax, %r15
je 0xd4e1
cmpq 0xd2ea(%rip), %r15      # 0x1a368
jne 0xd091
movq 0xd2f1(%rip), %rax      # 0x1a378
movl $0x200, %r15d           # imm = 0x200
addq -0x8(%rax), %r15
addq $-0x4, %r15
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xce6b
movzbl %al, %esi
movq %r15, %rdi
callq 0x300c
jmp 0xd14f
cmpl $0x64, (%rdx)
jne 0xd0fa
addq $0xe0, %rcx
leaq 0x8(%rsp), %rdi
movq %rcx, (%rdi)
callq 0xad01
leaq 0x50(%rsp), %r14
movl $0x10000, (%r14)        # imm = 0x10000
leaq 0xd132(%rip), %rdi      # 0x1a210
movq %rax, %rsi
callq 0x10bc4
leaq 0xd12b(%rip), %rcx      # 0x1a218
cmpq %rcx, %rax
movb %bl, 0x1(%r14)
setne (%r14)
jmp 0xd140
cmpl $0x65, (%rdx)
jne 0xd163
addq $0xe0, %rcx
leaq 0x8(%rsp), %rdi
movq %rcx, (%rdi)
callq 0xad01
leaq 0x50(%rsp), %r14
movl $0x10000, (%r14)        # imm = 0x10000
leaq 0xd0ea(%rip), %rdi      # 0x1a210
movq %rax, %rsi
callq 0x10bc4
leaq 0xd0e3(%rip), %rcx      # 0x1a218
cmpq %rcx, %rax
movb %bl, 0x1(%r14)
sete (%r14)
leaq 0xd1e9(%rip), %rdi      # 0x1a330
movq %r14, %rsi
callq 0x11b1e
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x66, (%rdx)
jne 0xd26a
addq $0xe0, %rcx
leaq 0x8(%rsp), %r15
movq %rcx, (%r15)
movq %r15, %rdi
callq 0xad01
movq %rax, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movl $0x0, 0x7f(%rsp)
movq (%r14), %rax
movq (%r15), %r15
cmpq %rax, %r15
je 0xd409
cmpl $0x20, (%r15)
jne 0xd409
addq $0x70, %r15
movq %r15, 0x8(%rsp)
movb $0x1, 0x82(%rsp)
cmpq %rax, %r15
je 0xd249
leaq 0x68(%rsp), %r13
movl (%r15), %ecx
cmpl $0x5, %ecx
jne 0xd345
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
leaq 0x48(%r15), %rbp
movq %rbp, %rdx
callq 0x11312
cmpq 0x70(%rsp), %rax
jne 0xd513
movq %r13, %rdi
movq %rbp, %rsi
callq 0xf0c2
leaq 0x70(%r15), %rcx
movq (%r14), %rax
cmpq %rax, %rcx
je 0xd585
movl (%rcx), %edx
cmpl $0x21, %edx
je 0xd3b4
cmpl $0x19, %edx
je 0xd3da
cmpl $0x17, %edx
je 0xd23a
movq %rcx, %r15
jmp 0xd244
addq $0xe0, %r15
movq %r15, %rcx
cmpq %rax, %rcx
jne 0xd1d4
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x729c(%rip), %rsi      # 0x144f9
movq %rax, %rdi
callq 0x23a0
jmp 0xd5a1
cmpl $0x67, (%rdx)
jne 0xd2b6
addq $0xe0, %rcx
leaq 0x8(%rsp), %rdi
movq %rcx, (%rdi)
callq 0xad01
leaq 0xcf86(%rip), %rdi      # 0x1a210
movq %rax, %rsi
callq 0x10bc4
leaq 0xcf7f(%rip), %rcx      # 0x1a218
cmpq %rcx, %rax
je 0xd14f
leaq 0xcf67(%rip), %rdi      # 0x1a210
movq %rax, %rsi
callq 0x122b4
jmp 0xd14f
cmpl $0x5a, (%rdx)
jne 0xd2ef
cmpq %rax, %r15
je 0xd66b
cmpq 0xd09d(%rip), %r15      # 0x1a368
jne 0xd2de
movq 0xd0a4(%rip), %rax      # 0x1a378
movl $0x200, %r15d           # imm = 0x200
addq -0x8(%rax), %r15
addq $-0x4, %r15
movq %r15, %rdi
callq 0x3082
jmp 0xd14f
cmpl $0x62, (%rdx)
jne 0xd14f
cmpq %rax, %r15
je 0xd6ce
leaq 0xd028(%rip), %rdi      # 0x1a330
callq 0x122f2
movq 0xd04c(%rip), %rax      # 0x1a360
cmpq 0xd025(%rip), %rax      # 0x1a340
je 0xd4d0
cmpq 0xd040(%rip), %rax      # 0x1a368
jne 0xd33a
movq 0xd047(%rip), %rcx      # 0x1a378
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movb -0x3(%rax), %bl
andb -0x4(%rax), %bl
jmp 0xd14f
cmpl $0x19, %ecx
jne 0xd3bd
leaq 0x40(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x65c4(%rip), %rsi      # 0x1391e
leaq 0x65c8(%rip), %rdx      # 0x13929
leaq 0x30(%rsp), %rdi
callq 0x10b2e
leaq 0x30(%rsp), %rsi
movq %r13, %rdi
callq 0x10c4e
leaq 0x70(%r15), %r13
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd393
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21d0
movw $0x101, 0x80(%rsp)      # imm = 0x101
movq (%r14), %rax
cmpq %rax, %r13
je 0xd68c
cmpl $0x21, (%r13)
jne 0xd68c
addq $0xe0, %r15
jmp 0xd404
movq %r15, 0x8(%rsp)
cmpq %rax, %r15
je 0xd6ef
cmpl $0x21, %ecx
jne 0xd6ef
addq $0x70, %r15
jmp 0xd404
leaq 0xe0(%r15), %rcx
movw $0x1, 0x80(%rsp)
cmpq %rax, %rcx
je 0xd6ad
cmpl $0x21, (%rcx)
jne 0xd6ad
addq $0x150, %r15            # imm = 0x150
movq %r15, 0x8(%rsp)
cmpq %rax, %r15
je 0xd46b
leaq 0x50(%rsp), %r13
movabsq $0x300800008, %rbp      # imm = 0x300800008
movl (%r15), %eax
cmpq $0x21, %rax
ja 0xd44b
btq %rax, %rbp
jb 0xd457
cmpq $0x4, %rax
jne 0xd44b
movq 0x70(%rsp), %rax
subq 0x68(%rsp), %rax
sarq $0x5, %rax
cmpq %rax, 0x8(%r15)
jb 0xd457
jmp 0xd5b1
addl $-0x7a, %eax
cmpl $0x4, %eax
jae 0xd5e3
movq %r13, %rdi
movq %r15, %rsi
callq 0xf17a
addq $0x70, %r15
cmpq (%r14), %r15
jne 0xd41d
leaq 0xcd9e(%rip), %rdi      # 0x1a210
movq %r12, %rsi
callq 0x10bc4
leaq 0xcd97(%rip), %rcx      # 0x1a218
cmpq %rcx, %rax
je 0xd49b
addq $0x40, %rax
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x30f8
testb %al, %al
je 0xd4d7
leaq 0xcd6e(%rip), %rdi      # 0x1a210
movq %r12, %rsi
callq 0xf1c8
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0xf244
leaq 0x68(%rsp), %rdi
callq 0xf064
leaq 0x50(%rsp), %rdi
callq 0xf40c
jmp 0xd14f
movb $0x1, %bl
jmp 0xd14f
movq %r12, %rdi
callq 0x2486
jmp 0xd4b7
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x62b8(%rip), %rsi      # 0x137ad
movq %rax, %rdi
callq 0x23a0
movq 0xcad4(%rip), %rsi      # 0x19fd8
movq 0xcab5(%rip), %rdx      # 0x19fc0
movq %r14, %rdi
callq 0x2330
movq %r15, 0x8(%rsp)
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6ff3(%rip), %rsi      # 0x14528
leaq 0x700f(%rip), %rdx      # 0x1454b
leaq 0x10(%rsp), %rdi
callq 0x10b2e
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0xee1d
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x2350
xorl %ebp, %ebp
movq 0xca67(%rip), %rsi      # 0x19fd8
movq 0xca48(%rip), %rdx      # 0x19fc0
movq %r14, %rdi
callq 0x2330
jmp 0xd76d
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x6fb3(%rip), %rsi      # 0x1454c
movq %rax, %rdi
callq 0x23a0
movq 0xca18(%rip), %rdx      # 0x19fc0
movq 0xca29(%rip), %rsi      # 0x19fd8
jmp 0xd5db
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x700f(%rip), %rsi      # 0x145d4
movq %rax, %rdi
callq 0x20b0
movq 0xc9dc(%rip), %rdx      # 0x19fb0
movq 0xca1d(%rip), %rsi      # 0x19ff8
movq %r14, %rdi
callq 0x2330
movq %r15, 0x8(%rsp)
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x6fe7(%rip), %rsi      # 0x145ed
leaq 0x7008(%rip), %rdx      # 0x14615
leaq 0x10(%rsp), %rdi
callq 0x10b2e
leaq 0x88(%rsp), %rdi
movq %r15, %rsi
callq 0x50ff
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0xee77
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x2350
xorl %ebp, %ebp
movq 0xc981(%rip), %rsi      # 0x19fd8
movq 0xc962(%rip), %rdx      # 0x19fc0
movq %r14, %rdi
callq 0x2330
jmp 0xd76d
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x612e(%rip), %rsi      # 0x137ad
movq %rax, %rdi
callq 0x23a0
jmp 0xd4fd
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x6ed1(%rip), %rsi      # 0x14571
movq %rax, %rdi
callq 0x23a0
jmp 0xd5a1
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x6eb0(%rip), %rsi      # 0x14571
movq %rax, %rdi
callq 0x23a0
jmp 0xd5a1
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x6f56(%rip), %rsi      # 0x14638
movq %rax, %rdi
callq 0x23a0
jmp 0xd4fd
movl $0x10, %edi
callq 0x20e0
movq %rax, %r14
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x6e9d(%rip), %rsi      # 0x145aa
leaq 0x6ebf(%rip), %rdx      # 0x145d3
leaq 0x10(%rsp), %rdi
callq 0x10b2e
leaq 0x88(%rsp), %rdi
movq %r15, %rsi
callq 0x50ff
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0xee77
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x2350
xorl %ebp, %ebp
movq 0xc87a(%rip), %rsi      # 0x19fd8
movq 0xc85b(%rip), %rdx      # 0x19fc0
movq %r14, %rdi
callq 0x2330
jmp 0xd7b7
jmp 0xd7d7
jmp 0xd80a
jmp 0xd879
jmp 0xd88e
jmp 0xd879
jmp 0xd879
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd89e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0xd89e
jmp 0xd89b
jmp 0xd88e
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd7dd
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0xd7dd
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd7fe
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
jne 0xd841
jmp 0xd84e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
jne 0xd862
jmp 0xd87c
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd837
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xd84e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21d0
testb %bpl, %bpl
jne 0xd87c
jmp 0xd89e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xd87c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0xd87c
jmp 0xd879
jmp 0xd879
jmp 0xd879
jmp 0xd879
movq %rax, %rbx
movq %r14, %rdi
callq 0x2160
jmp 0xd89e
jmp 0xd89b
jmp 0xd89b
jmp 0xd89b
jmp 0xd89b
movq %rax, %rbx
movq %r14, %rdi
callq 0x2160
jmp 0xd8b2
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xf064
leaq 0x50(%rsp), %rdi
callq 0xf40c
movq %rbx, %rdi
callq 0x2360