// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/parser.c
// Function: subtilis_parser_statement
void subtilis_parser_statement(subtilis_parser_t *p, subtilis_token_t *t,
			       subtilis_error_t *err)
{
	subtilis_keyword_fn fn;
	const char *tbuf;
	int key_type;

	if ((p->current->endproc) &&
	    !((t->type == SUBTILIS_TOKEN_KEYWORD) &&
	      (t->tok.keyword.type == SUBTILIS_KEYWORD_DEF))) {
		subtilis_error_set_useless_statement(err, p->l->stream->name,
						     p->l->line);
		return;
	}

	tbuf = subtilis_token_get_text(t);
	if (t->type == SUBTILIS_TOKEN_IDENTIFIER) {
		subtilis_parser_assignment(p, t, err);
		return;
	} else if ((t->type == SUBTILIS_TOKEN_OPERATOR) &&
		   !strcmp(tbuf, "<-")) {
		subtilis_parser_return(p, t, err);
		return;
	} else if (t->type != SUBTILIS_TOKEN_KEYWORD) {
		subtilis_error_set_keyword_expected(
		    err, tbuf, p->l->stream->name, p->l->line);
		return;
	}

	key_type = t->tok.keyword.type;
	fn = keyword_fns[key_type];
	if (!fn) {
		tbuf = subtilis_token_get_text(t);
		subtilis_error_set_not_supported(err, tbuf, p->l->stream->name,
						 p->l->line);
		return;
	}
	fn(p, t, err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
testb $0x1, 0x88(%rax)
je 0x16c1d
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x16be8
movq -0x10(%rbp), %rax
cmpl $0x1d, 0x8(%rax)
je 0x16c1d
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %ecx
movl $0x2e, %esi
leaq 0x938ae(%rip), %r8      # 0xaa4bb
movl $0xbd, %r9d
callq 0x15930
jmp 0x16d58
movq -0x10(%rbp), %rdi
callq 0x12d70
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x16c49
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1b800
jmp 0x16d58
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x16c7d
movq -0x28(%rbp), %rdi
leaq 0x9387e(%rip), %rsi     # 0xaa4db
callq 0x12140
cmpl $0x0, %eax
jne 0x16c7d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x20b20
jmp 0x16d58
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
je 0x16ccd
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0x10, %esi
leaq 0x945c6(%rip), %rcx     # 0xab276
leaq 0x93804(%rip), %rax     # 0xaa4bb
movq %rax, (%rsp)
movl $0xcb, 0x8(%rsp)
callq 0x156d0
jmp 0x16d58
jmp 0x16ccf
jmp 0x16cd1
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0xb3afa(%rip), %rax     # 0xca7e0
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x16d46
movq -0x10(%rbp), %rdi
callq 0x12d70
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0x13, %esi
leaq 0x9454a(%rip), %rcx     # 0xab276
leaq 0x93788(%rip), %rax     # 0xaa4bb
movq %rax, (%rsp)
movl $0xd4, 0x8(%rsp)
callq 0x156d0
jmp 0x16d58
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
addq $0x40, %rsp
popq %rbp
retq
nop