// File: /workspace/github_c_makefile_star2_O3/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 0x7055
movq 0x40(%r12), %rax
movl 0x8(%rax), %esi
movq %r15, %rdi
callq 0x7229
testl %eax, %eax
je 0x71ff
movq %r14, %rdi
movq %r12, %rsi
callq 0x7275
testq %rax, %rax
je 0x71ee
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 0x7091
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 0x71df
movq %r14, %r13
addq $0x48, %r13
movq %r13, (%rsp)
cmpb $0x0, (%rbx)
jne 0x71e4
movq 0x8(%r15), %rax
cmpb $0x28, (%rax)
jne 0x710a
movq 0x18(%r15), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdi
movl $0x3, %edx
xorl %ecx, %ecx
callq 0x603f
testq %rax, %rax
je 0x70ee
movq 0x20(%r15), %r15
jmp 0x710c
movq 0x18(%r15), %rax
movq 0x8(%rax), %rdx
movl 0x28(%rax), %ecx
movq %rbx, %rdi
leaq 0xb7db(%rip), %rsi      # 0x128de
xorl %eax, %eax
callq 0x3200
xorl %eax, %eax
cmpb $0x0, (%rbx)
jne 0x7127
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x88e6
cmpb $0x0, (%rbx)
je 0x7150
testq %r15, %r15
je 0x71df
movq 0x8(%r15), %rax
cmpb $0x2c, (%rax)
jne 0x7142
cmpb $0x0, (%rbx)
jne 0x7142
movq 0x20(%r15), %r15
testq %r15, %r15
jne 0x70ba
jmp 0x71df
movq %rax, %rbp
movq (%r13), %r12
movq 0x8(%r15), %r13
movq %r12, %rdi
movq %r13, %rsi
leaq 0xaeee(%rip), %rdx      # 0x12056
callq 0x5d92
testq %rax, %rax
je 0x71ad
testq %rbp, %rbp
je 0x718f
movq 0x18(%rbp), %r12
movq %rbp, %rdi
callq 0x3030
movq %r12, %rbp
testq %r12, %r12
jne 0x7177
movq 0x8(%r15), %r13
movl 0x28(%r15), %ecx
movq %rbx, %rdi
leaq 0xb76c(%rip), %rsi      # 0x12909
movq %r13, %rdx
xorl %eax, %eax
callq 0x3200
movq (%rsp), %r13
jmp 0x7130
movl 0x1c(%r14), %eax
incl %eax
movl %eax, 0x20(%r14)
movl %eax, 0x1c(%r14)
movq (%rsp), %r13
movq %r13, %rax
testq %r12, %r12
je 0x71cf
movq 0x50(%r14), %rax
addq $0x18, %rax
movq %rbp, (%rax)
movq %rbp, 0x50(%r14)
movq 0x20(%r15), %r15
jmp 0x7127
cmpb $0x0, (%rbx)
je 0x7217
movq %r14, %rdi
callq 0x394d
jmp 0x7214
movq 0x11f7b(%rip), %rsi     # 0x19170
movq %rbx, %rdi
callq 0x3070
jmp 0x7214
movups 0xb2fc(%rip), %xmm0     # 0x12502
movups %xmm0, 0x10(%rbx)
movups 0xb2e1(%rip), %xmm0     # 0x124f2
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