// File: /workspace/github_c_makefile_star2_O3/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 0x102c6c
movq 0x18(%r14), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x102be9
cmpq $0x1, 0x10(%rax)
jne 0x102cab
movq 0x10(%rcx), %rax
movq 0x8(%rax), %rsi
cmpb $0xb, (%rsi)
jne 0x102c87
movq 0x8(%rsi), %r12
testq %r12, %r12
js 0x102ccb
cmpq 0x8(%r14), %r12
jge 0x102ccb
movq 0x10(%rax), %rax
movq 0x8(%rax), %r15
cmpb $0xb, (%r15)
jne 0x102d33
movq 0x8(%r15), %r13
cmpq $0x100, %r13            # imm = 0x100
jb 0x102c54
movq 0xc38(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x140(%rbx), %rcx
movq 0x50417(%rip), %r8      # 0x153060
movq %rbx, %rdi
movq %r15, %rdx
callq 0xed2a
testb $0x1, 0x3(%r14)
jne 0x102d51
movq 0x10(%r14), %rax
movb %r13b, (%rax,%r12)
jmp 0x102d26
movq 0xc38(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x18, %r8d
movl $0x1, %r9d
jmp 0x102c9d
movq 0xc38(%rbx), %rdx
movq %rbx, %rdi
movl $0xb, %r8d
movl $0x2, %r9d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe42d
movq 0xc38(%rbx), %rdx
movq %rbx, %rdi
movq %rcx, %rsi
movl $0x18, %ecx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xfec8b
testq %r12, %r12
movq 0xc38(%rbx), %rax
movq 0x8(%rax), %rax
leaq 0x47d68(%rip), %rcx     # 0x14aa48
leaq 0x47d59(%rip), %rdx     # 0x14aa40
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 0x38dfa
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 0x102c9d
movq 0x47c10(%rip), %rax     # 0x14a968
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 0x102d1b