#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct test_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ end_package(struct test_context *);
int /*<<< orphan*/ end_result(struct test_context *);
int /*<<< orphan*/ end_set(struct test_context *);
int /*<<< orphan*/ end_test(struct test_context *);
int /*<<< orphan*/ end_transaction(struct test_context *);
int /*<<< orphan*/ end_unsatisfiable(struct test_context *);
scalar_t__ strcmp(char const *, char *);
void end_test_element(void *data, const char *element) {
  struct test_context *ctx = data;
  if (strcmp(element, "test") == 0) {
    end_test(ctx);
  } else if (strcmp(element, "set") == 0) {
    end_set(ctx);
  } else if (strcmp(element, "package") == 0) {
    end_package(ctx);
  } else if (strcmp(element, "transaction") == 0) {
    end_transaction(ctx);
  } else if (strcmp(element, "result") == 0) {
    end_result(ctx);
  } else if (strcmp(element, "unsatisfiable") == 0) {
    end_unsatisfiable(ctx);
  }
}


x86 assembly (clang, -O0):
<end_test_element>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe6d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11b0 <end_test_element+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <end_test@plt>
jmp    128c <end_test_element+0x11c>
mov    -0x10(%rbp),%rdi
lea    0xe4a(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11d8 <end_test_element+0x68>
mov    -0x18(%rbp),%rdi
call   1040 <end_set@plt>
jmp    1287 <end_test_element+0x117>
mov    -0x10(%rbp),%rdi
lea    0xe26(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1200 <end_test_element+0x90>
mov    -0x18(%rbp),%rdi
call   1060 <end_package@plt>
jmp    1282 <end_test_element+0x112>
mov    -0x10(%rbp),%rdi
lea    0xe06(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1228 <end_test_element+0xb8>
mov    -0x18(%rbp),%rdi
call   1070 <end_transaction@plt>
jmp    127d <end_test_element+0x10d>
mov    -0x10(%rbp),%rdi
lea    0xdea(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1250 <end_test_element+0xe0>
mov    -0x18(%rbp),%rdi
call   1090 <end_result@plt>
jmp    1278 <end_test_element+0x108>
mov    -0x10(%rbp),%rdi
lea    0xdc9(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1273 <end_test_element+0x103>
mov    -0x18(%rbp),%rdi
call   1080 <end_unsatisfiable@plt>
jmp    1278 <end_test_element+0x108>
jmp    127d <end_test_element+0x10d>
jmp    1282 <end_test_element+0x112>
jmp    1287 <end_test_element+0x117>
jmp    128c <end_test_element+0x11c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_test_element>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xe7f(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11fa <end_test_element+0x8a>
lea    0xe70(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1209 <end_test_element+0x99>
lea    0xe60(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1218 <end_test_element+0xa8>
lea    0xe54(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1227 <end_test_element+0xb7>
lea    0xe4c(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1236 <end_test_element+0xc6>
lea    0xe3f(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1245 <end_test_element+0xd5>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <end_test@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <end_set@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <end_package@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1070 <end_transaction@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1090 <end_result@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1080 <end_unsatisfiable@plt>

LLVM IR (-O0):
%struct.test_context = type { i32 }
@.str = [5 x i8] c"test\00"
@.str.1 = [4 x i8] c"set\00"
@.str.2 = [8 x i8] c"package\00"
@.str.3 = [12 x i8] c"transaction\00"
@.str.4 = [7 x i8] c"result\00"
@.str.5 = [14 x i8] c"unsatisfiable\00"
define void @end_test_element(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.test_context*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.test_context*
store %struct.test_context* %7, %struct.test_context** %5
%8 = load i8*, i8** %4
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load %struct.test_context*, %struct.test_context** %5
%13 = call i32 @end_test(%struct.test_context* %12)
br label %54
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load %struct.test_context*, %struct.test_context** %5
%20 = call i32 @end_set(%struct.test_context* %19)
br label %53
21: ; preds = %14
%22 = load i8*, i8** %4
%23 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %21
%26 = load %struct.test_context*, %struct.test_context** %5
%27 = call i32 @end_package(%struct.test_context* %26)
br label %52
28: ; preds = %21
%29 = load i8*, i8** %4
%30 = call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %28
%33 = load %struct.test_context*, %struct.test_context** %5
%34 = call i32 @end_transaction(%struct.test_context* %33)
br label %51
35: ; preds = %28
%36 = load i8*, i8** %4
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %35
%40 = load %struct.test_context*, %struct.test_context** %5
%41 = call i32 @end_result(%struct.test_context* %40)
br label %50
42: ; preds = %35
%43 = load i8*, i8** %4
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %42
%47 = load %struct.test_context*, %struct.test_context** %5
%48 = call i32 @end_unsatisfiable(%struct.test_context* %47)
br label %49
49: ; preds = %46, %42
br label %50
50: ; preds = %49, %39
br label %51
51: ; preds = %50, %32
br label %52
52: ; preds = %51, %25
br label %53
53: ; preds = %52, %18
br label %54
54: ; preds = %53, %11
ret void
}

LLVM IR (-O2):
%struct.test_context = type { i32 }
@.str = [5 x i8] c"test\00"
@.str.1 = [4 x i8] c"set\00"
@.str.2 = [8 x i8] c"package\00"
@.str.3 = [12 x i8] c"transaction\00"
@.str.4 = [7 x i8] c"result\00"
@.str.5 = [14 x i8] c"unsatisfiable\00"
define void @end_test_element(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to %struct.test_context*
%4 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @end_test(%struct.test_context* %3)
br label %33
8: ; preds = %2
%9 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 @end_set(%struct.test_context* %3)
br label %33
13: ; preds = %8
%14 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @end_package(%struct.test_context* %3)
br label %33
18: ; preds = %13
%19 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = tail call i32 @end_transaction(%struct.test_context* %3)
br label %33
23: ; preds = %18
%24 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = tail call i32 @end_result(%struct.test_context* %3)
br label %33
28: ; preds = %23
%29 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = tail call i32 @end_unsatisfiable(%struct.test_context* %3)
br label %33
33: ; preds = %11, %21, %28, %31, %26, %16, %6
ret void
}