// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, 0x20(%rsp)
movq 0x18(%rdi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x3d9cb
leaq 0x5ad(%rip), %r14       # 0x3dd5e
leaq 0x5df(%rip), %r15       # 0x3dd97
movq 0x8(%rsp), %rdx
movzwl (%rdx), %eax
testb %al, %al
jle 0x3d86f
xorl %esi, %esi
movq %rdx, 0x18(%rsp)
movq 0x18(%rdx,%rsi,8), %r12
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x3d7e4
testq %r12, %r12
je 0x3d85c
movq 0x28(%r12), %r13
testq %r13, %r13
je 0x3d85c
movq %rsi, 0x10(%rsp)
movq %r13, %rbx
movzwl (%rbx), %eax
testb %al, %al
jle 0x3d846
xorl %ebp, %ebp
movq 0x18(%rbx,%rbp,8), %rsi
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x3d814
testq %rsi, %rsi
je 0x3d837
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x3d837
cmpq %r12, %rcx
jne 0x3dbc4
movq %r12, %rdi
movq %r14, %rdx
movq %r15, %rcx
callq 0x3dbe3
movzwl (%rbx), %eax
incq %rbp
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %rbp
jl 0x3d7ff
movq 0x10(%rbx), %rbx
cmpq %r13, %rbx
jne 0x3d7f6
movq 0x18(%rsp), %rdx
movzwl (%rdx), %eax
movq 0x10(%rsp), %rsi
incq %rsi
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %rsi
jl 0x3d7cf
movq 0x10(%rdx), %rdx
cmpq 0x8(%rsp), %rdx
jne 0x3d7bd
jmp 0x3d9cb
movq %rax, %rcx
movq %rax, 0x30(%rsp)
movq 0x8(%rcx), %rcx
movsbl (%rcx), %eax
testw %ax, %ax
jle 0x3d9b4
cwtl
decl %eax
cltq
movq %rcx, 0x28(%rsp)
movq %rax, 0x38(%rsp)
movq 0x18(%rcx,%rax,8), %rax
movq %rax, 0x10(%rsp)
cmpw $0x100, (%rcx)          # imm = 0x100
jb 0x3d8c7
cmpq $0x0, 0x10(%rsp)
je 0x3d99d
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x3d99d
movq 0x8(%rsp), %rdx
movzwl (%rdx), %eax
testb %al, %al
jle 0x3d98e
xorl %ebp, %ebp
movq %rdx, 0x18(%rsp)
movq 0x18(%rdx,%rbp,8), %r14
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x3d90a
testq %r14, %r14
je 0x3d97b
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rbx
testq %rbx, %rbx
je 0x3d97b
movq %rbx, %r13
movzwl (%r13), %eax
testb %al, %al
jle 0x3d96a
xorl %r12d, %r12d
movq 0x18(%r13,%r12,8), %r15
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3d93b
testq %r15, %r15
je 0x3d95a
movq 0x50(%r15), %rdi
movq %r14, %rsi
callq 0x2289b
testb %al, %al
jne 0x3d95a
addq $0x48, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e3aa
incq %r12
movl (%r13), %eax
movsbq %al, %rcx
cmpq %rcx, %r12
jl 0x3d927
movq 0x10(%r13), %r13
cmpq %rbx, %r13
jne 0x3d91b
movq 0x18(%rsp), %rdx
movzwl (%rdx), %eax
incq %rbp
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %rbp
jl 0x3d8f5
movq 0x10(%rdx), %rdx
cmpq 0x8(%rsp), %rdx
jne 0x3d8e3
movq 0x38(%rsp), %rcx
leaq -0x1(%rcx), %rax
testq %rcx, %rcx
movq 0x28(%rsp), %rcx
jg 0x3d8a5
movq 0x30(%rsp), %rax
cmpq %rax, %rcx
jne 0x3d88b
cmpb $0x0, 0x525b7(%rip)     # 0x8ff80
je 0x3d9e9
movb $0x0, 0x525ae(%rip)     # 0x8ff80
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
jne 0x3d883
jmp 0x3dbb5
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x3dbb5
movq 0x40(%rsp), %rdx
movzwl (%rdx), %eax
testb %al, %al
jle 0x3dba6
xorl %esi, %esi
movq %rdx, 0x20(%rsp)
movq 0x18(%rdx,%rsi,8), %rdi
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x3da30
testq %rdi, %rdi
je 0x3db93
movq %rsi, 0x30(%rsp)
movq 0x50(%rdi), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x3db7d
movq 0x28(%rsp), %r8
movq %rdi, 0x8(%rsp)
movzwl (%r8), %eax
testb %al, %al
jle 0x3db6e
leaq 0x18(%r8), %r9
leaq 0x10(%r8), %rcx
movq %rcx, 0x38(%rsp)
xorl %r12d, %r12d
movq %r8, 0x10(%rsp)
movq %r9, 0x18(%rsp)
movslq %r12d, %r13
movq (%r9,%r13,8), %r14
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x3da92
testq %r14, %r14
je 0x3db5f
movq 0x20(%rdi), %r15
testq %r15, %r15
je 0x3dafa
movq %r15, %rbx
movzwl (%rbx), %eax
testb %al, %al
jle 0x3dade
xorl %ebp, %ebp
movq 0x18(%rbx,%rbp,8), %rcx
movzwl %ax, %edx
cmpl $0x100, %edx            # imm = 0x100
jb 0x3dabc
testq %rcx, %rcx
je 0x3dacf
movq 0x48(%rcx), %rdi
movq %r14, %rsi
callq 0x2289b
testb %al, %al
jne 0x3db28
movzwl (%rbx), %eax
incq %rbp
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %rbp
jl 0x3daa7
movq 0x10(%rbx), %rbx
cmpq %r15, %rbx
jne 0x3da9e
movq 0x10(%rsp), %r8
movzwl (%r8), %eax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %r9
leaq (%r9,%r13,8), %rcx
movzwl %ax, %eax
movsbq %al, %rax
movq 0x38(%rsp), %rdx
leaq (%rdx,%rax,8), %rax
cmpq %rax, %rcx
jae 0x3db3d
leaq 0x8(%rcx), %rdx
movq 0x8(%rcx), %rsi
movq %rsi, (%rcx)
movq %rdx, %rcx
cmpq %rax, %rdx
jb 0x3db13
jmp 0x3db40
movq 0x10(%rsp), %r8
movzwl (%r8), %eax
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %r9
jmp 0x3db5f
movq %rcx, %rdx
movl $0xf0f0f0f0, %eax       # imm = 0xF0F0F0F0
movq %rax, (%rdx)
movl (%r8), %eax
leal -0x1(%rax), %ecx
movzbl %cl, %ecx
andl $0xffffff00, %eax       # imm = 0xFFFFFF00
orl %ecx, %eax
movw %ax, (%r8)
decl %r12d
incl %r12d
movsbl %al, %ecx
cmpl %ecx, %r12d
jl 0x3da77
movq 0x10(%r8), %r8
cmpq 0x28(%rsp), %r8
jne 0x3da51
addq $0x50, %rdi
callq 0x226a7
movq 0x20(%rsp), %rdx
movzwl (%rdx), %eax
movq 0x30(%rsp), %rsi
incq %rsi
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %rsi
jl 0x3da17
movq 0x10(%rdx), %rdx
cmpq 0x40(%rsp), %rdx
jne 0x3da05
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x42e5(%rip), %rdi      # 0x41eb0
leaq 0xda2e(%rip), %rsi      # 0x4b600
leaq 0xda32(%rip), %rcx      # 0x4b60b
movl $0xd5, %edx
callq 0xe120