// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/ir.c
// Function: ir_validate
int ir_validate(struct entrypoint *ep)
{
	struct basic_block *bb;
	int err = 0;

	if (!dbg_ir || has_error)
		return 0;

	FOR_EACH_PTR(ep->bbs, bb) {
		struct instruction *insn;
		FOR_EACH_PTR(bb->insns, insn) {
			if (!insn->bb)
				continue;
			err += validate_insn(ep, insn);
		} END_FOR_EACH_PTR(insn);
	} END_FOR_EACH_PTR(bb);

	if (err)
		abort();
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
leaq 0x2a88b(%rip), %rax     # 0x60db4
cmpl $0x0, (%rax)
je 0x369b1
leaq 0x2a84b(%rip), %rax     # 0x60d84
cmpl $0x0, (%rax)
jne 0x369b1
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x369b1
leaq 0xdf9a(%rip), %rbx      # 0x444f0
movq %rax, %rcx
xorl %esi, %esi
movq %rdi, (%rsp)
movq %rax, 0x28(%rsp)
xorl %edi, %edi
movq %rcx, 0x8(%rsp)
movl (%rcx), %eax
movq %rcx, %rdx
movsbq %al, %rcx
cmpq %rcx, %rdi
jge 0x36998
movq %rdi, 0x30(%rsp)
movq 0x18(%rdx,%rdi,8), %rcx
cmpw $0x100, %ax             # imm = 0x100
jb 0x36596
testq %rcx, %rcx
je 0x36986
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x36986
movq %rax, %rdx
movq %rax, 0x38(%rsp)
xorl %edi, %edi
movq %rdx, 0x48(%rsp)
movl (%rdx), %eax
movsbq %al, %rcx
cmpq %rcx, %rdi
jge 0x3696d
movq 0x18(%rdx,%rdi,8), %rbp
cmpw $0x100, %ax             # imm = 0x100
jb 0x365d1
testq %rbp, %rbp
je 0x36630
cmpq $0x0, 0x8(%rbp)
je 0x36630
movq %rdi, 0x50(%rsp)
movl %esi, 0x1c(%rsp)
movl (%rbp), %eax
andl $0x7f, %eax
xorl %r14d, %r14d
addl $-0x2, %eax
cmpl $0x4e, %eax
ja 0x3679e
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
movq 0x38(%rbp), %rsi
movq %rbp, %rdi
callq 0x369e4
addl %r14d, %eax
movl %eax, %r14d
movq 0x30(%rbp), %rsi
movq %rbp, %rdi
callq 0x369e4
addl %r14d, %eax
addl 0x1c(%rsp), %eax
movl %eax, %esi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rdi
incq %rdi
jmp 0x365b2
movq 0x40(%rbp), %rsi
movq %rbp, %rdi
callq 0x369e4
movl %eax, %r14d
jmp 0x365ff
movq 0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1f8c0
testb %al, %al
movl $0x0, %eax
jne 0x36620
movq 0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1f89c
movl %eax, %ebx
movq %rbp, %rdi
callq 0x36ac0
cmpl %eax, %ebx
jne 0x367b6
movq 0x8(%rbp), %rax
movq 0x18(%rax), %r12
testq %r12, %r12
leaq 0xde60(%rip), %rbx      # 0x444f0
je 0x3681f
movq %r12, %r13
cmpb $0x0, (%r13)
jg 0x3682a
movq 0x10(%r13), %r13
cmpq %r12, %r13
jne 0x36699
jmp 0x36822
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x3679e
cmpl $0x0, 0x50(%rax)
jle 0x3679e
leaq 0x29300(%rip), %rax     # 0x5f9d0
cmpq %rax, 0x30(%rbp)
movl $0x0, %eax
jne 0x36620
movq 0x10(%rbp), %rdi
leaq 0xe015(%rip), %rsi      # 0x446ff
xorl %eax, %eax
callq 0x1120e
pushq $0x1
popq %rax
jmp 0x36620
movq 0x38(%rbp), %rdx
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0x36a7f
jmp 0x36620
movq 0x38(%rbp), %rdx
movq (%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
callq 0x36a7f
movl %eax, %ebx
movq 0x40(%rbp), %rdx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x36a7f
movl %eax, %r14d
addl %ebx, %r14d
leaq 0xddb1(%rip), %rbx      # 0x444f0
jmp 0x36611
movq 0x38(%rbp), %rbx
testq %rbx, %rbx
je 0x36797
movq %rbx, %r14
movq (%rsp), %r12
xorl %r15d, %r15d
movl (%r14), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0x3678e
movq 0x18(%r14,%r15,8), %rcx
cmpw $0x100, %ax             # imm = 0x100
jb 0x36773
testq %rcx, %rcx
je 0x36789
movq (%rcx), %rdx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x36a7f
testl %eax, %eax
jne 0x36810
incq %r15
jmp 0x36757
movq 0x10(%r14), %r14
cmpq %rbx, %r14
jne 0x36754
leaq 0xdd52(%rip), %rbx      # 0x444f0
xorl %eax, %eax
jmp 0x36620
movq 0x20(%rbp), %rsi
movq %rbp, %rdi
callq 0x369e4
jmp 0x3660e
movq %rbp, %rdi
callq 0x11c44
movq 0x10(%rbp), %rdi
leaq 0xdea4(%rip), %rsi      # 0x4466d
movq %rax, %rdx
xorl %eax, %eax
callq 0x1120e
movq 0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1f89c
movq 0x10(%rbp), %rdi
leaq 0xdea5(%rip), %rsi      # 0x44690
movl %eax, %edx
xorl %eax, %eax
callq 0x10ddc
movq %rbp, %rdi
callq 0x36ac0
movq 0x10(%rbp), %rdi
leaq 0xde95(%rip), %rsi      # 0x4469c
movl %eax, %edx
xorl %eax, %eax
callq 0x10ddc
pushq $0x1
popq %rax
leaq 0xdcd6(%rip), %rbx      # 0x444f0
jmp 0x36620
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x36838
movq 0x18(%r13), %r15
andq $-0x4, %r15
pushq $0x1
popq %rax
movl %eax, %r14d
movq 0x38(%rbp), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
movl $0x0, %eax
je 0x36620
xorl %eax, %eax
movq 0x20(%rsp), %rsi
movq %rax, 0x10(%rsp)
xorl %ebx, %ebx
movq %rsi, 0x40(%rsp)
movl (%rsi), %ecx
movsbq %cl, %rax
cmpq %rax, %rbx
jge 0x3694d
movq 0x18(%rsi,%rbx,8), %rax
cmpw $0x100, %cx             # imm = 0x100
setae %cl
testq %rax, %rax
sete %dl
testb %dl, %cl
jne 0x36945
cmpq 0x236fd(%rip), %rax     # 0x59f90
je 0x36945
cmpl $0x2, 0x4(%rax)
jne 0x369c2
movq 0x18(%rax), %rbp
cmpq %r15, 0x8(%rbp)
je 0x36916
movq %rbp, %rdi
callq 0x11c44
movq 0x10(%rbp), %rdi
leaq 0xde2e(%rip), %rsi      # 0x446ee
movq %rax, %rdx
xorl %eax, %eax
callq 0x1120e
movq %r15, %rdi
callq 0x11a05
movq 0x10(%rbp), %rdi
leaq 0x5d5f(%rip), %rsi      # 0x3c63c
movq %rax, %rdx
xorl %eax, %eax
callq 0x10ddc
movq 0x8(%rbp), %rdi
callq 0x11a05
movq 0x10(%rbp), %rdi
leaq 0x5d51(%rip), %rsi      # 0x3c64c
movq %rax, %rdx
xorl %eax, %eax
callq 0x10ddc
movq 0x40(%rsp), %rsi
movq 0x10(%rsp), %rax
incl %eax
movq %rax, 0x10(%rsp)
testq %r15, %r15
je 0x36931
movsbl (%r13), %eax
cmpl %eax, %r14d
jl 0x36936
movq 0x10(%r13), %r13
xorl %r14d, %r14d
cmpq %r12, %r13
jne 0x3691b
xorl %r15d, %r15d
jmp 0x36945
movslq %r14d, %rax
movq 0x18(%r13,%rax,8), %r15
andq $-0x4, %r15
incl %r14d
incq %rbx
jmp 0x36862
movq 0x10(%rsi), %rsi
cmpq 0x20(%rsp), %rsi
leaq 0xdb93(%rip), %rbx      # 0x444f0
movq 0x10(%rsp), %rax
jne 0x36856
jmp 0x36620
movq 0x10(%rdx), %rdx
movq 0x38(%rsp), %rax
cmpq %rax, %rdx
movq 0x8(%rsp), %rcx
jne 0x365ab
jmp 0x3698b
movq 0x8(%rsp), %rcx
movq 0x30(%rsp), %rdi
incq %rdi
jmp 0x3656b
movq 0x10(%rdx), %rdx
movq 0x28(%rsp), %rax
cmpq %rax, %rdx
movq %rdx, %rcx
jne 0x36564
testl %esi, %esi
jne 0x369df
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdcdf(%rip), %rdi      # 0x446a8
leaq 0xdcf0(%rip), %rsi      # 0x446c0
leaq 0xdcee(%rip), %rcx      # 0x446c5
pushq $0x30
popq %rdx
callq 0xe120
callq 0xe060