// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_lts.c
// Function: zero_test
int
zero_test(treenode *ex)	/* true if condition ex is a simple comparison against 0 */
{
	if (!ex) return 0;

	if (ex->hdr.type == TN_IDENT)
		return 1;	/* s */

	if (ex->hdr.type != TN_EXPR
	||  ex->hdr.tok == AND
	||  ex->hdr.tok == OR)
		return 0;

	if (ex->hdr.tok == NOT
	&&  ex->lnode == ZT)
	{	if (ex->rnode->hdr.type == TN_IDENT)
			return 1;	/* !s */

		if (ex->rnode->hdr.type == TN_EXPR
		&&  ex->rnode->hdr.tok == NOT_EQ
		&&  ex->rnode->lnode
		&&  ex->rnode->lnode->hdr.type == TN_IDENT
		&&  is_zero_val(ex->rnode->rnode))
			return 1;	/* !(s != 0) */

		if (ex->rnode->hdr.type == TN_EXPR
		&&  ex->rnode->hdr.tok == EQUAL
		&&  ex->rnode->lnode
		&&  ex->rnode->lnode->hdr.type == TN_IDENT
		&&  is_zero_val(ex->rnode->rnode))
			return 1;	/* !(s == 0) */
	} else {
		if ((ex->hdr.tok == EQUAL || ex->hdr.tok == NOT_EQ)
		&&  ex->lnode
		&&  ex->lnode->hdr.type == TN_IDENT
		&&  is_zero_val(ex->rnode))
			return 1;	/* (s == 0) or (s != 0) */
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x2079f
movl $0x0, -0x4(%rbp)
jmp 0x20939
movq -0x10(%rbp), %rax
cmpl $0x2d, 0x1c(%rax)
jne 0x207b5
movl $0x1, -0x4(%rbp)
jmp 0x20939
movq -0x10(%rbp), %rax
cmpl $0x28, 0x1c(%rax)
jne 0x207d9
movq -0x10(%rbp), %rax
cmpl $0x151, 0x18(%rax)      # imm = 0x151
je 0x207d9
movq -0x10(%rbp), %rax
cmpl $0x150, 0x18(%rax)      # imm = 0x150
jne 0x207e5
movl $0x0, -0x4(%rbp)
jmp 0x20939
movq -0x10(%rbp), %rax
cmpl $0x162, 0x18(%rax)      # imm = 0x162
jne 0x208e2
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x208e2
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpl $0x2d, 0x1c(%rax)
jne 0x2081f
movl $0x1, -0x4(%rbp)
jmp 0x20939
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpl $0x28, 0x1c(%rax)
jne 0x20881
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpl $0x13a, 0x18(%rax)      # imm = 0x13A
jne 0x20881
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x40(%rax)
je 0x20881
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x40(%rax), %rax
cmpl $0x2d, 0x1c(%rax)
jne 0x20881
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x48(%rax), %rdi
callq 0x20950
cmpl $0x0, %eax
je 0x20881
movl $0x1, -0x4(%rbp)
jmp 0x20939
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpl $0x28, 0x1c(%rax)
jne 0x208e0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpl $0x137, 0x18(%rax)      # imm = 0x137
jne 0x208e0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x40(%rax)
je 0x208e0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x40(%rax), %rax
cmpl $0x2d, 0x1c(%rax)
jne 0x208e0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x48(%rax), %rdi
callq 0x20950
cmpl $0x0, %eax
je 0x208e0
movl $0x1, -0x4(%rbp)
jmp 0x20939
jmp 0x20932
movq -0x10(%rbp), %rax
cmpl $0x137, 0x18(%rax)      # imm = 0x137
je 0x208fc
movq -0x10(%rbp), %rax
cmpl $0x13a, 0x18(%rax)      # imm = 0x13A
jne 0x20930
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x20930
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpl $0x2d, 0x1c(%rax)
jne 0x20930
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x20950
cmpl $0x0, %eax
je 0x20930
movl $0x1, -0x4(%rbp)
jmp 0x20939
jmp 0x20932
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)