// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/worker.c
// Function: parse_lock_statement
struct element* parse_lock_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;
		if( next->str.string[ 0 ] == '{' ) {
			expr.next = calloc( 1, sizeof( struct value_expression ) );
			if( expr.next ) {
				expr.next->line = elem->line;
				expr.next->evaluate = evaluate_number_literal_expression;
			} else {
				strcpy( message, OUT_OF_MEMORY );
			}
		} else {
			expr.next = NULL;
			next = parse_expression( next, func, vars, &expr, message );
		}
		if( message[ 0 ] == 0 ) {
			stmt->source = expr.next;
			stmt->execute = execute_lock_statement;
			if( next->child ) {
				block.next = NULL;
				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 ) {
				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 0x168f8
movq -0x80(%rbp), %rax
leaq -0x11904(%rip), %rcx    # 0x4ed0
movq %rcx, 0x18(%rax)
movq -0x80(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x7b, %eax
jne 0x16841
movl $0x1, %edi
movl $0x30, %esi
callq 0x3120
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x1682c
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
leaq -0x12aa6(%rip), %rcx    # 0x3d80
movq %rcx, 0x18(%rax)
jmp 0x1683f
movq -0x28(%rbp), %rdi
leaq 0xa929(%rip), %rax      # 0x21160
movq (%rax), %rsi
callq 0x3070
jmp 0x16866
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)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x168f6
movq -0x38(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
leaq 0x93(%rip), %rcx        # 0x16920
movq %rcx, 0x10(%rax)
movq -0x50(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x168dc
movq $0x0, -0x58(%rbp)
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 0x168f4
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x168f6
jmp 0x1690b
movq -0x28(%rbp), %rdi
leaq 0xa85d(%rip), %rax      # 0x21160
movq (%rax), %rsi
callq 0x3070
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)