// File: /workspace/github_c_makefile_star2_O1/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 $0x68, %rsp
movq %rdi, 0x48(%rsp)
movq 0x18(%rdi), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x3f829
movl $0x8041, %ebp           # imm = 0x8041
movq 0x38(%rsp), %rcx
movq 0x8(%rcx), %rcx
movsbl (%rcx), %eax
testw %ax, %ax
jle 0x3f81e
cwtl
decl %eax
movq %rcx, 0x50(%rsp)
movq %rax, 0x20(%rsp)
movq 0x18(%rcx,%rax,8), %rax
movq %rax, 0x10(%rsp)
cmpw $0x100, (%rcx)          # imm = 0x100
jb 0x3f3d9
cmpq $0x0, 0x10(%rsp)
je 0x3f807
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x3f807
movq 0x30(%rsp), %r13
movq 0x8(%r13), %r13
movsbl (%r13), %eax
testw %ax, %ax
jle 0x3f7fc
movswl %ax, %r15d
decl %r15d
movq %r13, 0x40(%rsp)
movq 0x18(%r13,%r15,8), %r12
cmpw $0x100, (%r13)          # imm = 0x100
jb 0x3f42a
testq %r12, %r12
je 0x3f600
cmpq $0x0, 0x8(%r12)
je 0x3f600
movl (%r12), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
jne 0x3f600
movq 0x30(%r12), %r14
movq %r14, %rdi
callq 0x3fb8d
movl %eax, 0xc(%rsp)
movl $0x6, %ebx
testb $0x1, 0x40(%r12)
jne 0x3f5ee
movq 0x20(%r12), %rax
movq 0x8(%rax), %rdi
callq 0x225d8
testb %al, %al
je 0x3f489
movq %r12, %rdi
xorl %esi, %esi
callq 0x24adf
jmp 0x3f5ee
movq %r14, 0x18(%rsp)
leaq 0x30(%r12), %rax
movq %rax, 0x28(%rsp)
movl %r15d, %eax
testl %eax, %eax
jle 0x3f5c9
movl %eax, %ebp
incq %rbp
movq 0x8(%r13,%rbp,8), %r14
andq $-0x4, %r14
cmpq $0x0, 0x8(%r14)
je 0x3f542
movq %r12, %rdi
movq %r14, %rsi
movl 0xc(%rsp), %edx
callq 0x3c373
testl %eax, %eax
je 0x3f549
js 0x3f54d
movq 0x18(%r12), %rax
movzbl (%rax), %ecx
movq %rax, %rdx
cmpl $0x3, %ecx
jne 0x3f4e5
movq 0x60(%rax), %rdx
movzbl (%rdx), %esi
cmpl $0xe, %esi
ja 0x3f5a0
movl $0x6210, %edi           # imm = 0x6210
btl %esi, %edi
jae 0x3f5a0
movq 0x18(%r14), %rdx
cmpb $0x3, (%rdx)
jne 0x3f50c
movq 0x60(%rdx), %rdx
leaq 0x2ca45(%rip), %rsi     # 0x6bf58
cmpq %rsi, 0x60(%rdx)
je 0x3f53b
cmpl $0x3, %ecx
jne 0x3f522
movq 0x60(%rax), %rax
leaq 0x2ca2f(%rip), %rcx     # 0x6bf58
cmpq %rcx, 0x60(%rax)
je 0x3f564
movq 0x20(%r14), %rsi
movq %r12, %rdi
callq 0x24d76
movl $0xf, %ebx
jmp 0x3f588
movl $0xd, %ebx
jmp 0x3f588
xorl %ebx, %ebx
jmp 0x3f588
movl (%r14), %eax
andl $0x7f, %eax
xorl %ecx, %ecx
cmpl $0x43, %eax
setne %cl
leal 0xd(,%rcx,2), %ebx
jmp 0x3f588
movq 0x18(%r14), %rax
cmpb $0x3, (%rax)
jne 0x3f571
movq 0x60(%rax), %rax
movzbl (%rax), %ecx
movl $0xf, %ebx
cmpl $0xe, %ecx
ja 0x3f5b6
movl $0x6210, %edx           # imm = 0x6210
btl %ecx, %edx
jae 0x3f5b6
cmpl $0xd, %ebx
je 0x3f591
testl %ebx, %ebx
jne 0x3f5e0
decq %rbp
cmpq $0x1, %rbp
jg 0x3f4a8
jmp 0x3f5c9
leaq 0x2c8d1(%rip), %rsi     # 0x6be78
cmpq %rsi, 0x60(%rdx)
jne 0x3f519
jmp 0x3f4ff
leaq 0x2c8bb(%rip), %rcx     # 0x6be78
cmpq %rcx, 0x60(%rax)
jne 0x3f52f
jmp 0x3f588
cmpq 0x30(%rsp), %r13
je 0x3f5de
movq 0x8(%r13), %r13
movsbl (%r13), %eax
jmp 0x3f49b
xorl %ebx, %ebx
testl %ebx, %ebx
movl $0x8041, %ebp           # imm = 0x8041
movq 0x40(%rsp), %r13
je 0x3f615
cmpl $0xf, %ebx
ja 0x3f807
btl %ebx, %ebp
jae 0x3f807
leaq -0x1(%r15), %rax
testq %r15, %r15
movq %rax, %r15
jg 0x3f413
jmp 0x3f7fc
leaq 0x5195c(%rip), %rcx     # 0x90f78
movq (%rcx), %rax
incq %rax
movq %rax, (%rcx)
movq 0x10(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq $0x0, 0x58(%rsp)
movq %r12, %rdi
leaq 0x58(%rsp), %rdx
movl 0xc(%rsp), %ecx
callq 0x3fc13
testl %eax, %eax
je 0x3f6fa
movq 0x58(%rsp), %r14
testq %r14, %r14
je 0x3f76a
movq %r14, %rax
xorl %esi, %esi
movzwl (%rax), %ecx
movsbl %cl, %edi
testw %di, %di
setg %dl
jle 0x3f6c6
movzwl %di, %edi
movq %rdi, %r8
negq %r8
movb $0x1, %dl
movl $0x1, %r9d
movzwl %cx, %r11d
movq 0x10(%rax,%r9,8), %r10
cmpl $0x100, %r11d           # imm = 0x100
jb 0x3f699
testq %r10, %r10
je 0x3f6b0
movq 0x18(%r10), %r10
movq 0x30(%r10), %r10
testq %rsi, %rsi
je 0x3f6ad
cmpq %r10, %rsi
je 0x3f6b0
jmp 0x3f6cf
movq %r10, %rsi
cmpq %rdi, %r9
setb %dl
leaq (%r8,%r9), %r10
incq %r10
incq %r9
cmpq $0x1, %r10
jne 0x3f682
movq 0x10(%rax), %rax
cmpq %r14, %rax
jne 0x3f663
testb $0x1, %dl
je 0x3f7a0
movq 0x28(%rsp), %rdi
callq 0x24a58
movl (%r12), %eax
andl $-0x80, %eax
orl $0x46, %eax
movl %eax, (%r12)
movq %r14, 0x38(%r12)
jmp 0x3f7eb
leaq 0x28673(%rip), %rax     # 0x67d74
movl (%rax), %ebx
movq 0x58(%rsp), %r14
testq %r14, %r14
je 0x3f755
movq %r14, %r12
movzwl (%r12), %eax
testb %al, %al
jle 0x3f74b
xorl %r13d, %r13d
movq 0x18(%r12,%r13,8), %rcx
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3f730
testq %rcx, %rcx
je 0x3f73b
movq 0x18(%rcx), %rdi
xorl %esi, %esi
callq 0x24adf
incq %r13
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %r13
jl 0x3f71c
movq 0x10(%r12), %r12
cmpq %r14, %r12
jne 0x3f710
leaq 0x28618(%rip), %rax     # 0x67d74
movl %ebx, (%rax)
xorl %ebx, %ebx
movq 0x40(%rsp), %r13
jmp 0x3f5ee
movl $0xf, %ebx
cmpl $0x0, 0xc(%rsp)
je 0x3f5ee
movq 0x18(%rsp), %rax
cmpl $0x4, 0x4(%rax)
je 0x3fb6e
xorl %edi, %edi
callq 0x136d3
movq %r12, %rdi
movq %rax, %rsi
callq 0x24d76
jmp 0x3f5ee
movq %r12, %rdi
callq 0x24d76
movq %r14, %rbx
movzwl (%rbx), %eax
testb %al, %al
jle 0x3f7e2
xorl %r12d, %r12d
movq 0x18(%rbx,%r12,8), %rcx
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3f7c9
testq %rcx, %rcx
je 0x3f7d4
movq 0x18(%rcx), %rdi
xorl %esi, %esi
callq 0x24adf
incq %r12
movl (%rbx), %eax
movsbq %al, %rcx
cmpq %rcx, %r12
jl 0x3f7b5
movq 0x10(%rbx), %rbx
cmpq %r14, %rbx
jne 0x3f7ab
leaq 0x28582(%rip), %rax     # 0x67d74
orb $0x1, (%rax)
xorl %ebx, %ebx
jmp 0x3f5ee
cmpq 0x30(%rsp), %r13
jne 0x3f3f5
movq 0x20(%rsp), %rcx
leaq -0x1(%rcx), %rax
testq %rcx, %rcx
movq 0x50(%rsp), %rcx
jg 0x3f3b7
cmpq 0x38(%rsp), %rcx
jne 0x3f39f
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x3faec
movl $0x8041, %r12d          # imm = 0x8041
movq 0x60(%rsp), %rcx
movq 0x8(%rcx), %rcx
movsbl (%rcx), %eax
testw %ax, %ax
jle 0x3fae1
cwtl
decl %eax
movq %rcx, 0x38(%rsp)
movq %rax, 0x50(%rsp)
movq 0x18(%rcx,%rax,8), %rax
movq %rax, 0x20(%rsp)
cmpw $0x100, (%rcx)          # imm = 0x100
jb 0x3f885
cmpq $0x0, 0x20(%rsp)
je 0x3faca
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x3faca
movq 0x28(%rsp), %r15
movq 0x8(%r15), %r15
movsbl (%r15), %eax
testw %ax, %ax
jle 0x3fabf
movswl %ax, %ebx
decl %ebx
movq %r15, 0x10(%rsp)
movq 0x18(%r15,%rbx,8), %r14
cmpw $0x100, (%r15)          # imm = 0x100
jb 0x3f8d2
testq %r14, %r14
je 0x3faa6
cmpq $0x0, 0x8(%r14)
je 0x3faa6
movl (%r14), %eax
andl $0x7f, %eax
cmpl $0x44, %eax
jne 0x3faa6
movl $0x6, %eax
cmpq $0x0, 0x18(%r14)
je 0x3fa9b
testb $0x1, 0x40(%r14)
jne 0x3fa9b
movq 0x30(%r14), %rdi
callq 0x3fb8d
movl %eax, 0xc(%rsp)
movq %rbx, 0x18(%rsp)
movl %ebx, %eax
testl %eax, %eax
setle %bpl
jle 0x3f957
movl %eax, %ebx
incq %rbx
xorl %ebp, %ebp
movq 0x8(%r15,%rbx,8), %rsi
andq $-0x4, %rsi
cmpq $0x0, 0x8(%rsi)
je 0x3f94a
movq %r14, %rdi
movl 0xc(%rsp), %edx
callq 0x3fe98
testb %al, %al
je 0x3f96c
decq %rbx
cmpq $0x2, %rbx
setl %bpl
jge 0x3f92a
cmpq 0x28(%rsp), %r15
je 0x3fab8
movq 0x8(%r15), %r15
movsbl (%r15), %eax
jmp 0x3f91b
movl $0xf, %eax
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %rbx
testb $0x1, %bpl
je 0x3fa9b
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x3fa9b
movq %rcx, %r12
movq %rcx, 0x40(%rsp)
movzwl (%r12), %eax
testb %al, %al
jle 0x3fa76
xorl %r15d, %r15d
movq 0x18(%r12,%r15,8), %rbx
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3f9c9
testq %rbx, %rbx
je 0x3fa62
movq 0x20(%rbx), %rdi
callq 0x225b4
cmpl $0x1, %eax
jne 0x3fa62
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x3fa4e
movq %rax, %r13
movq %rax, 0x30(%rsp)
movzwl (%r13), %eax
testb %al, %al
jle 0x3fa3c
xorl %ebx, %ebx
movq 0x18(%r13,%rbx,8), %rsi
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3fa0b
testq %rsi, %rsi
je 0x3fa2c
cmpq $0x0, 0x8(%rsi)
je 0x3fa2c
movl $0x17, %ebp
cmpq %r14, %rsi
je 0x3fa53
movq %r14, %rdi
movl 0xc(%rsp), %edx
callq 0x3fe98
testb %al, %al
je 0x3fa53
incq %rbx
movl (%r13), %eax
movsbq %al, %rcx
cmpq %rcx, %rbx
jl 0x3f9f7
movq 0x10(%r13), %r13
movq 0x30(%rsp), %rax
cmpq %rax, %r13
jne 0x3f9ec
xorl %ebp, %ebp
jmp 0x3fa53
movl $0x18, %ebp
cmpl $0x18, %ebp
ja 0x3fa89
movl $0x1800001, %eax        # imm = 0x1800001
btl %ebp, %eax
jae 0x3fa89
incq %r15
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jl 0x3f9b1
movq 0x10(%r12), %r12
movq 0x40(%rsp), %rcx
cmpq %rcx, %r12
jne 0x3f9a1
movl $0x8041, %r12d          # imm = 0x8041
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %rbx
xorl %eax, %eax
cmpl $0xf, %eax
ja 0x3faca
btl %eax, %r12d
jae 0x3faca
leaq -0x1(%rbx), %rax
testq %rbx, %rbx
movq %rax, %rbx
jg 0x3f8bc
jmp 0x3fabf
xorl %eax, %eax
jmp 0x3f971
cmpq 0x28(%rsp), %r15
jne 0x3f8a1
movq 0x50(%rsp), %rcx
leaq -0x1(%rcx), %rax
testq %rcx, %rcx
movq 0x38(%rsp), %rcx
jg 0x3f863
cmpq 0x60(%rsp), %rcx
jne 0x3f84b
movq 0x48(%rsp), %rax
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x3fb5f
movq %r14, %r15
movzwl (%r15), %eax
testb %al, %al
jle 0x3fb56
xorl %r12d, %r12d
movq 0x18(%r15,%r12,8), %rbx
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3fb1c
testq %rbx, %rbx
je 0x3fb47
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x3fb47
movzwl 0x68(%rax), %eax
testl $0x41c, %eax            # imm = 0x41C
jne 0x3fb47
movq %rbx, %rdi
callq 0x3fb8d
movq 0x48(%rsp), %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x3c517
incq %r12
movl (%r15), %eax
movsbq %al, %rcx
cmpq %rcx, %r12
jl 0x3fb08
movq 0x10(%r15), %r15
cmpq %r14, %r15
jne 0x3fafd
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcbcb(%rip), %rdi      # 0x4c740
leaq 0xcbdf(%rip), %rsi      # 0x4c75b
leaq 0xcbe1(%rip), %rcx      # 0x4c764
movl $0xb4, %edx
callq 0xe120