// File: /workspace/github_c_makefile_star2_O1/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 0x2ae68
movq %rbx, %rdi
callq 0x1d672
cmpl $0x33, %eax
je 0x2ad2d
movq %rbx, %rdi
callq 0x1d672
addl $-0x12, %eax
cmpl $0x34, %eax
ja 0x2ae3f
btq %rax, %r13
jae 0x2ace9
movq 0x50(%rbx), %rax
movq 0x8(%rax), %rbx
jmp 0x2acae
movl $0x800001, %ecx         # imm = 0x800001
btq %rax, %rcx
jae 0x2adf9
cmpq $0x2, 0x40(%rbx)
jb 0x2ae68
movl $0x1, %r13d
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2ac8d
incq %r13
cmpq 0x40(%rbx), %r13
jb 0x2ad09
jmp 0x2ae68
movq 0x38(%rbx), %r13
leaq 0x36c30(%rip), %rax     # 0x61968
movq (%rax), %rax
movq (%rax,%r13,8), %rax
cmpb $0x0, 0x72(%rax)
jne 0x2ae68
movq 0x18(%r12), %rax
cmpq $0x0, (%rax,%r13,8)
je 0x2ae68
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x1e5d4
movq %rax, %rdi
callq 0x22c44
movl (%rax), %eax
leal -0x15(%rax), %ecx
cmpl $0x4, %ecx
jb 0x2ade5
cmpl $0x1, %eax
je 0x2ade5
movq 0x10(%r12), %rax
movq (%rax,%r13,8), %rax
movq (%rax,%rbp,8), %rax
movq (%r14), %rcx
shlq $0x6, %rcx
cmpq %rax, %rcx
jbe 0x2ada8
movq 0x8(%r14), %rcx
movq %rax, %rdx
shrq $0x6, %rdx
movq (%rcx,%rdx,8), %rcx
btq %rax, %rcx
jb 0x2ade5
movq (%r15), %rcx
shlq $0x6, %rcx
cmpq %rax, %rcx
jbe 0x2ade5
movq 0x8(%r15), %rcx
movq %rax, %rdx
shrq $0x6, %rdx
movq (%rcx,%rdx,8), %rcx
btq %rax, %rcx
jae 0x2ade5
leaq 0x36b80(%rip), %rcx     # 0x61950
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x1d672
cmpl $0x3c, %eax
je 0x2ae77
incq %rbp
movq 0x18(%r12), %rax
cmpq (%rax,%r13,8), %rbp
jb 0x2ad5b
jmp 0x2ae68
cmpq $0x1b, %rax
jne 0x2ae3f
cmpq $0x2, 0x40(%rbx)
jb 0x2ae68
movl $0x1, %r13d
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
callq 0x1d672
cmpl $0x12, %eax
je 0x2ae34
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2ac8d
incq %r13
cmpq 0x40(%rbx), %r13
jb 0x2ae0c
jmp 0x2ae68
cmpq $0x0, 0x40(%rbx)
je 0x2ae68
xorl %r13d, %r13d
movq 0x50(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2ac8d
incq %r13
cmpq 0x40(%rbx), %r13
jb 0x2ae49
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x50(%rbx), %rax
movq (%rax), %rdi
callq 0x1e73b
leaq 0xdd8d(%rip), %rsi      # 0x38c17
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x13aa3
nop