// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: op_define1
static goto_t op_define1(s7_scheme *sc)
                {
                    /* sc->code is the symbol being defined, sc->value is its value
                     *   if sc->value is a closure, car is of the form ((args...) body...)
                     * it's not possible to expand and replace macros at this point without evaluating
                     *   the body.  Just as examples, say we have a macro "mac",
                     *   (define (hi) (call/cc (lambda (mac) (mac 1))))
                     *   (define (hi) (quote (mac 1))) or macroexpand etc
                     *   (define (hi mac) (mac 1)) assuming mac here is a function passed as an arg, etc...
                     * the immutable constant check needs to wait until we have the actual new value because
                     *   we want to ignore the rebinding (not raise an error) if it is the existing value.
                     *   This happens when we reload a file that calls define-constant.
                     */
                    if (is_multiple_value(sc->value))                 /* (define x (values 1 2)) */
                        eval_error_no_return(sc, sc->syntax_error_symbol, "define: more than one value: ~S", 31, sc->value);
                    if (is_constant_symbol(sc, sc->code))             /* (define pi 3) or (define (pi a) a) */
                    {
                        s7_pointer x;

                        if (is_slot(global_slot(sc->code)))
                            x = global_slot(sc->code);
                        else x = symbol_to_slot(sc, sc->code);  /* local_slot can be free even if sc->code is immutable (local constant now defunct) */

                        if (!((is_slot(x)) &&
                                    (type(sc->value) == unchecked_type(slot_value(x))) &&
                                    (s7_is_equivalent(sc, sc->value, slot_value(x)))))    /* if value is unchanged, just ignore this (re)definition */
                            eval_error_no_return(sc, sc->syntax_error_symbol, "define: ~S is immutable", 23, sc->code);   /*   can't use s7_is_equal because value might be NaN, etc */
                    }
                    if (symbol_has_setter(sc->code))
                    {
                        s7_pointer x;
                        x = symbol_to_slot(sc, sc->code);
                        if ((is_slot(x)) &&
                                (slot_has_setter(x)))
                        {
                            sc->value = bind_symbol_with_setter(sc, OP_DEFINE_WITH_SETTER, sc->code, sc->value);
                            if (sc->value == sc->no_value)
                                return(goto_apply);
                            /* if all goes well, OP_DEFINE_WITH_SETTER will jump to DEFINE2 */
                        }
                    }
                    return(fall_through);
                }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rax
movzwl (%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x140132
movq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
leaq 0xb027f(%rip), %rsi     # 0x1f037f
movl $0x1f, %edx
callq 0xb880
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rdx
callq 0xb830
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq 0x48(%rsp), %rdi
movq 0x48(%rsp), %rax
movq (%rax), %rsi
callq 0xc57c0
testb $0x1, %al
jne 0x14014d
jmp 0x140238
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jne 0x140174
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x40(%rsp)
jmp 0x14018b
movq 0x48(%rsp), %rdi
movq 0x48(%rsp), %rax
movq (%rax), %rsi
callq 0xfc80
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jne 0x1401d4
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
movq 0x40(%rsp), %rcx
movq 0x10(%rcx), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x1401d4
movq 0x48(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rdx
callq 0x3e930
testb $0x1, %al
jne 0x140236
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq 0x1918(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
leaq 0xb019a(%rip), %rsi     # 0x1f039f
movl $0x17, %edx
callq 0xb880
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x48(%rsp), %rax
movq (%rax), %rdx
callq 0xb830
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
jmp 0x140238
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
je 0x1402dc
movq 0x48(%rsp), %rdi
movq 0x48(%rsp), %rax
movq (%rax), %rsi
callq 0xfc80
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jne 0x1402da
movq 0x38(%rsp), %rax
movq (%rax), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
je 0x1402da
movq 0x48(%rsp), %rdi
movq 0x48(%rsp), %rax
movq (%rax), %rdx
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rcx
movl $0x23d, %esi            # imm = 0x23D
callq 0x18d380
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x48(%rsp), %rcx
cmpq 0x138(%rcx), %rax
jne 0x1402d8
movl $0xa, 0x54(%rsp)
jmp 0x1402e4
jmp 0x1402da
jmp 0x1402dc
movl $0x2, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)