// File: /workspace/github_c_makefile_star2_O2/chgzm[P]minic/generator.c
// Function: process_relational_expr
static void process_relational_expr(const RelationalExprNode* node) {
    switch (node->cmp_type) {
    // <shift-expression>
    case CMP_NONE: {
        process_shift_expr(node->shift_expr_node);
        break;
    }
    // <relational-expression> <  <shift-expression>
    case CMP_LT: {
        process_relational_expr(node->relational_expr_node);
        process_shift_expr(node->shift_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  cmp rax, rdi\n");
        printf("  setl al\n");
        printf("  movzb rax, al\n");
        printf("  push rax\n");

        break;
    }
    // <relational-expression> >  <shift-expression>
    case CMP_GT: {
        process_relational_expr(node->relational_expr_node);
        process_shift_expr(node->shift_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  cmp rax, rdi\n");
        printf("  setg al\n");
        printf("  movzb rax, al\n");
        printf("  push rax\n");

        break;
    }
    // <relational-expression> <= <shift-expression>
    case CMP_LE: {
        process_relational_expr(node->relational_expr_node);
        process_shift_expr(node->shift_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  cmp rax, rdi\n");
        printf("  setle al\n");
        printf("  movzb rax, al\n");
        printf("  push rax\n");

        break;
    }
    // <relational-expression> >= <shift-expression>
    case CMP_GE: {
        process_relational_expr(node->relational_expr_node);
        process_shift_expr(node->shift_expr_node);

        printf("  pop rdi\n");
        printf("  pop rax\n");
        printf("  cmp rax, rdi\n");
        printf("  setge al\n");
        printf("  movzb rax, al\n");
        printf("  push rax\n");

        break;
    }
    default: {
        break;
    }
    }
}

// Assembly:
pushq %rbx
movl (%rdi), %eax
cmpq $0x6, %rax
ja 0x3b41
movq %rdi, %rbx
leaq 0x59ae(%rip), %rcx      # 0x94dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x3c5e
popq %rbx
retq
movq 0x10(%rbx), %rdi
callq 0x3b1b
movq 0x8(%rbx), %rdi
callq 0x3c5e
leaq 0x5dcf(%rip), %rdi      # 0x992b
callq 0x1070
leaq 0x5de7(%rip), %rdi      # 0x994f
callq 0x1070
leaq 0x5dcc(%rip), %rdi      # 0x9940
callq 0x1070
leaq 0x5c60(%rip), %rdi      # 0x97e0
jmp 0x3c40
movq 0x10(%rbx), %rdi
callq 0x3b1b
movq 0x8(%rbx), %rdi
callq 0x3c5e
leaq 0x5d8d(%rip), %rdi      # 0x992b
callq 0x1070
leaq 0x5da5(%rip), %rdi      # 0x994f
callq 0x1070
leaq 0x5d8a(%rip), %rdi      # 0x9940
callq 0x1070
leaq 0x5c28(%rip), %rdi      # 0x97ea
jmp 0x3c40
movq 0x10(%rbx), %rdi
callq 0x3b1b
movq 0x8(%rbx), %rdi
callq 0x3c5e
leaq 0x5d4e(%rip), %rdi      # 0x992b
callq 0x1070
leaq 0x5d66(%rip), %rdi      # 0x994f
callq 0x1070
leaq 0x5d4b(%rip), %rdi      # 0x9940
callq 0x1070
leaq 0x5bd4(%rip), %rdi      # 0x97d5
jmp 0x3c40
movq 0x10(%rbx), %rdi
callq 0x3b1b
movq 0x8(%rbx), %rdi
callq 0x3c5e
leaq 0x5d0f(%rip), %rdi      # 0x992b
callq 0x1070
leaq 0x5d27(%rip), %rdi      # 0x994f
callq 0x1070
leaq 0x5d0c(%rip), %rdi      # 0x9940
callq 0x1070
leaq 0x5b8a(%rip), %rdi      # 0x97ca
callq 0x1070
leaq 0x5bed(%rip), %rdi      # 0x9839
callq 0x1070
leaq 0x5cdd(%rip), %rdi      # 0x9935
popq %rbx
jmp 0x1070