// File: /workspace/github_c_makefile_star2_O3/oridb[P]mc/mi/dfcheck.c
// Function: checkundef
static void
checkundef(Node *n, Reaching *r, Bitset *reach, Bitset *kill)
{
	size_t i, j, did;
	Node *def;
	Type *t;

	if (n->type != Nexpr)
		return;
	if (exprop(n) == Ovar) {
		did = n->expr.did;
		if (decls[did]->decl.isconst)
			return;
		for (j = 0; j < r->ndefs[did]; j++) {
			t = tybase(exprtype(n));
			if (t->type == Tystruct || t->type == Tyunion || t->type == Tyarray ||
				t->type == Tytuple || t->type == Tyvoid)
				continue;
			if (bshas(kill, r->defs[did][j]))
				continue;
			if (!bshas(reach, r->defs[did][j]))
				continue;
			def = nodes[r->defs[did][j]];
			if (exprop(def) == Oundef)
				fatal(n, "%s used before definition", namestr(n->expr.args[0]));
		}
	} else {
		switch (exprop(n)) {
		case Oset:
		case Oasn:
		case Oblit:
			checkundef(n->expr.args[1], r, reach, kill);
			break;
		case Oaddr:
		case Oslice:
			/* these don't actually look at the value of args[0], so they're ok. */
			for (i = 1; i < n->expr.nargs; i++)
				checkundef(n->expr.args[i], r, reach, kill);
			break;
		case Ocall:
			for (i = 1; i < n->expr.nargs; i++)
				if (exprop(n->expr.args[i]) != Oaddr)
					checkundef(n->expr.args[i], r, reach, kill);
			break;
		default:
			for (i = 0; i < n->expr.nargs; i++)
				checkundef(n->expr.args[i], r, reach, kill);
			break;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x8, 0x8(%rdi)
jne 0x2a976
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movabsq $0x10400000000800, %r13 # imm = 0x10400000000800
movq %rbx, %rdi
callq 0x1d422
cmpl $0x33, %eax
je 0x2a83b
movq %rbx, %rdi
callq 0x1d422
addl $-0x12, %eax
cmpl $0x34, %eax
ja 0x2a94d
btq %rax, %r13
jae 0x2a7f7
movq 0x50(%rbx), %rax
movq 0x8(%rax), %rbx
cmpl $0x8, 0x8(%rbx)
je 0x2a7bd
jmp 0x2a976
movl $0x800001, %ecx         # imm = 0x800001
btq %rax, %rcx
jae 0x2a907
cmpq $0x2, 0x40(%rbx)
jb 0x2a976
movl $0x1, %r13d
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2a792
incq %r13
cmpq 0x40(%rbx), %r13
jb 0x2a817
jmp 0x2a976
movq 0x38(%rbx), %r13
leaq 0x37122(%rip), %rax     # 0x61968
movq (%rax), %rax
movq (%rax,%r13,8), %rax
cmpb $0x0, 0x72(%rax)
jne 0x2a976
movq 0x18(%r12), %rax
cmpq $0x0, (%rax,%r13,8)
je 0x2a976
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x1e384
movq %rax, %rdi
callq 0x227ac
movl (%rax), %eax
leal -0x15(%rax), %ecx
cmpl $0x4, %ecx
jb 0x2a8f3
cmpl $0x1, %eax
je 0x2a8f3
movq 0x10(%r12), %rax
movq (%rax,%r13,8), %rax
movq (%rax,%rbp,8), %rax
movq (%r14), %rcx
shlq $0x6, %rcx
cmpq %rax, %rcx
jbe 0x2a8b6
movq 0x8(%r14), %rcx
movq %rax, %rdx
shrq $0x6, %rdx
movq (%rcx,%rdx,8), %rcx
btq %rax, %rcx
jb 0x2a8f3
movq (%r15), %rcx
shlq $0x6, %rcx
cmpq %rax, %rcx
jbe 0x2a8f3
movq 0x8(%r15), %rcx
movq %rax, %rdx
shrq $0x6, %rdx
movq (%rcx,%rdx,8), %rcx
btq %rax, %rcx
jae 0x2a8f3
leaq 0x37072(%rip), %rcx     # 0x61950
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x1d422
cmpl $0x3c, %eax
je 0x2a985
incq %rbp
movq 0x18(%r12), %rax
cmpq (%rax,%r13,8), %rbp
jb 0x2a869
jmp 0x2a976
cmpq $0x1b, %rax
jne 0x2a94d
cmpq $0x2, 0x40(%rbx)
jb 0x2a976
movl $0x1, %r13d
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
callq 0x1d422
cmpl $0x12, %eax
je 0x2a942
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2a792
incq %r13
cmpq 0x40(%rbx), %r13
jb 0x2a91a
jmp 0x2a976
cmpq $0x0, 0x40(%rbx)
je 0x2a976
xorl %r13d, %r13d
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2a792
incq %r13
cmpq 0x40(%rbx), %r13
jb 0x2a957
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x50(%rbx), %rax
movq (%rax), %rdi
callq 0x1e4eb
leaq 0xe24f(%rip), %rsi      # 0x38be7
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x138e7
nopl (%rax)