// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: make_macro
static s7_pointer make_macro(s7_scheme *sc, opcode_t op)
    {
        s7_pointer cx, mac, body;
        uint64_t typ;

        if (op == OP_DEFINE_MACRO)
            typ = T_MACRO | T_DONT_EVAL_ARGS | T_COPY_ARGS;
        else
        {
            if (op == OP_DEFINE_MACRO_STAR)
                typ = T_MACRO_STAR | T_DONT_EVAL_ARGS | T_COPY_ARGS;
            else
            {
                if (op == OP_DEFINE_BACRO)
                    typ = T_BACRO | T_DONT_EVAL_ARGS | T_COPY_ARGS;
                else
                {
                    if (op == OP_DEFINE_BACRO_STAR)
                        typ = T_BACRO_STAR | T_DONT_EVAL_ARGS | T_COPY_ARGS;
                    else
                    {
                        if ((op == OP_DEFINE_EXPANSION) && (!is_let(sc->envir)))  /* local expansions are just normal macros */
                            typ = T_MACRO | T_EXPANSION | T_DONT_EVAL_ARGS | T_COPY_ARGS;
                        else
                        {
                            if ((op == OP_DEFINE_EXPANSION_STAR) && (!is_let(sc->envir)))
                                typ = T_MACRO_STAR | T_EXPANSION | T_DONT_EVAL_ARGS | T_COPY_ARGS;
                            else typ = T_MACRO | T_DONT_EVAL_ARGS | T_COPY_ARGS;
                        }
                    }
                }
            }
        }

        new_cell_no_check(sc, mac, typ);
        sc->temp6 = mac;
        closure_set_args(mac, cdar(sc->code));
        body = cdr(sc->code);
        closure_set_body(mac, body);
        closure_set_setter(mac, sc->F);
        closure_set_let(mac, sc->envir);
        closure_set_arity(mac, CLOSURE_ARITY_NOT_SET);
        sc->capture_let_counter++;

        sc->code = caar(sc->code);
        if (((op == OP_DEFINE_EXPANSION) || (op == OP_DEFINE_EXPANSION_STAR)) &&
                (!is_let(sc->envir)))
            set_type(sc->code, T_EXPANSION | T_SYMBOL | (typeflag(sc->code) & T_UNHEAP)); /* see comment under READ_TOK */
        /* symbol? macro name has already been checked, find name in environment, and define it */
        cx = symbol_to_local_slot(sc, sc->code, sc->envir);
        if (is_slot(cx))
            slot_set_value_with_hook(cx, mac);
        else s7_make_slot(sc, sc->envir, sc->code, mac); /* was current but we've checked immutable already */

        clear_symbol_list(sc); /* tracks names local to this macro */
        if (optimize(sc, body, 1, collect_parameters(sc, closure_args(mac), sc->nil)) == OPT_OOPS)
            clear_all_optimizations(sc, body);

        if ((is_pair(car(body))) &&        /* a desperate kludge -- need something better here! */
                (is_pair(cdar(body))) &&
                (is_pair(cadar(body))) &&
                (caadar(body) == sc->quote_symbol) &&
                (is_symbol(cadr(cadar(body)))) &&
                (is_definer(cadr(cadar(body)))))
            set_is_definer(sc->code);

        sc->temp6 = sc->nil;
        return(mac);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1000202a, %eax       # imm = 0x1000202A
leaq -0x1cc(%rsi), %rcx
cmpq $0x3, %rcx
ja 0xb8c90
leaq 0x1bfe0(%rip), %rdx     # 0xd4c60
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x1000202b, %eax       # imm = 0x1000202B
jmp 0xb8cce
cmpq $0x205, %rsi            # imm = 0x205
je 0xb8ca9
cmpq $0x206, %rsi            # imm = 0x206
jne 0xb8cc9
movl $0x1000202d, %eax       # imm = 0x1000202D
jmp 0xb8cce
movl $0x1000202c, %eax       # imm = 0x1000202C
jmp 0xb8cce
movq 0x8(%rbx), %rcx
movl $0x1000602a, %eax       # imm = 0x1000602A
jmp 0xb8cc4
movq 0x8(%rbx), %rcx
movl $0x1000602b, %eax       # imm = 0x1000602B
cmpb $0x1c, (%rcx)
jne 0xb8cce
movl $0x1000202a, %eax       # imm = 0x1000202A
movq 0x90(%rbx), %rcx
leaq -0x8(%rcx), %rdx
movq %rdx, 0x90(%rbx)
movq -0x8(%rcx), %r14
movq %rax, (%r14)
movq %r14, 0x520(%rbx)
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%r14)
movq (%rbx), %rax
movq 0x10(%rax), %r15
movq %r15, 0x10(%r14)
movq 0x120(%rbx), %rax
movq %rax, 0x20(%r14)
movq 0x8(%rbx), %rax
movq %rax, 0x18(%r14)
movl $0x40000000, 0x28(%r14) # imm = 0x40000000
incq 0x240(%rbx)
movq (%rbx), %rax
movq 0x8(%rbx), %r13
movq 0x8(%rax), %rax
movq 0x8(%rax), %r12
movq %r12, (%rbx)
andq $-0x2, %rsi
cmpq $0x1ce, %rsi            # imm = 0x1CE
jne 0xb8d6f
cmpb $0x1c, (%r13)
je 0xb8d6f
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
andq (%r12), %rax
orq $0x400a, %rax           # imm = 0x400A
movq %rax, (%r12)
movq (%rbx), %r12
movq 0x8(%rbx), %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xb1df
cmpb $0x20, (%rax)
jne 0xb8da9
movq %rax, %rbp
movq 0x200(%rbx), %rsi
movq %rbx, %rdi
callq 0x97c7
cmpb $0x1, (%rax)
jne 0xb8dbc
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x97da
jmp 0xb8dc0
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x94fb
jmp 0xb8dc0
movq %r14, 0x10(%rbp)
movq %rbx, %rdi
callq 0x7c981
movq 0x8(%r14), %rsi
movq 0x110(%rbx), %rdx
movq %rbx, %rdi
callq 0xb1d9a
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rcx
callq 0xb58d9
cmpl $0x2, %eax
jne 0xb8df9
movq %r15, %rdi
callq 0xa1b8f
movq 0x8(%r15), %rax
cmpb $0x1, (%rax)
jne 0xb8e3c
movq 0x10(%rax), %rax
cmpb $0x1, (%rax)
jne 0xb8e3c
movq 0x8(%rax), %rax
cmpb $0x1, (%rax)
jne 0xb8e3c
movq 0x8(%rax), %rcx
cmpq 0x17b0(%rbx), %rcx
jne 0xb8e3c
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
cmpb $0xa, (%rax)
jne 0xb8e3c
testb $0x4, 0x6(%rax)
je 0xb8e3c
movq (%rbx), %rax
orw $0x4, 0x6(%rax)
movq 0x110(%rbx), %rax
movq %rax, 0x520(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq