// File: /workspace/github_c_makefile_star2_O2/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
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movabsq $0x10400000000800, %r13 # imm = 0x10400000000800
cmpl $0x8, 0x8(%rbx)
jne 0x276c8
movq %rbx, %rdi
callq 0x1b5e6
cmpl $0x33, %eax
je 0x276b0
movq %rbx, %rdi
callq 0x1b5e6
addl $-0x12, %eax
cmpl $0x34, %eax
ja 0x277b5
btq %rax, %r13
jae 0x27680
movq 0x50(%rbx), %rax
movq 0x8(%rax), %rbx
jmp 0x27649
movl $0x800001, %ecx         # imm = 0x800001
btq %rax, %rcx
jae 0x276d7
pushq $0x1
popq %r13
cmpq 0x40(%rbx), %r13
jae 0x276c8
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x27628
incq %r13
jmp 0x2768f
movq 0x38(%rbx), %rbp
leaq 0x372ad(%rip), %rax     # 0x5e968
movq (%rax), %rax
movq (%rax,%rbp,8), %rax
cmpb $0x0, 0x72(%rax)
je 0x27718
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x1b, %rax
jne 0x277b5
pushq $0x1
popq %r13
cmpq 0x40(%rbx), %r13
jae 0x276c8
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
callq 0x1b5e6
cmpl $0x12, %eax
je 0x27713
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x27628
incq %r13
jmp 0x276e5
xorl %r13d, %r13d
movq 0x18(%r12), %rax
cmpq (%rax,%rbp,8), %r13
jae 0x276c8
movq %rbx, %rdi
callq 0x1bf90
movq %rax, %rdi
callq 0x1fcd8
movl (%rax), %eax
cmpl $0x18, %eax
ja 0x2774c
movl $0x1e00002, %ecx        # imm = 0x1E00002
btl %eax, %ecx
jae 0x2774c
incq %r13
jmp 0x2771b
movq 0x10(%r12), %rax
movq (%rax,%rbp,8), %rax
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
movq %rsi, (%rsp)
callq 0x277dd
testl %eax, %eax
jne 0x27747
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x277dd
testl %eax, %eax
je 0x27747
leaq 0x371d0(%rip), %rax     # 0x5e950
movq (%rax), %rax
movq (%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1b5e6
cmpl $0x3c, %eax
jne 0x27747
movq 0x50(%rbx), %rax
movq (%rax), %rdi
callq 0x1c0c8
leaq 0xd45f(%rip), %rsi      # 0x34c07
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x120fd
xorl %r13d, %r13d
cmpq 0x40(%rbx), %r13
jae 0x276c8
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x27628
incq %r13
jmp 0x277b8