#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 h(int a) {
  {
    __CrestCall(26, 3);
    __CrestStore(25, (unsigned long)(&a));
    {
      __CrestLoad(29, (unsigned long)(&a), (long long)a);
      __CrestLoad(28, (unsigned long)0, (long long)-4);
      __CrestApply2(27, 12, (long long)(a == -4));
      if (a == -4) {
        __CrestBranch(30, 14, 1);
        printf((char const *__restrict)"-4\n");
        __CrestClearStack(32);
      } else {
        __CrestBranch(31, 15, 0);
        printf((char const *__restrict)"not -4\n");
        __CrestClearStack(33);
      }
    }
    {
      __CrestReturn(34);
      return;
    }
  }
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1a,%edi
mov    $0x3,%esi
call   1080 <__CrestCall@plt>
lea    -0x4(%rbp),%rsi
mov    $0x19,%edi
call   1060 <__CrestStore@plt>
lea    -0x4(%rbp),%rsi
movslq -0x4(%rbp),%rdx
mov    $0x1d,%edi
call   1090 <__CrestLoad@plt>
mov    $0x1c,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xfffffffffffffffc,%rdx
call   1090 <__CrestLoad@plt>
cmpl   $0xfffffffc,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x1b,%edi
mov    $0xc,%esi
call   1030 <__CrestApply2@plt>
cmpl   $0xfffffffc,-0x4(%rbp)
jne    1226 <h+0xa6>
mov    $0x1e,%edi
mov    $0xe,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
lea    0xdf2(%rip),%rdi
call   1040 <printf@plt>
mov    $0x20,%edi
call   10a0 <__CrestClearStack@plt>
jmp    124d <h+0xcd>
mov    $0x1f,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
lea    0xdc2(%rip),%rdi
call   1040 <printf@plt>
mov    $0x21,%edi
call   10a0 <__CrestClearStack@plt>
mov    $0x22,%edi
call   1070 <__CrestReturn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
mov    $0x1a,%edi
mov    $0x3,%esi
call   1080 <__CrestCall@plt>
lea    0xc(%rsp),%rbx
mov    $0x19,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
movslq 0xc(%rsp),%rdx
mov    $0x1d,%edi
mov    %rbx,%rsi
call   1090 <__CrestLoad@plt>
mov    $0x1c,%edi
xor    %esi,%esi
mov    $0xfffffffffffffffc,%rdx
call   1090 <__CrestLoad@plt>
xor    %edx,%edx
cmpl   $0xfffffffc,0xc(%rsp)
sete   %dl
mov    $0x1b,%edi
mov    $0xc,%esi
call   1030 <__CrestApply2@plt>
cmpl   $0xfffffffc,0xc(%rsp)
jne    1211 <h+0x91>
mov    $0x1e,%edi
mov    $0xe,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
mov    $0x20,%ebx
lea    0xdf5(%rip),%rdi
jmp    122e <h+0xae>
mov    $0x1f,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
mov    $0x21,%ebx
lea    0xdd2(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%edi
call   10a0 <__CrestClearStack@plt>
mov    $0x22,%edi
call   1070 <__CrestReturn@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

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