// File: /workspace/github_c_makefile_star2_O2/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, 0x20(%rsp)
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
je 0x37c25
movq %rcx, %rdx
movq %rcx, 0x28(%rsp)
movq 0x8(%rdx), %rdx
movsbq (%rdx), %rax
movl %eax, %eax
movq %rdx, 0x30(%rsp)
testl %eax, %eax
jle 0x37a15
movq 0x10(%rdx,%rax,8), %rsi
decq %rax
cmpw $0x100, (%rdx)          # imm = 0x100
jb 0x3772f
testq %rsi, %rsi
je 0x37713
movq 0x28(%rsi), %rdi
testq %rdi, %rdi
je 0x37713
movq %rsi, 0x40(%rsp)
movq %rax, 0x38(%rsp)
movq %rdi, %r15
movq %rdi, (%rsp)
movq 0x8(%r15), %r15
movsbq (%r15), %r13
movq %r15, 0x18(%rsp)
testl %r13d, %r13d
jle 0x379f4
decq %r13
movl %r13d, %eax
movq 0x18(%r15,%rax,8), %r12
cmpw $0x100, (%r15)          # imm = 0x100
jb 0x37777
testq %r12, %r12
je 0x37756
cmpq $0x0, 0x8(%r12)
je 0x37756
movl (%r12), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
jne 0x37756
movq 0x30(%r12), %r14
movq %r14, %rdi
callq 0x37cbb
testb $0x1, 0x40(%r12)
jne 0x37756
movl %eax, %ebx
movq 0x20(%r12), %rax
movq 0x8(%rax), %rdi
callq 0x1f8c0
testb %al, %al
je 0x377be
movq %r12, %rdi
callq 0x37d46
jmp 0x37756
movq %r14, 0x10(%rsp)
leaq 0x30(%r12), %rax
movq %rax, 0x8(%rsp)
movq %r13, %rax
movl %eax, %ebp
testl %ebp, %ebp
jle 0x37809
movq 0x10(%r15,%rbp,8), %r14
andq $-0x4, %r14
cmpq $0x0, 0x8(%r14)
je 0x37804
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x34adb
testl %eax, %eax
je 0x37804
jns 0x37819
movl (%r14), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
jne 0x3785c
decq %rbp
jmp 0x377d2
cmpq (%rsp), %r15
je 0x37866
movq 0x8(%r15), %r15
movsbq (%r15), %rax
jmp 0x377d0
movq 0x18(%r12), %rbx
movq %rbx, %rdi
callq 0x37f3c
testb %al, %al
je 0x37837
movq 0x18(%r14), %rdi
callq 0x37f71
testl %eax, %eax
jne 0x3785c
movq %rbx, %rdi
callq 0x37f71
testl %eax, %eax
je 0x37850
movq 0x18(%r14), %rdi
callq 0x37f3c
testb %al, %al
jne 0x3785c
movq 0x20(%r14), %rsi
movq %r12, %rdi
callq 0x21fe6
movq 0x18(%rsp), %r15
jmp 0x37756
leaq 0x5270b(%rip), %rcx     # 0x89f78
movq (%rcx), %rax
incq %rax
movq %rax, (%rcx)
movq 0x40(%rsp), %rsi
movq %rax, 0x8(%rsi)
andq $0x0, 0x48(%rsp)
movq %r12, %rdi
leaq 0x48(%rsp), %rdx
movl %ebx, %ecx
callq 0x37d4d
testl %eax, %eax
je 0x37945
movq 0x48(%rsp), %r14
testq %r14, %r14
je 0x379cb
movq %r14, %rax
xorl %esi, %esi
movzwl (%rax), %ecx
movsbl %cl, %edx
testw %dx, %dx
movl $0x0, %edi
cmovgl %edx, %edi
movzwl %di, %edx
xorl %edi, %edi
cmpq %rdi, %rdx
je 0x378fa
movq 0x18(%rax,%rdi,8), %r8
cmpw $0x100, %cx             # imm = 0x100
jb 0x378db
testq %r8, %r8
je 0x378f5
movq 0x18(%r8), %r8
movq 0x30(%r8), %r8
testq %rsi, %rsi
je 0x378f2
cmpq %r8, %rsi
je 0x378f5
jmp 0x3799f
movq %r8, %rsi
incq %rdi
jmp 0x378c5
movq 0x10(%rax), %rax
cmpq %r14, %rax
jne 0x378af
movq %r12, %rdi
callq 0x21fe6
movq %r14, %rbx
xorl %r15d, %r15d
movl (%rbx), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0x3793a
movq 0x18(%rbx,%r15,8), %rcx
cmpw $0x100, %ax             # imm = 0x100
jb 0x3792c
testq %rcx, %rcx
je 0x37935
movq 0x18(%rcx), %rdi
callq 0x37d46
incq %r15
jmp 0x37911
movq 0x10(%rbx), %rbx
cmpq %r14, %rbx
jne 0x3790e
jmp 0x379bc
leaq 0x29428(%rip), %rax     # 0x60d74
movl (%rax), %ebx
movq 0x48(%rsp), %r14
testq %r14, %r14
je 0x37991
movq %r14, %r15
xorl %r12d, %r12d
movl (%r15), %eax
movsbq %al, %rcx
cmpq %rcx, %r12
jge 0x37988
movq 0x18(%r15,%r12,8), %rcx
cmpw $0x100, %ax             # imm = 0x100
jb 0x3797a
testq %rcx, %rcx
je 0x37983
movq 0x18(%rcx), %rdi
callq 0x37d46
incq %r12
jmp 0x3795e
movq 0x10(%r15), %r15
cmpq %r14, %r15
jne 0x3795b
leaq 0x293dc(%rip), %rax     # 0x60d74
movl %ebx, (%rax)
jmp 0x3785c
movq 0x8(%rsp), %rdi
callq 0x21c58
movl (%r12), %eax
andl $-0x80, %eax
orl $0x46, %eax
movl %eax, (%r12)
movq %r14, 0x38(%r12)
leaq 0x293b1(%rip), %rax     # 0x60d74
orb $0x1, (%rax)
jmp 0x3785c
testl %ebx, %ebx
je 0x3785c
movq 0x10(%rsp), %rax
cmpl $0x4, 0x4(%rax)
je 0x37c9c
xorl %edi, %edi
callq 0x12c98
movq %r12, %rdi
movq %rax, %rsi
jmp 0x37857
movq (%rsp), %rdi
cmpq %rdi, %r15
jne 0x37749
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rax
jmp 0x37713
cmpq %rcx, %rdx
jne 0x37704
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x37c25
movq 0x50(%rsp), %rcx
movq 0x8(%rcx), %rcx
movsbq (%rcx), %rax
movl %eax, %eax
movq %rcx, 0x28(%rsp)
testl %eax, %eax
jle 0x37c1a
movq 0x10(%rcx,%rax,8), %r12
decq %rax
cmpw $0x100, (%rcx)          # imm = 0x100
jb 0x37a65
testq %r12, %r12
je 0x37a49
movq 0x28(%r12), %rdx
testq %rdx, %rdx
je 0x37a49
movq %rax, 0x30(%rsp)
movq %rdx, %r15
movq %r12, 0x38(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%r15), %r15
movsbq (%r15), %rax
movq %rax, (%rsp)
movq %r15, 0x8(%rsp)
movq (%rsp), %rax
testl %eax, %eax
jle 0x37bfd
decq %rax
movq %rax, (%rsp)
movl %eax, %eax
movq 0x18(%r15,%rax,8), %r14
cmpw $0x100, (%r15)          # imm = 0x100
jb 0x37ab9
testq %r14, %r14
je 0x37a92
cmpq $0x0, 0x8(%r14)
je 0x37a92
movl (%r14), %eax
andl $0x7f, %eax
cmpl $0x44, %eax
jne 0x37a92
cmpq $0x0, 0x18(%r14)
je 0x37a92
testb $0x1, 0x40(%r14)
jne 0x37a92
movq 0x30(%r14), %rdi
callq 0x37cbb
movl %eax, %ebp
movq %r15, %rbx
movq (%rsp), %rax
movl %eax, %r15d
testl %r15d, %r15d
jle 0x37b1a
movq 0x10(%rbx,%r15,8), %rsi
andq $-0x4, %rsi
cmpq $0x0, 0x8(%rsi)
je 0x37b15
movq %r14, %rdi
movl %ebp, %edx
callq 0x37f8b
testb %al, %al
je 0x37bf3
decq %r15
jmp 0x37aee
cmpq 0x10(%rsp), %rbx
movq 0x8(%rsp), %r15
je 0x37b30
movq 0x8(%rbx), %rbx
movsbq (%rbx), %rax
jmp 0x37aeb
movq 0x18(%r12), %rax
testq %rax, %rax
je 0x37a92
movq %rax, %r12
movq %rax, 0x40(%rsp)
xorl %r15d, %r15d
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0x37bdb
movq 0x18(%r12,%r15,8), %rbx
cmpw $0x100, %ax             # imm = 0x100
jb 0x37b6a
testq %rbx, %rbx
je 0x37bd3
movq 0x20(%rbx), %rdi
callq 0x1f89c
cmpl $0x1, %eax
jne 0x37bd3
movq 0x28(%rbx), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x37bd3
movq 0x18(%rsp), %rbx
xorl %r13d, %r13d
movl (%rbx), %eax
movsbq %al, %rcx
cmpq %rcx, %r13
jge 0x37bc8
movq 0x18(%rbx,%r13,8), %rsi
cmpw $0x100, %ax             # imm = 0x100
jb 0x37ba9
testq %rsi, %rsi
je 0x37bc3
cmpq $0x0, 0x8(%rsi)
je 0x37bc3
cmpq %r14, %rsi
je 0x37bd3
movq %r14, %rdi
movl %ebp, %edx
callq 0x37f8b
testb %al, %al
je 0x37bd3
incq %r13
jmp 0x37b8e
movq 0x10(%rbx), %rbx
cmpq 0x18(%rsp), %rbx
jne 0x37b8b
incq %r15
jmp 0x37b49
movq 0x10(%r12), %r12
movq 0x40(%rsp), %rax
cmpq %rax, %r12
jne 0x37b46
movq 0x38(%rsp), %r12
movq 0x8(%rsp), %r15
jmp 0x37a92
movq 0x10(%rsp), %rdx
cmpq %rdx, %r15
jne 0x37a81
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rax
jmp 0x37a49
cmpq 0x50(%rsp), %rcx
jne 0x37a3a
movq 0x20(%rsp), %rax
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x37c8d
movq %r14, %r15
xorl %r12d, %r12d
movl (%r15), %eax
movsbq %al, %rcx
cmpq %rcx, %r12
jge 0x37c84
movq 0x18(%r15,%r12,8), %rbx
cmpw $0x100, %ax             # imm = 0x100
jb 0x37c55
testq %rbx, %rbx
je 0x37c7f
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x37c7f
movzwl 0x68(%rax), %eax
testw $0x41c, %ax             # imm = 0x41C
jne 0x37c7f
movq %rbx, %rdi
callq 0x37cbb
movq 0x20(%rsp), %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x34c64
incq %r12
jmp 0x37c39
movq 0x10(%r15), %r15
cmpq %r14, %r15
jne 0x37c36
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcc5d(%rip), %rdi      # 0x44900
leaq 0xcc71(%rip), %rsi      # 0x4491b
leaq 0xcc73(%rip), %rcx      # 0x44924
movl $0xb4, %edx
callq 0xe120