// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: check_when
static s7_pointer check_when(s7_scheme *sc)
                {
                    s7_pointer form;
                    form = sc->code;
                    set_current_code(sc, form);
                    sc->code = cdr(sc->code);

                    if (!is_pair(sc->code))                                            /* (when) or (when . 1) */
                        eval_error(sc, "when has no expression or body:  ~A", 35, form);
                    if (!is_pair(cdr(sc->code)))                                       /* (when 1) or (when 1 . 1) */
                        eval_error(sc, "when has no body?:  ~A", 22, form);
                    else
                    {
                        if (!s7_is_proper_list(sc, cddr(sc->code)))
                            eval_error(sc, "when: stray dot?", 16, form);
                    }

                    pair_set_syntax_op(form, OP_WHEN_P);
                    if (is_null(cddr(sc->code)))
                        set_if_opts(sc, form, true, false);
                    else
                    {
                        s7_pointer test;
                        test = car(sc->code);
                        if (is_safe_symbol(test))
                        {
                            pair_set_syntax_op(form, OP_WHEN_S);
                            set_opt2_con(form, cadr(sc->code));
                            set_opt3_pair(form, cddr(sc->code));
                        }
                        else
                        {
                            if (is_fxable(sc, test))
                            {
                                pair_set_syntax_op(form, OP_WHEN_A);
                                if (is_pair(car(sc->code))) set_opt2_pair(form, cdar(sc->code));
                                set_opt3_pair(form, cdr(sc->code));
                                set_c_call(sc->code, fx_choose(sc, sc->code, sc->envir, let_symbol_is_safe)); /* "A" in when_a */
                                if (c_callee(sc->code) == fx_and_2)
                                    pair_set_syntax_op(form, OP_WHEN_AND_2);
                                else
                                {
                                    if (c_callee(sc->code) == fx_and_3)
                                        pair_set_syntax_op(form, OP_WHEN_AND_3);
                                }
                            }
                            else
                            {
                                if ((is_pair(test)) && (car(test) == sc->and_symbol))
                                {
                                    /* an experiment... */
                                    opcode_t new_op;
                                    s7_pointer old_code;
                                    pair_set_syntax_op(test, symbol_syntax_op_checked(test));
                                    old_code = sc->code;
                                    sc->code = test;
                                    check_and(sc);
                                    sc->code = old_code;
                                    new_op = symbol_syntax_op_checked(test);
                                    if (new_op == OP_AND_AP)
                                        pair_set_syntax_op(form, OP_WHEN_AND_AP);
                                }
                            }
                        }
                    }
                    sc->code = cdr(form);
                    push_stack_no_args(sc, OP_WHEN_PP, cdr(sc->code));
                    sc->code = car(sc->code);
                    return(NULL);
                }

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x1480b7
movq 0x78(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x78(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rdi
leaq 0xa8931(%rip), %rsi     # 0x1f09ad
movl $0x23, %edx
callq 0xb880
movq 0x40(%rsp), %rdi
movq %rax, %rsi
movq 0x70(%rsp), %rdx
callq 0xb830
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq %rax, 0x80(%rsp)
jmp 0x148607
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x148137
movq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x78(%rsp), %rdi
leaq 0xa88d5(%rip), %rsi     # 0x1f09d1
movl $0x16, %edx
callq 0xb880
movq 0x28(%rsp), %rdi
movq %rax, %rsi
movq 0x70(%rsp), %rdx
callq 0xb830
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq %rax, 0x80(%rsp)
jmp 0x148607
movq 0x78(%rsp), %rdi
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rsi
callq 0x31a40
testb $0x1, %al
jne 0x1481c1
movq 0x78(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x78(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rdi
leaq 0xa8862(%rip), %rsi     # 0x1f09e8
movl $0x10, %edx
callq 0xb880
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x70(%rsp), %rdx
callq 0xb830
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq %rax, 0x80(%rsp)
jmp 0x148607
jmp 0x1481c3
jmp 0x1481c5
movq 0x70(%rsp), %rax
movw $0x29f, 0x4(%rax)       # imm = 0x29F
movq 0x70(%rsp), %rax
movq (%rax), %rcx
andq $-0x10000, %rcx         # imm = 0xFFFF0000
orq $0x201, %rcx            # imm = 0x201
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x78(%rsp), %rcx
cmpq 0x110(%rcx), %rax
jne 0x148227
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x193530
jmp 0x148585
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x1482d4
movq 0x78(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0xfc80
movzbl (%rax), %eax
cmpl $0x20, %eax
jne 0x1482d4
jmp 0x148262
movq 0x70(%rsp), %rax
movw $0x29d, 0x4(%rax)       # imm = 0x29D
movq 0x70(%rsp), %rax
movq (%rax), %rcx
andq $-0x10000, %rcx         # imm = 0xFFFF0000
orq $0x201, %rcx            # imm = 0x201
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x70(%rsp), %rax
movq (%rax), %rcx
andq $-0x40001, %rcx         # imm = 0xFFFBFFFF
movq %rcx, (%rax)
jmp 0x148583
movq 0x78(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x15cfb0
testb $0x1, %al
jne 0x1482ec
jmp 0x14843e
jmp 0x1482ee
movq 0x70(%rsp), %rax
movw $0x29e, 0x4(%rax)       # imm = 0x29E
movq 0x70(%rsp), %rax
movq (%rax), %rcx
andq $-0x10000, %rcx         # imm = 0xFFFF0000
orq $0x201, %rcx            # imm = 0x201
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x148344
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x20(%rax)
jmp 0x148346
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x70(%rsp), %rax
movq (%rax), %rcx
andq $-0x40001, %rcx         # imm = 0xFFFBFFFF
movq %rcx, (%rax)
jmp 0x14836f
movq 0x78(%rsp), %rdi
movq 0x78(%rsp), %rax
movq (%rax), %rsi
movq 0x78(%rsp), %rax
movq 0x8(%rax), %rdx
leaq -0x4278c(%rip), %rcx    # 0x105c00
callq 0x103260
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x20(%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movzwl 0x6(%rax), %ecx
orl $0x4, %ecx
movw %cx, 0x6(%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
leaq -0x423a2(%rip), %rcx    # 0x106020
cmpq %rcx, 0x20(%rax)
jne 0x1483f5
jmp 0x1483ca
movq 0x70(%rsp), %rax
movw $0x2a1, 0x4(%rax)       # imm = 0x2A1
movq 0x70(%rsp), %rax
movq (%rax), %rcx
andq $-0x10000, %rcx         # imm = 0xFFFF0000
orq $0x201, %rcx            # imm = 0x201
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
jmp 0x148439
movq 0x78(%rsp), %rax
movq (%rax), %rax
leaq -0x42214(%rip), %rcx    # 0x1061f0
cmpq %rcx, 0x20(%rax)
jne 0x148437
jmp 0x14840c
movq 0x70(%rsp), %rax
movw $0x2a2, 0x4(%rax)       # imm = 0x2A2
movq 0x70(%rsp), %rax
movq (%rax), %rcx
andq $-0x10000, %rcx         # imm = 0xFFFF0000
orq $0x201, %rcx            # imm = 0x201
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
jmp 0x148437
jmp 0x148439
jmp 0x148581
movq 0x68(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x14857f
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x78(%rsp), %rcx
cmpq 0x1820(%rcx), %rax
jne 0x14857f
jmp 0x14846c
movq 0x68(%rsp), %rax
movzwl (%rax), %eax
cmpl $0x201, %eax            # imm = 0x201
jne 0x14848b
movq 0x68(%rsp), %rax
movzwl 0x4(%rax), %eax
movq %rax, 0x8(%rsp)
jmp 0x1484a5
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movw %ax, %cx
movq 0x68(%rsp), %rax
movw %cx, 0x4(%rax)
movq 0x68(%rsp), %rax
movq (%rax), %rcx
andq $-0x10000, %rcx         # imm = 0xFFFF0000
orq $0x201, %rcx            # imm = 0x201
movq 0x68(%rsp), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rdi
callq 0x153800
movq 0x58(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
movq 0x68(%rsp), %rax
movzwl (%rax), %eax
cmpl $0x201, %eax            # imm = 0x201
jne 0x148523
movq 0x68(%rsp), %rax
movzwl 0x4(%rax), %eax
movq %rax, (%rsp)
jmp 0x14853c
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x60(%rsp)
cmpq $0x287, 0x60(%rsp)      # imm = 0x287
jne 0x14857d
jmp 0x148552
movq 0x70(%rsp), %rax
movw $0x2a0, 0x4(%rax)       # imm = 0x2A0
movq 0x70(%rsp), %rax
movq (%rax), %rcx
andq $-0x10000, %rcx         # imm = 0xFFFF0000
orq $0x201, %rcx            # imm = 0x201
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
jmp 0x14857d
jmp 0x14857f
jmp 0x148581
jmp 0x148583
jmp 0x148585
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq 0x78(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x78(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x78(%rsp), %rax
movq 0x50(%rax), %rax
movl $0x2e4, %ecx            # imm = 0x2E4
movq %rcx, 0x18(%rax)
movq 0x78(%rsp), %rax
movq 0x50(%rax), %rcx
addq $0x20, %rcx
movq %rcx, 0x50(%rax)
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
movq $0x0, 0x80(%rsp)
movq 0x80(%rsp), %rax
addq $0x88, %rsp
retq
nopw (%rax,%rax)