// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/linearize.c
// Function: linearize_asm_statement
static pseudo_t linearize_asm_statement(struct entrypoint *ep, struct statement *stmt)
{
	struct instruction *insn;
	struct expression *expr, *clob;
	struct asm_rules *rules;
	struct asm_operand *op;

	insn = alloc_instruction(OP_ASM, 0);
	expr = stmt->asm_string;
	if (!expr || expr->type != EXPR_STRING) {
		warning(stmt->pos, "expected string in inline asm");
		return VOID;
	}
	insn->string = expr->string->data;

	rules = __alloc_asm_rules(0);
	insn->asm_rules = rules;

	/* Gather the inputs.. */
	FOR_EACH_PTR(stmt->asm_inputs, op) {
		add_asm_input(ep, insn, op);
	} END_FOR_EACH_PTR(op);

	/* ... and the addresses for memory outputs */
	FOR_EACH_PTR(stmt->asm_outputs, op) {
		add_asm_output_address(ep, insn, op);
	} END_FOR_EACH_PTR(op);

	add_one_insn(ep, insn);

	/* Assign the outputs */
	FOR_EACH_PTR(stmt->asm_outputs, op) {
		add_asm_output(ep, insn, op);
	} END_FOR_EACH_PTR(op);

	/* and finally, look if it clobbers memory */
	FOR_EACH_PTR(stmt->asm_clobbers, clob) {
		if (!strcmp(clob->string->data, "memory"))
			insn->clobber_memory = 1;
	} END_FOR_EACH_PTR(clob);

	return VOID;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x4e, %edi
xorl %esi, %esi
callq 0x1afb0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1b216
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x2, %eax
je 0x1b23c
movq -0x18(%rbp), %rax
movq 0x4(%rax), %rdi
leaq 0x4878e(%rip), %rsi     # 0x639b3
movb $0x0, %al
callq 0x16d80
leaq 0x70b7d(%rip), %rax     # 0x8bdb0
movq %rax, -0x8(%rbp)
jmp 0x1b5a0
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x4, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x30(%rax)
xorl %edi, %edi
callq 0x1a8f0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x1b28c
jmp 0x1b309
jmp 0x1b28e
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x50(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x1b2f5
movq -0x50(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x1b2d9
cmpq $0x0, -0x40(%rbp)
jne 0x1b2d9
jmp 0x1b2ea
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x1ba20
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1b295
jmp 0x1b2f7
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq -0x48(%rbp), %rax
jne 0x1b28e
jmp 0x1b30b
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x1b330
jmp 0x1b3ad
jmp 0x1b332
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movq -0x70(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x1b399
movq -0x70(%rbp), %rax
movslq -0x7c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x70(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x1b37d
cmpq $0x0, -0x40(%rbp)
jne 0x1b37d
jmp 0x1b38e
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x1ba70
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x1b339
jmp 0x1b39b
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
cmpq -0x68(%rbp), %rax
jne 0x1b332
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1b5b0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x88(%rbp)
jne 0x1b3f4
jmp 0x1b496
jmp 0x1b3f6
movl $0x0, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
movq -0x90(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x1b475
movq -0x90(%rbp), %rax
movslq -0x9c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x90(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x1b453
cmpq $0x0, -0x40(%rbp)
jne 0x1b453
jmp 0x1b464
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x1baf0
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x1b400
jmp 0x1b477
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x90(%rbp)
cmpq -0x88(%rbp), %rax
jne 0x1b3f6
jmp 0x1b498
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x1b4d2
jmp 0x1b595
jmp 0x1b4d4
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movq -0xb0(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x1b574
movq -0xb0(%rbp), %rax
movslq -0xbc(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0xb0(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x1b531
cmpq $0x0, -0x30(%rbp)
jne 0x1b531
jmp 0x1b560
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
addq $0x4, %rdi
leaq 0x4edcb(%rip), %rsi     # 0x6a30f
callq 0x111b0
cmpl $0x0, %eax
jne 0x1b55e
movq -0x20(%rbp), %rax
movb 0x40(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x40(%rax)
jmp 0x1b560
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x1b4de
jmp 0x1b576
movq -0xb0(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xb0(%rbp)
cmpq -0xa8(%rbp), %rax
jne 0x1b4d4
leaq 0x70814(%rip), %rax     # 0x8bdb0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax)