// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: check_lambda_args
static s7_pointer check_lambda_args(s7_scheme *sc, s7_pointer args, int32_t *arity)
                {
                    s7_pointer x;
                    int32_t i;

                    if (!is_list(args))
                    {
                        if (is_constant(sc, args))                       /* (lambda :a ...) */
                            eval_error(sc, "lambda parameter '~S is a constant", 34, args); /* not ~A here, (lambda #\null do) for example */

                        /* we currently accept (lambda i i . i) (lambda quote i)  (lambda : : . #()) (lambda : 1 . "")
                         *   at this level, but when the lambda form is evaluated, it will trigger an error.
                         */
                        if (is_symbol(args))
                            set_local(args);

                        if (arity) (*arity) = -1;
                        return(sc->F);
                    }

                    for (i = 0, x = args; is_pair(x); i++, x = cdr(x))
                    {
                        s7_pointer car_x;
                        car_x = car(x);
                        if (is_constant(sc, car_x))                      /* (lambda (pi) pi), constant here means not a symbol */
                        {
                            if (is_pair(car_x))                          /* (lambda ((:hi . "hi") . "hi") 1) */
                                eval_error(sc, "lambda parameter '~S is a pair (perhaps you want define* or lambda*?)", 69, car_x);
                            eval_error(sc, "lambda parameter '~S is a constant", 34, car_x);
                        }
                        if (symbol_is_in_arg_list(car_x, cdr(x)))       /* (lambda (a a) ...) or (lambda (a . a) ...) */
                            eval_error(sc, "lambda parameter '~S is used twice in the parameter list", 56, car_x);
                        set_local(car_x);
                    }
                    if (is_not_null(x))
                    {
                        if (is_constant(sc, x))                         /* (lambda (a . 0.0) a) or (lambda (a . :b) a) */
                            eval_error(sc, "lambda :rest parameter '~S is a constant", 40, x);
                        i = -i - 1;
                    }

                    if (arity) (*arity) = i;
                    return(sc->F);
                }

// Assembly:
pushq %r14
pushq %rbx
movzbl (%rsi), %eax
cmpl $0x1, %eax
je 0xc0690
cmpl $0x2, %eax
je 0xc0617
cmpl $0xa, %eax
jne 0xc05db
movq (%rsi), %rax
btl $0x18, %eax
jb 0xc05db
btq $0x30, %rax
jae 0xc05b4
movq 0x8(%rdi), %r8
movq 0x18(%r8), %r10
movq 0x20(%rsi), %r9
movl $0x18, %ecx
cmpq %r9, %r10
je 0xc05a3
jle 0xc059a
movq 0x10(%r8), %r8
movq 0x18(%r8), %r10
cmpq %r10, %r9
jl 0xc058d
cmpq %r9, %r10
jne 0xc08b2
movq (%rsi,%rcx), %r9
cmpb $0x20, (%r9)
jne 0xc05b4
testb $0x1, 0x3(%r9)
jne 0xc05db
cmpb $0xa, %al
jne 0xc05c7
andq $-0x11122f6, %rax       # imm = 0xFEEEDD0A
orq $0x100000, %rax         # imm = 0x100000
movq %rax, (%rsi)
testq %rdx, %rdx
je 0xc068c
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
jmp 0xc068c
movq 0x1918(%rdi), %rax
movq 0x820(%rdi), %rcx
movslq 0x7dc(%rdi), %rdx
movq (%rcx,%rdx,8), %rcx
incl %edx
andl $0x7, %edx
movl %edx, 0x7dc(%rdi)
leaq 0x5735c(%rip), %rdx     # 0x117962
movq %rdx, 0x10(%rcx)
movq $0x22, 0x8(%rcx)
jmp 0xc0808
xorl %eax, %eax
xorl %ecx, %ecx
cmpq 0x110(%rdi), %rsi
je 0xc0685
testb %cl, %cl
je 0xc07d1
movq (%rsi), %rcx
btl $0x18, %ecx
jb 0xc07d1
btq $0x30, %rcx
jae 0xc0683
movq 0x8(%rdi), %r8
movq 0x18(%r8), %r10
movq 0x20(%rsi), %r9
movl $0x18, %ecx
cmpq %r9, %r10
je 0xc066e
jle 0xc0665
movq 0x10(%r8), %r8
movq 0x18(%r8), %r10
cmpq %r10, %r9
jl 0xc0658
cmpq %r9, %r10
jne 0xc08eb
movq (%rsi,%rcx), %r9
cmpb $0x20, (%r9)
jne 0xc0683
testb $0x1, 0x3(%r9)
jne 0xc07d1
notl %eax
testq %rdx, %rdx
je 0xc068c
movl %eax, (%rdx)
popq %rbx
popq %r14
retq
xorl %eax, %eax
movabsq $0x1000000000000, %r8   # imm = 0x1000000000000
movq 0x8(%rsi), %rcx
movzbl (%rcx), %r9d
cmpl $0xa, %r9d
jne 0xc0834
movq (%rcx), %r9
btl $0x18, %r9d
jb 0xc0876
testq %r8, %r9
je 0xc06ff
movq 0x8(%rdi), %r11
movq 0x18(%r11), %r14
movq 0x20(%rcx), %rbx
movl $0x18, %r10d
cmpq %rbx, %r14
je 0xc06ec
jle 0xc06e7
movq 0x10(%r11), %r11
movq 0x18(%r11), %r14
cmpq %r14, %rbx
jl 0xc06da
cmpq %rbx, %r14
jne 0xc0750
movq (%rcx,%r10), %rbx
cmpb $0x20, (%rbx)
jne 0xc06ff
testb $0x1, 0x3(%rbx)
jne 0xc0876
movq 0x10(%rsi), %r10
cmpb $0x1, (%r10)
jne 0xc0724
movq 0x8(%r10), %r11
cmpq %rcx, %r11
je 0xc0777
cmpb $0x1, (%r11)
jne 0xc071e
cmpq %rcx, 0x8(%r11)
je 0xc0777
movq 0x10(%r10), %r10
jmp 0xc0703
cmpq %rcx, %r10
je 0xc0777
andq $-0x1112201, %r9        # imm = 0xFEEEDDFF
orq $0x100000, %r9          # imm = 0x100000
movq %r9, (%rcx)
incl %eax
movq 0x10(%rsi), %rsi
movb (%rsi), %cl
cmpb $0x1, %cl
je 0xc069c
jmp 0xc08e0
movl $0x10, %r10d
cmpb $0x1c, (%r11)
jne 0xc06ec
movq 0x8(%r11), %rbx
testq %rbx, %rbx
je 0xc0771
cmpq %rcx, 0x8(%rbx)
je 0xc06f0
movq 0x18(%rbx), %rbx
jmp 0xc0760
movq 0x10(%r11), %r11
jmp 0xc0756
movq 0x1918(%rdi), %rsi
movq 0x820(%rdi), %rax
movslq 0x7dc(%rdi), %rdx
movq (%rax,%rdx,8), %rax
incl %edx
andl $0x7, %edx
movl %edx, 0x7dc(%rdi)
leaq 0x57229(%rip), %rdx     # 0x1179cb
movq %rdx, 0x10(%rax)
movq $0x38, 0x8(%rax)
movq 0x6e0(%rdi), %rdx
movq %rax, 0x8(%rdx)
movq 0x6e0(%rdi), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x6e0(%rdi), %rdx
jmp 0xc082c
movq 0x1918(%rdi), %rax
movq 0x820(%rdi), %rcx
movslq 0x7dc(%rdi), %rdx
movq (%rcx,%rdx,8), %rcx
incl %edx
andl $0x7, %edx
movl %edx, 0x7dc(%rdi)
leaq 0x57208(%rip), %rdx     # 0x117a04
movq %rdx, 0x10(%rcx)
movq $0x28, 0x8(%rcx)
movq 0x6e0(%rdi), %rdx
movq %rcx, 0x8(%rdx)
movq 0x6e0(%rdi), %rcx
movq 0x10(%rcx), %rcx
movq %rsi, 0x8(%rcx)
movq 0x6e0(%rdi), %rdx
movq %rax, %rsi
popq %rbx
popq %r14
jmp 0x38dfa
cmpl $0x1, %r9d
jne 0xc0876
movq 0x1918(%rdi), %rsi
movq 0x820(%rdi), %rax
movslq 0x7dc(%rdi), %rdx
movq (%rax,%rdx,8), %rax
incl %edx
andl $0x7, %edx
movl %edx, 0x7dc(%rdi)
leaq 0x57120(%rip), %rdx     # 0x117985
movq %rdx, 0x10(%rax)
movq $0x45, 0x8(%rax)
jmp 0xc07ae
movq 0x1918(%rdi), %rsi
movq 0x820(%rdi), %rax
movslq 0x7dc(%rdi), %rdx
movq (%rax,%rdx,8), %rax
incl %edx
andl $0x7, %edx
movl %edx, 0x7dc(%rdi)
leaq 0x570c1(%rip), %rdx     # 0x117962
movq %rdx, 0x10(%rax)
movq $0x22, 0x8(%rax)
jmp 0xc07ae
movl $0x10, %ecx
cmpb $0x1c, (%r8)
jne 0xc05a3
movq 0x8(%r8), %r9
testq %r9, %r9
je 0xc08da
cmpq %rsi, 0x8(%r9)
je 0xc05a7
movq 0x18(%r9), %r9
jmp 0xc08c5
movq 0x10(%r8), %r8
jmp 0xc08b7
cmpb $0xa, %cl
sete %cl
jmp 0xc061b
movl $0x10, %ecx
cmpb $0x1c, (%r8)
jne 0xc066e
movq 0x8(%r8), %r9
testq %r9, %r9
je 0xc0913
cmpq %rsi, 0x8(%r9)
je 0xc0672
movq 0x18(%r9), %r9
jmp 0xc08fe
movq 0x10(%r8), %r8
jmp 0xc08f0