// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: new_array_element
static struct element* new_array_element( struct array *arr, struct environment *env, int max_depth, char *message ) {
	struct element *tail = NULL, *elem = new_element( 7 );
	int idx = 0, count = 0;
	struct string *str = NULL;
	if( elem ) {
		if( arr->structure ) {
			strcpy( elem->str.string, "$new" );
			elem->str.length = 4;
		} else if( arr->string_values ) {
			strcpy( elem->str.string, "$array" );
			elem->str.length = 6;
		} else {
			strcpy( elem->str.string, "$buffer" );
		}
		elem->next = new_element( 2 );
		if( elem->next ) {
			strcpy( elem->next->str.string, "()" );
			if( arr->structure ) {
				elem->next->child = new_element( arr->structure->str.length );
				if( elem->next->child ) {
					strcpy( elem->next->child->str.string, arr->structure->str.string );
				}
			} else {
				elem->next->child = new_number_element( arr->length );
			}
			while( idx < arr->length ) {
				if( arr->number_values[ idx ] || ( arr->string_values && arr->string_values[ idx ] ) ) {
					count = idx + 1;
				}
				idx++;
			}
			idx = 0;
			tail = elem->next->child;
			while( tail && idx < count ) {
				while( tail->next ) {
					tail = tail->next;
				}
				if( arr->string_values ) {
					str = arr->string_values[ idx ];
				}
				tail->next = value_to_element( arr->number_values[ idx++ ], str, env, max_depth - 1, message );
				tail = tail->next;
			}
		}
		if( tail == NULL ) { 
			unref_string( &elem->str );
			if( message[ 0 ] == 0 ) {
				strcpy( message, OUT_OF_MEMORY );
			}
			elem = NULL;
		}
	}
	return elem;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x7, %edi
callq 0x3780
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1446a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x1422a
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x81cc(%rip), %rsi      # 0x1c3e4
callq 0x3070
movq -0x30(%rbp), %rax
movl $0x4, 0x10(%rax)
jmp 0x1426c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x14256
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x8199(%rip), %rsi      # 0x1c3dd
callq 0x3070
movq -0x30(%rbp), %rax
movl $0x6, 0x10(%rax)
jmp 0x1426a
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x821c(%rip), %rsi      # 0x1c481
callq 0x3070
jmp 0x1426c
movl $0x2, %edi
callq 0x3780
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x14434
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x8351(%rip), %rsi      # 0x1c5f4
callq 0x3070
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x14304
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl 0x10(%rax), %edi
callq 0x3780
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x14302
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x3070
jmp 0x1431f
movq -0x8(%rbp), %rax
movl 0x40(%rax), %edi
callq 0x14480
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x18(%rax)
jmp 0x14321
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jge 0x14371
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x34(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x1435d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x14366
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x34(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x14366
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x14321
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x28(%rbp)
movb %al, -0x41(%rbp)
je 0x143a0
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
setl %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x143ac
jmp 0x14432
jmp 0x143ae
movq -0x28(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x143c7
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x143ae
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x143e6
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x34(%rbp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edi
movq -0x40(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movq -0x20(%rbp), %r8
callq 0x13d80
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x14388
jmp 0x14434
cmpq $0x0, -0x28(%rbp)
jne 0x14468
movq -0x30(%rbp), %rdi
callq 0x3c20
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x14460
movq -0x20(%rbp), %rdi
movq 0xcd05(%rip), %rsi      # 0x21160
callq 0x3070
movq $0x0, -0x30(%rbp)
jmp 0x1446a
movq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)