// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x5f328
jmp 0x5f399
jmp 0x5f32a
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movw (%rax), %ax
shlw $0x8, %ax
sarw $0x8, %ax
cwtl
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jl 0x5f38d
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5f382
cmpq $0x0, -0x10(%rbp)
jne 0x5f382
jmp 0x5f349
movq -0x10(%rbp), %rdi
callq 0x5f550
jmp 0x5f349
jmp 0x5f38f
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x5f32a
jmp 0x5f39b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x5f3c4
jmp 0x5f435
jmp 0x5f3c6
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movw (%rax), %ax
shlw $0x8, %ax
sarw $0x8, %ax
cwtl
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, %eax
jl 0x5f429
movq -0x48(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x48(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5f41e
cmpq $0x0, -0x10(%rbp)
jne 0x5f41e
jmp 0x5f3e5
movq -0x10(%rbp), %rdi
callq 0x5f910
jmp 0x5f3e5
jmp 0x5f42b
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x5f3c6
jmp 0x5f437
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0x5f45f
jmp 0x5f543
jmp 0x5f461
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movq -0x68(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x5f52b
movq -0x68(%rbp), %rax
movslq -0x74(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x68(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5f4b0
cmpq $0x0, -0x18(%rbp)
jne 0x5f4b0
jmp 0x5f51d
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x5f4c5
jmp 0x5f51d
movq -0x80(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
andq $0x41c, %rax            # imm = 0x41C
cmpq $0x0, %rax
je 0x5f4e9
jmp 0x5f51d
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5fca0
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movl %eax, %edx
callq 0x59480
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x5f468
jmp 0x5f52d
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq -0x60(%rbp), %rax
jne 0x5f461
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)