// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: set_pair_p_3
static bool set_pair_p_3(s7_scheme *sc, s7_pointer obj, s7_pointer arg, s7_pointer value)
                {
                    if (is_slot(obj))
                        obj = slot_value(obj);
                    else s7_error(sc, sc->syntax_error_symbol, set_elist_3(sc, no_setter_string, caar(sc->code), prepackaged_type_names[type(obj)]));

                    switch (type(obj))
                    {
                        case T_C_OBJECT:
                            set_car(sc->t3_1, obj);
                            set_car(sc->t3_2, arg);
                            set_car(sc->t3_3, value);
                            sc->value = (*(c_object_set(sc, obj)))(sc, sc->t3_1);
                            break;

                            /* some of these are wasteful -- we know the object type! (list hash-table) */
                        case T_INT_VECTOR:
                        case T_FLOAT_VECTOR:
                        case T_VECTOR:
                        case T_BYTE_VECTOR:
#if WITH_GMP
                            set_car(sc->t3_1, obj);
                            set_car(sc->t3_2, arg);
                            set_car(sc->t3_3, value);
                            sc->value = g_vector_set(sc, sc->t3_1);
#else
                            if (vector_rank(obj) > 1)
                            {
                                set_car(sc->t3_1, obj);
                                set_car(sc->t3_2, arg);
                                set_car(sc->t3_3, value);
                                sc->value = g_vector_set(sc, sc->t3_1);
                            }
                            else
                            {
                                s7_int index;

                                if (!is_t_integer(arg))
                                    eval_type_error(sc, "vector-set!: index must be an integer: ~S", 41, sc->code);
                                index = integer(arg);
                                if (index < 0)
                                    eval_range_error(sc, "vector-set!: index must not be negative: ~S", 43, sc->code);
                                if (index >= vector_length(obj))
                                    eval_range_error(sc, "vector-set!: index must be less than vector length: ~S", 54, sc->code);
                                if (is_immutable(obj))
                                    immutable_object_error(sc, set_elist_3(sc, immutable_error_string, sc->vector_set_symbol, obj));
                                if (is_typed_vector(obj))
                                {
                                    if ((sc->safety < NO_SAFETY) || /* or == NO_SAFETY?? */
                                            (typed_vector_typer_call(sc, obj, set_plist_1(sc, value)) != sc->F))
                                        vector_element(obj, index) = value;
                                    else return(s7_wrong_type_arg_error(sc, "vector-set!", 3, value, make_type_name(sc, typed_vector_typer_name(sc, obj), INDEFINITE_ARTICLE)));
                                }
                                else vector_setter(obj)(sc, obj, index, value);
                                sc->value = T_Pos(value);
                            }
#endif
                            break;

                        case T_STRING:
#if WITH_GMP
                            set_car(sc->t3_1, obj);
                            set_car(sc->t3_2, arg);
                            set_car(sc->t3_3, value);
                            sc->value = g_string_set(sc, sc->t3_1);
#else
                            {
                                s7_int index;
                                if (!is_t_integer(arg))
                                    eval_type_error(sc, "index must be an integer: ~S", 28, sc->code);
                                index = integer(arg);
                                if (index < 0)
                                    eval_range_error(sc, "index must not be negative: ~S", 30, sc->code);
                                if (index >= string_length(obj))
                                    eval_range_error(sc, "index must be less than sequence length: ~S", 43, sc->code);
                                if (is_immutable(obj))
                                    immutable_object_error(sc, set_elist_3(sc, immutable_error_string, sc->string_set_symbol, obj));

                                if (s7_is_character(value))
                                {
                                    string_value(obj)[index] = (char)s7_character(value);
                                    sc->value = value;
                                }
                                else eval_type_error(sc, "(string-)set!: value must be a character: ~S", 44, sc->code);
                            }
#endif
                            break;

                        case T_PAIR:
                            set_car(sc->t3_1, obj);
                            set_car(sc->t3_2, arg);
                            set_car(sc->t3_3, value);
                            sc->value = g_list_set(sc, sc->t3_1);
                            break;

                        case T_HASH_TABLE:
                            if (is_immutable(obj))
                                immutable_object_error(sc, set_elist_3(sc, immutable_error_string, sc->hash_table_set_symbol, obj));
                            sc->value = s7_hash_table_set(sc, obj, arg, value);
                            break;

                        case T_LET:
                            sc->value = s7_let_set(sc, obj, arg, value); /* this checks immutable */
                            break;

                        case T_C_OPT_ARGS_FUNCTION:
                        case T_C_RST_ARGS_FUNCTION:
                        case T_C_ANY_ARGS_FUNCTION:                       /* (let ((lst (list 1 2))) (set! (list-ref lst 1) 2) lst) */
                        case T_C_FUNCTION:
                        case T_C_FUNCTION_STAR:
                            /* obj here is a c_function, but its setter could be a closure and vice versa below */
                            if (is_procedure_or_macro(c_function_setter(obj)))
                            {
                                if (is_c_function(c_function_setter(obj)))
                                {
                                    set_car(sc->t2_1, arg);
                                    set_car(sc->t2_2, value);
                                    sc->value = c_function_call(c_function_setter(obj))(sc, sc->t2_1);
                                }
                                else
                                {
                                    sc->code = c_function_setter(obj);
                                    if (needs_copied_args(sc->code))
                                        sc->args = list_2(sc, arg, value);
                                    else sc->args = set_plist_2(sc, arg, value);
                                    return(true); /* goto APPLY; */
                                }
                            }
                            else s7_error(sc, sc->syntax_error_symbol, set_elist_3(sc, no_setter_string, caar(sc->code), prepackaged_type_names[type(obj)]));
                            break;

                        case T_MACRO:   case T_MACRO_STAR:
                        case T_BACRO:   case T_BACRO_STAR:
                        case T_CLOSURE: case T_CLOSURE_STAR:
                            if (is_procedure_or_macro(closure_setter(obj)))
                            {
                                if (is_c_function(closure_setter(obj)))
                                {
                                    set_car(sc->t2_1, arg);
                                    set_car(sc->t2_2, value);
                                    sc->value = c_function_call(closure_setter(obj))(sc, sc->t2_1);
                                }
                                else
                                {
                                    sc->code = closure_setter(obj);
                                    if (needs_copied_args(sc->code))
                                        sc->args = list_2(sc, arg, value);
                                    else sc->args = set_plist_2(sc, arg, value);
                                    return(true); /* goto APPLY; */
                                }
                            }
                            else s7_error(sc, sc->syntax_error_symbol, set_elist_3(sc, no_setter_string, caar(sc->code), prepackaged_type_names[type(obj)]));
                            break;

                        default:                                         /* (set! (1 2) 3) */
                            s7_error(sc, sc->syntax_error_symbol, set_elist_3(sc, no_setter_string, caar(sc->code), prepackaged_type_names[type(obj)]));
                    }
                    return(false);
                }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movzbl (%rsi), %eax
cmpq $0x20, %rax
jne 0xc795d
movq 0x10(%r15), %r15
jmp 0xc79ab
movq 0x1918(%rbx), %rsi
movq 0x8daa5(%rip), %rcx     # 0x155410
movq (%rbx), %rdx
movq 0x8(%rdx), %rdx
movq 0x8(%rdx), %rdx
leaq 0x830e3(%rip), %rdi     # 0x14aa60
movq (%rdi,%rax,8), %rax
movq 0x6e8(%rbx), %rdi
movq %rcx, 0x8(%rdi)
movq 0x10(%rdi), %rcx
movq %rdx, 0x8(%rcx)
movq 0x10(%rcx), %rcx
movq %rax, 0x8(%rcx)
movq 0x6e8(%rbx), %rdx
movq %rbx, %rdi
callq 0x38dfa
movzbl (%r15), %eax
leal -0x13(%rax), %ecx
cmpl $0x20, %ecx
ja 0xc7b95
leaq 0x40ea6(%rip), %rdx     # 0x108868
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x20(%r15), %rcx
movzbl (%rcx), %edx
leaq 0x84957(%rip), %rsi     # 0x14c330
cmpb $0x0, (%rdx,%rsi)
jne 0xc79f0
leaq 0x8498a(%rip), %rsi     # 0x14c370
cmpb $0x1, (%rdx,%rsi)
jne 0xc7bdc
cmpb $0x30, %dl
jb 0xc7a6f
movq 0x570(%rbx), %rax
movq %r12, 0x8(%rax)
movq 0x578(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x20(%r15), %rax
jmp 0xc7a5d
movq 0x8(%r15), %rcx
movq 0x30(%rcx), %rcx
movzbl (%rcx), %edx
leaq 0x8490d(%rip), %rsi     # 0x14c330
cmpb $0x0, (%rdx,%rsi)
jne 0xc7a3a
leaq 0x84940(%rip), %rsi     # 0x14c370
cmpb $0x1, (%rdx,%rsi)
jne 0xc7bdc
cmpb $0x30, %dl
jb 0xc7a6f
movq 0x570(%rbx), %rax
movq %r12, 0x8(%rax)
movq 0x578(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x8(%r15), %rax
movq 0x30(%rax), %rax
movq 0x570(%rbx), %rsi
movq %rbx, %rdi
callq *0x10(%rax)
jmp 0xc7d9b
movq %rcx, (%rbx)
testb $0x10, 0x3(%rcx)
jne 0xc7b24
movq 0x708(%rbx), %rax
movq %r12, 0x8(%rax)
movq 0x710(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x708(%rbx), %rax
movq %rax, 0x10(%rbx)
jmp 0xc7b8e
movq 0x18(%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xc7aeb
cmpq $0x2, 0x10(%rax)
jl 0xc7aeb
movq 0x580(%rbx), %rax
movq %r15, 0x8(%rax)
movq 0x588(%rbx), %rax
movq %r12, 0x8(%rax)
movq 0x590(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x580(%rbx), %rsi
movq %rbx, %rdi
callq 0x79cc5
jmp 0xc7d9b
cmpb $0xb, (%r12)
jne 0xc7c2f
movq 0x8(%r12), %r12
testq %r12, %r12
js 0xc7dad
cmpq 0x8(%r15), %r12
jge 0xc7e19
movq (%r15), %rax
btl $0x18, %eax
jb 0xc7e55
shrq $0x30, %rax
jmp 0xc7e99
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r15
cmpq 0x98(%rbx), %rax
ja 0xc7b4a
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movl $0x200001, %ecx         # imm = 0x200001
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
movq %r15, 0x10(%rax)
movq 0x90(%rbx), %rdx
leaq -0x8(%rdx), %rsi
movq %rsi, 0x90(%rbx)
movq -0x8(%rdx), %rdx
movq %rcx, (%rdx)
movq %r12, 0x8(%rdx)
movq %rax, 0x10(%rdx)
movq %rdx, 0x10(%rbx)
movb $0x1, %al
jmp 0xc7da1
cmpl $0x1, %eax
jne 0xc7bdc
movq 0x580(%rbx), %rax
movq %r15, 0x8(%rax)
movq 0x588(%rbx), %rax
movq %r12, 0x8(%rax)
movq 0x590(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x580(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbx, %rdi
movl $0x2, %ecx
callq 0xe6eb4
jmp 0xc7d9b
movq 0x1918(%rbx), %rsi
movq 0x8d826(%rip), %rcx     # 0x155410
movq (%rbx), %rdx
movq 0x8(%rdx), %rdx
movq 0x8(%rdx), %rdx
leaq 0x82e64(%rip), %rdi     # 0x14aa60
movq (%rdi,%rax,8), %rax
movq 0x6e8(%rbx), %rdi
movq %rcx, 0x8(%rdi)
movq 0x10(%rdi), %rcx
movq %rdx, 0x8(%rcx)
movq 0x10(%rcx), %rcx
movq %rax, 0x8(%rcx)
movq 0x6e8(%rbx), %rdx
movq %rbx, %rdi
callq 0x38dfa
jmp 0xc7d9f
movq 0x1940(%rbx), %r14
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x50880(%rip), %rcx     # 0x1184da
movq %rcx, 0x10(%rax)
movq $0x29, 0x8(%rax)
jmp 0xc7f5d
movq 0x580(%rbx), %rax
movq %r15, 0x8(%rax)
movq 0x588(%rbx), %rax
movq %r12, 0x8(%rax)
movq 0x590(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x8d8(%rbx), %rax
movq 0x8(%r15), %rcx
movq (%rax,%rcx,8), %rax
movq 0x580(%rbx), %rsi
movq %rbx, %rdi
callq *0x50(%rax)
jmp 0xc7d9b
cmpb $0xb, (%r12)
jne 0xc7ddd
movq 0x8(%r12), %r12
testq %r12, %r12
js 0xc7eed
cmpq 0x8(%r15), %r12
jge 0xc7f26
testb $0x1, 0x3(%r15)
je 0xc7d16
movq 0x82c8a(%rip), %rax     # 0x14a968
movq 0x1550(%rbx), %rcx
movq 0x6e8(%rbx), %rdx
movq %rax, 0x8(%rdx)
movq 0x10(%rdx), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %r15, 0x8(%rax)
movq 0x6e8(%rbx), %rdx
movq 0xea8(%rbx), %rsi
movq %rbx, %rdi
callq 0x38dfa
cmpb $0x8, (%r14)
jne 0xc7f97
movb 0x8(%r14), %al
movq 0x10(%r15), %rcx
movb %al, (%rcx,%r12)
jmp 0xc7ffb
testb $0x1, 0x3(%r15)
je 0xc7d77
movq 0x82c29(%rip), %rax     # 0x14a968
movq 0xf70(%rbx), %rcx
movq 0x6e8(%rbx), %rdx
movq %rax, 0x8(%rdx)
movq 0x10(%rdx), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %r15, 0x8(%rax)
movq 0x6e8(%rbx), %rdx
movq 0xea8(%rbx), %rsi
movq %rbx, %rdi
callq 0x38dfa
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x36924
jmp 0xc7d9b
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0xb7d1
movq %rax, 0x20(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1948(%rbx), %r14
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x5072c(%rip), %rcx     # 0x118504
jmp 0xc7f51
movq 0x1940(%rbx), %r14
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x506df(%rip), %rcx     # 0x1184e7
movq %rcx, 0x10(%rax)
movq $0x1c, 0x8(%rax)
jmp 0xc7f5d
movq 0x1948(%rbx), %r14
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x506ec(%rip), %rcx     # 0x118530
movq %rcx, 0x10(%rax)
movq $0x36, 0x8(%rax)
jmp 0xc7f5d
movq 0x82b0c(%rip), %rax     # 0x14a968
movq 0x1668(%rbx), %rcx
movq 0x6e8(%rbx), %rdx
movq %rax, 0x8(%rdx)
movq 0x10(%rdx), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %r15, 0x8(%rax)
movq 0x6e8(%rbx), %rdx
movq 0xea8(%rbx), %rsi
movq %rbx, %rdi
callq 0x38dfa
movzwl 0x6(%r15), %eax
testb $0x2, %al
jne 0xc7eb2
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *0x28(%r15)
jmp 0xc7ffb
cmpq $0x0, 0x6a0(%rbx)
js 0xc7ff3
movq 0x28(%r15), %rsi
cmpb $0x30, (%rsi)
jb 0xc7fd0
movq 0x10(%rsi), %rax
movq 0x700(%rbx), %rcx
movq %r14, 0x8(%rcx)
movq 0x700(%rbx), %rsi
movq %rbx, %rdi
callq *%rax
jmp 0xc7fea
movq 0x1948(%rbx), %r14
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x505f9(%rip), %rcx     # 0x118511
movq %rcx, 0x10(%rax)
movq $0x1e, 0x8(%rax)
jmp 0xc7f5d
movq 0x1948(%rbx), %r14
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x50616(%rip), %rcx     # 0x118567
movq %rcx, 0x10(%rax)
movq $0x2b, 0x8(%rax)
movq (%rbx), %rcx
movq 0x6e0(%rbx), %rdx
movq %rax, 0x8(%rdx)
movq 0x6e0(%rbx), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x6e0(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38dfa
testq %r14, %r14
setne %al
jmp 0xc7da1
movq 0x1940(%rbx), %r14
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x505d1(%rip), %rcx     # 0x118593
movq %rcx, 0x10(%rax)
movq $0x2c, 0x8(%rax)
jmp 0xc7f5d
movq 0x700(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x700(%rbx), %rdx
movq %rbx, %rdi
callq 0xaee6
cmpq 0x120(%rbx), %rax
je 0xc8004
movq 0x10(%r15), %rax
movq %r14, (%rax,%r12,8)
movq %r14, 0x20(%rbx)
jmp 0xc7d9f
movq 0x28(%r15), %rsi
cmpb $0x30, (%rsi)
jb 0xc8013
movq 0x8(%rsi), %rax
jmp 0xc8027
movq 0x18(%rsi), %rdx
movq %rbx, %rdi
callq 0x99caa
movq 0x8(%rax), %rax
addq $0x10, %rax
movq (%rax), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x99bbf
leaq 0x4ab1a(%rip), %rsi     # 0x112b58
movl $0x3, %edx
movq %rbx, %rdi
movq %r14, %rcx
movq %rax, %r8
callq 0xd4e5
testq %rax, %rax
jmp 0xc7f8f