// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: g_string_1
static s7_pointer g_string_1(s7_scheme *sc, s7_pointer args, s7_pointer sym)
    {
        int32_t i, len;
        s7_pointer x, newstr;
        char *str;

        /* get length for new string and check arg types */
        for (len = 0, x = args; is_not_null(x); len++, x = cdr(x))
        {
            s7_pointer p;
            p = car(x);
            if (!s7_is_character(p))
            {
                if (has_active_methods(sc, p))
                {
                    s7_pointer func;
                    func = find_method(sc, find_let(sc, p), sym);
                    if (func != sc->undefined)
                    {
                        s7_pointer y;
                        if (len == 0)
                            return(s7_apply_function(sc, func, args));
                        newstr = make_empty_string(sc, len, 0);
                        str = string_value(newstr);
                        for (i = 0, y = args; y != x; i++, y = cdr(y))
                            str[i] = character(car(y));
                        return(g_string_append_1(sc, set_plist_2(sc, newstr, s7_apply_function(sc, func, x)), sym));
                    }
                }
                return(wrong_type_argument(sc, sym, len + 1, car(x), T_CHARACTER));
            }
        }
        newstr = make_empty_string(sc, len, 0);
        str = string_value(newstr);
        for (i = 0, x = args; is_not_null(x); i++, x = cdr(x))
            str[i] = character(car(x));

        return(newstr);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rsi, 0x110(%rdi)
je 0x106790
xorl %r12d, %r12d
movq %rbx, %r13
movq 0x8(%r13), %rsi
movb (%rsi), %bpl
cmpb $0x8, %bpl
je 0x106771
testb $0x40, 0x3(%rsi)
je 0x1066f3
cmpb $0x1, 0x24c(%r14)
jne 0x1066f3
movq %r14, %rdi
callq 0x9a55
movq %r14, %rdi
movq %rax, %rsi
movq 0x8(%rsp), %rdx
callq 0x99ef
movq 0x128(%r14), %rcx
cmpq %rcx, %rax
je 0x1066ee
movq %rcx, 0x10(%rsp)
testq %r12, %r12
movq %rax, (%rsp)
movq %r14, %rdi
je 0x1066d7
movq %r12, %rsi
xorl %edx, %edx
callq 0xf83b
movq %rax, %r15
cmpq %rbx, %r13
je 0x10669c
movq 0x10(%r15), %rax
movq %rbx, %rcx
movq 0x8(%rcx), %rdx
movb 0x8(%rdx), %dl
movb %dl, (%rax)
movq 0x10(%rcx), %rcx
incq %rax
cmpq %r13, %rcx
jne 0x106687
movq %r14, %rdi
movq (%rsp), %rsi
movq %r13, %rdx
callq 0xbd41
movq 0x708(%r14), %rcx
movq %r15, 0x8(%rcx)
movq 0x710(%r14), %rcx
movq %rax, 0x8(%rcx)
movq 0x708(%r14), %rsi
movq %r14, %rdi
movq 0x8(%rsp), %rdx
callq 0x102a67
jmp 0x1066e2
movq %rax, %rsi
movq %rbx, %rdx
callq 0xbd41
movq %rax, %r15
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq %rcx, %rax
jne 0x106771
movq 0x8(%rsp), %rax
movq 0x8(%rax), %r15
cmpq $0x7fe, %r12            # imm = 0x7FE
ja 0x106713
leaq 0x48244(%rip), %rax     # 0x14e950
movq 0x8(%rax,%r12,8), %rdx
jmp 0x106751
movq 0x90(%r14), %rax
cmpq 0x98(%r14), %rax
ja 0x10672b
movq %r14, %rdi
callq 0xb389
leaq 0x1(%r12), %rax
movq 0x90(%r14), %rcx
leaq -0x8(%rcx), %rdx
movq %rdx, 0x90(%r14)
movq -0x8(%rcx), %rdx
movq $0xb, (%rdx)
movq %rax, 0x8(%rdx)
movq 0x8(%r13), %rcx
movq 0x140(%r14), %r8
movq 0x4c33d(%rip), %r9      # 0x152aa0
movq %r14, %rdi
movq %r15, %rsi
callq 0xb31d
movq %rax, %r15
cmpb $0x8, %bpl
jne 0x1067c5
incq %r12
movq 0x10(%r13), %r13
cmpq 0x110(%r14), %r13
jne 0x10660c
movl %r12d, %esi
jmp 0x106792
xorl %esi, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xf83b
movq %rax, %r15
cmpq %rbx, 0x110(%r14)
je 0x1067c5
movq 0x10(%r15), %rax
movq 0x8(%rbx), %rcx
movb 0x8(%rcx), %cl
movb %cl, (%rax)
movq 0x10(%rbx), %rbx
incq %rax
cmpq 0x110(%r14), %rbx
jne 0x1067ac
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq