// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: parse_assignment_statement
static struct element* parse_assignment_statement( struct element *elem,
	struct function *func, struct variables *vars, struct statement *prev, char *message ) {
	struct local_variable *local;
	struct global_variable *global;
	elem = elem->next;
	while( message[ 0 ] == 0 && elem ) {
		if( elem->str.string[ 0 ] == ';' ) {
			elem = elem->next;
			break;
		} else if( elem->str.string[ 0 ] == ',' && elem->next ) {
			elem = elem->next;
		}
		if( elem->str.string[ 0 ] == '[' ) {
			elem = parse_array_assignment( elem, func, vars, prev, message );
		} else if( elem->next && elem->next->str.string[ 0 ] == '(' ) {
			elem = parse_struct_assignment( elem, func, vars, prev, message );
		} else {
			local = get_local_variable( func->variable_decls, elem->str.string, "." );
			if( local ) {
				elem = parse_local_assignment( elem, func, vars, local, prev, message );
			} else {
				global = ( struct global_variable * ) find_decl( func, elem->str.string, GLOBAL, "!." );
				if( global ) {
					elem = parse_global_assignment( elem, func, vars, global, prev, message );
				} else {
					sprintf( message, "Undeclared variable '%.64s' on line %d.", elem->str.string, elem->line );
				}
			}
		}
		prev = prev->next;
	}
	return elem;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
jne 0xd6b4
cmpq $0x0, -0x8(%rbp)
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0xd6c0
jmp 0xd84a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0xd6e1
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xd84a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0xd708
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xd708
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xd70a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0xd73c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0xeb50
movq %rax, -0x8(%rbp)
jmp 0xd839
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xd77d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0xd77d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0xecc0
movq %rax, -0x8(%rbp)
jmp 0xd837
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xe435(%rip), %rdx      # 0x1bbc9
callq 0x74c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xd7c7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
callq 0xeee0
movq %rax, -0x8(%rbp)
jmp 0xd835
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movl $0x4, %edx
leaq 0xe3e9(%rip), %rcx      # 0x1bbc8
callq 0x7b80
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xd812
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
callq 0xf170
movq %rax, -0x8(%rbp)
jmp 0xd833
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
leaq 0xe9c8(%rip), %rsi      # 0x1c1f4
movb $0x0, %al
callq 0x31f0
jmp 0xd835
jmp 0xd837
jmp 0xd839
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xd698
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)