// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: parse_while_statement
static struct element* parse_while_statement( struct element *elem,
	struct function *func, struct variables *vars, struct statement *prev, char *message ) {
	struct expression expr;
	struct element *next = elem->next;
	struct statement block = { 0 }, *stmt = calloc( 1, sizeof( struct block_statement ) );
	if( stmt ) {
		stmt->dispose = dispose_block_statement;
		prev->next = stmt;
		expr.next = NULL;
		next = parse_expression( next, func, vars, &expr, message );
		if( expr.next ) {
			stmt->source = expr.next;
			if( next->child ) {
				parse_keywords_indexed( func->env->statements_index, next->child, func, vars, &block, message );
				( ( struct block_statement * ) stmt )->if_block = block.next;
			}
			if( message[ 0 ] == 0 ) {
				stmt->execute = execute_while_statement;
				if( expr.next->evaluate == evaluate_arithmetic_expression
				&& strchr( "!<(=)>", expr.next->index ) && expr.next->parameters->evaluate == evaluate_local ) {
					if( expr.next->parameters->next->evaluate == evaluate_local ) {
						stmt->local = expr.next->parameters->index;
						( ( struct block_statement * ) stmt )->rhs = expr.next->parameters->next->index;
						( ( struct block_statement * ) stmt )->oper = expr.next->index;
						stmt->execute = execute_while_local_statement;
					} else if( expr.next->parameters->next->evaluate == evaluate_number_literal_expression ) {
						stmt->local = expr.next->parameters->index;
						( ( struct block_statement * ) stmt )->num = ( ( struct value_expression * ) expr.next->parameters->next )->num;
						( ( struct block_statement * ) stmt )->oper = expr.next->index;
						stmt->execute = execute_while_const_statement;
					}
				} else if( expr.next->evaluate == evaluate_local ) {
					stmt->local = expr.next->index;
					stmt->execute = execute_while_const_statement;
				}
				next = next->next;
			}
		}
	} else {
		strcpy( message, OUT_OF_MEMORY );
	}
	return next;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %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, -0x50(%rbp)
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x30f0
movl $0x1, %edi
movl $0x48, %esi
callq 0x3120
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
je 0xe18c
movq -0x80(%rbp), %rax
leaq -0x90c4(%rip), %rcx     # 0x4ed0
movq %rcx, 0x18(%rax)
movq -0x80(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq $0x0, -0x38(%rbp)
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %r8
leaq -0x48(%rbp), %rcx
callq 0x60c0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xe18a
movq -0x38(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xe023
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
addq $0x80, %rdi
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %r9
leaq -0x78(%rbp), %r8
callq 0x9050
movq -0x58(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xe188
movq -0x80(%rbp), %rax
leaq 0x1d92(%rip), %rcx      # 0xfdd0
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rax
leaq -0x850d(%rip), %rcx     # 0x5b40
cmpq %rcx, 0x18(%rax)
jne 0xe14d
movq -0x38(%rbp), %rax
movl 0x4(%rax), %esi
leaq 0xe25d(%rip), %rdi      # 0x1c2c2
callq 0x30d0
cmpq $0x0, %rax
je 0xe14d
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
leaq -0x94c3(%rip), %rcx     # 0x4bc0
cmpq %rcx, 0x18(%rax)
jne 0xe14d
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
leaq -0x94e0(%rip), %rcx     # 0x4bc0
cmpq %rcx, 0x18(%rax)
jne 0xe0ec
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x4(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movl 0x4(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x3c(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x80(%rbp), %rax
leaq 0x1e3a(%rip), %rcx      # 0xff20
movq %rcx, 0x10(%rax)
jmp 0xe14b
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
leaq -0xa37f(%rip), %rcx     # 0x3d80
cmpq %rcx, 0x18(%rax)
jne 0xe149
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x4(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movl 0x28(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x80(%rbp), %rax
leaq 0x201b(%rip), %rcx      # 0x10160
movq %rcx, 0x10(%rax)
jmp 0xe14b
jmp 0xe17c
movq -0x38(%rbp), %rax
leaq -0x9598(%rip), %rcx     # 0x4bc0
cmpq %rcx, 0x18(%rax)
jne 0xe17a
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, (%rax)
movq -0x80(%rbp), %rax
leaq 0x1fea(%rip), %rcx      # 0x10160
movq %rcx, 0x10(%rax)
jmp 0xe17c
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0xe18a
jmp 0xe19c
movq -0x28(%rbp), %rdi
movq 0x12fc9(%rip), %rsi     # 0x21160
callq 0x3070
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)