// File: /workspace/github_c_makefile_star2_O1/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 0xd00e7
movq 0x10(%r15), %r15
jmp 0xd0135
movq 0x1918(%rbx), %rsi
movq 0x8d31b(%rip), %rcx     # 0x15d410
movq (%rbx), %rdx
movq 0x8(%rdx), %rdx
movq 0x8(%rdx), %rdx
leaq 0x82959(%rip), %rdi     # 0x152a60
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 0x3b366
movzbl (%r15), %eax
leal -0x13(%rax), %ecx
cmpl $0x20, %ecx
ja 0xd036f
leaq 0x416b0(%rip), %rdx     # 0x1117fc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x20(%r15), %rcx
movzbl (%rcx), %edx
leaq 0x841cd(%rip), %rsi     # 0x154330
cmpb $0x0, (%rdx,%rsi)
jne 0xd017a
leaq 0x84200(%rip), %rsi     # 0x154370
cmpb $0x1, (%rdx,%rsi)
jne 0xd03b6
cmpb $0x30, %dl
jb 0xd01f9
movq 0x570(%rbx), %rax
movq %r12, 0x8(%rax)
movq 0x578(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x20(%r15), %rax
jmp 0xd01e7
movq 0x8(%r15), %rcx
movq 0x30(%rcx), %rcx
movzbl (%rcx), %edx
leaq 0x84183(%rip), %rsi     # 0x154330
cmpb $0x0, (%rdx,%rsi)
jne 0xd01c4
leaq 0x841b6(%rip), %rsi     # 0x154370
cmpb $0x1, (%rdx,%rsi)
jne 0xd03b6
cmpb $0x30, %dl
jb 0xd01f9
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 0xd0575
movq %rcx, (%rbx)
testb $0x10, 0x3(%rcx)
jne 0xd02fe
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 0xd0368
movq 0x18(%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xd0275
cmpq $0x2, 0x10(%rax)
jl 0xd0275
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 0x7fcf5
jmp 0xd0575
cmpb $0xb, (%r12)
jne 0xd0409
movq 0x8(%r12), %r12
testq %r12, %r12
js 0xd0589
cmpq 0x8(%r15), %r12
jge 0xd05f5
testb $0x1, 0x3(%r15)
je 0xd02de
movq 0x826c2(%rip), %rax     # 0x152968
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 0x3b366
testb $0x2, 0x6(%r15)
jne 0xd0631
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *0x28(%r15)
jmp 0xd0784
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r15
cmpq 0x98(%rbx), %rax
ja 0xd031d
movq %rbx, %rdi
callq 0xb389
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 0xd057b
cmpl $0x1, %eax
jne 0xd03b6
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 0xefca0
jmp 0xd0575
movq 0x1918(%rbx), %rsi
movq 0x8d04c(%rip), %rcx     # 0x15d410
movq (%rbx), %rdx
movq 0x8(%rdx), %rdx
movq 0x8(%rdx), %rdx
leaq 0x8268a(%rip), %rdi     # 0x152a60
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 0x3b366
jmp 0xd0579
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 0x50f96(%rip), %rcx     # 0x1213ca
movq %rcx, 0x10(%rax)
movq $0x29, 0x8(%rax)
jmp 0xd06dc
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 0xd0575
cmpb $0xb, (%r12)
jne 0xd05b9
movq 0x8(%r12), %r12
testq %r12, %r12
js 0xd066c
cmpq 0x8(%r15), %r12
jge 0xd06a5
testb $0x1, 0x3(%r15)
je 0xd04f0
movq 0x824b0(%rip), %rax     # 0x152968
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 0x3b366
cmpb $0x8, (%r14)
jne 0xd0720
movb 0x8(%r14), %al
movq 0x10(%r15), %rcx
movb %al, (%rcx,%r12)
jmp 0xd0784
testb $0x1, 0x3(%r15)
je 0xd0551
movq 0x8244f(%rip), %rax     # 0x152968
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 0x3b366
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x38db7
jmp 0xd0575
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0xc645
movq %rax, 0x20(%rbx)
xorl %eax, %eax
andb $0x1, %al
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 0x50e40(%rip), %rcx     # 0x1213f4
jmp 0xd06d0
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 0x50df3(%rip), %rcx     # 0x1213d7
movq %rcx, 0x10(%rax)
movq $0x1c, 0x8(%rax)
jmp 0xd06dc
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 0x50e00(%rip), %rcx     # 0x121420
movq %rcx, 0x10(%rax)
movq $0x36, 0x8(%rax)
jmp 0xd06dc
cmpq $0x0, 0x6a0(%rbx)
js 0xd077c
movq 0x28(%r15), %rsi
cmpb $0x30, (%rsi)
jb 0xd0759
movq 0x10(%rsi), %rax
movq 0x700(%rbx), %rcx
movq %r14, 0x8(%rcx)
movq 0x700(%rbx), %rsi
movq %rbx, %rdi
callq *%rax
jmp 0xd0773
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 0x50d6a(%rip), %rcx     # 0x121401
movq %rcx, 0x10(%rax)
movq $0x1e, 0x8(%rax)
jmp 0xd06dc
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 0x50d87(%rip), %rcx     # 0x121457
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 0x3b366
testq %r14, %r14
setne %al
xorl %ecx, %ecx
testb %cl, %cl
je 0xd057b
jmp 0xd0579
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 0x50d38(%rip), %rcx     # 0x121483
movq %rcx, 0x10(%rax)
movq $0x2c, 0x8(%rax)
jmp 0xd06dc
movq 0x700(%rbx), %rax
movq %r14, 0x8(%rax)
movq 0x700(%rbx), %rdx
movq %rbx, %rdi
callq 0xbd41
cmpq 0x120(%rbx), %rax
je 0xd078c
movq 0x10(%r15), %rax
movq %r14, (%rax,%r12,8)
movq %r14, 0x20(%rbx)
movb $0x1, %cl
jmp 0xd0713
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa0581
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0xa0491
leaq 0x4b29a(%rip), %rsi     # 0x11ba48
movl $0x3, %edx
movq %rbx, %rdi
movq %r14, %rcx
movq %rax, %r8
callq 0xe25f
testq %rax, %rax
jmp 0xd070e