// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/ssa.c
// Function: ssa_convert
void ssa_convert(struct entrypoint *ep)
{
	struct basic_block *bb;
	pseudo_t pseudo;
	int first, last;

	// calculate the number of BBs
	first = ep->entry->bb->nr;
	last = first;
	FOR_EACH_PTR(ep->bbs, bb) {
		int nr = bb->nr;
		if (nr > last)
			last = nr;
		bb->phi_map = NULL;
	} END_FOR_EACH_PTR(bb);

	// try to promote memory accesses to pseudos
	stores = NULL;
	FOR_EACH_PTR(ep->accesses, pseudo) {
		ssa_convert_one_var(ep, pseudo->sym);
	} END_FOR_EACH_PTR(pseudo);

	// rename the converted accesses
	phis_all = phis_used = NULL;
	ssa_rename_insns(ep);
	ssa_rename_phis(ep);

	// remove now dead stores
	remove_dead_stores(stores);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x25c2c
movq %rax, %rcx
xorl %edx, %edx
movl (%rcx), %esi
movsbq %sil, %rdi
cmpq %rdi, %rdx
jge 0x25c23
movq 0x18(%rcx,%rdx,8), %rdi
cmpw $0x100, %si             # imm = 0x100
jb 0x25c19
testq %rdi, %rdi
je 0x25c1e
andq $0x0, 0x58(%rdi)
incq %rdx
jmp 0x25bfd
movq 0x10(%rcx), %rcx
cmpq %rax, %rcx
jne 0x25bfb
andq $0x0, 0x3edb4(%rip)     # 0x649e8
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x26185
movq 0x30(%rsp), %rdx
xorl %esi, %esi
movq %rdx, 0x28(%rsp)
movl (%rdx), %eax
movsbq %al, %rcx
cmpq %rcx, %rsi
jge 0x26176
movq 0x18(%rdx,%rsi,8), %rcx
cmpw $0x100, %ax             # imm = 0x100
jb 0x25c7a
testq %rcx, %rcx
je 0x26101
movq %rsi, 0x10(%rsp)
movq 0x18(%rcx), %rbp
leaq 0x642ee(%rip), %rax     # 0x89f78
movq (%rax), %rcx
incq %rcx
andq $0x0, 0x48(%rsp)
movq %rcx, (%rsp)
movq %rcx, (%rax)
andq $0x0, 0x40(%rsp)
movq 0x68(%rbp), %rax
movq 0xd8(%rbp), %rcx
movq %rcx, 0x20(%rsp)
testq %rcx, %rcx
setne %cl
btl $0xa, %eax
setae %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x260f7
testw $0x11c, %ax             # imm = 0x11C
je 0x25cef
testb $0x1c, %al
jne 0x260f7
xorl %edx, %edx
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x34c64
jmp 0x260f7
movzbl (%rbp), %eax
movq %rbp, %r12
cmpl $0x3, %eax
jne 0x25d03
movq 0x60(%rbp), %r12
movl (%r12), %eax
cmpb $0xd, %al
ja 0x25fb3
movzbl %al, %eax
movl $0x2a10, %ecx           # imm = 0x2A10
btl %eax, %ecx
jae 0x25f2a
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x260f7
movb $0x1, %bl
movq %rax, %r14
xorl %r13d, %r13d
movq %rax, 0x8(%rsp)
xorl %r15d, %r15d
movl (%r14), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0x25de3
movq 0x18(%r14,%r15,8), %rcx
cmpw $0x100, %ax             # imm = 0x100
jb 0x25d5e
testq %rcx, %rcx
je 0x25ddb
movq (%rcx), %rax
movq 0x8(%rax), %r12
movl (%rax), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
je 0x25dbe
cmpl $0x44, %eax
je 0x25d9d
cmpl $0x3f, %eax
je 0x25cd9
movq 0x18(%rbp), %rdi
callq 0x2936d
movq 0x4(%rbp), %rdi
leaq 0x1a9f1(%rip), %rsi     # 0x40782
movq %rax, %rdx
xorl %eax, %eax
callq 0x1108a
jmp 0x25ddb
movq (%rsp), %rax
cmpq %rax, 0x8(%r12)
je 0x25dbe
movq (%rsp), %rax
movq %rax, 0x8(%r12)
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0x1fae9
testb $0x1, %bl
je 0x25ddb
testq %r13, %r13
je 0x25dd8
cmpq %r12, %r13
movzbl %bl, %ebx
movl $0x0, %eax
cmovnel %eax, %ebx
jmp 0x25ddb
movq %r12, %r13
incq %r15
jmp 0x25d3e
movq 0x10(%r14), %r14
movq 0x8(%rsp), %rax
cmpq %rax, %r14
jne 0x25d3b
testb $0x1, %bl
je 0x26109
testq %r13, %r13
je 0x260f7
movq 0x28(%r13), %r14
testq %r14, %r14
je 0x260f7
xorl %r13d, %r13d
movq %r14, %r15
xorl %edi, %edi
movq 0x20(%rsp), %rbx
movq %r14, 0x8(%rsp)
xorl %r12d, %r12d
movl (%r15), %eax
movsbq %al, %rcx
cmpq %rcx, %r12
jge 0x25f09
movq 0x18(%r15,%r12,8), %rbp
cmpw $0x100, %ax             # imm = 0x100
jb 0x25e49
testq %rbp, %rbp
je 0x25e56
cmpq $0x0, 0x8(%rbp)
je 0x25e56
cmpq %rbx, 0x30(%rbp)
je 0x25e5b
incq %r12
jmp 0x25e29
movl (%rbp), %eax
movl %eax, %ecx
andl $0x7f, %ecx
cmpl $0x44, %ecx
je 0x25ec8
cmpl $0x43, %ecx
jne 0x25e56
testq %rdi, %rdi
je 0x25ed5
xorl (%rdi), %eax
cmpl $0xff, %eax
ja 0x25ed0
movq 0x38(%rdi), %rax
cmpq 0x38(%rbp), %rax
jne 0x25ed0
movq %rdi, (%rsp)
movq 0x18(%rdi), %rdi
movq %rdi, %r14
callq 0x2662c
testb %al, %al
je 0x25ea6
movq 0x18(%rbp), %rdi
callq 0x2667e
testl %eax, %eax
jne 0x25ebf
movq %r14, %rdi
callq 0x2667e
testl %eax, %eax
je 0x25eec
movq 0x18(%rbp), %rdi
callq 0x2662c
testb %al, %al
je 0x25eec
xorl %r13d, %r13d
movq (%rsp), %rdi
jmp 0x25eff
movb $0x1, %r13b
movq %rbp, %rdi
jmp 0x25e56
xorl %r13d, %r13d
jmp 0x25e56
callq 0x12d2b
movq %rbp, %rdi
movq %rax, %rsi
callq 0x21fe6
xorl %edi, %edi
jmp 0x25e56
movq (%rsp), %r14
movq 0x20(%r14), %rsi
movq %rbp, %rdi
callq 0x21fe6
movq %r14, %rdi
movq 0x8(%rsp), %r14
jmp 0x25e56
movq 0x10(%r15), %r15
cmpq %r14, %r15
jne 0x25e26
testb $0x1, %r13b
je 0x260f7
callq 0x26661
jmp 0x260f7
cmpl $0x7, %eax
je 0x25fd9
cmpl $0x8, %eax
jne 0x25fb3
movq 0x98(%r12), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x25d1c
movq 0x8(%rsp), %r14
movzwl (%r14), %r15d
movsbl %r15b, %eax
testw %ax, %ax
movl $0x0, %ecx
cmovgl %eax, %ecx
movzwl %cx, %r13d
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0x25fa3
movq 0x18(%r14,%rbx,8), %rdi
cmpw $0x100, %r15w           # imm = 0x100
jb 0x25f83
testq %rdi, %rdi
je 0x25f9e
movl 0x50(%rdi), %eax
cmpl 0x50(%r12), %eax
jne 0x260f7
callq 0x2662c
testb %al, %al
je 0x260f7
incq %rbx
jmp 0x25f6c
movq 0x10(%r14), %r14
cmpq 0x8(%rsp), %r14
jne 0x25f53
jmp 0x25d1c
movq 0x60(%r12), %rax
cmpq 0x33fc1(%rip), %rax     # 0x59f80
setne %cl
cmpq 0x33f87(%rip), %rax     # 0x59f50
setne %al
testb %al, %cl
je 0x25d1c
jmp 0x260f7
testb $0x20, 0x56(%r12)
jne 0x260f7
movq 0x98(%r12), %rax
testq %rax, %rax
je 0x25d1c
xorl %ecx, %ecx
xorl %r9d, %r9d
movq %rax, %rdx
movzwl (%rdx), %esi
movsbl %sil, %edi
testw %di, %di
movl $0x0, %r8d
cmovgl %edi, %r8d
movzwl %r8w, %edi
xorl %r8d, %r8d
cmpq %r8, %rdi
je 0x260cc
movq 0x18(%rdx,%r8,8), %r10
cmpw $0x100, %si             # imm = 0x100
jb 0x2603b
testq %r10, %r10
jne 0x2603b
movl %r9d, %r11d
jmp 0x260c1
movzbl (%r10), %ebx
movl %ebx, %r14d
movq %r10, %r11
cmpl $0x3, %ebx
jne 0x26052
movq 0x60(%r10), %r11
movzbl (%r11), %r14d
cmpl $0x9, %r14d
jne 0x26060
movq 0x60(%r11), %r11
movzbl (%r11), %r14d
xorl %r11d, %r11d
cmpl $0xb, %r14d
jne 0x26072
pushq $0x1
popq %r11
testl %r9d, %r9d
jne 0x260c1
cmpl $0x3, %ebx
jne 0x2607e
movq 0x60(%r10), %r10
movl (%r10), %ebx
addb $-0x4, %bl
cmpb $0xb, %bl
jae 0x26098
movb $0x1, %r9b
movzbl %bl, %ebx
movl $0x6a1, %r14d           # imm = 0x6A1
btl %ebx, %r14d
jb 0x260b5
movq 0x60(%r10), %r9
cmpq 0x33edd(%rip), %r9      # 0x59f80
sete %r10b
cmpq 0x33ea2(%rip), %r9      # 0x59f50
sete %r9b
orb %r10b, %r9b
testb %r9b, %r9b
je 0x260f7
testl %ecx, %ecx
pushq $0x1
popq %rcx
jne 0x260f7
incq %r8
movl %r11d, %r9d
jmp 0x26019
movq 0x10(%rdx), %rdx
cmpq %rax, %rdx
jne 0x25ffe
testl %r9d, %r9d
je 0x25d1c
movl 0x50(%r12), %eax
leaq 0x3f8ea(%rip), %rcx     # 0x659d8
cmpl 0x50(%rcx), %eax
jle 0x25d1c
movq 0x28(%rsp), %rdx
movq 0x10(%rsp), %rsi
incq %rsi
jmp 0x25c57
movq 0x48(%rsp), %rdx
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2c4a0
movq 0x40(%rsp), %rbx
testq %rbx, %rbx
je 0x2616a
movq %rbx, %r14
xorl %r15d, %r15d
movl (%r14), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0x26161
movq 0x18(%r14,%r15,8), %rdi
cmpw $0x100, %ax             # imm = 0x100
jb 0x26149
testq %rdi, %rdi
je 0x2615c
movq %rbp, %rsi
callq 0x12ed4
movq 0xd8(%rbp), %rcx
movq %rcx, 0x30(%rax)
incq %r15
jmp 0x2612d
movq 0x10(%r14), %r14
cmpq %rbx, %r14
jne 0x2612a
orb $0x10, 0x56(%rbp)
pushq $0x1
popq %rdx
jmp 0x25cdb
movq 0x10(%rdx), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x25c50
andq $0x0, 0x3e863(%rip)     # 0x649f0
andq $0x0, 0x3e863(%rip)     # 0x649f8
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x265ce
movq %rax, %rdx
movq %rax, 0x28(%rsp)
xorl %esi, %esi
movq %rdx, 0x20(%rsp)
movl (%rdx), %eax
movsbq %al, %rcx
cmpq %rcx, %rsi
jge 0x2634e
movq %rsi, 0x10(%rsp)
movq 0x18(%rdx,%rsi,8), %rcx
movq %rcx, (%rsp)
cmpw $0x100, %ax             # imm = 0x100
jb 0x261e4
cmpq $0x0, (%rsp)
je 0x2633c
movq (%rsp), %rax
movq 0x28(%rax), %r14
testq %r14, %r14
je 0x2633c
movq (%rsp), %rax
leaq 0x58(%rax), %r12
movq %r14, %rbx
xorl %r15d, %r15d
movl (%rbx), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0x2632f
movq 0x18(%rbx,%r15,8), %r13
cmpw $0x100, %ax             # imm = 0x100
jb 0x26226
testq %r13, %r13
je 0x26327
cmpq $0x0, 0x8(%r13)
je 0x26327
movl (%r13), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
je 0x262b7
cmpl $0x46, %eax
je 0x26284
cmpl $0x44, %eax
jne 0x26327
movq 0x30(%r13), %rax
cmpl $0x5, 0x4(%rax)
jne 0x26327
movq 0x18(%rax), %rsi
testq %rsi, %rsi
je 0x26327
testb $0x10, 0x56(%rsi)
je 0x26327
movq %r12, %rdi
movq %r13, %rdx
callq 0x380e2
leaq 0x3e766(%rip), %rdi     # 0x649e8
jmp 0x262ad
movq 0x18(%r13), %rsi
testq %rsi, %rsi
je 0x26327
testb $0x10, 0x56(%rsi)
je 0x26327
movq %r12, %rdi
movq %r13, %rdx
callq 0x380e2
leaq 0x3e74b(%rip), %rdi     # 0x649f8
movq %r13, %rsi
callq 0x1fae9
jmp 0x26327
movq 0x30(%r13), %rax
cmpl $0x5, 0x4(%rax)
jne 0x26327
movq 0x18(%rax), %rbp
testq %rbp, %rbp
je 0x26327
testb $0x10, 0x56(%rbp)
je 0x26327
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0x26698
testq %rax, %rax
je 0x2630c
movl (%rax), %ecx
movl (%r13), %edx
xorl %ecx, %edx
cmpl $0xff, %edx
ja 0x26306
andl $0x7f, %ecx
leal -0x43(%rcx), %edx
cmpl $0x2, %edx
jae 0x26316
movq 0x38(%r13), %rcx
cmpq 0x38(%rax), %rcx
je 0x2631b
andb $-0x11, 0x56(%rbp)
jmp 0x26327
callq 0x12d2b
movq %rax, %rsi
jmp 0x2631f
cmpl $0x46, %ecx
jne 0x26306
movq 0x20(%rax), %rsi
movq %r13, %rdi
callq 0x21fe6
incq %r15
jmp 0x26203
movq 0x10(%rbx), %rbx
cmpq %r14, %rbx
jne 0x26200
movq 0x10(%rsp), %rsi
incq %rsi
movq 0x20(%rsp), %rdx
jmp 0x261b6
movq 0x10(%rdx), %rdx
movq 0x28(%rsp), %rax
cmpq %rax, %rdx
jne 0x261af
movq 0x3e691(%rip), %r15     # 0x649f8
andq $0x0, 0x3e681(%rip)     # 0x649f0
testq %r15, %r15
je 0x265ce
leaq 0x3e671(%rip), %rbx     # 0x649f0
movq %r15, %r12
xorl %r13d, %r13d
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %r13
jge 0x263c8
movq 0x18(%r12,%r13,8), %r14
cmpw $0x100, %ax             # imm = 0x100
jb 0x263a2
testq %r14, %r14
je 0x263c3
movq 0x20(%r14), %rax
movq 0x8(%rax), %rdi
callq 0x1f8c0
testb %al, %al
jne 0x263c3
orb $0x1, 0x40(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1fae9
incq %r13
jmp 0x26385
movq 0x10(%r12), %r12
cmpq %r15, %r12
jne 0x26382
movq 0x3e617(%rip), %rax     # 0x649f0
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x265ce
movq 0x38(%rsp), %rdx
xorl %esi, %esi
movq %rdx, 0x50(%rsp)
movl (%rdx), %eax
movsbq %al, %rcx
cmpq %rcx, %rsi
jge 0x265bf
movq %rsi, 0x30(%rsp)
movq 0x18(%rdx,%rsi,8), %rcx
movq %rcx, 0x10(%rsp)
cmpw $0x100, %ax             # imm = 0x100
jb 0x26423
cmpq $0x0, 0x10(%rsp)
je 0x265ad
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x265ad
movq 0x10(%rsp), %rcx
movq 0x30(%rcx), %rcx
testq %rcx, %rcx
je 0x265ad
movq 0x18(%rcx), %r14
testb $0x10, 0x56(%r14)
je 0x265ad
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x265ad
movq 0x10(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rbx
movq %r14, 0x28(%rsp)
xorl %r12d, %r12d
movq %rbx, 0x20(%rsp)
movl (%rbx), %eax
movsbq %al, %rcx
cmpq %rcx, %r12
jge 0x2659e
movq 0x18(%rbx,%r12,8), %r13
cmpw $0x100, %ax             # imm = 0x100
jb 0x264ab
testq %r13, %r13
je 0x26596
movq %r13, %rdi
movq %r14, %rsi
callq 0x26698
testq %rax, %rax
je 0x264c1
movq 0x20(%rax), %rax
jmp 0x264c6
callq 0x12d2b
movq %rax, (%rsp)
movq %rax, %rdi
movq %r14, %rsi
callq 0x12d3c
movq %rax, %rbx
movq 0x20(%rax), %rbp
movq 0x18(%r14), %rax
movq %rax, 0x10(%rbp)
leaq 0x28(%r13), %r15
movq %r15, %rdi
callq 0x1fd69
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1fae9
movq %r15, %rdi
movq %r14, %rsi
callq 0x1fae9
movq %r13, 0x8(%rbx)
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x1fae9
movq %rax, %r13
movq %rbp, (%rax)
movl 0x4(%rbp), %eax
cmpl $0x6, %eax
ja 0x26530
pushq $0x43
popq %rcx
btl %eax, %ecx
jb 0x2654f
xorl %edi, %edi
callq 0x119b4
movq %r13, 0x8(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x8(%rbp), %rdi
movq %rax, %rsi
callq 0x1fae9
movq 0x18(%rbp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x38(%rax)
movq (%rsp), %rax
cmpl $0x3, 0x4(%rax)
movq 0x28(%rsp), %r14
movq 0x20(%rsp), %rbx
jne 0x26596
movq 0x18(%rax), %rsi
movl (%rsi), %eax
andl $0x7f, %eax
cmpl $0x46, %eax
jne 0x26596
movb 0x40(%rsi), %al
testb $0x1, %al
jne 0x26596
orb $0x1, %al
movb %al, 0x40(%rsi)
leaq 0x3e45f(%rip), %rdi     # 0x649f0
callq 0x1fae9
incq %r12
jmp 0x26488
movq 0x10(%rbx), %rbx
cmpq 0x18(%rsp), %rbx
jne 0x26480
movq 0x30(%rsp), %rsi
incq %rsi
movq 0x50(%rsp), %rdx
jmp 0x263f3
movq 0x10(%rdx), %rdx
cmpq 0x38(%rsp), %rdx
jne 0x263ec
movq 0x3e413(%rip), %rbx     # 0x649e8
testq %rbx, %rbx
je 0x2661d
movq %rbx, %r14
xorl %r15d, %r15d
movl (%r14), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0x26614
movq 0x18(%r14,%r15,8), %rdi
cmpw $0x100, %ax             # imm = 0x100
jb 0x265fc
testq %rdi, %rdi
je 0x2660f
movq 0x30(%rdi), %rax
movq 0x18(%rax), %rax
testb $0x10, 0x56(%rax)
je 0x2660f
callq 0x26661
incq %r15
jmp 0x265e0
movq 0x10(%r14), %r14
cmpq %rbx, %r14
jne 0x265dd
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq