// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/parse.c
// Function: parse_asm_statement
static struct token *parse_asm_statement(struct token *token, struct statement *stmt)
{
	unsigned long mods = 0;

	token = token->next;
	stmt->type = STMT_ASM;
	while (token_type(token) == TOKEN_IDENT) {
		struct symbol *s = lookup_keyword(token->ident, NS_TYPEDEF);
		if (s && s->op->asm_modifier)
			s->op->asm_modifier(token, &mods, s->ctype.modifiers);
		else if (token->ident == &goto_ident)
			asm_modifier(token, &mods, MOD_ASM_GOTO);
		token = token->next;
	}
	token = expect(token, '(', "after asm");
	token = string_expression(token, &stmt->asm_string, "inline asm");
	if (match_op(token, ':'))
		token = parse_asm_operands(token, stmt, &stmt->asm_outputs);
	if (match_op(token, ':'))
		token = parse_asm_operands(token, stmt, &stmt->asm_inputs);
	if (match_op(token, ':'))
		token = parse_asm_clobbers(token, stmt, &stmt->asm_clobbers);
	if (match_op(token, ':') && (mods & MOD_ASM_GOTO))
		token = parse_asm_labels(token, stmt, &stmt->asm_labels);
	token = expect(token, ')', "after asm");
	return expect(token, ';', "at end of asm-statement");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
movq 0x8(%rdi), %r14
movl $0xb, (%rsi)
pushq $0x2
popq %rbp
leaq 0x4313f(%rip), %r13     # 0x5def0
pushq $0x20
popq %r12
movl (%r14), %eax
andl $0x3f, %eax
cmpl $0x3, %eax
jne 0x1ae05
movq 0x10(%r14), %rdi
movl %ebp, %esi
callq 0x18e4b
testq %rax, %rax
je 0x1adeb
movq 0x40(%rax), %rcx
movq 0x50(%rcx), %rcx
testq %rcx, %rcx
je 0x1adeb
movq 0x68(%rax), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq *%rcx
jmp 0x1adff
cmpq %r13, 0x10(%r14)
jne 0x1adff
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x193a0
movq 0x8(%r14), %r14
jmp 0x1adb5
leaq 0x21c58(%rip), %rdx     # 0x3ca64
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x17480
leaq 0x10(%rbx), %rsi
leaq 0x1fcaa(%rip), %rdx     # 0x3aacc
movq %rax, %rdi
callq 0x328db
movq %rax, %r14
movq (%rax), %rax
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x1ae53
cmpl $0x3a, 0x10(%r14)
jne 0x1ae53
leaq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x1af99
movq %rax, %r14
movq (%rax), %rax
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x1ae76
cmpl $0x3a, 0x10(%r14)
jne 0x1ae76
leaq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x1af99
movq %rax, %r14
movq (%rax), %rax
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x1aec6
cmpl $0x3a, 0x10(%r14)
jne 0x1aec6
leaq 0x28(%rbx), %r15
leaq 0x10(%rsp), %r12
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x32929
movq %rax, %r14
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x1aeb1
movq %r15, %rdi
callq 0x1fae9
movl (%r14), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x1aec3
cmpl $0x2c, 0x10(%r14)
je 0x1ae90
movq (%r14), %rax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x1af1d
cmpl $0x3a, 0x10(%r14)
jne 0x1af1d
testb $0x20, 0x8(%rsp)
je 0x1af1d
addq $0x30, %rbx
pushq $0x1
popq %rbp
movq 0x8(%r14), %r14
movl (%r14), %eax
andl $0x3f, %eax
cmpl $0x3, %eax
jne 0x1af1d
movq %r14, %rdi
movl %ebp, %esi
callq 0x1754e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1fae9
movq 0x8(%r14), %r14
movl (%r14), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x1af1d
cmpl $0x2c, 0x10(%r14)
je 0x1aee3
leaq 0x21b40(%rip), %rdx     # 0x3ca64
pushq $0x29
popq %rsi
movq %r14, %rdi
callq 0x17480
leaq 0x21b38(%rip), %rdx     # 0x3ca6e
pushq $0x3b
popq %rsi
movq %rax, %rdi
callq 0x17480
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq