#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*/ __CrestApply2(int, int, long long);
int /*<<< orphan*/ __CrestBranch(int, int, int);
int /*<<< orphan*/ __CrestCall(int, int);
int /*<<< orphan*/ __CrestClearStack(int);
int /*<<< orphan*/ __CrestInt(int *);
int /*<<< orphan*/ __CrestLoad(int, unsigned long, long long);
int /*<<< orphan*/ __CrestReturn(int);
int /*<<< orphan*/ __CrestStore(int, unsigned long);
int /*<<< orphan*/ __globinit_cfg_test();
int /*<<< orphan*/ f(int);
int /*<<< orphan*/ g(int);
int /*<<< orphan*/ printf(char const *);
int main(void) {
  int a;
  int __retres2;
  {
    __globinit_cfg_test();
    __CrestCall(49, 7);
    __CrestInt(&a);
    __CrestLoad(52, (unsigned long)(&a), (long long)a);
    __CrestLoad(51, (unsigned long)0, (long long)19);
    __CrestApply2(50, 12, (long long)(a == 19));
    if (a == 19) {
      __CrestBranch(53, 27, 1);
      printf((char const *__restrict)"19\n");
      __CrestClearStack(55);
    } else {
      __CrestBranch(54, 28, 0);
      printf((char const *__restrict)"not 19\n");
      __CrestClearStack(56);
    }
    __CrestLoad(57, (unsigned long)(&a), (long long)a);
    f(a);
    __CrestClearStack(58);
    __CrestLoad(59, (unsigned long)(&a), (long long)a);
    g(a);
    __CrestClearStack(60);
    __CrestLoad(63, (unsigned long)(&a), (long long)a);
    __CrestLoad(62, (unsigned long)0, (long long)1);
    __CrestApply2(61, 13, (long long)(a != 1));
    if (a != 1) {
      __CrestBranch(64, 31, 1);
      printf((char const *__restrict)"not 1\n");
      __CrestClearStack(66);
    } else {
      __CrestBranch(65, 32, 0);
      printf((char const *__restrict)"1\n");
      __CrestClearStack(67);
    }
    __CrestLoad(68, (unsigned long)0, (long long)0);
    __CrestStore(69, (unsigned long)(&__retres2));
    __retres2 = 0;
    __CrestLoad(70, (unsigned long)(&__retres2), (long long)__retres2);
    __CrestReturn(71);
    return (__retres2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   10c0 <__globinit_cfg_test@plt>
mov    $0x31,%edi
mov    $0x7,%esi
call   1090 <__CrestCall@plt>
lea    -0x8(%rbp),%rdi
call   10a0 <__CrestInt@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x34,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x33,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x13,%edx
call   10b0 <__CrestLoad@plt>
cmpl   $0x13,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x32,%edi
mov    $0xc,%esi
call   1030 <__CrestApply2@plt>
cmpl   $0x13,-0x8(%rbp)
jne    126a <main+0xaa>
mov    $0x35,%edi
mov    $0x1b,%esi
mov    $0x1,%edx
call   1060 <__CrestBranch@plt>
lea    0xdae(%rip),%rdi
call   1050 <printf@plt>
mov    $0x37,%edi
call   10e0 <__CrestClearStack@plt>
jmp    1291 <main+0xd1>
mov    $0x36,%edi
mov    $0x1c,%esi
xor    %edx,%edx
call   1060 <__CrestBranch@plt>
lea    0xd7e(%rip),%rdi
call   1050 <printf@plt>
mov    $0x38,%edi
call   10e0 <__CrestClearStack@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x39,%edi
call   10b0 <__CrestLoad@plt>
mov    -0x8(%rbp),%edi
call   1040 <f@plt>
mov    $0x3a,%edi
call   10e0 <__CrestClearStack@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x3b,%edi
call   10b0 <__CrestLoad@plt>
mov    -0x8(%rbp),%edi
call   10d0 <g@plt>
mov    $0x3c,%edi
call   10e0 <__CrestClearStack@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x3f,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x3e,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   10b0 <__CrestLoad@plt>
cmpl   $0x1,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x3d,%edi
mov    $0xd,%esi
call   1030 <__CrestApply2@plt>
cmpl   $0x1,-0x8(%rbp)
je     1355 <main+0x195>
mov    $0x40,%edi
mov    $0x1f,%esi
mov    $0x1,%edx
call   1060 <__CrestBranch@plt>
lea    0xcc7(%rip),%rdi
call   1050 <printf@plt>
mov    $0x42,%edi
call   10e0 <__CrestClearStack@plt>
jmp    137c <main+0x1bc>
mov    $0x41,%edi
mov    $0x20,%esi
xor    %edx,%edx
call   1060 <__CrestBranch@plt>
lea    0xc9f(%rip),%rdi
call   1050 <printf@plt>
mov    $0x43,%edi
call   10e0 <__CrestClearStack@plt>
mov    $0x44,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10b0 <__CrestLoad@plt>
lea    -0xc(%rbp),%rsi
mov    $0x45,%edi
call   1070 <__CrestStore@plt>
movl   $0x0,-0xc(%rbp)
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x46,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x47,%edi
call   1080 <__CrestReturn@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   10c0 <__globinit_cfg_test@plt>
mov    $0x31,%edi
mov    $0x7,%esi
call   1090 <__CrestCall@plt>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   10a0 <__CrestInt@plt>
movslq 0x8(%rsp),%rdx
mov    $0x34,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    $0x13,%edx
mov    $0x33,%edi
xor    %esi,%esi
call   10b0 <__CrestLoad@plt>
xor    %edx,%edx
cmpl   $0x13,0x8(%rsp)
sete   %dl
mov    $0x32,%edi
mov    $0xc,%esi
call   1030 <__CrestApply2@plt>
cmpl   $0x13,0x8(%rsp)
jne    124d <main+0x8d>
mov    $0x35,%edi
mov    $0x1b,%esi
mov    $0x1,%edx
call   1060 <__CrestBranch@plt>
mov    $0x37,%ebx
lea    0xdb9(%rip),%rdi
jmp    126a <main+0xaa>
mov    $0x36,%edi
mov    $0x1c,%esi
xor    %edx,%edx
call   1060 <__CrestBranch@plt>
mov    $0x38,%ebx
lea    0xd96(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%edi
call   10e0 <__CrestClearStack@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rbx
mov    $0x39,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    0x8(%rsp),%edi
call   1050 <f@plt>
mov    $0x3a,%edi
call   10e0 <__CrestClearStack@plt>
movslq 0x8(%rsp),%rdx
mov    $0x3b,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    0x8(%rsp),%edi
call   10d0 <g@plt>
mov    $0x3c,%edi
call   10e0 <__CrestClearStack@plt>
movslq 0x8(%rsp),%rdx
mov    $0x3f,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x3e,%edi
xor    %esi,%esi
call   10b0 <__CrestLoad@plt>
xor    %edx,%edx
cmpl   $0x1,0x8(%rsp)
setne  %dl
mov    $0x3d,%edi
mov    $0xd,%esi
call   1030 <__CrestApply2@plt>
cmpl   $0x1,0x8(%rsp)
jne    1327 <main+0x167>
mov    $0x41,%edi
mov    $0x20,%esi
xor    %edx,%edx
call   1060 <__CrestBranch@plt>
mov    $0x43,%ebx
lea    0xce6(%rip),%rdi
jmp    1347 <main+0x187>
mov    $0x40,%edi
mov    $0x1f,%esi
mov    $0x1,%edx
call   1060 <__CrestBranch@plt>
mov    $0x42,%ebx
lea    0xcc0(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%edi
call   10e0 <__CrestClearStack@plt>
mov    $0x44,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10b0 <__CrestLoad@plt>
lea    0xc(%rsp),%rbx
mov    $0x45,%edi
mov    %rbx,%rsi
call   1070 <__CrestStore@plt>
movl   $0x0,0xc(%rsp)
mov    $0x46,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   10b0 <__CrestLoad@plt>
mov    $0x47,%edi
call   1080 <__CrestReturn@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"19\0A\00"
@.str.1 = [8 x i8] c"not 19\0A\00"
@.str.2 = [7 x i8] c"not 1\0A\00"
@.str.3 = [3 x i8] c"1\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__globinit_cfg_test()
%5 = call i32 @__CrestCall(i32 49, i32 7)
%6 = call i32 @__CrestInt(i32* %2)
%7 = ptrtoint i32* %2 to i64
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = call i32 @__CrestLoad(i32 52, i64 %7, i64 %9)
%11 = call i32 @__CrestLoad(i32 51, i64 0, i64 19)
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 19
%14 = zext i1 %13 to i32
%15 = sext i32 %14 to i64
%16 = call i32 @__CrestApply2(i32 50, i32 12, i64 %15)
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 19
br i1 %18, label %19, label %23
19: ; preds = %0
%20 = call i32 @__CrestBranch(i32 53, i32 27, i32 1)
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%22 = call i32 @__CrestClearStack(i32 55)
br label %27
23: ; preds = %0
%24 = call i32 @__CrestBranch(i32 54, i32 28, i32 0)
%25 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%26 = call i32 @__CrestClearStack(i32 56)
br label %27
27: ; preds = %23, %19
%28 = ptrtoint i32* %2 to i64
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = call i32 @__CrestLoad(i32 57, i64 %28, i64 %30)
%32 = load i32, i32* %2
%33 = call i32 @f(i32 %32)
%34 = call i32 @__CrestClearStack(i32 58)
%35 = ptrtoint i32* %2 to i64
%36 = load i32, i32* %2
%37 = sext i32 %36 to i64
%38 = call i32 @__CrestLoad(i32 59, i64 %35, i64 %37)
%39 = load i32, i32* %2
%40 = call i32 @g(i32 %39)
%41 = call i32 @__CrestClearStack(i32 60)
%42 = ptrtoint i32* %2 to i64
%43 = load i32, i32* %2
%44 = sext i32 %43 to i64
%45 = call i32 @__CrestLoad(i32 63, i64 %42, i64 %44)
%46 = call i32 @__CrestLoad(i32 62, i64 0, i64 1)
%47 = load i32, i32* %2
%48 = icmp ne i32 %47, 1
%49 = zext i1 %48 to i32
%50 = sext i32 %49 to i64
%51 = call i32 @__CrestApply2(i32 61, i32 13, i64 %50)
%52 = load i32, i32* %2
%53 = icmp ne i32 %52, 1
br i1 %53, label %54, label %58
54: ; preds = %27
%55 = call i32 @__CrestBranch(i32 64, i32 31, i32 1)
%56 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%57 = call i32 @__CrestClearStack(i32 66)
br label %62
58: ; preds = %27
%59 = call i32 @__CrestBranch(i32 65, i32 32, i32 0)
%60 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%61 = call i32 @__CrestClearStack(i32 67)
br label %62
62: ; preds = %58, %54
%63 = call i32 @__CrestLoad(i32 68, i64 0, i64 0)
%64 = ptrtoint i32* %3 to i64
%65 = call i32 @__CrestStore(i32 69, i64 %64)
store i32 0, i32* %3
%66 = ptrtoint i32* %3 to i64
%67 = load i32, i32* %3
%68 = sext i32 %67 to i64
%69 = call i32 @__CrestLoad(i32 70, i64 %66, i64 %68)
%70 = call i32 @__CrestReturn(i32 71)
%71 = load i32, i32* %3
ret i32 %71
}

LLVM IR (-O2):
@str = [7 x i8] c"not 19\00"
@str.4 = [2 x i8] c"1\00"
@str.5 = [6 x i8] c"not 1\00"
@str.6 = [3 x i8] c"19\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (...) @__globinit_cfg_test()
%6 = tail call i32 @__CrestCall(i32 49, i32 7)
%7 = call i32 @__CrestInt(i32* %1)
%8 = ptrtoint i32* %1 to i64
%9 = load i32, i32* %1
%10 = sext i32 %9 to i64
%11 = call i32 @__CrestLoad(i32 52, i64 %8, i64 %10)
%12 = call i32 @__CrestLoad(i32 51, i64 0, i64 19)
%13 = load i32, i32* %1
%14 = icmp eq i32 %13, 19
%15 = zext i1 %14 to i64
%16 = call i32 @__CrestApply2(i32 50, i32 12, i64 %15)
%17 = load i32, i32* %1
%18 = icmp eq i32 %17, 19
br i1 %18, label %19, label %21
19: ; preds = %0
%20 = call i32 @__CrestBranch(i32 53, i32 27, i32 1)
br label %23
21: ; preds = %0
%22 = call i32 @__CrestBranch(i32 54, i32 28, i32 0)
br label %23
23: ; preds = %21, %19
%24 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0), %21 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.6, i64 0, i64 0), %19 ]
%25 = phi i32 [ 56, %21 ], [ 55, %19 ]
%26 = call i32 @puts(i8* dereferenceable(1) %24)
%27 = call i32 @__CrestClearStack(i32 %25)
%28 = load i32, i32* %1
%29 = sext i32 %28 to i64
%30 = call i32 @__CrestLoad(i32 57, i64 %8, i64 %29)
%31 = load i32, i32* %1
%32 = call i32 @f(i32 %31)
%33 = call i32 @__CrestClearStack(i32 58)
%34 = load i32, i32* %1
%35 = sext i32 %34 to i64
%36 = call i32 @__CrestLoad(i32 59, i64 %8, i64 %35)
%37 = load i32, i32* %1
%38 = call i32 @g(i32 %37)
%39 = call i32 @__CrestClearStack(i32 60)
%40 = load i32, i32* %1
%41 = sext i32 %40 to i64
%42 = call i32 @__CrestLoad(i32 63, i64 %8, i64 %41)
%43 = call i32 @__CrestLoad(i32 62, i64 0, i64 1)
%44 = load i32, i32* %1
%45 = icmp ne i32 %44, 1
%46 = zext i1 %45 to i64
%47 = call i32 @__CrestApply2(i32 61, i32 13, i64 %46)
%48 = load i32, i32* %1
%49 = icmp eq i32 %48, 1
br i1 %49, label %52, label %50
50: ; preds = %23
%51 = call i32 @__CrestBranch(i32 64, i32 31, i32 1)
br label %54
52: ; preds = %23
%53 = call i32 @__CrestBranch(i32 65, i32 32, i32 0)
br label %54
54: ; preds = %52, %50
%55 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0), %52 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i64 0, i64 0), %50 ]
%56 = phi i32 [ 67, %52 ], [ 66, %50 ]
%57 = call i32 @puts(i8* dereferenceable(1) %55)
%58 = call i32 @__CrestClearStack(i32 %56)
%59 = call i32 @__CrestLoad(i32 68, i64 0, i64 0)
%60 = ptrtoint i32* %2 to i64
%61 = call i32 @__CrestStore(i32 69, i64 %60)
store i32 0, i32* %2
%62 = call i32 @__CrestLoad(i32 70, i64 %60, i64 0)
%63 = call i32 @__CrestReturn(i32 71)
%64 = load i32, i32* %2
ret i32 %64
}