// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/liveness.c
// Function: track_pseudo_liveness
void track_pseudo_liveness(struct entrypoint *ep)
{
	struct basic_block *bb;

	/* Add all the bb pseudo usage */
	FOR_EACH_PTR(ep->bbs, bb) {
		struct instruction *insn;
		FOR_EACH_PTR(bb->insns, insn) {
			if (!insn->bb)
				continue;
			assert(insn->bb == bb);
			track_instruction_usage(bb, insn, insn_defines, insn_uses);
		} END_FOR_EACH_PTR(insn);
	} END_FOR_EACH_PTR(bb);

	/* Calculate liveness.. */
	do {
		liveness_changed = 0;
		FOR_EACH_PTR_REVERSE(ep->bbs, bb) {
			track_bb_liveness(bb);
		} END_FOR_EACH_PTR_REVERSE(bb);
	} while (liveness_changed);

	/* Remove the pseudos from the "defines" list that are used internally */
	FOR_EACH_PTR(ep->bbs, bb) {
		pseudo_t def;
		FOR_EACH_PTR(bb->defines, def) {
			struct basic_block *child;
			FOR_EACH_PTR(bb->children, child) {
				if (pseudo_in_list(child->needs, def))
					goto is_used;
			} END_FOR_EACH_PTR(child);
			DELETE_CURRENT_PTR(def);
is_used:
		;
		} END_FOR_EACH_PTR(def);
		PACK_PTR_LIST(&bb->defines);
	} END_FOR_EACH_PTR(bb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5dbc7
jmp 0x5dd3b
jmp 0x5dbc9
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x5dd23
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5dc1b
cmpq $0x0, -0x10(%rbp)
jne 0x5dc1b
jmp 0x5dd15
jmp 0x5dc1d
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x5dc45
jmp 0x5dd13
jmp 0x5dc47
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x48(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x5dcfb
movq -0x48(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5dc96
cmpq $0x0, -0x38(%rbp)
jne 0x5dc96
jmp 0x5dced
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x5dca3
jmp 0x5dced
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x5dcb3
jmp 0x5dcd2
leaq 0x6126(%rip), %rdi      # 0x63de0
leaq 0xf69f(%rip), %rsi      # 0x6d360
movl $0xd5, %edx
leaq 0xf69e(%rip), %rcx      # 0x6d36b
callq 0x11120
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
leaq 0x7af(%rip), %rdx       # 0x5e490
leaq 0x808(%rip), %rcx       # 0x5e4f0
callq 0x5e190
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x5dc4e
jmp 0x5dcfd
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq -0x40(%rbp), %rax
jne 0x5dc47
jmp 0x5dd15
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5dbd0
jmp 0x5dd25
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq -0x18(%rbp), %rax
jne 0x5dbc9
jmp 0x5dd3d
movl $0x0, 0x58619(%rip)     # 0xb6360
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x5dd70
jmp 0x5dde1
jmp 0x5dd72
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movw (%rax), %ax
shlw $0x8, %ax
sarw $0x8, %ax
cwtl
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x74(%rbp)
cmpl $0x0, %eax
jl 0x5ddd5
movq -0x68(%rbp), %rax
movslq -0x74(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x68(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5ddca
cmpq $0x0, -0x10(%rbp)
jne 0x5ddca
jmp 0x5dd91
movq -0x10(%rbp), %rdi
callq 0x5e560
jmp 0x5dd91
jmp 0x5ddd7
movq -0x68(%rbp), %rax
cmpq -0x60(%rbp), %rax
jne 0x5dd72
jmp 0x5dde3
cmpl $0x0, 0x58576(%rip)     # 0xb6360
jne 0x5dd3d
jmp 0x5ddf2
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x5de20
jmp 0x5e17b
jmp 0x5de22
movl $0x0, -0x94(%rbp)
movl -0x94(%rbp), %eax
movq -0x88(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x5e15d
movq -0x88(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x88(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5de86
cmpq $0x0, -0x10(%rbp)
jne 0x5de86
jmp 0x5e149
jmp 0x5de88
movq -0x10(%rbp), %rax
movq 0x50(%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 0x5dec2
jmp 0x5e13c
jmp 0x5dec4
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 0x5e11b
movq -0xb0(%rbp), %rax
movslq -0xbc(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
movq -0xb0(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5df2e
cmpq $0x0, -0xa0(%rbp)
jne 0x5df2e
jmp 0x5e107
jmp 0x5df30
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
cmpq $0x0, -0xd0(%rbp)
jne 0x5df6a
jmp 0x5e027
jmp 0x5df6c
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
movq -0xd8(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x5e006
movq -0xd8(%rbp), %rax
movslq -0xe4(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0xc8(%rbp)
movq -0xd8(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5dfcf
cmpq $0x0, -0xc8(%rbp)
jne 0x5dfcf
jmp 0x5dff2
movq -0xc8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0xa0(%rbp), %rsi
callq 0x5da90
cmpl $0x0, %eax
je 0x5dff0
jmp 0x5e105
jmp 0x5dff2
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x5df76
jmp 0x5e008
movq -0xd8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xd8(%rbp)
cmpq -0xd0(%rbp), %rax
jne 0x5df6c
jmp 0x5e029
movq -0xb0(%rbp), %rax
addq $0x18, %rax
movslq -0xbc(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xf0(%rbp)
movq -0xb0(%rbp), %rax
addq $0x18, %rax
movq -0xb0(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0xf8(%rbp)
movq -0xf0(%rbp), %rax
cmpq -0xf8(%rbp), %rax
jae 0x5e0b7
movq -0xf0(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0xf0(%rbp), %rax
movq %rcx, (%rax)
movq -0xf0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xf0(%rbp)
jmp 0x5e07e
movq -0xf0(%rbp), %rax
movl $0xf0f0f0f0, %ecx       # imm = 0xF0F0F0F0
movq %rcx, (%rax)
movq -0xb0(%rbp), %rax
movw (%rax), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
addl $-0x1, %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xff, %dx
andw $0xff00, %cx            # imm = 0xFF00
orw %dx, %cx
movw %cx, (%rax)
movl -0xbc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x5e105
jmp 0x5e107
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x5dece
jmp 0x5e11d
movq -0xb0(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xb0(%rbp)
cmpq -0xa8(%rbp), %rax
jne 0x5dec4
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0x31170
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x5de2c
jmp 0x5e15f
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x88(%rbp)
cmpq -0x80(%rbp), %rax
jne 0x5de22
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)