// File: /workspace/github_c_makefile_star2_O2/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 0x9d745
movq 0x10(%r15), %r15
jmp 0x9d793
movq 0x1918(%rbx), %rsi
movq 0x86cbd(%rip), %rcx     # 0x124410
movq (%rbx), %rdx
movq 0x8(%rdx), %rdx
movq 0x8(%rdx), %rdx
leaq 0x7c2fb(%rip), %rdi     # 0x119a60
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 0x2cdc0
movzbl (%r15), %eax
leal -0x13(%rax), %ecx
cmpl $0x20, %ecx
ja 0x9d97d
leaq 0x370b2(%rip), %rdx     # 0xd485c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x20(%r15), %rcx
movzbl (%rcx), %edx
leaq 0x7db6f(%rip), %rsi     # 0x11b330
cmpb $0x0, (%rdx,%rsi)
jne 0x9d7d8
leaq 0x7dba2(%rip), %rsi     # 0x11b370
cmpb $0x1, (%rdx,%rsi)
jne 0x9d9b7
cmpb $0x30, %dl
jb 0x9d857
movq 0x570(%rbx), %rax
movq %r12, 0x8(%rax)
movq 0x578(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x20(%r15), %rax
jmp 0x9d845
movq 0x8(%r15), %rcx
movq 0x30(%rcx), %rcx
movzbl (%rcx), %edx
leaq 0x7db25(%rip), %rsi     # 0x11b330
cmpb $0x0, (%rdx,%rsi)
jne 0x9d822
leaq 0x7db58(%rip), %rsi     # 0x11b370
cmpb $0x1, (%rdx,%rsi)
jne 0x9d9b7
cmpb $0x30, %dl
jb 0x9d857
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 0x9db68
movq %rcx, (%rbx)
testb $0x10, 0x3(%rcx)
jne 0x9d90c
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 0x9d976
movq 0x18(%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x9d8d3
cmpq $0x2, 0x10(%rax)
jl 0x9d8d3
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 0x627c1
jmp 0x9db68
cmpb $0xb, (%r12)
jne 0x9da0a
movq 0x8(%r12), %r12
testq %r12, %r12
js 0x9db7a
cmpq 0x8(%r15), %r12
jge 0x9dbe6
movq (%r15), %rax
btl $0x18, %eax
jb 0x9dc22
shrq $0x30, %rax
jmp 0x9dc5f
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r15
cmpq 0x98(%rbx), %rax
ja 0x9d932
movq %rbx, %rdi
callq 0x9c27
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 0x9db6e
cmpl $0x1, %eax
jne 0x9d9b7
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 0x5fd3e
jmp 0x9db68
movq 0x1918(%rbx), %rsi
movq 0x86a4b(%rip), %rcx     # 0x124410
movq (%rbx), %rdx
movq 0x8(%rdx), %rdx
movq 0x8(%rdx), %rdx
leaq 0x7c089(%rip), %rdi     # 0x119a60
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 0x2cdc0
jmp 0x9db6c
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 0x46a45(%rip), %rcx     # 0xe447a
movq %rcx, 0x10(%rax)
movq $0x29, 0x8(%rax)
jmp 0x9dd23
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 0x9db68
cmpb $0xb, (%r12)
jne 0x9dbaa
movq 0x8(%r12), %r12
testq %r12, %r12
js 0x9dcb3
cmpq 0x8(%r15), %r12
jge 0x9dcec
testb $0x1, 0x3(%r15)
je 0x9daea
movq 0x7beaf(%rip), %rax     # 0x119968
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), %rsi
movq %rbx, %rdi
callq 0x972b
cmpb $0x8, (%r14)
jne 0x9dd5d
movb 0x8(%r14), %al
movq 0x10(%r15), %rcx
movb %al, (%rcx,%r12)
jmp 0x9ddc1
testb $0x1, 0x3(%r15)
je 0x9db44
movq 0x7be55(%rip), %rax     # 0x119968
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), %rsi
movq %rbx, %rdi
callq 0x972b
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2a7e4
jmp 0x9db68
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0xaacc
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 0x468ff(%rip), %rcx     # 0xe44a4
jmp 0x9dd17
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 0x468b2(%rip), %rcx     # 0xe4487
movq %rcx, 0x10(%rax)
movq $0x1c, 0x8(%rax)
jmp 0x9dd23
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 0x468bf(%rip), %rcx     # 0xe44d0
movq %rcx, 0x10(%rax)
movq $0x36, 0x8(%rax)
jmp 0x9dd23
movq 0x7bd3f(%rip), %rax     # 0x119968
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), %rsi
movq %rbx, %rdi
callq 0x972b
movzwl 0x6(%r15), %eax
testb $0x2, %al
jne 0x9dc78
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *0x28(%r15)
jmp 0x9ddc1
cmpq $0x0, 0x6a0(%rbx)
js 0x9ddb9
movq 0x28(%r15), %rsi
cmpb $0x30, (%rsi)
jb 0x9dd96
movq 0x10(%rsi), %rax
movq 0x700(%rbx), %rcx
movq %r14, 0x8(%rcx)
movq 0x700(%rbx), %rsi
movq %rbx, %rdi
callq *%rax
jmp 0x9ddb0
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 0x467d3(%rip), %rcx     # 0xe44b1
movq %rcx, 0x10(%rax)
movq $0x1e, 0x8(%rax)
jmp 0x9dd23
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 0x467f0(%rip), %rcx     # 0xe4507
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 0x2cdc0
testq %r14, %r14
setne %al
jmp 0x9db6e
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 0x467ab(%rip), %rcx     # 0xe4533
movq %rcx, 0x10(%rax)
movq $0x2c, 0x8(%rax)
jmp 0x9dd23
movq 0x700(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x700(%rbx), %rdx
movq %rbx, %rdi
callq 0xa34c
cmpq 0x120(%rbx), %rax
je 0x9ddca
movq 0x10(%r15), %rax
movq %r14, (%rax,%r12,8)
movq %r14, 0x20(%rbx)
jmp 0x9db6c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7b119
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7b04d
leaq 0x40d0e(%rip), %rsi     # 0xdeaf8
pushq $0x3
popq %rdx
movq %rbx, %rdi
movq %r14, %rcx
movq %rax, %r8
callq 0xc2b0
testq %rax, %rax
jmp 0x9dd55