#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, ...);
int test_code_limit();
int test_gencode();
int test_get_stack_full();
int test_init_0();
int test_init_null();
int test_init_simple();
int test_init_simple2();
int test_init_simple_run();
int test_push();
int yla_vm_test1() {
  int __yla_test_result = 0;
  char *__yla_test_name = "yla_vm_test1";
  printf("Start TEST %s\n", __yla_test_name);
  {
    char *__yla_test_case_name = "test_gencode";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_gencode();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  {
    char *__yla_test_case_name = "test_init_null";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_init_null();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  {
    char *__yla_test_case_name = "test_init_0";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_init_0();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  {
    char *__yla_test_case_name = "test_init_simple";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_init_simple();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  {
    char *__yla_test_case_name = "test_init_simple2";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_init_simple2();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  {
    char *__yla_test_case_name = "test_init_simple_run";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_init_simple_run();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  {
    char *__yla_test_case_name = "test_push";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_push();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  {
    char *__yla_test_case_name = "test_get_stack_full";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_get_stack_full();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  {
    char *__yla_test_case_name = "test_code_limit";
    printf("Start TESTCASE %s\n", __yla_test_case_name);
    int __yla_test_case_result = test_code_limit();
    printf("Finished TESTCASE %s %s\n", __yla_test_case_name,
           ((__yla_test_case_result) ? "FAILED" : "PASSED"));
    __yla_test_result |= __yla_test_case_result;
  }
  printf("Finished TEST %s %s\n", __yla_test_name,
         ((__yla_test_result) ? "FAILED" : "PASSED"));
  return __yla_test_result;
}


x86 assembly (clang, -O0):
<yla_vm_test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe47(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe46(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   10b0 <test_gencode@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%ecx
lea    0xe58(%rip),%rdx
lea    0xe4a(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x1c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    0xe33(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   1060 <test_init_null@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%ecx
lea    0xdfe(%rip),%rdx
lea    0xdf0(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x2c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    0xde8(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rsi
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   1080 <test_init_0@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%rsi
mov    -0x3c(%rbp),%ecx
lea    0xda4(%rip),%rdx
lea    0xd96(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xd6f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x3c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    0xd9a(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rsi
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   1040 <test_init_simple@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%rsi
mov    -0x4c(%rbp),%ecx
lea    0xd4a(%rip),%rdx
lea    0xd3c(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xd15(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x4c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    0xd51(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rsi
lea    0xcdc(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   1050 <test_init_simple2@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x58(%rbp),%rsi
mov    -0x5c(%rbp),%ecx
lea    0xcf0(%rip),%rdx
lea    0xce2(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xcbb(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x5c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    0xd09(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rsi
lea    0xc82(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   1090 <test_init_simple_run@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x68(%rbp),%rsi
mov    -0x6c(%rbp),%ecx
lea    0xc96(%rip),%rdx
lea    0xc88(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xc61(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x6c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    0xcc4(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rsi
lea    0xc28(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   10a0 <test_push@plt>
mov    %eax,-0x7c(%rbp)
mov    -0x78(%rbp),%rsi
mov    -0x7c(%rbp),%ecx
lea    0xc3c(%rip),%rdx
lea    0xc2e(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xc07(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x7c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    0xc74(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rsi
lea    0xbc8(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   1030 <test_get_stack_full@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x88(%rbp),%rsi
mov    -0x8c(%rbp),%ecx
lea    0xbd3(%rip),%rdx
lea    0xbc5(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xb9e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x8c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    0xc1c(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rsi
lea    0xb5c(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   10c0 <test_code_limit@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x98(%rbp),%rsi
mov    -0x9c(%rbp),%ecx
lea    0xb67(%rip),%rdx
lea    0xb59(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xb32(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x9c(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%ecx
lea    0xb31(%rip),%rdx
lea    0xb23(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xba4(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yla_vm_test1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe5b(%rip),%rdi
lea    0xe47(%rip),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe62(%rip),%rdi
lea    0xe4e(%rip),%rbp
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10b0 <test_gencode@plt>
mov    %eax,%r13d
test   %eax,%eax
lea    0xe71(%rip),%r15
lea    0xe63(%rip),%r12
mov    %r12,%rdx
cmove  %r15,%rdx
lea    0xe3c(%rip),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe4f(%rip),%r14
lea    0xe0e(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1060 <test_init_null@plt>
mov    %eax,%ebp
test   %eax,%eax
mov    %r12,%rdx
cmove  %r15,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
or     %r13d,%ebp
lea    0xe24(%rip),%r14
lea    0xdd4(%rip),%rdi
mov    %rdi,%r15
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1080 <test_init_0@plt>
mov    %eax,%r13d
test   %eax,%eax
mov    %r12,%rdx
lea    0xde4(%rip),%rax
cmove  %rax,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xdee(%rip),%r14
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1040 <test_init_simple@plt>
mov    %eax,%r15d
test   %eax,%eax
mov    %r12,%rdx
lea    0xda9(%rip),%rax
cmove  %rax,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
or     %r15d,%r13d
or     %ebp,%r13d
lea    0xdbe(%rip),%r14
lea    0xd51(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1050 <test_init_simple2@plt>
mov    %eax,%ebp
test   %eax,%eax
mov    %r12,%rdx
lea    0xd62(%rip),%r15
cmove  %r15,%rdx
lea    0xd37(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd8b(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1090 <test_init_simple_run@plt>
mov    %eax,%ebx
test   %eax,%eax
mov    %r12,%rdx
cmove  %r15,%rdx
lea    0xd00(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
or     %ebx,%ebp
lea    0xd67(%rip),%r14
lea    0xcd3(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10a0 <test_push@plt>
mov    %eax,%ebx
test   %eax,%eax
mov    %r12,%rdx
cmove  %r15,%rdx
lea    0xcc3(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
or     %ebx,%ebp
or     %r13d,%ebp
lea    0xd31(%rip),%r14
lea    0xc93(%rip),%r13
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1030 <test_get_stack_full@plt>
mov    %eax,%ebx
test   %eax,%eax
mov    %r12,%rdx
cmove  %r15,%rdx
lea    0xc80(%rip),%r15
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
or     %ebx,%ebp
lea    0xd02(%rip),%r14
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10c0 <test_code_limit@plt>
mov    %eax,%ebx
test   %eax,%eax
mov    %r12,%rdx
lea    0xc68(%rip),%r13
cmove  %r13,%rdx
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
or     %ebx,%ebp
cmove  %r13,%r12
lea    0xcd2(%rip),%rdi
lea    0xbe7(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"yla_vm_test1\00"
@.str.1 = [15 x i8] c"Start TEST %s\0A\00"
@.str.2 = [13 x i8] c"test_gencode\00"
@.str.3 = [19 x i8] c"Start TESTCASE %s\0A\00"
@.str.4 = [25 x i8] c"Finished TESTCASE %s %s\0A\00"
@.str.5 = [7 x i8] c"FAILED\00"
@.str.6 = [7 x i8] c"PASSED\00"
@.str.7 = [15 x i8] c"test_init_null\00"
@.str.8 = [12 x i8] c"test_init_0\00"
@.str.9 = [17 x i8] c"test_init_simple\00"
@.str.10 = [18 x i8] c"test_init_simple2\00"
@.str.11 = [21 x i8] c"test_init_simple_run\00"
@.str.12 = [10 x i8] c"test_push\00"
@.str.13 = [20 x i8] c"test_get_stack_full\00"
@.str.14 = [16 x i8] c"test_code_limit\00"
@.str.15 = [21 x i8] c"Finished TEST %s %s\0A\00"
define i32 @yla_vm_test1() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i8*
%20 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %2
%21 = load i8*, i8** %2
%22 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %21)
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8** %3
%23 = load i8*, i8** %3
%24 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %23)
%25 = call i32 (...) @test_gencode()
store i32 %25, i32* %4
%26 = load i8*, i8** %3
%27 = load i32, i32* %4
%28 = icmp ne i32 %27, 0
%29 = zext i1 %28 to i64
%30 = select i1 %28, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%31 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %26, i8* %30)
%32 = load i32, i32* %4
%33 = load i32, i32* %1
%34 = or i32 %33, %32
store i32 %34, i32* %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8** %5
%35 = load i8*, i8** %5
%36 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %35)
%37 = call i32 (...) @test_init_null()
store i32 %37, i32* %6
%38 = load i8*, i8** %5
%39 = load i32, i32* %6
%40 = icmp ne i32 %39, 0
%41 = zext i1 %40 to i64
%42 = select i1 %40, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%43 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %38, i8* %42)
%44 = load i32, i32* %6
%45 = load i32, i32* %1
%46 = or i32 %45, %44
store i32 %46, i32* %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8** %7
%47 = load i8*, i8** %7
%48 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %47)
%49 = call i32 (...) @test_init_0()
store i32 %49, i32* %8
%50 = load i8*, i8** %7
%51 = load i32, i32* %8
%52 = icmp ne i32 %51, 0
%53 = zext i1 %52 to i64
%54 = select i1 %52, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%55 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %50, i8* %54)
%56 = load i32, i32* %8
%57 = load i32, i32* %1
%58 = or i32 %57, %56
store i32 %58, i32* %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8** %9
%59 = load i8*, i8** %9
%60 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %59)
%61 = call i32 (...) @test_init_simple()
store i32 %61, i32* %10
%62 = load i8*, i8** %9
%63 = load i32, i32* %10
%64 = icmp ne i32 %63, 0
%65 = zext i1 %64 to i64
%66 = select i1 %64, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%67 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %62, i8* %66)
%68 = load i32, i32* %10
%69 = load i32, i32* %1
%70 = or i32 %69, %68
store i32 %70, i32* %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8** %11
%71 = load i8*, i8** %11
%72 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %71)
%73 = call i32 (...) @test_init_simple2()
store i32 %73, i32* %12
%74 = load i8*, i8** %11
%75 = load i32, i32* %12
%76 = icmp ne i32 %75, 0
%77 = zext i1 %76 to i64
%78 = select i1 %76, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%79 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %74, i8* %78)
%80 = load i32, i32* %12
%81 = load i32, i32* %1
%82 = or i32 %81, %80
store i32 %82, i32* %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i8** %13
%83 = load i8*, i8** %13
%84 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %83)
%85 = call i32 (...) @test_init_simple_run()
store i32 %85, i32* %14
%86 = load i8*, i8** %13
%87 = load i32, i32* %14
%88 = icmp ne i32 %87, 0
%89 = zext i1 %88 to i64
%90 = select i1 %88, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%91 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %86, i8* %90)
%92 = load i32, i32* %14
%93 = load i32, i32* %1
%94 = or i32 %93, %92
store i32 %94, i32* %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i8** %15
%95 = load i8*, i8** %15
%96 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %95)
%97 = call i32 (...) @test_push()
store i32 %97, i32* %16
%98 = load i8*, i8** %15
%99 = load i32, i32* %16
%100 = icmp ne i32 %99, 0
%101 = zext i1 %100 to i64
%102 = select i1 %100, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%103 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %98, i8* %102)
%104 = load i32, i32* %16
%105 = load i32, i32* %1
%106 = or i32 %105, %104
store i32 %106, i32* %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0), i8** %17
%107 = load i8*, i8** %17
%108 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %107)
%109 = call i32 (...) @test_get_stack_full()
store i32 %109, i32* %18
%110 = load i8*, i8** %17
%111 = load i32, i32* %18
%112 = icmp ne i32 %111, 0
%113 = zext i1 %112 to i64
%114 = select i1 %112, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%115 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %110, i8* %114)
%116 = load i32, i32* %18
%117 = load i32, i32* %1
%118 = or i32 %117, %116
store i32 %118, i32* %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0), i8** %19
%119 = load i8*, i8** %19
%120 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %119)
%121 = call i32 (...) @test_code_limit()
store i32 %121, i32* %20
%122 = load i8*, i8** %19
%123 = load i32, i32* %20
%124 = icmp ne i32 %123, 0
%125 = zext i1 %124 to i64
%126 = select i1 %124, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%127 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %122, i8* %126)
%128 = load i32, i32* %20
%129 = load i32, i32* %1
%130 = or i32 %129, %128
store i32 %130, i32* %1
%131 = load i8*, i8** %2
%132 = load i32, i32* %1
%133 = icmp ne i32 %132, 0
%134 = zext i1 %133 to i64
%135 = select i1 %133, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0)
%136 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i8* %131, i8* %135)
%137 = load i32, i32* %1
ret i32 %137
}

LLVM IR (-O2):
@.str = [13 x i8] c"yla_vm_test1\00"
@.str.1 = [15 x i8] c"Start TEST %s\0A\00"
@.str.2 = [13 x i8] c"test_gencode\00"
@.str.3 = [19 x i8] c"Start TESTCASE %s\0A\00"
@.str.4 = [25 x i8] c"Finished TESTCASE %s %s\0A\00"
@.str.5 = [7 x i8] c"FAILED\00"
@.str.6 = [7 x i8] c"PASSED\00"
@.str.7 = [15 x i8] c"test_init_null\00"
@.str.8 = [12 x i8] c"test_init_0\00"
@.str.9 = [17 x i8] c"test_init_simple\00"
@.str.10 = [18 x i8] c"test_init_simple2\00"
@.str.11 = [21 x i8] c"test_init_simple_run\00"
@.str.12 = [10 x i8] c"test_push\00"
@.str.13 = [20 x i8] c"test_get_stack_full\00"
@.str.14 = [16 x i8] c"test_code_limit\00"
@.str.15 = [21 x i8] c"Finished TEST %s %s\0A\00"
define i32 @yla_vm_test1() {
%1 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (...) @test_gencode()
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%6 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%8 = tail call i32 (...) @test_init_null()
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%11 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %10)
%12 = or i32 %8, %3
%13 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%14 = tail call i32 (...) @test_init_0()
%15 = icmp eq i32 %14, 0
%16 = select i1 %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%17 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8* %16)
%18 = or i32 %12, %14
%19 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%20 = tail call i32 (...) @test_init_simple()
%21 = icmp eq i32 %20, 0
%22 = select i1 %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%23 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8* %22)
%24 = or i32 %18, %20
%25 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%26 = tail call i32 (...) @test_init_simple2()
%27 = icmp eq i32 %26, 0
%28 = select i1 %27, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%29 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %28)
%30 = or i32 %24, %26
%31 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
%32 = tail call i32 (...) @test_init_simple_run()
%33 = icmp eq i32 %32, 0
%34 = select i1 %33, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%35 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i8* %34)
%36 = or i32 %30, %32
%37 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
%38 = tail call i32 (...) @test_push()
%39 = icmp eq i32 %38, 0
%40 = select i1 %39, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%41 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i8* %40)
%42 = or i32 %36, %38
%43 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%44 = tail call i32 (...) @test_get_stack_full()
%45 = icmp eq i32 %44, 0
%46 = select i1 %45, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%47 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0), i8* %46)
%48 = or i32 %42, %44
%49 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
%50 = tail call i32 (...) @test_code_limit()
%51 = icmp eq i32 %50, 0
%52 = select i1 %51, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%53 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0), i8* %52)
%54 = or i32 %48, %50
%55 = icmp eq i32 %54, 0
%56 = select i1 %55, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%57 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %56)
ret i32 %54
}