// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: g_make_byte_vector
static s7_pointer g_make_byte_vector(s7_scheme *sc, s7_pointer args)
                {
#define H_make_byte_vector "(make-byte-vector len (byte 0)) makes a byte-vector of length len filled with byte."
#define Q_make_byte_vector s7_make_signature(sc, 3, sc->is_byte_vector_symbol, s7_make_signature(sc, 2, sc->is_integer_symbol, sc->is_pair_symbol), sc->is_byte_symbol)

                    s7_int len = 0, ib = 0;
                    s7_pointer p, init;
                    p = car(args);

                    if (!is_pair(p))
                    {
                        if (!s7_is_integer(p))
                            return(method_or_bust(sc, p, sc->make_byte_vector_symbol, args, T_INTEGER, 1));
                        len = s7_integer(p);
                        if ((len < 0) || (len > sc->max_vector_length))
                            return(out_of_range(sc, sc->make_byte_vector_symbol, small_int(1), p, (len < 0) ? its_negative_string : its_too_large_string));
                    }
                    if (is_pair(cdr(args)))
                    {
                        init = cadr(args);
                        if (!s7_is_integer(init))
                            return(method_or_bust(sc, init, sc->make_byte_vector_symbol, args, T_INTEGER, 2));
                        ib = s7_integer(init);
                        if ((ib < 0) || (ib > 255))
                            return(simple_wrong_type_argument_with_type(sc, sc->make_byte_vector_symbol, init, an_unsigned_byte_string));
                    }
                    else init = small_int(0);

                    if (!s7_is_integer(p))
                        return(g_make_vector_1(sc, set_plist_2(sc, p, init), sc->make_byte_vector_symbol));

                    p = make_simple_byte_vector(sc, len);
                    if ((len > 0) && (is_pair(cdr(args))))
                        local_memset((void *)(byte_vector_bytes(p)), ib, len);
                    return(p);
                }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x8(%rsi), %rsi
movzbl (%rsi), %ecx
cmpl $0x1, %ecx
je 0x81b93
cmpl $0xb, %ecx
jne 0x81be4
movq 0x8(%rsi), %rbx
testq %rbx, %rbx
js 0x81b1d
cmpq 0x2a0(%rdi), %rbx
jle 0x81b95
testq %rbx, %rbx
movq 0x12d0(%rdi), %rax
movq 0x8(%rax), %rax
movq 0xcce26(%rip), %rcx     # 0x14e958
leaq 0xd0f0f(%rip), %rdx     # 0x152a48
leaq 0xd0f00(%rip), %r8      # 0x152a40
cmovsq %rdx, %r8
movq (%r8), %rdx
movq 0x1ee8(%rdi), %r8
movq 0x10(%r8), %r8
movq %rax, 0x8(%r8)
movq 0x10(%r8), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x1948(%rdi), %r15
movq 0x1ee8(%rdi), %rdx
movq %r15, %rsi
callq 0x3b366
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %ebx, %ebx
movq 0x10(%r14), %rax
cmpb $0x1, (%rax)
jne 0x81bff
movq 0x8(%rax), %rax
cmpb $0xb, (%rax)
jne 0x81cab
movq 0x8(%rax), %r12
cmpq $0x100, %r12            # imm = 0x100
jb 0x81c09
movq 0x12d0(%rdi), %rcx
movq 0x8(%rcx), %rsi
movq 0x140(%rdi), %rcx
movq 0xd948f(%rip), %r8      # 0x15b060
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xfac8
movq 0x12d0(%rdi), %rdx
movq %r14, %rcx
movl $0xb, %r8d
movl $0x1, %r9d
jmp 0x81cc4
movq 0xccd4a(%rip), %rax     # 0x14e950
xorl %r12d, %r12d
cmpb $0xb, %cl
jne 0x81c77
movq %rbx, %rsi
callq 0x3f2f5
movq %rax, %r15
testq %rbx, %rbx
jle 0x81b84
movq 0x10(%r14), %rax
cmpb $0x1, (%rax)
jne 0x81b84
movq 0x10(%r15), %rdi
cmpq $0x8, %rbx
jb 0x81c5d
movq %rbx, %rax
shrq $0x3, %rax
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
imulq %r12, %rcx
movq %rcx, (%rdi)
addq $0x8, %rdi
decq %rax
jne 0x81c4e
andl $0x7, %ebx
testq %rbx, %rbx
je 0x81b84
movzbl %r12b, %esi
movq %rbx, %rdx
callq 0x9270
jmp 0x81b84
movq 0x708(%rdi), %rcx
movq %rsi, 0x8(%rcx)
movq 0x710(%rdi), %rcx
movq %rax, 0x8(%rcx)
movq 0x708(%rdi), %rsi
movq 0x12d0(%rdi), %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3ed20
movq 0x12d0(%rdi), %rdx
movq %rax, %rsi
movq %r14, %rcx
movl $0xb, %r8d
movl $0x2, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xf1ae