// File: /workspace/github_c_makefile_star2_O1/martincameron[P]towntalk/towntalk.c
// Function: parse_function
struct function* parse_function( struct element *elem, char *name,
	struct function *parent, char *message ) {
	struct element *child;
	struct function *func;
	if( elem->line < 1 && !check_element_depth( elem, parent->env->element_depth ) ) {
		strcpy( message, "Maximum element depth exceeded." );
		return NULL;
	}
	func = new_function( name, parent );
	if( func ) {
		func->line = elem->line;
		func->file = parent->file;
		func->file->reference_count++;
		if( parent->library ) {
			func->library = parent->library;
			func->library->reference_count++;
		}
		func->body = elem->next;
		func->env = parent->env;
		child = elem->child;
		while( child && message[ 0 ] == 0 ) {
			child = add_function_parameter( func, child, message );
			if( child && child->str.string[ 0 ] == ',' && message[ 0 ] == 0 ) {
				child = child->next;
			}
		}
		if( message[ 0 ] ) {
			unref_string( &func->str );
			func = NULL;
		}
	} else {
		strcpy( message, OUT_OF_MEMORY );
	}
	return func;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x0, 0x28(%rdi)
jg 0x71aa
movq 0x40(%r12), %rax
movl 0x8(%rax), %esi
movq %r15, %rdi
callq 0x7367
testl %eax, %eax
je 0x733d
movq %r14, %rdi
movq %r12, %rsi
callq 0x73b3
testq %rax, %rax
je 0x732c
movq %rax, %r14
movl 0x28(%r15), %eax
movl %eax, 0x18(%r14)
movq 0x28(%r12), %rax
movq %rax, 0x28(%r14)
incq (%rax)
movq 0x30(%r12), %rax
testq %rax, %rax
je 0x71e6
movq %rax, 0x30(%r14)
incq (%rax)
movq 0x20(%r15), %rax
movq %rax, 0x38(%r14)
movq 0x40(%r12), %rax
movq %rax, 0x40(%r14)
movq 0x18(%r15), %r15
testq %r15, %r15
je 0x731d
movq %r14, %r12
addq $0x48, %r12
cmpb $0x0, (%rbx)
jne 0x731d
movq 0x8(%r15), %rax
cmpb $0x28, (%rax)
jne 0x725b
movq 0x18(%r15), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdi
movl $0x3, %edx
xorl %ecx, %ecx
callq 0x6103
testq %rax, %rax
je 0x723f
movq 0x20(%r15), %r15
jmp 0x725d
movq 0x18(%r15), %rax
movq 0x8(%rax), %rdx
movl 0x28(%rax), %ecx
movq %rbx, %rdi
leaq 0xb68b(%rip), %rsi      # 0x128df
xorl %eax, %eax
callq 0x3200
xorl %eax, %eax
cmpb $0x0, (%rbx)
jne 0x72f8
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x8a9f
cmpb $0x0, (%rbx)
jne 0x72f8
movq %rax, %rbp
movq (%r12), %r13
movq 0x8(%r15), %rsi
movq %r13, %rdi
leaq 0xadc5(%rip), %rdx      # 0x12056
callq 0x5cf3
testq %rax, %rax
je 0x72cf
testq %rbp, %rbp
je 0x72b4
movq 0x18(%rbp), %r13
movq %rbp, %rdi
callq 0x3030
movq %r13, %rbp
testq %r13, %r13
jne 0x72a0
movq 0x8(%r15), %rdx
movl 0x28(%r15), %ecx
movq %rbx, %rdi
leaq 0xb644(%rip), %rsi      # 0x1290a
xorl %eax, %eax
callq 0x3200
jmp 0x72f8
movl 0x1c(%r14), %eax
incl %eax
movl %eax, 0x20(%r14)
movl %eax, 0x1c(%r14)
movq %r12, %rax
testq %r13, %r13
je 0x72ed
movq 0x50(%r14), %rax
addq $0x18, %rax
movq %rbp, (%rax)
movq %rbp, 0x50(%r14)
movq 0x20(%r15), %r15
testq %r15, %r15
je 0x7311
movq 0x8(%r15), %rax
cmpb $0x2c, (%rax)
jne 0x7314
cmpb $0x0, (%rbx)
jne 0x7314
movq 0x20(%r15), %r15
jmp 0x7314
xorl %r15d, %r15d
testq %r15, %r15
jne 0x720b
cmpb $0x0, (%rbx)
je 0x7355
movq %r14, %rdi
callq 0x3979
jmp 0x7352
movq 0x11e3d(%rip), %rsi     # 0x19170
movq %rbx, %rdi
callq 0x3070
jmp 0x7352
movups 0xb1b9(%rip), %xmm0     # 0x124fd
movups %xmm0, 0x10(%rbx)
movups 0xb19e(%rip), %xmm0     # 0x124ed
movups %xmm0, (%rbx)
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq