// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: add_function_parameter
static struct element* add_function_parameter( struct function *func, struct element *elem, char *message ) {
	struct local_variable *param;
	struct structure *type = NULL;
	if( elem->str.string[ 0 ] == '(' ) {
		type = ( struct structure * ) find_decl( func, elem->child->str.string, STRUCT, NULL );
		if( type ) {
			elem = elem->next;
		} else {
			sprintf( message, "Structure '%.64s' not declared on line %d.", elem->child->str.string, elem->child->line );
		}
	}
	if( message[ 0 ] == 0 ) {
		param = new_local_variable( func, elem, type, message );
		if( message[ 0 ] == 0 ) {
			/*printf("Function parameter '%s'\n", name);*/
			if( get_local_variable( func->variable_decls, elem->str.string, "" ) == NULL ) {
				func->num_parameters = func->num_variables = func->num_parameters + 1;
				if( func->variable_decls ) {
					func->variable_decls_tail->next = param;
				} else {
					func->variable_decls = param;
				}
				func->variable_decls_tail = param;
				elem = elem->next;
			} else {
				dispose_local_variables( param );
				sprintf( message, "Parameter '%.64s' already defined on line %d.", elem->str.string, elem->line );
			}
		}
	}
	return elem;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0x960e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rsi
movl $0x3, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x7b80
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x95e3
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x960c
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x28(%rax), %ecx
leaq 0x127a6(%rip), %rsi     # 0x1bdab
movb $0x0, %al
callq 0x31f0
jmp 0x960e
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x96f2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0xb880
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x96f0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x119f8(%rip), %rdx     # 0x1b056
callq 0x74c0
cmpq $0x0, %rax
jne 0x96c4
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x969e
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rcx, 0x18(%rax)
jmp 0x96aa
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x96ee
movq -0x20(%rbp), %rdi
callq 0xa6f0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
leaq 0x126ef(%rip), %rsi     # 0x1bdd6
movb $0x0, %al
callq 0x31f0
jmp 0x96f0
jmp 0x96f2
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)