// File: /workspace/github_c_makefile_star2_O0/phluid61[P]hsf/src/innerlist.c
// Function: SH_InnerList__to_s
sh_char_t*
SH_InnerList__to_s(SH_InnerList* obj, int* err) {
	sh_char_t* tmp_s;
	sh_char_t* s;
	sh_char_t* ptr;

	size_t i;
	size_t n;
	size_t total;

	__SH_InnerList__string str;
	str.length = (size_t)0;
	str.n = (size_t)0;

	SH_InnerList__each(obj, &__SH_InnerList__to_s_item, (void*)(&str), err);
	if (__catch(err)) {
		for (i = 0; i < str.n; i++) {
			free(str.a[i]);
		}
		__cascade(err, (sh_char_t*)0);
	}

	total = 2; /* '(' and ')' */
	total += str.length;
	if (str.n > 1)
		total += (str.n - 1); /* ' ' between items */
	total += 1; /* NULL */

	s = (sh_char_t*)malloc(sizeof(sh_char_t) * total);
	if ((sh_char_t*)0 == s) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (sh_char_t*)0;
	}

	ptr = s;

	*ptr = '(';
	ptr ++;

	for (i = 0; i < str.n; i++) {
		if (i > 0) {
			*ptr = ' ';
			ptr ++;
		}

		tmp_s = str.a[i];
		n = strlen((const char*)tmp_s);
		memcpy((void*)ptr, (const void*)tmp_s, n);
		free(str.a[i]);
		ptr += n;
	}

	*ptr = ')';
	ptr ++;

	*ptr = SH_CHAR_C(0);

	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x860, %rsp            # imm = 0x860
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x858(%rbp)
movq $0x0, -0x850(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq 0x2a58(%rip), %rsi      # 0x3fe0
leaq -0x858(%rbp), %rdx
callq 0x1050
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x15fb
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl (%rcx), %eax
je 0x15fb
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x850(%rbp), %rax
jae 0x15da
movq -0x38(%rbp), %rax
movq -0x848(%rbp,%rax,8), %rdi
callq 0x1030
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x15ae
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x15f9
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl (%rcx), %eax
je 0x15f9
movq $0x0, -0x8(%rbp)
jmp 0x1738
jmp 0x15fb
movq $0x2, -0x48(%rbp)
movq -0x858(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x1, -0x850(%rbp)
jbe 0x162f
movq -0x850(%rbp), %rax
subq $0x1, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
shlq $0x0, %rdi
callq 0x1080
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x28(%rbp), %rax
jne 0x1673
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x1666
movq -0x18(%rbp), %rax
movl $0x80000001, (%rax)     # imm = 0x80000001
movq $0x0, -0x8(%rbp)
jmp 0x1738
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb $0x28, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x850(%rbp), %rax
jae 0x1716
cmpq $0x0, -0x38(%rbp)
jbe 0x16bd
movq -0x30(%rbp), %rax
movb $0x20, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq -0x848(%rbp,%rax,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1060
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x1070
movq -0x38(%rbp), %rax
movq -0x848(%rbp,%rax,8), %rdi
callq 0x1030
movq -0x40(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1696
movq -0x30(%rbp), %rax
movb $0x29, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x860, %rsp            # imm = 0x860
popq %rbp
retq