// File: /workspace/github_c_makefile_star2_O2/Encryptr[P]O-plus-plus/opp/parser/parser.c
// Function: opp_parser_begin
void opp_parser_begin(struct Opp_Parser* parser)
{
	if (parser == NULL)
		return;

	for (;;) {
		opp_next(parser->lex);
		if (parser->lex->t.id == FEND)
			break;

		struct Opp_Node* stmt = opp_parse_global_def(parser);

		if (parser->nstmts == parser->stmt_size) {
			parser->statments = (struct Opp_Node**)
				realloc(parser->statments, (64+parser->stmt_size) * sizeof(struct Opp_Node*));

			if (parser->statments == NULL)
				INTERNAL_ERROR("Malloc Fail");

			parser->stmt_size += 64;
		}

		parser->statments[parser->nstmts] = stmt;
		parser->nstmts++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x81c7
movq %rdi, %rbx
leaq 0x20(%rdi), %rax
movq %rax, (%rsp)
leaq 0x3870(%rip), %r14      # 0xb784
jmp 0x81a4
movq %rbx, %rdi
pushq $0x1e
popq %rsi
callq 0x8610
movq %rax, %r12
movq (%rbx), %rdi
callq 0x95cd
movq (%rbx), %rdi
cmpl $0x1, 0x30(%rdi)
je 0x7f49
leaq 0x3eb1(%rip), %rsi      # 0xbdf0
xorl %eax, %eax
callq 0x919e
movq (%rbx), %rdi
movq 0x38(%rdi), %rbp
movq %rbp, %rdi
callq 0x10b0
leaq 0x1(%rax), %rdi
callq 0x1180
movq %rax, %r13
movq %rax, 0x10(%r12)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x1050
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x821c
movq %rax, %rbp
testq %rax, %rax
jne 0x7f99
movq (%rbx), %rdi
leaq 0x3e84(%rip), %rsi      # 0xbe13
movq %r13, %rdx
xorl %eax, %eax
callq 0x919e
movq %r12, %r15
addq $0x10, %r15
movl $0x8, 0x8(%rbp)
movq %r15, 0x18(%rbp)
movq (%rbx), %rdi
callq 0x95cd
movq (%rbx), %r13
cmpl $0x27, 0x30(%r13)
je 0x7fd4
movq (%r15), %rdx
movq %r13, %rdi
leaq 0x3e63(%rip), %rsi      # 0xbe2d
xorl %eax, %eax
callq 0x919e
movq (%rbx), %r13
movl $0x80, %esi
pushq $0x1
popq %rdi
callq 0x1130
movq %rax, 0x20(%r12)
xorl %ebp, %ebp
pushq $0x10
popq %rax
movl %eax, %r14d
movq %r13, %rdi
callq 0x95cd
movq (%rbx), %r13
movl 0x30(%r13), %eax
cmpl $0x28, %eax
je 0x805e
cmpl $0x40, %eax
je 0x805e
cmpl %r14d, %ebp
jne 0x803f
movq 0x20(%r12), %rdi
addl $0x40, %r14d
leaq (,%r14,8), %rsi
callq 0x11a0
movq %rax, 0x20(%r12)
testq %rax, %rax
jne 0x803f
leaq 0x255d(%rip), %rdi      # 0xa590
leaq 0x3e14(%rip), %rsi      # 0xbe4e
callq 0x9287
movq %rbx, %rdi
callq 0x82da
movq 0x20(%r12), %rcx
movl %ebp, %edx
movq %rax, (%rcx,%rdx,8)
incl %ebp
movq (%rbx), %r13
cmpl $0x23, 0x30(%r13)
jne 0x7fee
movq %r13, %rdi
callq 0x95cd
movq (%rbx), %rdi
cmpl $0x2a, 0x30(%rdi)
je 0x8080
movq (%r15), %rdx
leaq 0x3de6(%rip), %rsi      # 0xbe5f
xorl %eax, %eax
callq 0x919e
movl %ebp, 0x18(%r12)
leaq 0x36f8(%rip), %r14      # 0xb784
jmp 0x8156
cmpl $0x1, %eax
jne 0x80a6
movq %rbx, %rdi
callq 0x82da
movq %rax, %r12
jmp 0x8156
movq 0x38(%rdi), %rdx
leaq 0x37e6(%rip), %rsi      # 0xb897
xorl %eax, %eax
callq 0x919e
xorl %r12d, %r12d
jmp 0x8156
movq %rbx, %rdi
pushq $0x14
popq %rsi
callq 0x8610
movq %rax, %r12
movq (%rbx), %rdi
callq 0x95cd
movq (%rbx), %rdi
cmpl $0x5, 0x30(%rdi)
je 0x80f0
leaq 0x3cbc(%rip), %rsi      # 0xbda2
xorl %eax, %eax
callq 0x919e
movq (%rbx), %rdi
movq 0x38(%rdi), %rsi
movq %rbx, %rdi
callq 0x1723
movq (%rbx), %rdi
callq 0x95cd
movq (%rbx), %rdi
cmpl $0x2a, 0x30(%rdi)
je 0x8156
leaq 0x3cb8(%rip), %rsi      # 0xbdcc
jmp 0x814f
movq %rbx, %rdi
pushq $0x18
popq %rsi
callq 0x8610
movq %rax, %r12
movq (%rbx), %rdi
callq 0x95cd
movq %rbx, %rdi
callq 0x82da
movq %rax, 0x10(%r12)
cmpl $0x16, (%rax)
jne 0x8156
cmpq $0x0, 0x28(%rax)
je 0x8156
movq (%rbx), %rdi
leaq 0x3c24(%rip), %rsi      # 0xbd73
xorl %eax, %eax
callq 0x919e
movl 0x18(%rbx), %ecx
movq 0x8(%rbx), %rax
cmpq %rcx, 0x10(%rbx)
jne 0x819b
leaq 0x200(,%rcx,8), %rsi
movq %rax, %rdi
callq 0x11a0
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x8193
leaq 0x240d(%rip), %rdi      # 0xa590
leaq 0x36aa(%rip), %rsi      # 0xb834
callq 0x9287
movq 0x8(%rbx), %rax
addq $0x40, 0x10(%rbx)
movl 0x18(%rbx), %ecx
movq %r12, (%rax,%rcx,8)
incl %ecx
movl %ecx, 0x18(%rbx)
movq (%rbx), %rdi
callq 0x95cd
movq (%rbx), %rdi
movl 0x30(%rdi), %eax
leal -0x38(%rax), %ecx
cmpl $0x8, %ecx
ja 0x8091
movslq (%r14,%rcx,4), %rax
addq %r14, %rax
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq