// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/frontend/irgen_c.c
// Function: ir_stat_return
static void _ir_stat_return(
	IRGeneratorCContext *ctx,
	int indentLevel,
	ParserASTNode *node_stat_return
) {
	assert(ctx);
	assert(node_stat_return);
	assert(node_stat_return->type == FE_NODE_STAT_RETURN);
	assert(node_stat_return->nchilds == 0 || node_stat_return->nchilds == 1);

	_OUT_INDENT(ctx, indentLevel);

	int nchilds = node_stat_return->nchilds;
	if (nchilds == 0) {
		_OUT_CSTR(ctx, "return");
	} else if (nchilds == 1) {
		_OUT_CSTR(ctx, "return ");
		ResizableString rstr_expr;
		rstr_init(&rstr_expr);
		_ir_expr_wrapper(ctx, &rstr_expr, node_stat_return->childs[0]);
		_OUT_STR(ctx, rstr_expr.buffer, rstr_expr.len);
		rstr_free(&rstr_expr);
	} else {
		assert(0);
	}

	_OUT_CSTR(ctx, ";\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x26dbc
jmp 0x26ddb
leaq 0x55793(%rip), %rdi     # 0x7c556
leaq 0x5001e(%rip), %rsi     # 0x76de8
movl $0x5d8, %edx            # imm = 0x5D8
leaq 0x50e49(%rip), %rcx     # 0x77c1f
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x26de4
jmp 0x26e03
leaq 0x4fa37(%rip), %rdi     # 0x76822
leaq 0x4fff6(%rip), %rsi     # 0x76de8
movl $0x5d9, %edx            # imm = 0x5D9
leaq 0x50e21(%rip), %rcx     # 0x77c1f
callq 0x30a0
movq -0x18(%rbp), %rax
cmpl $0xb70, (%rax)          # imm = 0xB70
jne 0x26e11
jmp 0x26e30
leaq 0x4fa1b(%rip), %rdi     # 0x76833
leaq 0x4ffc9(%rip), %rsi     # 0x76de8
movl $0x5da, %edx            # imm = 0x5DA
leaq 0x50df4(%rip), %rcx     # 0x77c1f
callq 0x30a0
movq -0x18(%rbp), %rax
cmpl $0x0, 0x44(%rax)
je 0x26e44
movq -0x18(%rbp), %rax
cmpl $0x1, 0x44(%rax)
jne 0x26e46
jmp 0x26e65
leaq 0x4fa14(%rip), %rdi     # 0x76861
leaq 0x4ff94(%rip), %rsi     # 0x76de8
movl $0x5db, %edx            # imm = 0x5DB
leaq 0x50dbf(%rip), %rcx     # 0x77c1f
callq 0x30a0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x25d00
movq -0x18(%rbp), %rax
movl 0x44(%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x26ebe
movl $0x0, -0x20(%rbp)
movslq -0x20(%rbp), %rax
cmpq $0x6, %rax
jae 0x26eb9
movslq -0x20(%rbp), %rcx
leaq 0x4f98f(%rip), %rax     # 0x7682c
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x26e88
jmp 0x26f80
cmpl $0x1, -0x1c(%rbp)
jne 0x26f5f
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
cmpq $0x7, %rax
jae 0x26f00
movslq -0x24(%rbp), %rcx
leaq 0x50d7d(%rip), %rax     # 0x77c61
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x26ecf
leaq -0x38(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
leaq -0x38(%rbp), %rsi
callq 0x21d00
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x26f54
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x26f28
leaq -0x38(%rbp), %rdi
callq 0x9310
jmp 0x26f7e
leaq 0x4b4f5(%rip), %rdi     # 0x7245b
leaq 0x4fe7b(%rip), %rsi     # 0x76de8
movl $0x5ea, %edx            # imm = 0x5EA
leaq 0x50ca6(%rip), %rcx     # 0x77c1f
callq 0x30a0
jmp 0x26f80
movl $0x0, -0x40(%rbp)
movslq -0x40(%rbp), %rax
cmpq $0x2, %rax
jae 0x26fb8
movslq -0x40(%rbp), %rcx
leaq 0x4fbc2(%rip), %rax     # 0x76b5e
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x26f87
addq $0x40, %rsp
popq %rbp
retq
nop