// File: /workspace/github_c_makefile_star2_O0/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: is_falsey
static inline int _is_falsey(const greshunkel_tuple *tuple) {
	const int is_string = tuple->type == GSHKL_STR ? 1 : 0;
	const int is_loop = tuple->type == GSHKL_ARR ? 1 : 0;
	const int is_subcontext = tuple->type == GSHKL_SUBCTEXT ? 1 : 0;

	int is_null = 0;
	if (is_string) {
		is_null = strnlen(tuple->value.str, MAX_GSHKL_STR_SIZE) == 0 ? 1 : 0;
	} else if (is_loop) {
		is_null = tuple->value.arr == NULL;
	} else if (is_subcontext) {
		is_null = 0;
	}
	if (!is_null) {
		if (is_string) {
			const int says_false = strncmp(tuple->value.str, "FALSE", strlen("FALSE")) == 0 ? 1 : 0;
			m38_log_msg(LOG_DEBUG, "_is_falsey: is_string SF: %i", says_false);
			return says_false;
		} else if (is_loop) {
			const int has_items = tuple->value.arr->count > 0;
			m38_log_msg(LOG_DEBUG, "_is_falsey: s_string is_loop has_items: %i", !has_items);
			return !has_items;
		}
		m38_log_msg(LOG_DEBUG, "_is_falsey: !is_null is_subcontext: %i", !is_subcontext);
		return !is_subcontext;
	}

	m38_log_msg(LOG_DEBUG, "_is_falsey: return 0");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x2, %edx
cmovel %ecx, %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x4b26
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x1120
movq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovel %ecx, %eax
movl %eax, -0x20(%rbp)
jmp 0x4b53
cmpl $0x0, -0x18(%rbp)
je 0x4b42
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
jmp 0x4b51
cmpl $0x0, -0x1c(%rbp)
je 0x4b4f
movl $0x0, -0x20(%rbp)
jmp 0x4b51
jmp 0x4b53
cmpl $0x0, -0x20(%rbp)
jne 0x4c37
cmpl $0x0, -0x14(%rbp)
je 0x4baf
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
leaq 0x24ac(%rip), %rsi      # 0x701e
movl $0x5, %edx
callq 0x1060
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
movl $0x1, %edi
leaq 0x3e0c(%rip), %rsi      # 0x89a9
movb $0x0, %al
callq 0x5a60
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4c51
cmpl $0x0, -0x18(%rbp)
je 0x4c01
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x10(%rax)
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %edx
movl $0x1, %edi
leaq 0x3ddf(%rip), %rsi      # 0x89c6
movb $0x0, %al
callq 0x5a60
cmpl $0x0, -0x28(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x4c51
jmp 0x4c03
cmpl $0x0, -0x1c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %edx
movl $0x1, %edi
leaq 0x3dd4(%rip), %rsi      # 0x89f1
movb $0x0, %al
callq 0x5a60
cmpl $0x0, -0x1c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x4c51
movl $0x1, %edi
leaq 0x3dd5(%rip), %rsi      # 0x8a18
movb $0x0, %al
callq 0x5a60
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)