// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/storage.c
// Function: set_up_bb_storage
static void set_up_bb_storage(struct basic_block *bb)
{
	struct basic_block *child;

	FOR_EACH_PTR(bb->children, child) {
		pseudo_t pseudo;
		FOR_EACH_PTR(child->needs, pseudo) {
			struct storage *child_in, *parent_out;

			parent_out = lookup_storage(bb, pseudo, STOR_OUT);
			child_in = lookup_storage(child, pseudo, STOR_IN);

			if (parent_out) {
				if (!child_in) {
					add_storage(parent_out, child, pseudo, STOR_IN);
					continue;
				}
				if (parent_out == child_in)
					continue;
				combine_storage(parent_out, child_in);
				continue;
			}
			if (child_in) {
				add_storage(child_in, bb, pseudo, STOR_OUT);
				continue;
			}
			parent_out = alloc_storage();
			add_storage(parent_out, bb, pseudo, STOR_OUT);
			add_storage(parent_out, child, pseudo, STOR_IN);
		} END_FOR_EACH_PTR(pseudo);
	} END_FOR_EACH_PTR(child);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%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 0x48e14
jmp 0x48fec
jmp 0x48e16
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 0x48fd4
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 0x48e68
cmpq $0x0, -0x10(%rbp)
jne 0x48e68
jmp 0x48fc6
jmp 0x48e6a
movq -0x10(%rbp), %rax
movq 0x48(%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 0x48e92
jmp 0x48fc4
jmp 0x48e94
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 0x48fac
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 0x48ee6
cmpq $0x0, -0x38(%rbp)
jne 0x48ee6
jmp 0x48f9e
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x1, %edx
callq 0x48690
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0x48690
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x48f4d
cmpq $0x0, -0x60(%rbp)
jne 0x48f32
movq -0x68(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
xorl %ecx, %ecx
callq 0x487f0
jmp 0x48f9e
movq -0x68(%rbp), %rax
cmpq -0x60(%rbp), %rax
jne 0x48f3e
jmp 0x48f9e
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x49280
jmp 0x48f9e
cmpq $0x0, -0x60(%rbp)
je 0x48f6c
movq -0x60(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl $0x1, %ecx
callq 0x487f0
jmp 0x48f9e
callq 0x49270
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl $0x1, %ecx
callq 0x487f0
movq -0x68(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
xorl %ecx, %ecx
callq 0x487f0
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x48e9b
jmp 0x48fae
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq -0x40(%rbp), %rax
jne 0x48e94
jmp 0x48fc6
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x48e1d
jmp 0x48fd6
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq -0x18(%rbp), %rax
jne 0x48e16
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)