// File: /workspace/github_c_makefile_star2_O1/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
cmpb $0x1, (%rsi)
sete %al
jne 0x646f7
movq 0x8(%r14), %rcx
cmpb $0x13, (%rcx)
jne 0x646fc
xorl %r15d, %r15d
movq %r14, %rdx
addq 0x8(%rcx), %r15
movq 0x10(%rdx), %rdx
cmpb $0x1, (%rdx)
sete %al
jne 0x6474c
movq 0x8(%rdx), %rcx
cmpb $0x13, (%rcx)
je 0x646dc
jmp 0x646ff
xorl %r15d, %r15d
jmp 0x6474c
xorl %r15d, %r15d
testb %al, %al
je 0x6474c
movq 0x110(%rbx), %r12
cmpq %r12, 0x10(%r14)
je 0x6487f
movq 0x15a8(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x102a67
movq %rax, %r14
movq 0x15a8(%rbx), %r15
cmpb $0x13, (%rax)
je 0x64890
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r12
jmp 0x648ba
testq %r15, %r15
je 0x647fb
leaq 0x1(%r15), %rsi
movq %rbx, (%rsp)
movq %rbx, %rdi
callq 0xa305
movq %rax, %r12
movq (%rax), %r13
cmpb $0x1, (%r14)
jne 0x6479d
xorl %ebp, %ebp
movq 0x8(%r14), %rbx
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
jle 0x64793
movq %r13, %rdi
addq %rbp, %rdi
movq 0x10(%rbx), %rsi
callq 0x93e0
addq 0x8(%rbx), %rbp
movq 0x10(%r14), %r14
cmpb $0x1, (%r14)
je 0x64773
movb $0x0, (%r13,%r15)
movq (%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x9d9f
movq %rax, %r14
movslq 0x8(%r12), %rax
cmpq $0x11, %rax
jne 0x64858
movq (%r12), %rdi
testq %rdi, %rdi
je 0x647dd
callq 0x9050
movq $0x0, (%r12)
movl $0x0, 0x8(%r12)
movq 0x838(%rbx), %rax
movq %rax, 0x18(%r12)
movq %r12, 0x838(%rbx)
jmp 0x6486d
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 0xbfbba(%rip), %rax     # 0x1243f0
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 0xfac8
movq 0x838(%rbx,%rax,8), %rcx
movq %rcx, 0x18(%r12)
movq %r12, 0x838(%rbx,%rax,8)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %r14
movq 0x15a8(%rbx), %r15
cmpb $0x13, (%r14)
jne 0x648b3
movq 0x8(%r14), %rdx
testq %rdx, %rdx
jle 0x64912
movq 0x10(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9d9f
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x648cb
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rcx
movq $0x200001, (%rcx)       # imm = 0x200001
movq %r14, 0x8(%rcx)
movq %r12, 0x10(%rcx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x13, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9b739
movq 0x8(%r15), %rsi
movq 0x140(%rbx), %rcx
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rdx
movq (%rax,%rdx,8), %r8
leal 0x1(%rdx), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0xbfaae(%rip), %rax     # 0x1243f0
movq %rax, 0x10(%r8)
movq $0x11, 0x8(%r8)
movq %rbx, %rdi
movq %r14, %rdx
jmp 0x64845