// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/frontend/irgen_c.c
// Function: ir_stat_for
static void _ir_stat_for(
	IRGeneratorCContext *ctx,
	int indentLevel,
	ParserASTNode *node_stat_for
) {
	assert(ctx);
	assert(node_stat_for);
	assert(node_stat_for->type == FE_NODE_STAT_FOR);
	assert(node_stat_for->nchilds == 4);

	_OUT_INDENT(ctx, indentLevel);
	_OUT_CSTR(ctx, "{\n");

	ParserASTNode *node_stat_for_init = node_stat_for->childs[0];
	assert(node_stat_for_init->type == FE_NODE_STAT_FOR_INIT);
	if (node_stat_for_init->nchilds > 0) {
		_OUT_INDENT(ctx, indentLevel + 1);
		_ir_var(ctx, node_stat_for_init->childs[0]);
	}

	_OUT_INDENT(ctx, indentLevel + 1);
	_OUT_CSTR(ctx, "for (;");

	ParserASTNode *node_stat_for_expr_cond = node_stat_for->childs[1];
	assert(node_stat_for_expr_cond->type == FE_NODE_STAT_FOR_EXPR_COND);
	if (node_stat_for_expr_cond->nchilds > 0) {
		ResizableString rstr_for_expr_cond;
		rstr_init(&rstr_for_expr_cond);
		_ir_expr_wrapper(ctx, &rstr_for_expr_cond, node_stat_for_expr_cond->childs[0]);
		_OUT_STR(ctx, rstr_for_expr_cond.buffer, rstr_for_expr_cond.len);
		rstr_free(&rstr_for_expr_cond);
	}

	_OUT_CSTR(ctx, ";");

	ParserASTNode *node_stat_for_expr = node_stat_for->childs[2];
	assert(node_stat_for_expr->type == FE_NODE_STAT_FOR_EXPR);
	if (node_stat_for_expr->nchilds > 0) {
		ResizableString rstr_for_expr;
		rstr_init(&rstr_for_expr);
		_ir_expr_wrapper(ctx, &rstr_for_expr, node_stat_for_expr->childs[0]);
		_OUT_STR(ctx, rstr_for_expr.buffer, rstr_for_expr.len);
		rstr_free(&rstr_for_expr);
	}

	_OUT_CSTR(ctx, ")\n");

	ParserASTNode *node_stat_for_block = node_stat_for->childs[3];
	_ir_stats_block(ctx, indentLevel + 1, node_stat_for_block);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x267bf
jmp 0x267de
leaq 0x55d90(%rip), %rdi     # 0x7c556
leaq 0x5061b(%rip), %rsi     # 0x76de8
movl $0x586, %edx            # imm = 0x586
leaq 0x512c8(%rip), %rcx     # 0x77aa1
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x267e7
jmp 0x26806
leaq 0x4fca1(%rip), %rdi     # 0x7648f
leaq 0x505f3(%rip), %rsi     # 0x76de8
movl $0x587, %edx            # imm = 0x587
leaq 0x512a0(%rip), %rcx     # 0x77aa1
callq 0x30a0
movq -0x18(%rbp), %rax
cmpl $0xb40, (%rax)          # imm = 0xB40
jne 0x26814
jmp 0x26833
leaq 0x4fc82(%rip), %rdi     # 0x7649d
leaq 0x505c6(%rip), %rsi     # 0x76de8
movl $0x588, %edx            # imm = 0x588
leaq 0x51273(%rip), %rcx     # 0x77aa1
callq 0x30a0
movq -0x18(%rbp), %rax
cmpl $0x4, 0x44(%rax)
jne 0x2683f
jmp 0x2685e
leaq 0x4fc7f(%rip), %rdi     # 0x764c5
leaq 0x5059b(%rip), %rsi     # 0x76de8
movl $0x589, %edx            # imm = 0x589
leaq 0x51248(%rip), %rcx     # 0x77aa1
callq 0x30a0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x25d00
movl $0x0, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
cmpq $0x2, %rax
jae 0x268a2
movslq -0x1c(%rbp), %rcx
leaq 0x5102b(%rip), %rax     # 0x778b1
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 0x26871
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0xb41, (%rax)          # imm = 0xB41
jne 0x268bf
jmp 0x268de
leaq 0x5121a(%rip), %rdi     # 0x77ae0
leaq 0x5051b(%rip), %rsi     # 0x76de8
movl $0x58f, %edx            # imm = 0x58F
leaq 0x511c8(%rip), %rcx     # 0x77aa1
callq 0x30a0
movq -0x28(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jle 0x2690b
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x25d00
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rsi
callq 0x20a40
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x25d00
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq $0x6, %rax
jae 0x26952
movslq -0x2c(%rbp), %rcx
leaq 0x511dc(%rip), %rax     # 0x77b12
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x26921
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0xb42, (%rax)          # imm = 0xB42
jne 0x26970
jmp 0x2698f
leaq 0x511a2(%rip), %rdi     # 0x77b19
leaq 0x5046a(%rip), %rsi     # 0x76de8
movl $0x599, %edx            # imm = 0x599
leaq 0x51117(%rip), %rcx     # 0x77aa1
callq 0x30a0
movq -0x38(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jle 0x269f6
leaq -0x48(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
leaq -0x48(%rbp), %rsi
callq 0x21d00
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x269ed
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
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 0x269c1
leaq -0x48(%rbp), %rdi
callq 0x9310
movl $0x0, -0x50(%rbp)
movslq -0x50(%rbp), %rax
cmpq $0x1, %rax
jae 0x26a2e
movslq -0x50(%rbp), %rcx
leaq 0x51105(%rip), %rax     # 0x77b17
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x269fd
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpl $0xb43, (%rax)          # imm = 0xB43
jne 0x26a4c
jmp 0x26a6b
leaq 0x51102(%rip), %rdi     # 0x77b55
leaq 0x5038e(%rip), %rsi     # 0x76de8
movl $0x5a5, %edx            # imm = 0x5A5
leaq 0x5103b(%rip), %rcx     # 0x77aa1
callq 0x30a0
movq -0x58(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jle 0x26ad2
leaq -0x68(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
leaq -0x68(%rbp), %rsi
callq 0x21d00
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0x26ac9
movq -0x60(%rbp), %rax
movslq -0x6c(%rbp), %rcx
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 0x26a9d
leaq -0x68(%rbp), %rdi
callq 0x9310
movl $0x0, -0x70(%rbp)
movslq -0x70(%rbp), %rax
cmpq $0x2, %rax
jae 0x26b0a
movslq -0x70(%rbp), %rcx
leaq 0x516d1(%rip), %rax     # 0x781bf
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x26ad9
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
movq -0x78(%rbp), %rdx
callq 0x25b90
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x25d00
movl $0x0, -0x7c(%rbp)
movslq -0x7c(%rbp), %rax
cmpq $0x2, %rax
jae 0x26b71
movslq -0x7c(%rbp), %rcx
leaq 0x51622(%rip), %rax     # 0x78177
movsbl (%rax,%rcx), %edi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x30d0
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x26b40
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)