// File: /workspace/github_c_makefile_star2_O1/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 0x3a4e
movq %rdi, %rbx
leaq 0x6aa6(%rip), %rcx      # 0xa4dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rbx), %rax
cmpq $0x0, 0x8(%rax)
je 0x3b96
popq %rbx
retq
movq 0x10(%rbx), %rdi
callq 0x3a23
movq 0x8(%rbx), %rax
cmpq $0x0, 0x8(%rax)
jne 0x3a6c
movq (%rax), %rdi
callq 0x3b9c
leaq 0x6eb8(%rip), %rdi      # 0xa92b
callq 0x1070
leaq 0x6ed0(%rip), %rdi      # 0xa94f
callq 0x1070
leaq 0x6eb5(%rip), %rdi      # 0xa940
callq 0x1070
leaq 0x6d49(%rip), %rdi      # 0xa7e0
jmp 0x3b78
movq 0x10(%rbx), %rdi
callq 0x3a23
movq 0x8(%rbx), %rax
cmpq $0x0, 0x8(%rax)
jne 0x3ab8
movq (%rax), %rdi
callq 0x3b9c
leaq 0x6e6c(%rip), %rdi      # 0xa92b
callq 0x1070
leaq 0x6e84(%rip), %rdi      # 0xa94f
callq 0x1070
leaq 0x6e69(%rip), %rdi      # 0xa940
callq 0x1070
leaq 0x6d07(%rip), %rdi      # 0xa7ea
jmp 0x3b78
movq 0x10(%rbx), %rdi
callq 0x3a23
movq 0x8(%rbx), %rax
cmpq $0x0, 0x8(%rax)
jne 0x3b04
movq (%rax), %rdi
callq 0x3b9c
leaq 0x6e20(%rip), %rdi      # 0xa92b
callq 0x1070
leaq 0x6e38(%rip), %rdi      # 0xa94f
callq 0x1070
leaq 0x6e1d(%rip), %rdi      # 0xa940
callq 0x1070
leaq 0x6ca6(%rip), %rdi      # 0xa7d5
jmp 0x3b78
movq 0x10(%rbx), %rdi
callq 0x3a23
movq 0x8(%rbx), %rax
cmpq $0x0, 0x8(%rax)
jne 0x3b4d
movq (%rax), %rdi
callq 0x3b9c
leaq 0x6dd7(%rip), %rdi      # 0xa92b
callq 0x1070
leaq 0x6def(%rip), %rdi      # 0xa94f
callq 0x1070
leaq 0x6dd4(%rip), %rdi      # 0xa940
callq 0x1070
leaq 0x6c52(%rip), %rdi      # 0xa7ca
callq 0x1070
leaq 0x6cb5(%rip), %rdi      # 0xa839
callq 0x1070
leaq 0x6da5(%rip), %rdi      # 0xa935
popq %rbx
jmp 0x1070
movq (%rax), %rdi
popq %rbx
jmp 0x3b9c