// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/cse.c
// Function: cse_eliminate
void cse_eliminate(struct entrypoint *ep)
{
	int i;

	for (i = 0; i < INSN_HASH_SIZE; i++) {
		struct instruction_list **list = insn_hash_table + i;
		if (*list) {
			if (instruction_list_size(*list) > 1) {
				struct instruction *insn, *last;

				sort_instruction_list(list);

				last = NULL;
				FOR_EACH_PTR(*list, insn) {
					if (!insn->bb)
						continue;
					if (last) {
						if (!insn_compare(last, insn))
							insn = try_to_cse(ep, last, insn);
					}
					last = insn;
				} END_FOR_EACH_PTR(insn);
			}
			free_ptr_list(list);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x5d794(%rip), %rax     # 0x89700
xorl %ecx, %ecx
cmpq $0x100, %rcx            # imm = 0x100
je 0x2c194
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x2c18c
movq %rcx, 0x18(%rsp)
leaq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
callq 0x1f89c
cmpl $0x2, %eax
jl 0x2c176
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1f0(%rip), %rsi       # 0x2c1a3
callq 0x257d4
movq (%rbx), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x2c176
xorl %r12d, %r12d
movq 0x10(%rsp), %r15
xorl %ebx, %ebx
movl (%r15), %eax
movsbq %al, %rcx
cmpq %rcx, %rbx
jge 0x2c167
movq 0x18(%r15,%rbx,8), %r13
cmpw $0x100, %ax             # imm = 0x100
jb 0x2bff3
testq %r13, %r13
je 0x2c011
cmpq $0x0, 0x8(%r13)
je 0x2c011
testq %r12, %r12
je 0x2c00e
movq %r12, %rdi
movq %r13, %rsi
callq 0x2c1a3
testl %eax, %eax
je 0x2c016
movq %r13, %r12
incq %rbx
jmp 0x2bfd3
movq 0x8(%r12), %rbp
movq 0x8(%r13), %r14
cmpq %r14, %rbp
je 0x2c040
movq %rbp, %rdi
movq %r14, %rsi
callq 0x364dc
testb %al, %al
je 0x2c0a7
movq %r13, %rdi
movq %r12, %rsi
callq 0x2c46c
jmp 0x2c011
movq 0x28(%rbp), %rax
testq %rax, %rax
je 0x2c090
movq %rax, %rcx
movzwl (%rcx), %edx
movsbl %dl, %esi
testw %si, %si
movl $0x0, %edi
cmovgl %esi, %edi
movzwl %di, %esi
xorl %edi, %edi
cmpq %rdi, %rsi
je 0x2c087
movq 0x18(%rcx,%rdi,8), %r8
cmpw $0x100, %dx             # imm = 0x100
jb 0x2c078
testq %r8, %r8
je 0x2c082
cmpq %r12, %r8
je 0x2c033
cmpq %r13, %r8
je 0x2c0b6
incq %rdi
jmp 0x2c062
movq 0x10(%rcx), %rcx
cmpq %rax, %rcx
jne 0x2c04c
movq (%rbp), %rdi
leaq 0x16af7(%rip), %rsi     # 0x42b92
xorl %eax, %eax
callq 0x1108a
jmp 0x2c011
movq %r14, %rdi
movq %rbp, %rsi
callq 0x364dc
testb %al, %al
je 0x2c0c6
movq %r12, %rdi
movq %r13, %rsi
callq 0x2c46c
jmp 0x2c00e
movq 0x18(%rbp), %rdi
callq 0x1f89c
cmpl $0x1, %eax
jne 0x2c00e
movq 0x18(%rbp), %rdi
callq 0x1f919
movq %rax, 0x20(%rsp)
movq 0x18(%r14), %rdi
callq 0x1f89c
cmpl $0x1, %eax
jne 0x2c00e
movq 0x18(%r14), %rdi
callq 0x1f919
movq 0x20(%rsp), %r14
testq %r14, %r14
je 0x2c00e
cmpq %r14, %rax
jne 0x2c00e
movq %r13, %rdi
movq %r12, %rsi
callq 0x2c46c
addq $0x28, %rbp
movq %rbp, %rdi
movq %r12, %rsi
pushq $0x1
popq %rdx
callq 0x1fbfd
movq %r14, %rbp
addq $0x28, %r14
movq %r14, %rdi
callq 0x1fd69
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x1fae9
movq %r14, %rdi
movq %r13, %rsi
callq 0x1fae9
movq %rbp, 0x8(%r12)
jmp 0x2c011
movq 0x10(%r15), %r15
cmpq 0x10(%rsp), %r15
jne 0x2bfd1
movq 0x8(%rsp), %rdi
callq 0x1ff30
leaq 0x5d579(%rip), %rax     # 0x89700
movq 0x18(%rsp), %rcx
incq %rcx
jmp 0x2bf6e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq