// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: g_bv_set_3
static s7_pointer g_bv_set_3(s7_scheme *sc, s7_pointer args)
                {
                    s7_pointer v, index, value;
                    s7_int ind, uval;
                    v = car(args);
                    if (!is_byte_vector(v))
                        return(method_or_bust(sc, v, sc->byte_vector_set_symbol, args, T_BYTE_VECTOR, 1));
                    if (vector_rank(v) != 1)
                        return(univect_set(sc, args, sc->byte_vector_set_symbol, T_BYTE_VECTOR));
                    index = cadr(args);
                    if (!s7_is_integer(index))
                        return(method_or_bust(sc, index, sc->byte_vector_set_symbol, args, T_INTEGER, 2));
                    ind = s7_integer(index);
                    if ((ind < 0) || (ind >= vector_length(v)))
                        return(simple_out_of_range(sc, sc->byte_vector_set_symbol, index, (ind < 0) ? its_negative_string : its_too_large_string));
                    value = caddr(args);
                    if (!s7_is_integer(value))
                        return(method_or_bust(sc, value, sc->byte_vector_set_symbol, args, T_INTEGER, 3));
                    if ((ind < 0) || (ind >= vector_length(v)))
                        return(simple_out_of_range(sc, sc->byte_vector_set_symbol, index, (ind < 0) ? its_negative_string : its_too_large_string));
                    uval = s7_integer(value);
                    if ((uval < 0) || (uval > 255))
                        simple_wrong_type_argument_with_type(sc, sc->byte_vector_set_symbol, value, an_unsigned_byte_string);
                    if (is_immutable_vector(v))
                        return(immutable_object_error(sc, set_elist_3(sc, immutable_error_string, sc->byte_vector_set_symbol, v)));
                    byte_vector(v, ind) = (uint8_t)uval;
                    return(value);
                }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rcx
movq %rdi, %rbx
movq 0x8(%rsi), %r14
cmpb $0x18, (%r14)
jne 0x10c0a4
movq 0x18(%r14), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x10c021
cmpq $0x1, 0x10(%rax)
jne 0x10c0e3
movq 0x10(%rcx), %rax
movq 0x8(%rax), %rsi
cmpb $0xb, (%rsi)
jne 0x10c0bf
movq 0x8(%rsi), %r12
testq %r12, %r12
js 0x10c103
cmpq 0x8(%r14), %r12
jge 0x10c103
movq 0x10(%rax), %rax
movq 0x8(%rax), %r15
cmpb $0xb, (%r15)
jne 0x10c16b
movq 0x8(%r15), %r13
cmpq $0x100, %r13            # imm = 0x100
jb 0x10c08c
movq 0xc38(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x140(%rbx), %rcx
movq 0x4efdf(%rip), %r8      # 0x15b060
movq %rbx, %rdi
movq %r15, %rdx
callq 0xfac8
testb $0x1, 0x3(%r14)
jne 0x10c189
movq 0x10(%r14), %rax
movb %r13b, (%rax,%r12)
jmp 0x10c15e
movq 0xc38(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x18, %r8d
movl $0x1, %r9d
jmp 0x10c0d5
movq 0xc38(%rbx), %rdx
movq %rbx, %rdi
movl $0xb, %r8d
movl $0x2, %r9d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf1ae
movq 0xc38(%rbx), %rdx
movq %rbx, %rdi
movq %rcx, %rsi
movl $0x18, %ecx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x107e66
testq %r12, %r12
movq 0xc38(%rbx), %rax
movq 0x8(%rax), %rax
leaq 0x46930(%rip), %rcx     # 0x152a48
leaq 0x46921(%rip), %rdx     # 0x152a40
cmovsq %rcx, %rdx
movq (%rdx), %rcx
movq 0x1ef8(%rbx), %rdx
movq 0x10(%rdx), %rdx
movq %rax, 0x8(%rdx)
movq 0x10(%rdx), %rax
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x1948(%rbx), %r15
movq 0x1ef8(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b366
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0xc38(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movl $0xb, %r8d
movl $0x3, %r9d
jmp 0x10c0d5
movq 0x467d8(%rip), %rax     # 0x152968
movq 0xc38(%rbx), %rcx
movq 0x6e8(%rbx), %rdx
movq %rax, 0x8(%rdx)
movq 0x10(%rdx), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %r14, 0x8(%rax)
movq 0x6e8(%rbx), %rdx
movq 0xea8(%rbx), %r15
jmp 0x10c153