// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/frontend/irgen_c.c
// Function: ir_stat_if
static void _ir_stat_if(
	IRGeneratorCContext *ctx,
	int indentLevel,
	ParserASTNode *node_if
) {
	assert(ctx);
	assert(node_if);
	assert(node_if->type == FE_NODE_STAT_IF);

	_OUT_INDENT(ctx, indentLevel);
	_OUT_CSTR(ctx, "if (");
	ResizableString rstr_if_expr;
	rstr_init(&rstr_if_expr);
	_ir_expr_wrapper(ctx, &rstr_if_expr, node_if->childs[0]);
	_OUT_STR(ctx, rstr_if_expr.buffer, rstr_if_expr.len);
	rstr_free(&rstr_if_expr);
	_OUT_CSTR(ctx, ")\n");
	_ir_stats_block(ctx, indentLevel, node_if->childs[1]);

	for (int i = 2; i < node_if->nchilds; i++) {
		ParserASTNode *node = node_if->childs[i];
		if (node->type == FE_NODE_STAT_ELIF) {
			_OUT_INDENT(ctx, indentLevel);
			_OUT_CSTR(ctx, "else if (");
			ResizableString rstr_elif_expr;
			rstr_init(&rstr_elif_expr);
			_ir_expr_wrapper(ctx, &rstr_elif_expr, node->childs[0]);
			_OUT_STR(ctx, rstr_elif_expr.buffer, rstr_elif_expr.len);
			rstr_free(&rstr_elif_expr);
			_OUT_CSTR(ctx, ")\n");
			_ir_stats_block(ctx, indentLevel, node->childs[1]);
		} else if (node->type == FE_NODE_STAT_ELSE) {
			_OUT_INDENT(ctx, indentLevel);
			_OUT_CSTR(ctx, "else\n");
			_ir_stats_block(ctx, indentLevel, node->childs[0]);
		} else {
			assert(0);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x260fc
jmp 0x2611b
leaq 0x56453(%rip), %rdi     # 0x7c556
leaq 0x50cde(%rip), %rsi     # 0x76de8
movl $0x533, %edx            # imm = 0x533
leaq 0x518b2(%rip), %rcx     # 0x779c8
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x26124
jmp 0x26143
leaq 0x50220(%rip), %rdi     # 0x7634b
leaq 0x50cb6(%rip), %rsi     # 0x76de8
movl $0x534, %edx            # imm = 0x534
leaq 0x5188a(%rip), %rcx     # 0x779c8
callq 0x30a0
movq -0x18(%rbp), %rax
cmpl $0xb10, (%rax)          # imm = 0xB10
jne 0x26151
jmp 0x26170
leaq 0x501fb(%rip), %rdi     # 0x76353
leaq 0x50c89(%rip), %rsi     # 0x76de8
movl $0x535, %edx            # imm = 0x535
leaq 0x5185d(%rip), %rcx     # 0x779c8
callq 0x30a0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x25d00
movl $0x0, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
cmpq $0x4, %rax
jae 0x261b4
movslq -0x1c(%rbp), %rcx
leaq 0x51873(%rip), %rax     # 0x77a0b
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x26183
leaq -0x30(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
leaq -0x30(%rbp), %rsi
callq 0x21d00
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x26208
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x261dc
leaq -0x30(%rbp), %rdi
callq 0x9310
movl $0x0, -0x38(%rbp)
movslq -0x38(%rbp), %rax
cmpq $0x2, %rax
jae 0x26249
movslq -0x38(%rbp), %rcx
leaq 0x51f92(%rip), %rax     # 0x781bf
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x26218
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdx
callq 0x25b90
movl $0x2, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x2642c
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpl $0xb11, (%rax)          # imm = 0xB11
jne 0x26392
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x25d00
movl $0x0, -0x4c(%rbp)
movslq -0x4c(%rbp), %rax
cmpq $0x9, %rax
jae 0x262e0
movslq -0x4c(%rbp), %rcx
leaq 0x51742(%rip), %rax     # 0x77a06
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x262af
leaq -0x60(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
leaq -0x60(%rbp), %rsi
callq 0x21d00
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0x26334
movq -0x58(%rbp), %rax
movslq -0x64(%rbp), %rcx
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x26308
leaq -0x60(%rbp), %rdi
callq 0x9310
movl $0x0, -0x68(%rbp)
movslq -0x68(%rbp), %rax
cmpq $0x2, %rax
jae 0x26375
movslq -0x68(%rbp), %rcx
leaq 0x51e66(%rip), %rax     # 0x781bf
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x26344
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x48(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdx
callq 0x25b90
jmp 0x2641c
movq -0x48(%rbp), %rax
cmpl $0xb12, (%rax)          # imm = 0xB12
jne 0x263fb
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x25d00
movl $0x0, -0x6c(%rbp)
movslq -0x6c(%rbp), %rax
cmpq $0x5, %rax
jae 0x263e2
movslq -0x6c(%rbp), %rcx
leaq 0x5164a(%rip), %rax     # 0x77a10
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x263b1
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x48(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
callq 0x25b90
jmp 0x2641a
leaq 0x4c059(%rip), %rdi     # 0x7245b
leaq 0x509df(%rip), %rsi     # 0x76de8
movl $0x552, %edx            # imm = 0x552
leaq 0x515b3(%rip), %rcx     # 0x779c8
callq 0x30a0
jmp 0x2641c
jmp 0x2641e
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x26268
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)