// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/memops.c
// Function: simplify_memops
void simplify_memops(struct entrypoint *ep)
{
	struct basic_block *bb;
	pseudo_t pseudo;

	FOR_EACH_PTR_REVERSE(ep->bbs, bb) {
		simplify_loads(bb);
	} END_FOR_EACH_PTR_REVERSE(bb);

	FOR_EACH_PTR_REVERSE(ep->bbs, bb) {
		kill_dominated_stores(bb);
	} END_FOR_EACH_PTR_REVERSE(bb);

	FOR_EACH_PTR(ep->accesses, pseudo) {
		struct symbol *var = pseudo->sym;
		unsigned long mod;
		if (!var)
			continue;
		mod = var->ctype.modifiers;
		if (mod & (MOD_VOLATILE | MOD_NONLOCAL | MOD_STATIC))
			continue;
		kill_dead_stores(ep, pseudo, local_pseudo(pseudo));
	} END_FOR_EACH_PTR(pseudo);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x30(%rsp)
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x3eaa2
movq %rax, %rcx
movq %rax, 0x38(%rsp)
movq 0x8(%rcx), %rcx
movsbl (%rcx), %eax
testw %ax, %ax
jle 0x3e847
cwtl
decl %eax
cltq
movq %rcx, 0x40(%rsp)
movq %rax, 0x8(%rsp)
movq 0x18(%rcx,%rax,8), %rax
movq %rax, 0x10(%rsp)
cmpw $0x100, (%rcx)          # imm = 0x100
jb 0x3e494
cmpq $0x0, 0x10(%rsp)
je 0x3e830
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x3e830
movq (%rsp), %r15
movq 0x8(%r15), %r15
movsbl (%r15), %eax
testw %ax, %ax
jle 0x3e826
cwtl
decl %eax
movslq %eax, %r13
movq %r15, 0x28(%rsp)
movq 0x18(%r15,%r13,8), %r12
cmpw $0x100, (%r15)          # imm = 0x100
jb 0x3e4e0
testq %r12, %r12
je 0x3e7ee
cmpq $0x0, 0x8(%r12)
je 0x3e7ee
movl (%r12), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
jne 0x3e7ee
movq 0x30(%r12), %rbx
movq %rbx, %rdi
callq 0x3eb49
testb $0x1, 0x40(%r12)
jne 0x3e7ee
movl %eax, %r14d
movq 0x20(%r12), %rax
movq 0x8(%rax), %rdi
callq 0x22554
testb %al, %al
je 0x3e539
movq %r12, %rdi
xorl %esi, %esi
callq 0x24a3f
jmp 0x3e7ee
movq %rbx, 0x18(%rsp)
leaq 0x30(%r12), %rax
movq %rax, 0x20(%rsp)
movl %r13d, %eax
testl %eax, %eax
jle 0x3e58f
movl %eax, %ebp
incq %rbp
movq 0x8(%r15,%rbp,8), %rbx
andq $-0x4, %rbx
cmpq $0x0, 0x8(%rbx)
je 0x3e586
movq %r12, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x3b44a
testl %eax, %eax
je 0x3e586
jns 0x3e5a3
movl (%rbx), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
jne 0x3e7e9
decq %rbp
cmpq $0x1, %rbp
ja 0x3e554
cmpq (%rsp), %r15
je 0x3e664
movq 0x8(%r15), %r15
movsbl (%r15), %eax
jmp 0x3e54b
movq 0x18(%r12), %rax
movzbl (%rax), %ecx
movl %ecx, %esi
movq %rax, %rdx
cmpl $0x3, %ecx
jne 0x3e5bb
movq 0x60(%rax), %rdx
movl (%rdx), %esi
cmpb $0xe, %sil
ja 0x3e652
movzbl %sil, %esi
movl $0x6210, %edi           # imm = 0x6210
btl %esi, %edi
jae 0x3e652
movq 0x18(%rbx), %rdx
cmpb $0x3, (%rdx)
jne 0x3e5e0
movq 0x60(%rdx), %rdx
leaq 0x2c971(%rip), %rsi     # 0x6af58
cmpq %rsi, 0x60(%rdx)
je 0x3e7e9
cmpl $0x3, %ecx
jne 0x3e5fa
movq 0x60(%rax), %rax
leaq 0x2c957(%rip), %rcx     # 0x6af58
cmpq %rcx, 0x60(%rax)
je 0x3e618
movq 0x20(%rbx), %rsi
movq %r12, %rdi
callq 0x24ce2
jmp 0x3e7e9
movq 0x18(%rbx), %rax
movzbl (%rax), %ecx
cmpl $0x3, %ecx
jne 0x3e62a
movq 0x60(%rax), %rax
movl (%rax), %ecx
cmpb $0xe, %cl
ja 0x3e640
movzbl %cl, %ecx
movl $0x6210, %edx           # imm = 0x6210
btl %ecx, %edx
jb 0x3e7e9
leaq 0x2c831(%rip), %rcx     # 0x6ae78
cmpq %rcx, 0x60(%rax)
jne 0x3e607
jmp 0x3e7e9
leaq 0x2c81f(%rip), %rsi     # 0x6ae78
cmpq %rsi, 0x60(%rdx)
jne 0x3e5f1
jmp 0x3e5d3
leaq 0x5190d(%rip), %rcx     # 0x8ff78
movq (%rcx), %rax
incq %rax
movq %rax, (%rcx)
movq 0x10(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq $0x0, 0x48(%rsp)
movq %r12, %rdi
leaq 0x48(%rsp), %rdx
movl %r14d, %ecx
callq 0x3ebcf
testl %eax, %eax
je 0x3e75a
movq 0x48(%rsp), %rbx
testq %rbx, %rbx
je 0x3e800
movq %rbx, %rax
xorl %esi, %esi
movzwl (%rax), %ecx
movsbl %cl, %edx
testw %dx, %dx
jle 0x3e6fa
movzwl %dx, %edx
xorl %edi, %edi
movzwl %cx, %r9d
movq 0x18(%rax,%rdi,8), %r8
cmpl $0x100, %r9d            # imm = 0x100
jb 0x3e6d8
testq %r8, %r8
je 0x3e6f2
movq 0x18(%r8), %r8
movq 0x30(%r8), %r8
testq %rsi, %rsi
je 0x3e6ef
cmpq %r8, %rsi
je 0x3e6f2
jmp 0x3e7c2
movq %r8, %rsi
incq %rdi
cmpq %rdi, %rdx
jne 0x3e6c1
movq 0x10(%rax), %rax
cmpq %rbx, %rax
jne 0x3e6b1
movq %r12, %rdi
callq 0x24ce2
movq %rbx, %r14
movzwl (%r14), %eax
testb %al, %al
jle 0x3e74c
xorl %r15d, %r15d
movq 0x18(%r14,%r15,8), %rcx
movzwl %ax, %edx
cmpl $0x100, %edx            # imm = 0x100
jb 0x3e72e
testq %rcx, %rcx
je 0x3e73d
movq 0x18(%rcx), %rdi
xorl %esi, %esi
callq 0x24a3f
movzwl (%r14), %eax
incq %r15
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r15
jl 0x3e719
movq 0x10(%r14), %r14
cmpq %rbx, %r14
jne 0x3e70e
jmp 0x3e7df
leaq 0x28613(%rip), %rax     # 0x66d74
movl (%rax), %ebx
movq 0x48(%rsp), %r14
testq %r14, %r14
je 0x3e7b7
movq %r14, %r15
movzwl (%r15), %eax
testb %al, %al
jle 0x3e7ae
xorl %r12d, %r12d
movq 0x18(%r15,%r12,8), %rcx
movzwl %ax, %edx
cmpl $0x100, %edx            # imm = 0x100
jb 0x3e790
testq %rcx, %rcx
je 0x3e79f
movq 0x18(%rcx), %rdi
xorl %esi, %esi
callq 0x24a3f
movzwl (%r15), %eax
incq %r12
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r12
jl 0x3e77b
movq 0x10(%r15), %r15
cmpq %r14, %r15
jne 0x3e770
leaq 0x285b6(%rip), %rax     # 0x66d74
movl %ebx, (%rax)
jmp 0x3e7e9
movq 0x20(%rsp), %rdi
callq 0x249b8
movl (%r12), %eax
andl $-0x80, %eax
orl $0x46, %eax
movl %eax, (%r12)
movq %rbx, 0x38(%r12)
leaq 0x2858e(%rip), %rax     # 0x66d74
orb $0x1, (%rax)
movq 0x28(%rsp), %r15
leaq -0x1(%r13), %rax
testq %r13, %r13
movq %rax, %r13
jg 0x3e4ca
jmp 0x3e826
testl %r14d, %r14d
je 0x3e7e9
movq 0x18(%rsp), %rax
cmpl $0x4, 0x4(%rax)
je 0x3eb2a
xorl %edi, %edi
callq 0x13745
movq %r12, %rdi
movq %rax, %rsi
jmp 0x3e60e
cmpq (%rsp), %r15
jne 0x3e4ae
movq 0x8(%rsp), %rcx
leaq -0x1(%rcx), %rax
testq %rcx, %rcx
movq 0x40(%rsp), %rcx
jg 0x3e472
movq 0x38(%rsp), %rax
cmpq %rax, %rcx
jne 0x3e458
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x3eaa2
movq 0x50(%rsp), %rcx
movq 0x8(%rcx), %rcx
movsbl (%rcx), %eax
testw %ax, %ax
jle 0x3ea97
cwtl
decl %eax
cltq
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x18(%rcx,%rax,8), %rax
movq %rax, 0x8(%rsp)
cmpw $0x100, (%rcx)          # imm = 0x100
jb 0x3e8ad
cmpq $0x0, 0x8(%rsp)
je 0x3ea80
movq 0x8(%rsp), %rax
movq 0x28(%rax), %r13
testq %r13, %r13
je 0x3ea80
movq %r13, %rcx
movq %r13, 0x10(%rsp)
movq 0x8(%rcx), %rcx
movsbl (%rcx), %eax
testw %ax, %ax
jle 0x3ea77
cwtl
decl %eax
cltq
movq %rcx, 0x20(%rsp)
movq %rax, (%rsp)
movq 0x18(%rcx,%rax,8), %r14
cmpw $0x100, (%rcx)          # imm = 0x100
jb 0x3e8fa
testq %r14, %r14
je 0x3ea61
cmpq $0x0, 0x8(%r14)
je 0x3ea61
movl (%r14), %eax
andl $0x7f, %eax
cmpl $0x44, %eax
jne 0x3ea61
cmpq $0x0, 0x18(%r14)
je 0x3ea61
testb $0x1, 0x40(%r14)
jne 0x3ea61
movq 0x30(%r14), %rdi
callq 0x3eb49
movl %eax, %ebp
movq 0x20(%rsp), %rbx
movq (%rsp), %rax
testl %eax, %eax
jle 0x3e973
movl %eax, %r15d
incq %r15
movq 0x8(%rbx,%r15,8), %rsi
andq $-0x4, %rsi
cmpq $0x0, 0x8(%rsi)
je 0x3e96a
movq %r14, %rdi
movl %ebp, %edx
callq 0x3edcf
testb %al, %al
je 0x3ea61
decq %r15
cmpq $0x2, %r15
jae 0x3e948
cmpq %r13, %rbx
je 0x3e981
movq 0x8(%rbx), %rbx
movsbl (%rbx), %eax
jmp 0x3e93e
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x3ea61
movq 0x18(%rsp), %r12
movzwl (%r12), %eax
testb %al, %al
jle 0x3ea4c
xorl %r15d, %r15d
movq 0x18(%r12,%r15,8), %rbx
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3e9c1
testq %rbx, %rbx
je 0x3ea38
movq 0x20(%rbx), %rdi
callq 0x22530
cmpl $0x1, %eax
jne 0x3ea38
movq 0x28(%rbx), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x3ea38
movq 0x28(%rsp), %rbx
movzwl (%rbx), %eax
testb %al, %al
jle 0x3ea2d
xorl %r13d, %r13d
movq 0x18(%rbx,%r13,8), %rsi
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x3ea01
testq %rsi, %rsi
je 0x3ea1e
cmpq $0x0, 0x8(%rsi)
je 0x3ea1e
cmpq %r14, %rsi
je 0x3ea38
movq %r14, %rdi
movl %ebp, %edx
callq 0x3edcf
testb %al, %al
je 0x3ea38
movzwl (%rbx), %eax
incq %r13
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r13
jl 0x3e9ec
movq 0x10(%rbx), %rbx
cmpq 0x28(%rsp), %rbx
jne 0x3e9e2
incq %r15
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jl 0x3e9ad
movq 0x10(%r12), %r12
cmpq 0x18(%rsp), %r12
movq 0x10(%rsp), %r13
jne 0x3e99d
movq (%rsp), %rcx
leaq -0x1(%rcx), %rax
testq %rcx, %rcx
movq 0x20(%rsp), %rcx
jg 0x3e8e1
cmpq %r13, %rcx
jne 0x3e8c7
movq 0x40(%rsp), %rcx
leaq -0x1(%rcx), %rax
testq %rcx, %rcx
movq 0x38(%rsp), %rcx
jg 0x3e88b
cmpq 0x50(%rsp), %rcx
jne 0x3e871
movq 0x30(%rsp), %rax
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x3eb1b
movq %r14, %r15
movzwl (%r15), %eax
testb %al, %al
jle 0x3eb12
xorl %r12d, %r12d
movq 0x18(%r15,%r12,8), %rbx
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x3ead3
testq %rbx, %rbx
je 0x3eb03
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x3eb03
movzwl 0x68(%rcx), %ecx
testl $0x41c, %ecx            # imm = 0x41C
jne 0x3eb03
movq %rbx, %rdi
callq 0x3eb49
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x3b603
movzwl (%r15), %eax
incq %r12
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r12
jl 0x3eabe
movq 0x10(%r15), %r15
cmpq %r14, %r15
jne 0x3eab3
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcb7f(%rip), %rdi      # 0x4b6b0
leaq 0xcb93(%rip), %rsi      # 0x4b6cb
leaq 0xcb95(%rip), %rcx      # 0x4b6d4
movl $0xb4, %edx
callq 0xe120