// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/flow.c
// Function: kill_dead_stores_bb
static void kill_dead_stores_bb(pseudo_t pseudo, unsigned long generation, struct basic_block *bb, int local)
{
	struct instruction *insn;
	struct basic_block *parent;

	if (bb->generation == generation)
		return;
	bb->generation = generation;
	FOR_EACH_PTR_REVERSE(bb->insns, insn) {
		if (!insn->bb)
			continue;
		switch (insn->opcode) {
		case OP_LOAD:
			if (insn->src == pseudo)
				return;
			break;
		case OP_STORE:
			if (insn->src == pseudo) {
				kill_instruction_force(insn);
				continue;
			}
			break;
		case OP_CALL:
			if (!local)
				return;
		default:
			continue;
		}
		if (!local && insn->src->type != PSEUDO_SYM)
			return;
	} END_FOR_EACH_PTR_REVERSE(insn);

	FOR_EACH_PTR(bb->parents, parent) {
		if (bb_list_size(parent->children) > 1)
			continue;
		kill_dead_stores_bb(pseudo, generation, parent, local);
	} END_FOR_EACH_PTR(parent);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x596fa
jmp 0x598f9
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x59732
jmp 0x59837
jmp 0x59734
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movw (%rax), %ax
shlw $0x8, %ax
sarw $0x8, %ax
cwtl
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jl 0x59827
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x59790
cmpq $0x0, -0x28(%rbp)
jne 0x59790
jmp 0x59753
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x5979d
jmp 0x59753
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
movl %eax, -0x70(%rbp)
subl $0x43, %eax
je 0x597c4
jmp 0x597b0
movl -0x70(%rbp), %eax
subl $0x44, %eax
je 0x597d9
jmp 0x597ba
movl -0x70(%rbp), %eax
subl $0x4a, %eax
je 0x597f7
jmp 0x59804
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x597d7
jmp 0x598f9
jmp 0x59809
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x597f5
movq -0x28(%rbp), %rdi
callq 0x596b0
jmp 0x59753
jmp 0x59809
cmpl $0x0, -0x1c(%rbp)
jne 0x59802
jmp 0x598f9
jmp 0x59804
jmp 0x59753
cmpl $0x0, -0x1c(%rbp)
jne 0x59822
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x5, 0x4(%rax)
je 0x59822
jmp 0x598f9
jmp 0x59753
jmp 0x59829
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x59734
jmp 0x59839
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x59861
jmp 0x598f9
jmp 0x59863
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movq -0x60(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x598e1
movq -0x60(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x60(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x598ae
cmpq $0x0, -0x30(%rbp)
jne 0x598ae
jmp 0x598d6
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x5a6c0
cmpl $0x1, %eax
jle 0x598c2
jmp 0x598d6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x596d0
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x5986a
jmp 0x598e3
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
cmpq -0x58(%rbp), %rax
jne 0x59863
addq $0x70, %rsp
popq %rbp
retq
nop