// File: joncampbell123[P]haxcc/haxpp.cpp
// Function: parse_string(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>)
stringref_t parse_string(string::iterator &li,const string::iterator lie) {
    /* at this point *li == '\"' */
    string r;
    char c;

    if (li == lie) throw invalid_argument("expected string, got end of line");
    if (*li != '\"') throw invalid_argument("expected string, got " + *li);
    li++;

    do {
        if (li == lie) throw invalid_argument("string cut short, expected close quote");
        if (*li == '\"') { li++; break; }
        c = parse_string_char(li,lie);
        r += c;
    } while (1);

    return string_store.add(r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x33d0
movq -0x10(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x15b70
testb $0x1, %al
jne 0x78bf
jmp 0x7928
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x68(%rbp)
leaq 0x1d57e(%rip), %rsi     # 0x24e58
callq 0x3530
jmp 0x78e1
movq -0x68(%rbp), %rdi
movq 0x2b6ec(%rip), %rsi     # 0x32fd8
movq 0x2b6cd(%rip), %rdx     # 0x32fc0
callq 0x34b0
jmp 0x7ac6
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x31f0
jmp 0x7ab4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x7ab4
movq -0x10(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x79a3
movl $0x10, %edi
callq 0x3130
movq %rax, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
callq 0x15a50
movq -0x70(%rbp), %rdi
movsbq (%rax), %rax
leaq 0x1d516(%rip), %rsi     # 0x24e79
addq %rax, %rsi
callq 0x3530
jmp 0x796d
movq -0x78(%rbp), %rdi
movq 0x2b660(%rip), %rsi     # 0x32fd8
movq 0x2b641(%rip), %rdx     # 0x32fc0
callq 0x34b0
jmp 0x7ac6
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x31f0
jmp 0x7ab4
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x15a70
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x15b70
testb $0x1, %al
jne 0x79c5
jmp 0x7a1d
movl $0x10, %edi
callq 0x3130
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x80(%rbp)
leaq 0x1d377(%rip), %rsi     # 0x24d57
callq 0x3530
jmp 0x79e7
movq -0x80(%rbp), %rdi
movq 0x2b5e6(%rip), %rsi     # 0x32fd8
movq 0x2b5c7(%rip), %rdx     # 0x32fc0
callq 0x34b0
jmp 0x7ac6
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x31f0
jmp 0x7ab4
movq -0x10(%rbp), %rdi
callq 0x15a50
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x7a3f
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x15a70
movq %rax, -0x58(%rbp)
jmp 0x7a82
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rsi
callq 0x5ee0
movb %al, -0x81(%rbp)
jmp 0x7a5c
movb -0x81(%rbp), %al
movb %al, -0x31(%rbp)
movsbl -0x31(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0x3190
jmp 0x7a74
jmp 0x7a76
movb $0x1, %al
testb $0x1, %al
jne 0x79b2
jmp 0x7a82
leaq 0x2b88f(%rip), %rdi     # 0x33318
leaq -0x30(%rbp), %rsi
callq 0x3940
movq %rax, -0x90(%rbp)
jmp 0x7a9b
leaq -0x30(%rbp), %rdi
callq 0x3598
movq -0x90(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x3598
movq -0x40(%rbp), %rdi
callq 0x34e0
nopw %cs:(%rax,%rax)