// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r15
cmpb $0xb, (%r15)
jne 0x5b0d3
movq 0x8(%r15), %r12
testq %r12, %r12
js 0x5b096
cmpq 0x2a8(%rbx), %r12
jle 0x5b160
testq %r12, %r12
movq 0x1310(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xba8ad(%rip), %rdx     # 0x115958
leaq 0xbe996(%rip), %rax     # 0x119a48
leaq 0xbe987(%rip), %rcx     # 0x119a40
cmovsq %rax, %rcx
movq (%rcx), %r8
movq %rbx, %rdi
movq %r15, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcb8f
testb $0x40, 0x3(%r15)
je 0x5b12d
cmpb $0x1, 0x24c(%rbx)
jne 0x5b12d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x88f3
movq 0x1310(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x888f
cmpq 0x128(%rbx), %rax
je 0x5b12d
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35492
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa34c
movq 0x1310(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xba819(%rip), %rdx     # 0x115958
movq 0x140(%rbx), %r8
movq 0xbe96b(%rip), %r9      # 0x119ab8
movq %rbx, %rdi
movq %r15, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9bbb
movq 0x10(%r14), %rax
cmpq 0x110(%rbx), %rax
je 0x5b1ae
movq 0x8(%rax), %rsi
cmpb $0x8, (%rsi)
jne 0x5b1c3
movb 0x8(%rsi), %bpl
movsbl %bpl, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd239
movq %rax, %rbx
testq %r12, %r12
je 0x5b1a2
testb %bpl, %bpl
jne 0x5b1a2
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x78377
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd239
movq 0x1310(%rbx), %rdx
pushq $0x8
popq %r8
pushq $0x2
popq %r9
movq %rbx, %rdi
movq %r14, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcd70