// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/frontend/irgen.c
// Function: ir_cond_expr_with_rstr
static void _ir_cond_expr_with_rstr(
	IRGeneratorContext *ctx,
	ResizableString *rstr,
	ResizableString *cond_expr_label,
	_ExprResult *expr_result,
	ParserASTNode *expr_node
) {
	assert(ctx);
	assert(rstr);
	assert(cond_expr_label);
	assert(expr_result);
	assert(expr_node);

	ParserASTNode *node_type = FE_EXPR_AST_NODE_GET_TYPE_NODE(expr_node);

	ResizableString rstr_type;
	rstr_init(&rstr_type);
	_ir_type(ctx, &rstr_type, node_type);

	ResizableString rstr_tmp;
	rstr_init(&rstr_tmp);
	_generate_func_tmp_var(
		ctx,
		ctx->func_symbol,
		&rstr_tmp,
		FE_SEM_NODE_TYPE_INT64
	);

	rstr_appendf(
		rstr,
		"neq %s, %s, cast<%s>(0);\n",
		RSTR_CSTR(&rstr_tmp),
		RSTR_CSTR(&(expr_result->rstr_result)),
		RSTR_CSTR(&rstr_type)
	);

	rstr_append_with_cstr(cond_expr_label, RSTR_CSTR(&rstr_tmp));

	rstr_free(&rstr_type);
	rstr_free(&rstr_tmp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1d758
jmp 0x1d777
leaq 0x5edf7(%rip), %rdi     # 0x7c556
leaq 0x56c2e(%rip), %rsi     # 0x74394
movl $0xb9d, %edx            # imm = 0xB9D
leaq 0x5863f(%rip), %rcx     # 0x75db1
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x1d780
jmp 0x1d79f
leaq 0x55387(%rip), %rdi     # 0x72b0e
leaq 0x56c06(%rip), %rsi     # 0x74394
movl $0xb9e, %edx            # imm = 0xB9E
leaq 0x58617(%rip), %rcx     # 0x75db1
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x1d7a8
jmp 0x1d7c7
leaq 0x5867b(%rip), %rdi     # 0x75e2a
leaq 0x56bde(%rip), %rsi     # 0x74394
movl $0xb9f, %edx            # imm = 0xB9F
leaq 0x585ef(%rip), %rcx     # 0x75db1
callq 0x30a0
cmpq $0x0, -0x20(%rbp)
je 0x1d7d0
jmp 0x1d7ef
leaq 0x5743c(%rip), %rdi     # 0x74c13
leaq 0x56bb6(%rip), %rsi     # 0x74394
movl $0xba0, %edx            # imm = 0xBA0
leaq 0x585c7(%rip), %rcx     # 0x75db1
callq 0x30a0
cmpq $0x0, -0x28(%rbp)
je 0x1d7f8
jmp 0x1d817
leaq 0x5863b(%rip), %rdi     # 0x75e3a
leaq 0x56b8e(%rip), %rsi     # 0x74394
movl $0xba1, %edx            # imm = 0xBA1
leaq 0x5859f(%rip), %rcx     # 0x75db1
callq 0x30a0
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x30(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq -0x40(%rbp), %rsi
callq 0x10ca0
leaq -0x50(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rsi
leaq -0x50(%rbp), %rdx
leaq 0x700c3(%rip), %rcx     # 0x8d920
callq 0x1ab00
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x1d87e
leaq 0x5a03d(%rip), %rax     # 0x778b5
movq %rax, -0x60(%rbp)
jmp 0x1d886
movq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1d8a6
leaq 0x5a015(%rip), %rax     # 0x778b5
movq %rax, -0x70(%rbp)
jmp 0x1d8b2
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1d8ce
leaq 0x59fed(%rip), %rax     # 0x778b5
movq %rax, -0x80(%rbp)
jmp 0x1d8d6
movq -0x38(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rcx
movq -0x68(%rbp), %rdx
movq -0x58(%rbp), %rdi
movq -0x80(%rbp), %r8
leaq 0x58557(%rip), %rsi     # 0x75e44
movb $0x0, %al
callq 0x94d0
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x1d916
leaq 0x59fa8(%rip), %rax     # 0x778b5
movq %rax, -0x90(%rbp)
jmp 0x1d921
movq -0x48(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x8d70
leaq -0x40(%rbp), %rdi
callq 0x9310
leaq -0x50(%rbp), %rdi
callq 0x9310
addq $0x90, %rsp
popq %rbp
retq
nop