// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: g_make_string
static s7_pointer g_make_string(s7_scheme *sc, s7_pointer args)
    {
#define H_make_string "(make-string len (val #\\space)) makes a string of length len filled with the character val (default: space)"
#define Q_make_string s7_make_signature(sc, 3, sc->is_string_symbol, sc->is_integer_symbol, sc->is_char_symbol)

        s7_pointer n;
        s7_int len;

        n = car(args);
        if (!s7_is_integer(n))
        {
            check_method(sc, n, sc->make_string_symbol, args);
            return(wrong_type_argument(sc, sc->make_string_symbol, 1, n, T_INTEGER));
        }

        len = s7_integer(n);
#if WITH_GMP
        if ((len == 0) && (!s7_is_zero(n)))
            return(s7_out_of_range_error(sc, "make-string", 1, n, "big integer is too big for s7_int"));
#endif
        if ((len < 0) || (len > sc->max_string_length))
            return(out_of_range(sc, sc->make_string_symbol, small_int(1), n, (len < 0) ? its_negative_string : its_too_large_string));

        if (is_not_null(cdr(args)))
        {
            char fill;
            if (!s7_is_character(cadr(args)))
                return(method_or_bust(sc, cadr(args), sc->make_string_symbol, args, T_CHARACTER, 2));
            fill = s7_character(cadr(args));
            n = make_empty_string(sc, len, fill);
            if ((fill == '\0') && (len > 0))
                memclr((void *)string_value(n), (size_t)len);
            return(n);
        }
        return(make_empty_string(sc, len, '\0')); /* #\null here means "don't fill/clear" */
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %r14
cmpb $0xb, (%r14)
jne 0x76111
movq 0x8(%r14), %r12
testq %r12, %r12
js 0x760a2
cmpq 0x2a8(%rbx), %r12
jle 0x7628e
testq %r12, %r12
movq 0x1310(%rbx), %rax
movq 0x8(%rax), %rax
movq 0xd88a1(%rip), %rcx     # 0x14e958
leaq 0xdc98a(%rip), %rdx     # 0x152a48
leaq 0xdc97b(%rip), %rsi     # 0x152a40
cmovsq %rdx, %rsi
movq (%rsi), %rdx
movq 0x1ee8(%rbx), %rsi
movq 0x10(%rsi), %rsi
movq %rax, 0x8(%rsi)
movq 0x10(%rsi), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %r14, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x1948(%rbx), %r15
movq 0x1ee8(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b366
jmp 0x76305
movb $0x1, %bpl
testb $0x40, 0x3(%r14)
je 0x7624c
cmpb $0x1, 0x24c(%rbx)
jne 0x7624c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9a55
movq 0x1310(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x99ef
cmpq 0x128(%rbx), %rax
je 0x7624c
cmpb $0x1, (%r15)
jne 0x7635e
movq %rax, 0x10(%rsp)
movq %r15, 0x4c8(%rbx)
movq 0x8(%r15), %rbp
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r12
cmpq 0x98(%rbx), %rax
ja 0x7618f
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %rbp, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %rax, 0x8(%rsp)
movq %rax, 0x4e8(%rbx)
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
jne 0x76228
movq 0x8(%rsp), %rbp
movq 0x8(%r15), %r12
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r13
cmpq 0x98(%rbx), %rax
ja 0x761f2
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %r12, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %rax, 0x10(%rbp)
movq 0x10(%r15), %r15
cmpb $0x1, (%r15)
movq %rax, %rbp
je 0x761cf
movq 0x110(%rbx), %rax
movq %rax, 0x4e8(%rbx)
movq %rax, 0x4c8(%rbx)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rdx
jmp 0x76365
testb %bpl, %bpl
je 0x76305
movq 0x1310(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xd86f1(%rip), %rdx     # 0x14e958
movq 0x140(%rbx), %r8
movq 0xdc843(%rip), %r9      # 0x152ab8
movq %rbx, %rdi
movq %r14, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb31d
movq 0x10(%r15), %rax
cmpq 0x110(%rbx), %rax
je 0x76317
movq 0x8(%rax), %rsi
cmpb $0x8, (%rsi)
jne 0x76332
movb 0x8(%rsi), %bpl
movsbl %bpl, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf83b
movq %rax, %r15
testq %r12, %r12
je 0x76305
testb %bpl, %bpl
jne 0x76305
movq 0x10(%r15), %rbx
cmpq $0x8, %r12
jb 0x762f3
movabsq $0x7ffffffffffffff8, %r14 # imm = 0x7FFFFFFFFFFFFFF8
andq %r12, %r14
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x9270
addq %r14, %rbx
andl $0x7, %r12d
testq %r12, %r12
je 0x76305
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x9270
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf83b
movq 0x1310(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rcx
movl $0x8, %r8d
movl $0x2, %r9d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf1ae
movq 0x110(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xbd41
movq %rax, %r15
xorl %ebp, %ebp
jmp 0x7624c