// File: /workspace/github_c_makefile_star2_O0/Yamsman[P]scc/src/parse.c
// Function: parse_stmt_jump
ast_n *parse_stmt_jump(lexer *lx) {
	ast_n *node = NULL;

	switch (lex_peek(lx).type) {
		case TOK_KW_GOTO:
			node = astn_new(STMT, STMT_GOTO, lex_peek(lx));
			lex_adv(lx);

			token t = lex_peek(lx);
			if (t.type != TOK_IDENT)
				c_error(&t.loc, "Expected identifier after 'goto'\n");
			lex_adv(lx);
			node->dat.stmt.lbl = t.dat.sval;
			break;
		case TOK_KW_CONTINUE:
			node = astn_new(STMT, STMT_CONTINUE, lex_peek(lx));
			lex_adv(lx);
			break;
		case TOK_KW_BREAK:
			node = astn_new(STMT, STMT_BREAK, lex_peek(lx));
			lex_adv(lx);
			break;
		case TOK_KW_RETURN:
			node = astn_new(STMT, STMT_RETURN, lex_peek(lx));
			lex_adv(lx);
			
			if (lex_peek(lx).type != TOK_SEM)
				node->dat.stmt.expr = parse_expr(lx);
			break;
	}

	//Missing ';'
	token t = lex_peek(lx);
	if (lex_peek(lx).type != TOK_SEM)
		c_error(&t.loc, "Missing ']' after statement\n");
	lex_adv(lx);

	return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x9790
movl -0x40(%rbp), %eax
addl $-0x3e, %eax
movl %eax, %ecx
movq %rcx, -0x1c8(%rbp)
subl $0x3, %eax
ja 0xe105
movq -0x1c8(%rbp), %rax
leaq 0x4c4e(%rip), %rcx      # 0x12b98
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x9790
movups -0x70(%rbp), %xmm0
movups -0x60(%rbp), %xmm1
movups -0x50(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x2, %edi
movl $0xa, %esi
callq 0x3350
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x97e0
movq -0x8(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x9790
cmpl $0x35, -0xa0(%rbp)
je 0xdfc8
leaq -0xa0(%rbp), %rdi
addq $0x8, %rdi
leaq 0x52b2(%rip), %rsi      # 0x13273
movb $0x0, %al
callq 0x3880
movq -0x8(%rbp), %rdi
callq 0x97e0
movq -0x80(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0xe105
movq -0x8(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x9790
movups -0xd0(%rbp), %xmm0
movups -0xc0(%rbp), %xmm1
movups -0xb0(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x2, %edi
movl $0xb, %esi
callq 0x3350
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x97e0
jmp 0xe105
movq -0x8(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x9790
movups -0x100(%rbp), %xmm0
movups -0xf0(%rbp), %xmm1
movups -0xe0(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x2, %edi
movl $0xc, %esi
callq 0x3350
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x97e0
jmp 0xe105
movq -0x8(%rbp), %rsi
leaq -0x130(%rbp), %rdi
callq 0x9790
movups -0x130(%rbp), %xmm0
movups -0x120(%rbp), %xmm1
movups -0x110(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x2, %edi
movl $0xd, %esi
callq 0x3350
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x97e0
movq -0x8(%rbp), %rsi
leaq -0x160(%rbp), %rdi
callq 0x9790
cmpl $0x1, -0x160(%rbp)
je 0xe103
movq -0x8(%rbp), %rdi
callq 0xc0a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0xe105
movq -0x8(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x9790
movq -0x8(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
callq 0x9790
cmpl $0x1, -0x1c0(%rbp)
je 0xe147
leaq -0x190(%rbp), %rdi
addq $0x8, %rdi
leaq 0x5155(%rip), %rsi      # 0x13295
movb $0x0, %al
callq 0x3880
movq -0x8(%rbp), %rdi
callq 0x97e0
movq -0x10(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
nopl (%rax)