// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: parse_infix_expression
static struct element* parse_infix_expression( struct element *elem,
	struct function *func, struct variables *vars, struct expression *prev, char *message ) {
	struct element *copy, *oper, *child, *next = elem->next;
	if( next && next->str.string[ 0 ] == '(' && next->child ) {
		copy = new_element( next->str.length );
		if( copy ) {
			copy->line = next->line;
			strcpy( copy->str.string, next->str.string );
			copy->child = copy_element( next->child );
			if( copy->child ) {
				oper = validate_syntax( "x", copy->child, next, func->env, message );
				if( message[ 0 ] == 0 ) {
					if( oper && strcmp( oper->str.string, elem->str.string ) ) {
						child = copy->child;
						while( child->next != oper ) {
							child = child->next;
						}
						child->next = oper->next;
						oper->next = copy;
						copy = oper;
					}
					parse_expression( copy, func, vars, prev, message );
					next = next->next;
				}
			} else {
				strcpy( message, OUT_OF_MEMORY );
			}
			dispose_element( copy );
		} else {
			strcpy( message, OUT_OF_MEMORY );
		}
	} else {
		sprintf( message, "Invalid infix expression on line %d.", elem->line );
	}
	return next;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %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, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x6a34
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0x6a34
movq -0x48(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x6a34
movq -0x48(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x3780
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x6a22
movq -0x48(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3070
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xab00
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x6a07
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x48(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x28(%rbp), %r8
leaq 0x1501f(%rip), %rdi     # 0x1b979
callq 0x8430
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x6a05
cmpq $0x0, -0x38(%rbp)
je 0x69e0
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3130
cmpl $0x0, %eax
je 0x69e0
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x38(%rbp), %rax
je 0x69bc
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x69a0
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x60c0
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x6a17
movq -0x28(%rbp), %rdi
movq 0x1a74e(%rip), %rsi     # 0x21160
callq 0x3070
movq -0x30(%rbp), %rdi
callq 0x3ed0
jmp 0x6a32
movq -0x28(%rbp), %rdi
movq 0x1a733(%rip), %rsi     # 0x21160
callq 0x3070
jmp 0x6a4d
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0x1530c(%rip), %rsi     # 0x1bd52
movb $0x0, %al
callq 0x31f0
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)