// File: /workspace/github_c_makefile_star2_O3/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 0x29cff(%rip), %rax     # 0x66db4
cmpl $0x0, (%rax)
je 0x3d594
leaq 0x29cbf(%rip), %rax     # 0x66d84
cmpl $0x0, (%rax)
jne 0x3d594
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x3d594
leaq 0xe1be(%rip), %r14      # 0x4b2a0
movq %rax, %rsi
xorl %r12d, %r12d
movq %rdi, 0x8(%rsp)
movq %rax, 0x28(%rsp)
movzwl (%rsi), %eax
testb %al, %al
jle 0x3d57d
xorl %r8d, %r8d
movq %rsi, 0x30(%rsp)
movq 0x18(%rsi,%r8,8), %rcx
movzwl %ax, %edx
cmpl $0x100, %edx            # imm = 0x100
jb 0x3d11e
testq %rcx, %rcx
je 0x3d56a
movq 0x28(%rcx), %rcx
testq %rcx, %rcx
je 0x3d56a
movq %r8, 0x38(%rsp)
movq %rcx, %rdx
movq %rcx, 0x40(%rsp)
movzwl (%rdx), %esi
testb %sil, %sil
jle 0x3d54b
xorl %r13d, %r13d
movq %rdx, 0x50(%rsp)
movq 0x18(%rdx,%r13,8), %r15
movzwl %si, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x3d161
testq %r15, %r15
je 0x3d1b1
cmpq $0x0, 0x8(%r15)
je 0x3d1b1
movl (%r15), %eax
andl $0x7f, %eax
xorl %ebx, %ebx
addl $-0x2, %eax
cmpl $0x4e, %eax
ja 0x3d349
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
movq 0x38(%r15), %rsi
movq %r15, %rdi
callq 0x3d5c9
addl %ebx, %eax
movl %eax, %ebx
movq 0x30(%r15), %rsi
movq %r15, %rdi
callq 0x3d5c9
addl %ebx, %eax
addl %r12d, %eax
movq 0x50(%rsp), %rdx
movzwl (%rdx), %esi
movl %eax, %r12d
incq %r13
movzwl %si, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r13
jl 0x3d14c
jmp 0x3d54b
movq 0x40(%r15), %rsi
movq %r15, %rdi
callq 0x3d5c9
movl %eax, %ebx
jmp 0x3d185
movq 0x20(%r15), %rax
movq 0x8(%rax), %rdi
callq 0x22554
testb %al, %al
movl $0x0, %eax
jne 0x3d1a3
movq 0x8(%r15), %rax
movq 0x18(%rax), %rdi
callq 0x22530
movl %eax, %r14d
movq 0x38(%r15), %rdi
movq %rdi, 0x10(%rsp)
callq 0x3d6a9
cmpl %eax, %r14d
jne 0x3d377
movq 0x8(%r15), %rax
movq 0x18(%rax), %rbp
testq %rbp, %rbp
leaq 0xe07c(%rip), %r14      # 0x4b2a0
je 0x3d3e3
movq %rbp, %rbx
cmpb $0x0, (%rbx)
jg 0x3d3ec
movq 0x10(%rbx), %rbx
cmpq %rbp, %rbx
jne 0x3d22d
jmp 0x3d3e5
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x3d349
cmpl $0x0, 0x50(%rax)
jle 0x3d349
leaq 0x2876e(%rip), %rax     # 0x659d0
cmpq %rax, 0x30(%r15)
movl $0x0, %eax
jne 0x3d1a3
movq 0x10(%r15), %rdi
leaq 0xe233(%rip), %rsi      # 0x4b4af
xorl %eax, %eax
callq 0x11a80
movl $0x1, %eax
jmp 0x3d1a3
movq 0x38(%r15), %rdx
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x3d666
jmp 0x3d1a3
movq 0x38(%r15), %rdx
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3d666
movl %r12d, %ebp
movl %eax, %r12d
movq 0x40(%r15), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3d666
movl %eax, %ebx
addl %r12d, %ebx
movl %ebp, %r12d
jmp 0x3d195
movq 0x38(%r15), %rbx
testq %rbx, %rbx
je 0x3d349
movl %r12d, 0x4(%rsp)
movq %rbx, %r14
movq 0x8(%rsp), %rbp
movzwl (%r14), %eax
testb %al, %al
jle 0x3d334
xorl %r12d, %r12d
movq 0x18(%r14,%r12,8), %rcx
movzwl %ax, %edx
cmpl $0x100, %edx            # imm = 0x100
jb 0x3d30f
testq %rcx, %rcx
je 0x3d325
movq (%rcx), %rdx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3d666
testl %eax, %eax
jne 0x3d361
movzwl (%r14), %eax
incq %r12
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r12
jl 0x3d2fa
movq 0x10(%r14), %r14
cmpq %rbx, %r14
jne 0x3d2ef
leaq 0xdf5c(%rip), %r14      # 0x4b2a0
movl 0x4(%rsp), %r12d
xorl %eax, %eax
jmp 0x3d1a3
movq 0x20(%r15), %rsi
movq %r15, %rdi
callq 0x3d5c9
jmp 0x3d193
movl $0x1, %eax
leaq 0xdf33(%rip), %r14      # 0x4b2a0
movl 0x4(%rsp), %r12d
jmp 0x3d1a3
movq %r15, %rdi
callq 0x12543
movq 0x10(%r15), %rdi
leaq 0xe093(%rip), %rsi      # 0x4b41d
movq %rax, %rdx
xorl %eax, %eax
callq 0x11a80
movq 0x8(%r15), %rax
movq 0x18(%rax), %rdi
callq 0x22530
movq 0x10(%r15), %rdi
leaq 0xe094(%rip), %rsi      # 0x4b440
movl %eax, %edx
xorl %eax, %eax
callq 0x1178c
movq 0x38(%r15), %rdi
callq 0x3d6a9
movq 0x10(%r15), %rdi
leaq 0xe083(%rip), %rsi      # 0x4b44c
movl %eax, %edx
xorl %eax, %eax
callq 0x1178c
movl $0x1, %eax
leaq 0xdec2(%rip), %r14      # 0x4b2a0
jmp 0x3d1a3
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %edi, %edi
jmp 0x3d3fa
movq 0x18(%rbx), %rdi
andq $-0x4, %rdi
movl $0x1, %r15d
cmpq $0x0, 0x10(%rsp)
movl $0x0, %eax
je 0x3d1a3
xorl %eax, %eax
movq 0x10(%rsp), %rsi
movl %r12d, 0x4(%rsp)
movq %rax, 0x18(%rsp)
movzwl (%rsi), %eax
testb %al, %al
jle 0x3d52b
xorl %r14d, %r14d
movq %rsi, 0x48(%rsp)
movq 0x18(%rsi,%r14,8), %rcx
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
setae %al
testq %rcx, %rcx
sete %dl
testb %dl, %al
jne 0x3d519
cmpq 0x22b44(%rip), %rcx     # 0x5ff98
je 0x3d519
cmpl $0x2, 0x4(%rcx)
jne 0x3d5a5
movq 0x18(%rcx), %r12
cmpq %rdi, 0x8(%r12)
je 0x3d4e8
movq %rdi, 0x20(%rsp)
movq %r12, %rdi
callq 0x12543
movq 0x10(%r12), %rdi
leaq 0xe016(%rip), %rsi      # 0x4b49e
movq %rax, %rdx
xorl %eax, %eax
callq 0x11a80
movq 0x20(%rsp), %rdi
callq 0x122b5
movq 0x10(%r12), %rdi
leaq 0x6134(%rip), %rsi      # 0x435dc
movq %rax, %rdx
xorl %eax, %eax
callq 0x1178c
movq 0x8(%r12), %rdi
callq 0x122b5
movq 0x10(%r12), %rdi
leaq 0x6124(%rip), %rsi      # 0x435ec
movq %rax, %rdx
xorl %eax, %eax
callq 0x1178c
movq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x18(%rsp), %rax
incl %eax
movq %rax, 0x18(%rsp)
movl 0x4(%rsp), %r12d
testq %rdi, %rdi
je 0x3d506
movsbl (%rbx), %eax
cmpl %eax, %r15d
jl 0x3d50a
movq 0x10(%rbx), %rbx
xorl %r15d, %r15d
cmpq %rbp, %rbx
jne 0x3d4f2
xorl %edi, %edi
jmp 0x3d519
movslq %r15d, %rax
movq 0x18(%rbx,%rax,8), %rdi
andq $-0x4, %rdi
incl %r15d
incq %r14
movl (%rsi), %eax
movsbq %al, %rcx
cmpq %rcx, %r14
jl 0x3d42f
movq 0x10(%rsi), %rsi
cmpq 0x10(%rsp), %rsi
leaq 0xdd65(%rip), %r14      # 0x4b2a0
movq 0x18(%rsp), %rax
jne 0x3d417
jmp 0x3d1a3
movq 0x10(%rdx), %rdx
movq 0x40(%rsp), %rcx
cmpq %rcx, %rdx
jne 0x3d138
movq 0x30(%rsp), %rsi
movzwl (%rsi), %eax
movq 0x38(%rsp), %r8
incq %r8
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r8
jl 0x3d105
movq 0x10(%rsi), %rsi
movq 0x28(%rsp), %rax
cmpq %rax, %rsi
jne 0x3d0f2
testl %r12d, %r12d
jne 0x3d5c4
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdeac(%rip), %rdi      # 0x4b458
leaq 0xdebd(%rip), %rsi      # 0x4b470
leaq 0xdebb(%rip), %rcx      # 0x4b475
movl $0x30, %edx
callq 0xe120
callq 0xe060