// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: execute_switch_statement
static enum result execute_switch_statement( struct statement *this,
	struct variables *vars, struct variable *result ) {
	int matched = 0;
	struct expression *case_expr;
	struct variable switch_value = { 0, NULL }, case_value = { 0, NULL };
	struct statement *cases = ( ( struct block_statement * ) this )->if_block;
	struct statement *deflt = ( ( struct block_statement * ) this )->else_block;
	enum result ret = this->source->evaluate( this->source, vars, &switch_value );
	if( ret ) {
		while( cases && ret && !matched ) {
			case_expr = cases->source;
			while( case_expr && ret && !matched ) {
				ret = case_expr->evaluate( case_expr, vars, &case_value );
				if( ret ) {
					matched = compare_variables( &switch_value, &case_value ) == 0;
					dispose_variable( &case_value );
					if( matched ) {
						ret = cases->execute( cases, vars, result );
					}
				}
				case_expr = case_expr->next;
			}
			cases = cases->next;
		}
		if( ret && !matched && deflt ) {
			ret = deflt->execute( deflt, vars, result );
		}
		dispose_temporary( &switch_value );
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x30f0
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x30f0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq *%rax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x10ce2
jmp 0x10bc0
xorl %eax, %eax
cmpq $0x0, -0x50(%rbp)
movb %al, -0x5d(%rbp)
je 0x10be3
xorl %eax, %eax
cmpl $0x0, -0x5c(%rbp)
movb %al, -0x5d(%rbp)
je 0x10be3
cmpl $0x0, -0x1c(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x5d(%rbp)
movb -0x5d(%rbp), %al
testb $0x1, %al
jne 0x10bef
jmp 0x10cad
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x28(%rbp)
movb %al, -0x5e(%rbp)
je 0x10c1e
xorl %eax, %eax
cmpl $0x0, -0x5c(%rbp)
movb %al, -0x5e(%rbp)
je 0x10c1e
cmpl $0x0, -0x1c(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x5e(%rbp)
movb -0x5e(%rbp), %al
testb $0x1, %al
jne 0x10c27
jmp 0x10c9c
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq *%rax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x10c8b
leaq -0x38(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x10fc0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3be0
cmpl $0x0, -0x1c(%rbp)
je 0x10c89
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movl %eax, -0x5c(%rbp)
jmp 0x10c8b
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x10bfb
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x10bc0
cmpl $0x0, -0x5c(%rbp)
je 0x10cd9
cmpl $0x0, -0x1c(%rbp)
jne 0x10cd9
cmpq $0x0, -0x58(%rbp)
je 0x10cd9
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movl %eax, -0x5c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3ce0
movl -0x5c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)