// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: set_implicit_string
static goto_t set_implicit_string(s7_scheme *sc, s7_pointer cx)
                {
                    /* sc->code = cons(sc, sc->string_set_function, s7_append(sc, car(sc->code), cdr(sc->code)));
                     *
                     * here only one index makes sense, and it is required, so
                     *   (set! ("str") #\a), (set! ("str" . 1) #\a) and (set! ("str" 1 2) #\a)
                     *   are all errors (but see below!).
                     */
                    s7_pointer settee, index, val;

                    if (is_null(cdr(sc->code))) s7_wrong_number_of_args_error(sc, "no value for string-set!: ~S", sc->code);
                    if (!is_null(cddr(sc->code))) s7_wrong_number_of_args_error(sc, "too many values for string-set!: ~S", sc->code);

                    settee = car(sc->code);
                    if (is_null(cdr(settee))) s7_wrong_number_of_args_error(sc, "no index for string-set!: ~S", sc->code);
                    if (!is_null(cddr(settee))) s7_wrong_number_of_args_error(sc, "too many indices for string-set!: ~S", sc->code);

                    /* if there's one index (the standard case), and it is not a pair, and there's one value (also standard)
                     *    and it is not a pair, let's optimize this thing!
                     *    cx is what we're setting, cadar is the index, cadr is the new value
                     */
                    index = cadr(settee);
                    if (!is_pair(index))
                    {
                        s7_int ind;

                        if (is_symbol(index))
                            index = lookup_checked(sc, index);
                        if (!s7_is_integer(index))
                            eval_error_no_return(sc, sc->wrong_type_arg_symbol, "index must be an integer: ~S", 28, sc->code);
                        ind = s7_integer(index);
                        if ((ind < 0) ||
                                (ind >= string_length(cx)))
                            out_of_range(sc, sc->string_set_symbol, small_int(2), index, (ind < 0) ? its_negative_string : its_too_large_string);
                        if (is_immutable(cx))
                            immutable_object_error(sc, set_elist_3(sc, immutable_error_string, sc->string_set_symbol, cx));

                        val = cadr(sc->code);
                        if (!is_pair(val))
                        {
                            if (is_symbol(val))
                                val = lookup_checked(sc, val);
                            if (s7_is_character(val))
                            {
                                string_value(cx)[ind] = character(val);
                                sc->value = val;
                                return(goto_start);
                            }
                            eval_error_no_return(sc, sc->wrong_type_arg_symbol, "value must be a character: ~S", 29, sc->code);
                        }
                        push_op_stack(sc, sc->string_set_function);
                        sc->args = list_2(sc, index, cx);
                        sc->code = cdr(sc->code);
                        return(goto_eval_args);
                    }
                    push_stack(sc, OP_EVAL_ARGS1, list_1(sc, cx), cdr(sc->code));
                    push_op_stack(sc, sc->string_set_function);
                    sc->code = cadar(sc->code);
                    sc->cur_op = optimize_op(sc->code);
                    return(goto_top_no_pop);
                }

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rdi, 0x108(%rsp)
movq %rsi, 0x100(%rsp)
movq 0x108(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x108(%rsp), %rcx
cmpq 0x110(%rcx), %rax
jne 0x18f296
movq 0x108(%rsp), %rdi
movq 0x108(%rsp), %rax
movq (%rax), %rdx
leaq 0x61458(%rip), %rsi     # 0x1f06e9
callq 0x33290
movq 0x108(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x108(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0x18f2d9
movq 0x108(%rsp), %rdi
movq 0x108(%rsp), %rax
movq (%rax), %rdx
leaq 0x61432(%rip), %rsi     # 0x1f0706
callq 0x33290
movq 0x108(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0xf8(%rsp)
movq 0xf8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x108(%rsp), %rcx
cmpq 0x110(%rcx), %rax
jne 0x18f32c
movq 0x108(%rsp), %rdi
movq 0x108(%rsp), %rax
movq (%rax), %rdx
leaq 0x61403(%rip), %rsi     # 0x1f072a
callq 0x33290
movq 0xf8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x108(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0x18f36c
movq 0x108(%rsp), %rdi
movq 0x108(%rsp), %rax
movq (%rax), %rdx
leaq 0x613e0(%rip), %rsi     # 0x1f0747
callq 0x33290
movq 0xf8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x18f87b
movq 0xf0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x18f416
movq 0x108(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0xde990
movq %rax, 0xd8(%rsp)
cmpq $0x0, 0xd8(%rsp)
je 0x18f3df
movq 0xd8(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x18f3f9
movq 0x108(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0xdead0
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rdi
callq 0x11340
testb $0x1, %al
jne 0x18f498
movq 0x108(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x108(%rsp), %rax
movq 0x1940(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x108(%rsp), %rdi
leaq 0x60f9b(%rip), %rsi     # 0x1f03ff
movl $0x1c, %edx
callq 0xb880
movq 0x60(%rsp), %rdi
movq %rax, %rsi
movq 0x108(%rsp), %rax
movq (%rax), %rdx
callq 0xb830
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq 0xf0(%rsp), %rdi
callq 0x10790
movq %rax, 0xe0(%rsp)
cmpq $0x0, 0xe0(%rsp)
jl 0x18f4d2
movq 0xe0(%rsp), %rax
movq 0x100(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jl 0x18f553
movq 0x108(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x108(%rsp), %rax
movq 0x1550(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x86f92(%rip), %rax     # 0x216490
movq %rax, 0x50(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, 0xe0(%rsp)
jge 0x18f529
movq 0x8b056(%rip), %rax     # 0x21a578
movq %rax, 0x38(%rsp)
jmp 0x18f535
movq 0x8b040(%rip), %rax     # 0x21a570
movq %rax, 0x38(%rsp)
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %r8
callq 0x13880
movq 0x100(%rsp), %rax
movq (%rax), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
je 0x18f5af
movq 0x108(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x108(%rsp), %rdi
movq 0x8af12(%rip), %rsi     # 0x21a498
movq 0x108(%rsp), %rax
movq 0x1550(%rax), %rdx
movq 0x100(%rsp), %rcx
callq 0xf240
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0xb800
movq 0x108(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x18f726
movq 0xe8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x18f65c
movq 0x108(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0xde990
movq %rax, 0xc8(%rsp)
cmpq $0x0, 0xc8(%rsp)
je 0x18f625
movq 0xc8(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x18f63f
movq 0x108(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0xdead0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x14430
testb $0x1, %al
jne 0x18f66f
jmp 0x18f6b5
movq 0xe8(%rsp), %rax
movb 0x8(%rax), %dl
movq 0x100(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xe0(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0xe8(%rsp), %rcx
movq 0x108(%rsp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, 0x114(%rsp)
jmp 0x18fa2f
movq 0x108(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x108(%rsp), %rax
movq 0x1940(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x108(%rsp), %rdi
leaq 0x60dc8(%rip), %rsi     # 0x1f04ba
movl $0x1d, %edx
callq 0xb880
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x108(%rsp), %rax
movq (%rax), %rdx
callq 0xb830
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq 0x108(%rsp), %rax
movq 0x1eb0(%rax), %rcx
movq 0x108(%rsp), %rdx
movq 0x68(%rdx), %rax
movq %rax, %rsi
addq $0x8, %rsi
movq %rsi, 0x68(%rdx)
movq %rcx, (%rax)
movq 0x108(%rsp), %rax
movq %rax, (%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x108(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0x108(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x108(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x18f7bc
movq 0x108(%rsp), %rdi
callq 0xc670
movq 0x108(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x8(%rsp), %rsi
movq (%rsp), %rdi
movq 0xb0(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xa8(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0xb8(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdx
callq 0xd9f0
movq %rax, %rcx
movq 0x108(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x108(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq 0x108(%rsp), %rax
movq %rcx, (%rax)
movl $0xb, 0x114(%rsp)
jmp 0x18fa2f
jmp 0x18f87d
movq 0x108(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq 0x108(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, (%rax)
movq 0x108(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x108(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x100(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x108(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x108(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x108(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x18f90b
movq 0x108(%rsp), %rdi
callq 0xc670
movq 0x108(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x90(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x88(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x98(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rcx
movq 0x108(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x108(%rsp), %rax
movq 0x50(%rax), %rax
movl $0x193, %ecx            # imm = 0x193
movq %rcx, 0x18(%rax)
movq 0x108(%rsp), %rax
movq 0x50(%rax), %rcx
addq $0x20, %rcx
movq %rcx, 0x50(%rax)
movq 0x108(%rsp), %rax
movq 0x1eb0(%rax), %rcx
movq 0x108(%rsp), %rdx
movq 0x68(%rdx), %rax
movq %rax, %rsi
addq $0x8, %rsi
movq %rsi, 0x68(%rdx)
movq %rcx, (%rax)
movq 0x108(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rcx
movq 0x108(%rsp), %rax
movq %rcx, (%rax)
movq 0x108(%rsp), %rax
movq (%rax), %rax
movzwl 0x4(%rax), %eax
movl %eax, %ecx
movq 0x108(%rsp), %rax
movq %rcx, 0x18(%rax)
movl $0x9, 0x114(%rsp)
movl 0x114(%rsp), %eax
addq $0x118, %rsp            # imm = 0x118
retq
nop