// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_che_s_trans_control_if
er_t xoico_che_s_trans_control_if( xoico_che_s* o, x_source* source, xoico_che_result* result )
{
    // xoico_che_control.x:248:1
    
    BLM_TRY(xoico_che_s_trans(o,source, "if", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    BLM_TRY(xoico_che_s_trans(o,source, "(", result ))
    BLM_TRY(xoico_che_s_trans_expression(o,source, result, NULL )) // def
    BLM_TRY(xoico_che_s_trans(o,source, ")", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    if( x_source_parse_bl(source,"#=?'{'" ) )
    {
        BLM_TRY(xoico_che_s_trans_block(o,source, result, false ))
    }
    else
    {
        BLM_TRY(xoico_che_s_trans_statement_as_block(o,source, result, false ))
    }
    return  0;
}

er_t xoico_che_s_trans_control_while( xoico_che_s* o, x_source* source, xoico_che_result* result )
{
    // xoico_che_control.x:269:1
    
    BLM_TRY(xoico_che_s_trans(o,source, "while", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    BLM_TRY(xoico_che_s_trans(o,source, "(", result ))
    BLM_TRY(xoico_che_s_trans_expression(o,source, result, NULL )) // def
    BLM_TRY(xoico_che_s_trans(o,source, ")", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    if( x_source_parse_bl(source,"#=?'{'" ) )
    {
        BLM_TRY(xoico_che_s_trans_block(o,source, result, true ))
    }
    else
    {
        BLM_TRY(xoico_che_s_trans_statement_as_block(o,source, result, true ))
    }
    return  0;
}

er_t xoico_che_s_trans_control_do( xoico_che_s* o, x_source* source, xoico_che_result* result )
{
    // xoico_che_control.x:290:1
    
    BLM_TRY(xoico_che_s_trans(o,source, "do", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    if( x_source_parse_bl(source,"#=?'{'" ) )
    {
        BLM_TRY(xoico_che_s_trans_block(o,source, result, true ))
    }
    else
    {
        BLM_TRY(xoico_che_s_trans_statement_as_block(o,source, result, true ))
    }
    BLM_TRY(xoico_che_s_trans(o,source, "while", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    BLM_TRY(xoico_che_s_trans(o,source, "(", result ))
    BLM_TRY(xoico_che_s_trans_expression(o,source, result, NULL )) // def
    BLM_TRY(xoico_che_s_trans(o,source, ")", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    BLM_TRY(xoico_che_s_trans(o,source, ";", result ))
    return  0;
}

er_t xoico_che_s_trans_control_else( xoico_che_s* o, x_source* source, xoico_che_result* result )
{
    // xoico_che_control.x:314:1
    
    BLM_TRY(xoico_che_s_trans(o,source, "else", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    if( x_source_parse_bl(source,"#=?'{'" ) )
    {
        BLM_TRY(xoico_che_s_trans_block(o,source, result, false ))
    }
    else
    {
        BLM_TRY(xoico_che_s_trans_statement_as_block(o,source, result, false ))
    }
    return  0;
}

er_t xoico_che_s_trans_control_switch( xoico_che_s* o, x_source* source, xoico_che_result* result )
{
    // xoico_che_control.x:331:1
    
    BLM_TRY(xoico_che_s_trans(o,source, "switch", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    BLM_TRY(xoico_che_s_trans(o,source, "(", result ))
    BLM_TRY(xoico_che_s_trans_expression(o,source, result, NULL )) // def
    BLM_TRY(xoico_che_s_trans(o,source, ")", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    BLM_TRY(xoico_che_s_trans_block(o,source, result, true ))
    return  0;
}

er_t xoico_che_s_trans_control_case( xoico_che_s* o, x_source* source, xoico_che_result* result )
{
    // xoico_che_control.x:345:1
    
    BLM_TRY(xoico_che_s_trans(o,source, "case", result ))
    BLM_TRY(xoico_che_s_trans_expression(o,source, result, NULL ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    BLM_TRY(xoico_che_s_trans(o,source, ":", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    BLM_TRY(xoico_che_s_trans_statement_as_block(o,source, result, false ))
    return  0;
}

er_t xoico_che_s_trans_control_default( xoico_che_s* o, x_source* source, xoico_che_result* result )
{
    // xoico_che_control.x:358:1
    
    BLM_TRY(xoico_che_s_trans(o,source, "default", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    BLM_TRY(xoico_che_s_trans(o,source, ":", result ))
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    BLM_TRY(xoico_che_s_trans_statement_as_block(o,source, result, false ))
    return  0;
}

er_t xoico_che_s_trans_control_break( xoico_che_s* o, x_source* source, xoico_che_result* result )
{
    // xoico_che_control.x:370:1
    
    BLM_TRY(x_source_parse_fa(source,"break ;" ))
    
    sz_t ledge_level = -1;
    bl_t use_blm = false;
    
    for(sz_t i = o->stack_block.adl.size - 1; i >= 0; i-- )
    {
        const xoico_che_stack_block_unit_s* unit = o->stack_block.adl.data[ i ];
        use_blm = use_blm || unit->use_blm;
        if( unit->break_ledge )
        {
            ledge_level = unit->level;
            break;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
leaq 0x103851(%rip), %rdx    # 0x137d4b
callq 0x23280
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x3452e
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x17de17(%rip), %rax    # 0x1b2330
movq (%rax), %rdi
callq 0xc0720
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3473e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23fd0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x3456e
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x17ddd7(%rip), %rax    # 0x1b2330
movq (%rax), %rdi
callq 0xc0720
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3473e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
leaq 0xff2c5(%rip), %rdx     # 0x133846
callq 0x23280
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x345b5
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0x17dd90(%rip), %rax    # 0x1b2330
movq (%rax), %rdi
callq 0xc0720
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3473e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x27f50
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x345f9
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0x17dd4c(%rip), %rax    # 0x1b2330
movq (%rax), %rdi
callq 0xc0720
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3473e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
leaq 0x120d3f(%rip), %rdx    # 0x15534b
callq 0x23280
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x34640
movq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0x17dd05(%rip), %rax    # 0x1b2330
movq (%rax), %rdi
callq 0xc0720
movq -0x70(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3473e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23fd0
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0x34680
movq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq 0x17dcc5(%rip), %rax    # 0x1b2330
movq (%rax), %rdi
callq 0xc0720
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3473e
movq -0x18(%rbp), %rdi
leaq 0xff299(%rip), %rsi     # 0x133924
callq 0x6700
testb $0x1, %al
jne 0x34696
jmp 0x346e6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %ecx, %ecx
callq 0x2ae00
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x346e4
movq -0x88(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x17dc61(%rip), %rax    # 0x1b2330
movq (%rax), %rdi
callq 0xc0720
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3473e
jmp 0x34736
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %ecx, %ecx
callq 0x2c560
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0x34734
movq -0x98(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq 0x17dc11(%rip), %rax    # 0x1b2330
movq (%rax), %rdi
callq 0xc0720
movq -0xa0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3473e
jmp 0x34736
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)