// File: /workspace/github_c_makefile_star2_O1/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 0x29d3f(%rip), %rax     # 0x67db4
cmpl $0x0, (%rax)
je 0x3e52d
leaq 0x29cff(%rip), %rax     # 0x67d84
cmpl $0x0, (%rax)
jne 0x3e52d
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x3e52d
leaq 0xe28e(%rip), %r14      # 0x4c330
movq %rax, %rdx
xorl %esi, %esi
movq %rdi, (%rsp)
movq %rax, 0x28(%rsp)
movzwl (%rdx), %eax
testb %al, %al
jle 0x3e517
xorl %edi, %edi
movq %rdx, 0x30(%rsp)
movq 0x18(%rdx,%rdi,8), %rcx
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
movq %rdi, 0x38(%rsp)
jb 0x3e0df
testq %rcx, %rcx
je 0x3e4fb
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x3e4fb
movq %rax, %rdx
movq %rax, 0x40(%rsp)
movzwl (%rdx), %eax
testb %al, %al
jle 0x3e4e9
xorl %r12d, %r12d
movq %rdx, 0x50(%rsp)
movq 0x18(%rdx,%r12,8), %rbp
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3e11b
testq %rbp, %rbp
je 0x3e16c
cmpq $0x0, 0x8(%rbp)
je 0x3e16c
movl %esi, 0x14(%rsp)
movl (%rbp), %eax
andl $0x7f, %eax
xorl %ebx, %ebx
addl $-0x2, %eax
cmpl $0x4e, %eax
ja 0x3e234
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
movq 0x38(%rbp), %rsi
movq %rbp, %rdi
callq 0x3e562
addl %ebx, %eax
movl %eax, %ebx
movq 0x30(%rbp), %rsi
movq %rbp, %rdi
callq 0x3e562
addl %ebx, %eax
addl 0x14(%rsp), %eax
movl %eax, %esi
movq 0x50(%rsp), %rdx
incq %r12
movl (%rdx), %eax
movsbq %al, %rcx
cmpq %rcx, %r12
jl 0x3e107
jmp 0x3e4e9
movq 0x40(%rbp), %rsi
movq %rbp, %rdi
callq 0x3e562
movl %eax, %ebx
jmp 0x3e143
movq 0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x225d8
testb %al, %al
movl $0x0, %eax
jne 0x3e161
movq 0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x225b4
movl %eax, %r14d
movq %rbp, %rdi
callq 0x3e642
cmpl %eax, %r14d
jne 0x3e31f
movq 0x8(%rbp), %rax
movq 0x18(%rax), %r13
testq %r13, %r13
leaq 0xe158(%rip), %r14      # 0x4c330
je 0x3e38a
movq %r13, %rbx
cmpb $0x0, (%rbx)
jg 0x3e393
movq 0x10(%rbx), %rbx
cmpq %r13, %rbx
jne 0x3e1e1
jmp 0x3e38c
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x3e234
cmpl $0x0, 0x50(%rax)
jle 0x3e234
leaq 0x287c2(%rip), %rax     # 0x669d0
cmpq %rax, 0x30(%rbp)
movl $0x0, %eax
jne 0x3e161
movq 0x10(%rbp), %rdi
leaq 0xe317(%rip), %rsi      # 0x4c53f
xorl %eax, %eax
callq 0x11a38
jmp 0x3e315
xorl %eax, %eax
jmp 0x3e161
movq 0x38(%rbp), %rdx
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0x3e5ff
jmp 0x3e161
movq 0x38(%rbp), %rdx
movq (%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3e5ff
movl %eax, %r15d
movq 0x40(%rbp), %rdx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3e5ff
movl %eax, %ebx
addl %r15d, %ebx
jmp 0x3e153
movq 0x38(%rbp), %rbx
testq %rbx, %rbx
je 0x3e302
movq %rbx, %r14
movq (%rsp), %r13
movzwl (%r14), %eax
testb %al, %al
jle 0x3e2cf
xorl %r15d, %r15d
movq 0x18(%r14,%r15,8), %rcx
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3e2ae
testq %rcx, %rcx
je 0x3e2c0
movq (%rcx), %rdx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3e5ff
testl %eax, %eax
jne 0x3e2ef
incq %r15
movl (%r14), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jl 0x3e29a
movq 0x10(%r14), %r14
cmpq %rbx, %r14
jne 0x3e28f
xorl %ecx, %ecx
xorl %eax, %eax
jmp 0x3e2f9
movq 0x20(%rbp), %rsi
movq %rbp, %rdi
callq 0x3e562
jmp 0x3e151
movl $0x1, %ecx
movl $0x1, %eax
leaq 0xe030(%rip), %r14      # 0x4c330
jmp 0x3e309
movl $0x2, %eax
xorl %ecx, %ecx
testb $0x1, %al
jne 0x3e315
movq %rcx, %rax
jmp 0x3e161
movl $0x1, %eax
jmp 0x3e161
movq %rbp, %rdi
callq 0x12516
movq 0x10(%rbp), %rdi
leaq 0xe17b(%rip), %rsi      # 0x4c4ad
movq %rax, %rdx
xorl %eax, %eax
callq 0x11a38
movq 0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x225b4
movq 0x10(%rbp), %rdi
leaq 0xe17c(%rip), %rsi      # 0x4c4d0
movl %eax, %edx
xorl %eax, %eax
callq 0x11744
movq %rbp, %rdi
callq 0x3e642
movq 0x10(%rbp), %rdi
leaq 0xe16c(%rip), %rsi      # 0x4c4dc
movl %eax, %edx
xorl %eax, %eax
callq 0x11744
movl $0x1, %eax
leaq 0xdfab(%rip), %r14      # 0x4c330
jmp 0x3e161
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %edi, %edi
jmp 0x3e3a1
movq 0x18(%rbx), %rdi
andq $-0x4, %rdi
movl $0x1, %r15d
movq 0x38(%rbp), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
movl $0x0, %eax
je 0x3e161
xorl %eax, %eax
movq 0x18(%rsp), %rsi
movq %rax, 0x8(%rsp)
movzwl (%rsi), %eax
testb %al, %al
jle 0x3e4c9
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 0x3e4b7
cmpq 0x22b94(%rip), %rcx     # 0x60f90
je 0x3e4b7
cmpl $0x2, 0x4(%rcx)
jne 0x3e53e
movq 0x18(%rcx), %rbp
cmpq %rdi, 0x8(%rbp)
je 0x3e48b
movq %rdi, 0x20(%rsp)
movq %rbp, %rdi
callq 0x12516
movq 0x10(%rbp), %rdi
leaq 0xe100(%rip), %rsi      # 0x4c52e
movq %rax, %rdx
xorl %eax, %eax
callq 0x11a38
movq 0x20(%rsp), %rdi
callq 0x12271
movq 0x10(%rbp), %rdi
leaq 0x61cf(%rip), %rsi      # 0x4461c
movq %rax, %rdx
xorl %eax, %eax
callq 0x11744
movq 0x8(%rbp), %rdi
callq 0x12271
movq 0x10(%rbp), %rdi
leaq 0x61c1(%rip), %rsi      # 0x4462c
movq %rax, %rdx
xorl %eax, %eax
callq 0x11744
movq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
testq %rdi, %rdi
je 0x3e4a4
movsbl (%rbx), %eax
cmpl %eax, %r15d
jl 0x3e4a8
movq 0x10(%rbx), %rbx
xorl %r15d, %r15d
cmpq %r13, %rbx
jne 0x3e490
xorl %edi, %edi
jmp 0x3e4b7
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 0x3e3d7
movq 0x10(%rsi), %rsi
cmpq 0x18(%rsp), %rsi
leaq 0xde57(%rip), %r14      # 0x4c330
movq 0x8(%rsp), %rax
jne 0x3e3bf
jmp 0x3e161
movq 0x10(%rdx), %rdx
movq 0x40(%rsp), %rax
cmpq %rax, %rdx
jne 0x3e0f4
movq 0x38(%rsp), %rdi
incq %rdi
movq 0x30(%rsp), %rdx
movl (%rdx), %eax
movsbq %al, %rcx
cmpq %rcx, %rdi
jl 0x3e0c2
movq 0x10(%rdx), %rdx
movq 0x28(%rsp), %rax
cmpq %rax, %rdx
jne 0x3e0b0
testl %esi, %esi
jne 0x3e55d
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdfa3(%rip), %rdi      # 0x4c4e8
leaq 0xdfb4(%rip), %rsi      # 0x4c500
leaq 0xdfb2(%rip), %rcx      # 0x4c505
movl $0x30, %edx
callq 0xe120
callq 0xe060