// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x11e936
movq 0xa0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x11e936
movq 0xa0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x11e852
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0xc57c0
testb $0x1, %al
jne 0x11e852
jmp 0x11e8cd
movq 0xa8(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xa8(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xa8(%rsp), %rdi
leaq 0xd0feb(%rip), %rsi     # 0x1ef87a
movl $0x22, %edx
callq 0xb880
movq 0x68(%rsp), %rdi
movq %rax, %rsi
movq 0xa0(%rsp), %rdx
callq 0xb830
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq %rax, 0xb0(%rsp)
jmp 0x11ec9b
movq 0xa0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x11e901
movq 0xa0(%rsp), %rax
movq (%rax), %rcx
orq $0x100000, %rcx         # imm = 0x100000
andq $-0x12201, %rcx         # imm = 0xFFFEDDFF
movq 0xa0(%rsp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x98(%rsp)
je 0x11e91a
movq 0x98(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0xa8(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0xb0(%rsp)
jmp 0x11ec9b
movl $0x0, 0x8c(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x11eb95
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x11e9a7
movq 0xa8(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0xc57c0
testb $0x1, %al
jne 0x11e9a7
jmp 0x11eaad
movq 0x80(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x11ea32
movq 0xa8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xa8(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xa8(%rsp), %rdi
leaq 0xd0ea9(%rip), %rsi     # 0x1ef89d
movl $0x45, %edx
callq 0xb880
movq 0x50(%rsp), %rdi
movq %rax, %rsi
movq 0x80(%rsp), %rdx
callq 0xb830
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq %rax, 0xb0(%rsp)
jmp 0x11ec9b
movq 0xa8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa8(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xa8(%rsp), %rdi
leaq 0xd0e0b(%rip), %rsi     # 0x1ef87a
movl $0x22, %edx
callq 0xb880
movq 0x38(%rsp), %rdi
movq %rax, %rsi
movq 0x80(%rsp), %rdx
callq 0xb830
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq %rax, 0xb0(%rsp)
jmp 0x11ec9b
movq 0x80(%rsp), %rdi
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x15cb40
testb $0x1, %al
jne 0x11eacc
jmp 0x11eb47
movq 0xa8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xa8(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xa8(%rsp), %rdi
leaq 0xd0dda(%rip), %rsi     # 0x1ef8e3
movl $0x38, %edx
callq 0xb880
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x80(%rsp), %rdx
callq 0xb830
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq %rax, 0xb0(%rsp)
jmp 0x11ec9b
movq 0x80(%rsp), %rax
movq (%rax), %rcx
orq $0x100000, %rcx         # imm = 0x100000
andq $-0x12201, %rcx         # imm = 0xFFFEDDFF
movq 0x80(%rsp), %rax
movq %rcx, (%rax)
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x90(%rsp)
jmp 0x11e951
movq 0x90(%rsp), %rax
movq 0xa8(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0x11ec68
movq 0x90(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x11ebdd
movq 0xa8(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0xc57c0
testb $0x1, %al
jne 0x11ebdd
jmp 0x11ec55
movq 0xa8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xa8(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa8(%rsp), %rdi
leaq 0xd0d02(%rip), %rsi     # 0x1ef91c
movl $0x28, %edx
callq 0xb880
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x90(%rsp), %rdx
callq 0xb830
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq %rax, 0xb0(%rsp)
jmp 0x11ec9b
xorl %eax, %eax
subl 0x8c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x8c(%rsp)
cmpq $0x0, 0x98(%rsp)
je 0x11ec84
movl 0x8c(%rsp), %ecx
movq 0x98(%rsp), %rax
movl %ecx, (%rax)
movq 0xa8(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nopl (%rax,%rax)