// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: g_vector_fill_1
static s7_pointer g_vector_fill_1(s7_scheme *sc, s7_pointer caller, s7_pointer args)
                {
                    s7_pointer x, fill;
                    s7_int start = 0, end;

                    x = car(args);
                    if (!is_any_vector(x))
                    {
                        check_method(sc, x, sc->vector_fill_symbol, args);
                        /* not two_methods (and fill!) here else we get stuff like:
                         *   (let ((e (openlet (inlet 'fill! (lambda (obj val) (string-fill! (obj 'value) val)) 'value "01234")))) (vector-fill! e #\a) (e 'value)) -> "aaaaa"
                         */
                        return(wrong_type_argument(sc, caller, 1, x, T_VECTOR));
                    }
                    if (is_immutable_vector(x))
                        return(immutable_object_error(sc, set_elist_3(sc, immutable_error_string, caller, x)));

                    fill = cadr(args);
                    if (is_float_vector(x))
                    {
                        if (!s7_is_real(fill)) /* possibly a bignum */
                            return(method_or_bust(sc, fill, caller, args, T_REAL, 2));
                    }
                    else
                    {
                        if ((is_int_vector(x)) || (is_byte_vector(x)))
                        {
                            if (!s7_is_integer(fill))
                                return(method_or_bust(sc, fill, caller, args, T_INTEGER, 2));
                            if ((is_byte_vector(x)) &&
                                    ((s7_integer(fill) < 0) || (s7_integer(fill) > 255)))
                                return(out_of_range(sc, caller, small_int(2), fill, an_unsigned_byte_string));
                        }
                    }

                    end = vector_length(x);
                    if (!is_null(cddr(args)))
                    {
                        s7_pointer p;
                        p = start_and_end(sc, caller, args, 3, &start, &end);
                        if (p != sc->unused) return(p);
                        if (start == end) return(fill);
                    }
                    if (end == 0) return(fill);

                    if ((start == 0) && (end == vector_length(x)))
                        s7_vector_fill(sc, x, fill);
                    else
                    {
                        s7_int i;
                        if (is_normal_vector(x))
                        {
                            if ((is_typed_vector(x)) &&
                                    (typed_vector_typer_call(sc, x, set_plist_1(sc, fill)) == sc->F))
                                s7_wrong_type_arg_error(sc, "vector fill!", 2, fill, make_type_name(sc, typed_vector_typer_name(sc, x), INDEFINITE_ARTICLE));

                            for (i = start; i < end; i++)
                                vector_element(x, i) = fill;
                        }
                        else
                        {
                            if (is_int_vector(x))
                            {
                                s7_int k;
                                k = s7_integer(fill);
                                if (k == 0)
                                    memclr((void *)(int_vector_ints(x) + start), (end - start) * sizeof(s7_int));
                                else
                                {
                                    for (i = start; i < end; i++)
                                        int_vector(x, i) = k;
                                }
                            }
                            else
                            {
                                if (is_float_vector(x))
                                {
                                    s7_double y;
                                    y = s7_real(fill);
                                    if (y == 0.0)
                                        memclr((void *)(float_vector_floats(x) + start), (end - start) * sizeof(s7_double));
                                    else
                                    {
                                        s7_double *orig;
                                        s7_int left;
                                        orig = float_vector_floats(x);
                                        left = end - 8;
                                        i = start;
                                        while (i <= left)
                                            LOOP_8(orig[i++] = y);
                                        for (; i < end; i++)
                                            orig[i] = y;
                                    }
                                }
                                else
                                {
                                    if (is_byte_vector(x))
                                    {
                                        uint8_t k;
                                        k = (uint8_t)s7_integer(fill);
                                        if (k == 0)
                                            memclr((void *)(byte_vector_bytes(x) + start), end - start);
                                        else local_memset((void *)(byte_vector_bytes(x) + start), k, end - start);
                                    }}}}}
                    return(fill);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r12
movq $0x0, 0x8(%rsp)
movq 0x8(%rdx), %r15
movzbl (%r15), %eax
leaq 0x108304(%rip), %rdx    # 0x14ac20
movq (%r15), %rcx
cmpb $0x0, (%rax,%rdx)
je 0x42980
btl $0x18, %ecx
jb 0x42af2
movq 0x10(%r13), %rax
movq 0x8(%rax), %rbx
cmpb $0x16, %cl
je 0x42b35
movzbl %cl, %edx
cmpl $0x18, %edx
je 0x42b35
cmpl $0x17, %edx
jne 0x42b99
movzbl (%rbx), %ecx
leaq 0x108051(%rip), %rdx    # 0x14a9b0
cmpb $0x0, (%rcx,%rdx)
jne 0x42b99
movq %r12, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movl $0xd, %r8d
jmp 0x42c11
btl $0x1e, %ecx
jae 0x42abf
cmpb $0x1, 0x24c(%r12)
jne 0x42abf
movq %r12, %rdi
movq %r15, %rsi
callq 0x8a63
movq 0x1658(%r12), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x89ff
cmpq 0x128(%r12), %rax
je 0x42abf
cmpb $0x1, (%r13)
jne 0x42c4c
movq %rax, 0x10(%rsp)
movq %r13, 0x4c8(%r12)
movq 0x8(%r13), %r15
movq 0x90(%r12), %rax
movq 0x110(%r12), %rbp
cmpq 0x98(%r12), %rax
ja 0x42a0b
movq %r12, %rdi
callq 0xa550
movq 0x90(%r12), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r12)
movq -0x8(%rax), %r14
movq $0x200001, (%r14)       # imm = 0x200001
movq %r15, 0x8(%r14)
movq %rbp, 0x10(%r14)
movq %r14, 0x4e8(%r12)
movq 0x10(%r13), %r15
cmpb $0x1, (%r15)
jne 0x42a9d
movq %r14, %r13
movq 0x8(%r15), %rbp
movq 0x90(%r12), %rax
movq 0x110(%r12), %rbx
cmpq 0x98(%r12), %rax
ja 0x42a6d
movq %r12, %rdi
callq 0xa550
movq 0x90(%r12), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r12)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %rbp, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rax, 0x10(%r13)
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
movq %rax, %r13
je 0x42a3f
movq 0x110(%r12), %rax
movq %rax, 0x4e8(%r12)
movq %rax, 0x4c8(%r12)
movq 0x10(%rsp), %rax
jmp 0x42c54
movq 0x8(%rbp), %rsi
movq 0x103e8e(%rip), %rdx    # 0x146958
movq 0x140(%r12), %r8
movq 0x10802f(%rip), %r9     # 0x14ab08
movq %r12, %rdi
movq %r15, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa4e4
movq 0x107e6f(%rip), %rax    # 0x14a968
movq 0x6e8(%r12), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
movq %rbp, 0x8(%rax)
movq 0x10(%rax), %rax
movq %r15, 0x8(%rax)
movq 0x6e8(%r12), %rdx
movq 0xea8(%r12), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x38dfa
jmp 0x42f57
cmpb $0xb, (%rbx)
jne 0x42bff
cmpb $0x18, %cl
jne 0x42b99
cmpq $0x100, 0x8(%rbx)       # imm = 0x100
jb 0x42b99
movq 0x8(%rbp), %rax
movq 0x103e08(%rip), %rcx    # 0x146960
movq 0x110501(%rip), %rdx    # 0x153060
movq 0x1ee8(%r12), %rsi
movq 0x10(%rsi), %rsi
movq %rax, 0x8(%rsi)
movq 0x10(%rsi), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rbx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x1948(%r12), %r14
movq 0x1ee8(%r12), %rdx
jmp 0x42b25
movq 0x8(%r15), %r14
movq %r14, (%rsp)
movq 0x10(%rax), %rax
cmpq 0x110(%r12), %rax
je 0x42c2a
leaq 0x8(%rsp), %r8
movq %rsp, %r9
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl $0x3, %ecx
callq 0x9a55e
movq %rax, %r14
cmpq 0x140(%r12), %rax
jne 0x42f57
movq 0x8(%rsp), %r13
movq (%rsp), %r14
cmpq %r14, %r13
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x42f54
testq %r13, %r13
jne 0x42c73
jmp 0x42c33
movq %r12, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movl $0xb, %r8d
movl $0x2, %r9d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe42d
testq %r14, %r14
je 0x42f54
cmpq 0x8(%r15), %r14
jne 0x42c70
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3b0e4
jmp 0x42f54
movq 0x110(%r12), %r14
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xaee6
xorl %r13d, %r13d
movzbl (%r15), %eax
addl $-0x15, %eax
cmpl $0x3, %eax
ja 0x42f54
leaq 0xc4b8e(%rip), %rcx     # 0x107818
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x2, 0x6(%r15)
je 0x42f3f
movq 0x28(%r15), %rsi
cmpb $0x30, (%rsi)
jb 0x42df1
movq 0x10(%rsi), %rax
movq 0x700(%r12), %rcx
movq %rbx, 0x8(%rcx)
movq 0x700(%r12), %rsi
movq %r12, %rdi
callq *%rax
jmp 0x42e0d
cmpb $0xd, (%rbx)
jne 0x42d93
movsd 0x8(%rbx), %xmm0
jmp 0x42da9
cmpb $0xb, (%rbx)
jne 0x42d61
movzbl 0x8(%rbx), %eax
testq %rax, %rax
je 0x42d61
subq %r13, %r14
addq 0x10(%r15), %r13
cmpq $0x8, %r14
jb 0x42d21
movq %r14, %rcx
shrq $0x3, %rcx
movabsq $0x101010101010101, %rdx # imm = 0x101010101010101
imulq %rax, %rdx
movq %rdx, (%r13)
addq $0x8, %r13
decq %rcx
jne 0x42d10
andl $0x7, %r14d
testq %r14, %r14
je 0x42f54
movzbl %al, %esi
movq %r13, %rdi
jmp 0x42dd2
cmpb $0xb, (%rbx)
jne 0x42db5
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x42db5
cmpq %r13, %r14
jle 0x42f54
movq 0x10(%r15), %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
cmpq %r13, %r14
jne 0x42d4c
jmp 0x42f54
subq %r13, %r14
addq 0x10(%r15), %r13
cmpq $0x8, %r14
jb 0x42d89
movq %r14, %r15
andq $-0x8, %r15
movq %r13, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x8270
addq %r15, %r13
andl $0x7, %r14d
testq %r14, %r14
jne 0x42dcd
jmp 0x42f54
movq 0x107c96(%rip), %rdi    # 0x14aa30
leaq 0xc72d7(%rip), %rdx     # 0x10a078
movq %rbx, %rsi
callq 0xd498
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x42ddf
jp 0x42ddf
subq %r13, %r14
shlq $0x3, %r14
testq %r14, %r14
je 0x42f54
shlq $0x3, %r13
addq 0x10(%r15), %r13
movq %r13, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x8270
jmp 0x42f54
movq 0x10(%r15), %rcx
leaq -0x8(%r14), %rax
cmpq %rax, %r13
jle 0x42e31
movq %r13, %rdx
jmp 0x42e60
movq 0x700(%r12), %rax
movq %rbx, 0x8(%rax)
movq 0x700(%r12), %rdx
movq %r12, %rdi
callq 0xaee6
cmpq 0x120(%r12), %rax
jne 0x42f3f
movq 0x28(%r15), %rsi
cmpb $0x30, (%rsi)
jb 0x42f01
movq 0x8(%rsi), %rax
jmp 0x42f15
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movupd %xmm1, (%rcx,%r13,8)
movupd %xmm1, 0x10(%rcx,%r13,8)
leaq 0x8(%r13), %rdx
movupd %xmm1, 0x20(%rcx,%r13,8)
movupd %xmm1, 0x30(%rcx,%r13,8)
movq %rdx, %r13
cmpq %rax, %rdx
jle 0x42e39
subq %rdx, %r14
jle 0x42f54
leaq 0x1(%r14), %rax
andq $-0x2, %rax
decq %r14
movq %r14, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
leaq (%rcx,%rdx,8), %rcx
addq $0x8, %rcx
xorl %edx, %edx
movdqa 0xc7040(%rip), %xmm2    # 0x109ed0
movdqa 0xc7048(%rip), %xmm3    # 0x109ee0
pxor %xmm3, %xmm1
pcmpeqd %xmm4, %xmm4
movq %rdx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
por %xmm2, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm1, %xmm6
pcmpeqd %xmm1, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0x42ee2
movsd %xmm0, -0x8(%rcx,%rdx,8)
pxor %xmm4, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x42ef6
movsd %xmm0, (%rcx,%rdx,8)
addq $0x2, %rdx
cmpq %rdx, %rax
jne 0x42ea0
jmp 0x42f54
movq 0x18(%rsi), %rdx
movq %r12, %rdi
callq 0x99caa
movq 0x8(%rax), %rax
addq $0x10, %rax
movq (%rax), %rsi
movq %r12, %rdi
movl $0x1, %edx
callq 0x99bbf
leaq 0xd41d2(%rip), %rsi     # 0x1170fe
movl $0x2, %edx
movq %r12, %rdi
movq %rbx, %rcx
movq %rax, %r8
callq 0xd4e5
cmpq %r13, %r14
jle 0x42f54
movq 0x10(%r15), %rax
movq %rbx, (%rax,%r13,8)
incq %r13
cmpq %r13, %r14
jne 0x42f44
movq %rbx, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq