// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: g_symbol
static s7_pointer g_symbol(s7_scheme *sc, s7_pointer args)
    {
#define H_symbol "(symbol str ...) returns its string arguments concatenated and converted to a symbol"
#define Q_symbol s7_make_circular_signature(sc, 1, 2, sc->is_symbol_symbol, sc->is_string_symbol)

        s7_int len = 0, cur_len;
        s7_pointer p, sym;
        block_t *b;
        char *name;

        for (p = args; is_pair(p); p = cdr(p))
            if (is_string(car(p)))
                len += string_length(car(p));
            else break;

        if (is_pair(p))
        {
            if (is_null(cdr(args)))
                return(g_string_to_symbol_1(sc, car(args), sc->symbol_symbol));
            return(g_string_to_symbol_1(sc, g_string_append_1(sc, args, sc->symbol_symbol), sc->symbol_symbol));
        }
        if (len == 0)
            return(simple_wrong_type_argument_with_type(sc, sc->symbol_symbol, car(args), wrap_string(sc, "a non-null string", 17)));

        b = mallocate(sc, len + 1);
        name = (char *)block_data(b);
        /* can't use catstrs_direct here because it stops at embedded null */
        cur_len = 0;
        for (p = args; is_pair(p); p = cdr(p))
        {
            s7_pointer str;
            str = car(p);
            if (string_length(str) > 0)
            {
                memcpy((void *)(name + cur_len), (void *)string_value(str), string_length(str));
                cur_len += string_length(str);
            }
        }
        name[len] = '\0';
        sym = make_symbol_with_length(sc, name, len);
        liberate(sc, b);
        return(sym);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movq %rsi, %rax
cmpb $0x1, (%rax)
jne 0x4ca83
movq 0x8(%rax), %rcx
cmpb $0x13, (%rcx)
jne 0x4cad0
addq 0x8(%rcx), %r15
movq 0x10(%rax), %rax
jmp 0x4ca6b
testq %r15, %r15
je 0x4cb3a
leaq 0x1(%r15), %rsi
movq %rbx, %rdi
callq 0x9037
movq %rax, (%rsp)
movq (%rax), %r13
xorl %ebp, %ebp
cmpb $0x1, (%r14)
jne 0x4cb05
movq 0x8(%r14), %r12
movq 0x8(%r12), %rdx
testq %rdx, %rdx
jle 0x4caca
movq %r13, %rdi
addq %rbp, %rdi
movq 0x10(%r12), %rsi
callq 0x83e0
addq 0x8(%r12), %rbp
movq 0x10(%r14), %r14
jmp 0x4caa1
movq 0x10(%r14), %rax
cmpq 0x110(%rbx), %rax
je 0x4cb97
movq 0x15a8(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc6ff6
movq 0x15a8(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
jmp 0x4cba5
movb $0x0, (%r13,%r15)
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x8c3b
movq %rax, %r14
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x9439
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x15a8(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x8(%r14), %rdx
movq 0x140(%rbx), %rcx
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rdi
movq (%rax,%rdi,8), %r8
leal 0x1(%rdi), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0x9a92b(%rip), %rax     # 0xe74a0
movq %rax, 0x10(%r8)
movq $0x11, 0x8(%r8)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd456
movq 0x8(%r14), %rsi
movq 0x15a8(%rbx), %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc6f0c