#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*/ __CrestLoad(int, unsigned long, long long);
int /*<<< orphan*/ __CrestReturn(int);
int /*<<< orphan*/ __CrestStore(int, unsigned long);
int /*<<< orphan*/ printf(char const *);
void f(int a) {
  {
    __CrestCall(2, 1);
    __CrestStore(1, (unsigned long)(&a));
    {
      __CrestLoad(5, (unsigned long)(&a), (long long)a);
      __CrestLoad(4, (unsigned long)0, (long long)13);
      __CrestApply2(3, 14, (long long)(a > 13));
      if (a > 13) {
        __CrestBranch(6, 2, 1);
        printf((char const *__restrict)"greater than 13\n");
        __CrestClearStack(8);
      } else {
        __CrestBranch(7, 3, 0);
        printf((char const *__restrict)"not greater than 13\n");
        __CrestClearStack(9);
      }
    }
    {
      __CrestReturn(10);
      return;
    }
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x1,%esi
call   1080 <__CrestCall@plt>
lea    -0x4(%rbp),%rsi
mov    $0x1,%edi
call   1060 <__CrestStore@plt>
lea    -0x4(%rbp),%rsi
movslq -0x4(%rbp),%rdx
mov    $0x5,%edi
call   1090 <__CrestLoad@plt>
mov    $0x4,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xd,%edx
call   1090 <__CrestLoad@plt>
cmpl   $0xd,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x3,%edi
mov    $0xe,%esi
call   1030 <__CrestApply2@plt>
cmpl   $0xd,-0x4(%rbp)
jle    1224 <f+0xa4>
mov    $0x6,%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
lea    0xdf4(%rip),%rdi
call   1040 <printf@plt>
mov    $0x8,%edi
call   10a0 <__CrestClearStack@plt>
jmp    124b <f+0xcb>
mov    $0x7,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
lea    0xdc4(%rip),%rdi
call   1040 <printf@plt>
mov    $0x9,%edi
call   10a0 <__CrestClearStack@plt>
mov    $0xa,%edi
call   1070 <__CrestReturn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
mov    $0x2,%edi
mov    $0x1,%esi
call   1080 <__CrestCall@plt>
lea    0xc(%rsp),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
movslq 0xc(%rsp),%rdx
mov    $0x5,%edi
mov    %rbx,%rsi
call   1090 <__CrestLoad@plt>
mov    $0xd,%edx
mov    $0x4,%edi
xor    %esi,%esi
call   1090 <__CrestLoad@plt>
xor    %edx,%edx
cmpl   $0xe,0xc(%rsp)
setge  %dl
mov    $0x3,%edi
mov    $0xe,%esi
call   1030 <__CrestApply2@plt>
cmpl   $0xe,0xc(%rsp)
jl     120f <f+0x8f>
mov    $0x6,%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
mov    $0x8,%ebx
lea    0xdf7(%rip),%rdi
jmp    122c <f+0xac>
mov    $0x7,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
mov    $0x9,%ebx
lea    0xdd4(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%edi
call   10a0 <__CrestClearStack@plt>
mov    $0xa,%edi
call   1070 <__CrestReturn@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"greater than 13\0A\00"
@.str.1 = [21 x i8] c"not greater than 13\0A\00"
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @__CrestCall(i32 2, i32 1)
%4 = ptrtoint i32* %2 to i64
%5 = call i32 @__CrestStore(i32 1, i64 %4)
%6 = ptrtoint i32* %2 to i64
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = call i32 @__CrestLoad(i32 5, i64 %6, i64 %8)
%10 = call i32 @__CrestLoad(i32 4, i64 0, i64 13)
%11 = load i32, i32* %2
%12 = icmp sgt i32 %11, 13
%13 = zext i1 %12 to i32
%14 = sext i32 %13 to i64
%15 = call i32 @__CrestApply2(i32 3, i32 14, i64 %14)
%16 = load i32, i32* %2
%17 = icmp sgt i32 %16, 13
br i1 %17, label %18, label %22
18: ; preds = %1
%19 = call i32 @__CrestBranch(i32 6, i32 2, i32 1)
%20 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @__CrestClearStack(i32 8)
br label %26
22: ; preds = %1
%23 = call i32 @__CrestBranch(i32 7, i32 3, i32 0)
%24 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%25 = call i32 @__CrestClearStack(i32 9)
br label %26
26: ; preds = %22, %18
%27 = call i32 @__CrestReturn(i32 10)
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"not greater than 13\00"
@str.2 = [16 x i8] c"greater than 13\00"
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = tail call i32 @__CrestCall(i32 2, i32 1)
%4 = ptrtoint i32* %2 to i64
%5 = call i32 @__CrestStore(i32 1, i64 %4)
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = call i32 @__CrestLoad(i32 5, i64 %4, i64 %7)
%9 = call i32 @__CrestLoad(i32 4, i64 0, i64 13)
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 13
%12 = zext i1 %11 to i64
%13 = call i32 @__CrestApply2(i32 3, i32 14, i64 %12)
%14 = load i32, i32* %2
%15 = icmp sgt i32 %14, 13
br i1 %15, label %16, label %18
16: ; preds = %1
%17 = call i32 @__CrestBranch(i32 6, i32 2, i32 1)
br label %20
18: ; preds = %1
%19 = call i32 @__CrestBranch(i32 7, i32 3, i32 0)
br label %20
20: ; preds = %18, %16
%21 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0), %18 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0), %16 ]
%22 = phi i32 [ 9, %18 ], [ 8, %16 ]
%23 = call i32 @puts(i8* dereferenceable(1) %21)
%24 = call i32 @__CrestClearStack(i32 %22)
%25 = call i32 @__CrestReturn(i32 10)
ret void
}