xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int u_int32_t;

/* Variables and functions */
u_int32_t gcd(u_int32_t a, u_int32_t b) {
  if (!b)
    return (a);
  return (gcd(b, a % b));
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1133 <gcd+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <gcd+0x37>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = load i32, i32* %4
store i32 %9, i32* %3
br label %16
10: ; preds = %2
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = srem i32 %12, %13
%15 = call i32 @gcd(i32 %11, i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %10, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ bad_strncmp_one(int /*<<< orphan*/);
int /*<<< orphan*/ good_strncmp(int /*<<< orphan*/);
int /*<<< orphan*/ strdup(char *);
void call_strncmp(char *str) {
  good_strncmp(strdup(str));
  bad_strncmp_one(strdup(str));
}


x86 assembly (clang, -O0):
<call_strncmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %eax,%edi
call   1040 <good_strncmp@plt>
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %eax,%edi
call   1030 <bad_strncmp_one@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_strncmp>:
push   %rbx
mov    %rdi,%rbx
call   1050 <strdup@plt>
mov    %eax,%edi
call   1040 <good_strncmp@plt>
mov    %rbx,%rdi
call   1050 <strdup@plt>
mov    %eax,%edi
pop    %rbx
jmp    1030 <bad_strncmp_one@plt>

LLVM IR (-O0):
define void @call_strncmp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strdup(i8* %3)
%5 = call i32 @good_strncmp(i32 %4)
%6 = load i8*, i8** %2
%7 = call i32 @strdup(i8* %6)
%8 = call i32 @bad_strncmp_one(i32 %7)
ret void
}

LLVM IR (-O2):
define void @call_strncmp(i8* %0) {
%2 = tail call i32 @strdup(i8* %0)
%3 = tail call i32 @good_strncmp(i32 %2)
%4 = tail call i32 @strdup(i8* %0)
%5 = tail call i32 @bad_strncmp_one(i32 %4)
ret void
}
void _draw_dialog_box(struct guiBox *box, int x, const char *title) {
  (void)box;
  (void)x;
  (void)title;
}


x86 assembly (clang, -O0):
<_draw_dialog_box>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_draw_dialog_box>:
ret

LLVM IR (-O0):
%struct.guiBox = type opaque
define void @_draw_dialog_box(%struct.guiBox* %0, i32 %1, i8* %2) {
%4 = alloca %struct.guiBox*
%5 = alloca i32
%6 = alloca i8*
store %struct.guiBox* %0, %struct.guiBox** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load %struct.guiBox*, %struct.guiBox** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
ret void
}

LLVM IR (-O2):
%struct.guiBox = type opaque
define void @_draw_dialog_box(%struct.guiBox* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
void *calloc(int, size_t);
void *malloc(size_t);
void *default_alloc(size_t size, int zero, void *user_data) {
  (void)user_data;
  return zero ? calloc(1, size) : malloc(size);
}


x86 assembly (clang, -O0):
<default_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1154 <default_alloc+0x34>
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
jmp    1161 <default_alloc+0x41>
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_alloc>:
mov    %rdi,%rax
test   %esi,%esi
je     1134 <default_alloc+0x14>
mov    $0x1,%edi
mov    %rax,%rsi
jmp    1030 <calloc@plt>
mov    %rax,%rdi
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define i8* @default_alloc(i64 %0, i32 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i8*
store i64 %0, i64* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i64, i64* %4
%12 = call i8* @calloc(i32 1, i64 %11)
br label %16
13: ; preds = %3
%14 = load i64, i64* %4
%15 = call i8* @malloc(i64 %14)
br label %16
16: ; preds = %13, %10
%17 = phi i8* [ %12, %10 ], [ %15, %13 ]
ret i8* %17
}

LLVM IR (-O2):
define i8* @default_alloc(i64 %0, i32 %1, i8* nocapture readnone %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i8* @calloc(i32 1, i64 %0)
br label %9
7: ; preds = %3
%8 = tail call i8* @malloc(i64 %0)
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ %6, %5 ], [ %8, %7 ]
ret i8* %10
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ranged_random_mod(scalar_t__);
void loop_mod_linear(size_t count, uint32_t range, uint32_t *output) {
  for (size_t i = 0; i < count; i++) {
    *output++ = ranged_random_mod(range + i);
  }
}


x86 assembly (clang, -O0):
<loop_mod_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    116d <loop_mod_linear+0x5d>
mov    -0x10(%rbp),%rdi
add    -0x20(%rbp),%rdi
call   1030 <ranged_random_mod@plt>
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <loop_mod_linear+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_mod_linear>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1148 <loop_mod_linear+0x38>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rdi
call   1030 <ranged_random_mod@plt>
cltq
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <loop_mod_linear+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @loop_mod_linear(i64 %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
store i64 0, i64* %7
br label %8
8: ; preds = %20, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %4
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i64, i64* %5
%14 = load i64, i64* %7
%15 = add i64 %13, %14
%16 = call i32 @ranged_random_mod(i64 %15)
%17 = sext i32 %16 to i64
%18 = load i64*, i64** %6
%19 = getelementptr inbounds i64, i64* %18, i32 1
store i64* %19, i64** %6
store i64 %17, i64* %18
br label %20
20: ; preds = %12
%21 = load i64, i64* %7
%22 = add i64 %21, 1
store i64 %22, i64* %7
br label %8
23: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @loop_mod_linear(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %5, label %6
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i64 [ %13, %6 ], [ 0, %3 ]
%8 = phi i64* [ %12, %6 ], [ %2, %3 ]
%9 = add i64 %7, %1
%10 = tail call i32 @ranged_random_mod(i64 %9)
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %8, i64 1
store i64 %11, i64* %8
%13 = add nuw i64 %7, 1
%14 = icmp eq i64 %13, %0
br i1 %14, label %5, label %6
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t impl1(int64_t n) { return (n * n) / 1024; }


x86 assembly (clang, -O0):
<impl1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<impl1>:
mov    %edi,%eax
imul   %edi,%eax
shr    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @impl1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
%6 = sdiv i32 %5, 1024
ret i32 %6
}

LLVM IR (-O2):
define i32 @impl1(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = lshr i32 %2, 10
ret i32 %3
}
/* Variables and functions */
long _recursiveDecimalSum(long, long, long);
long _convertToDecimal(long EV_binaryNum) {
  long EV_recursiveDepth;
  long EV_decimalSum;
  EV_recursiveDepth = 0;
  EV_decimalSum = 0;
  return _recursiveDecimalSum(EV_binaryNum, EV_decimalSum, EV_recursiveDepth);
}


x86 assembly (clang, -O0):
<_convertToDecimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <_recursiveDecimalSum@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_convertToDecimal>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <_recursiveDecimalSum@plt>

LLVM IR (-O0):
define i64 @_convertToDecimal(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
store i64 0, i64* %4
%5 = load i64, i64* %2
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = call i64 @_recursiveDecimalSum(i64 %5, i64 %6, i64 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @_convertToDecimal(i64 %0) {
%2 = tail call i64 @_recursiveDecimalSum(i64 %0, i64 0, i64 0)
ret i64 %2
}
int atoi(char str[]) {
  int i, str_int, base;
  str_int = 0;
  base = 10;
  for (i = 0; str[i] != '\0'; i++) {
    str_int = base * str_int + (str[i] - '0');
  }
  return str_int;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115b <atoi+0x5b>
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111d <atoi+0x1d>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <atoi+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <atoi+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i32 10, i32* %5
store i32 0, i32* %3
br label %6
6: ; preds = %26, %1
%7 = load i8*, i8** %2
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %29
14: ; preds = %6
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = mul nsw i32 %15, %16
%18 = load i8*, i8** %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = sub nsw i32 %23, 48
%25 = add nsw i32 %17, %24
store i32 %25, i32* %4
br label %26
26: ; preds = %14
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %6
29: ; preds = %6
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %12, %4 ], [ 0, %1 ]
%6 = phi i8 [ %14, %4 ], [ %2, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = mul nsw i32 %7, 10
%10 = add i32 %9, -48
%11 = add i32 %10, %8
%12 = add nuw nsw i64 %5, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ dsputil_static_init();
void avcodec_init(void) {
  static int inited = 0;
  if (inited != 0)
    return;
  inited = 1;
  dsputil_static_init();
}


x86 assembly (clang, -O0):
<avcodec_init>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
je     1126 <avcodec_init+0x16>
jmp    1137 <avcodec_init+0x27>
movl   $0x1,0x2efc(%rip)
mov    $0x0,%al
call   1030 <dsputil_static_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<avcodec_init>:
cmpb   $0x0,0x2f15(%rip)
je     111a <avcodec_init+0xa>
ret
movb   $0x1,0x2f0b(%rip)
xor    %eax,%eax
jmp    1030 <dsputil_static_init@plt>

LLVM IR (-O0):
@avcodec_init.inited = internal global i32 0
define void @avcodec_init() {
%1 = load i32, i32* @avcodec_init.inited
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
br label %6
4: ; preds = %0
store i32 1, i32* @avcodec_init.inited
%5 = call i32 (...) @dsputil_static_init()
br label %6
6: ; preds = %4, %3
ret void
}

LLVM IR (-O2):
@avcodec_init.inited = internal unnamed_addr global i1 false
define void @avcodec_init() {
%1 = load i1, i1* @avcodec_init.inited
br i1 %1, label %4, label %2
2: ; preds = %0
store i1 true, i1* @avcodec_init.inited
%3 = tail call i32 (...) @dsputil_static_init()
br label %4
4: ; preds = %0, %2
ret void
}
/* Variables and functions */
scalar_t__ s(unsigned long long);
unsigned long long int S(unsigned long long int k) {
  unsigned long long int n;
  unsigned long long int ret = 0;
  for (n = 1; n <= k; ++n) {
    ret += s(n);
  }
  return ret;
}


x86 assembly (clang, -O0):
<S>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
ja     115c <S+0x4c>
mov    -0x10(%rbp),%rdi
call   1030 <s@plt>
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112c <S+0x1c>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1146 <S+0x36>
mov    %rdi,%r14
mov    $0x1,%ebx
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1030 <s@plt>
add    %rax,%r15
add    $0x1,%rbx
cmp    %r14,%rbx
jbe    1130 <S+0x20>
jmp    1149 <S+0x39>
xor    %r15d,%r15d
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @S(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %4
store i64 1, i64* %3
br label %5
5: ; preds = %14, %1
%6 = load i64, i64* %3
%7 = load i64, i64* %2
%8 = icmp ule i64 %6, %7
br i1 %8, label %9, label %17
9: ; preds = %5
%10 = load i64, i64* %3
%11 = call i64 @s(i64 %10)
%12 = load i64, i64* %4
%13 = add i64 %12, %11
store i64 %13, i64* %4
br label %14
14: ; preds = %9
%15 = load i64, i64* %3
%16 = add i64 %15, 1
store i64 %16, i64* %3
br label %5
17: ; preds = %5
%18 = load i64, i64* %4
ret i64 %18
}

LLVM IR (-O2):
define i64 @S(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = phi i64 [ %8, %3 ], [ 1, %1 ]
%6 = tail call i64 @s(i64 %5)
%7 = add i64 %6, %4
%8 = add i64 %5, 1
%9 = icmp ugt i64 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i64 [ 0, %1 ], [ %7, %3 ]
ret i64 %11
}
int checkExists(char character, char *ocurrences, int maxCharacter) {
  int i;
  for (i = 0; i < maxCharacter; i++)
    if ((int)ocurrences[i] == (int)character)
      return i;
  return -1;
}


x86 assembly (clang, -O0):
<checkExists>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115a <checkExists+0x5a>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1147 <checkExists+0x47>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <checkExists+0x61>
jmp    114c <checkExists+0x4c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1118 <checkExists+0x18>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkExists>:
mov    $0xffffffff,%eax
test   %edx,%edx
jle    111f <checkExists+0x1f>
mov    %edx,%edx
xor    %ecx,%ecx
nopl   (%rax)
cmp    %dil,(%rsi,%rcx,1)
je     1120 <checkExists+0x20>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <checkExists+0x10>
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @checkExists(i8 signext %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %26, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %29
13: ; preds = %9
%14 = load i8*, i8** %6
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = load i8, i8* %5
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %19, %21
br i1 %22, label %23, label %25
23: ; preds = %13
%24 = load i32, i32* %8
store i32 %24, i32* %4
br label %30
25: ; preds = %13
br label %26
26: ; preds = %25
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 1
store i32 %28, i32* %8
br label %9
29: ; preds = %9
store i32 -1, i32* %4
br label %30
30: ; preds = %29, %23
%31 = load i32, i32* %4
ret i32 %31
}

LLVM IR (-O2):
define i32 @checkExists(i8 signext %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, %0
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
/* Variables and functions */
void *__real_calloc(size_t, size_t);
unsigned int irq_disable();
int /*<<< orphan*/ irq_restore(unsigned int);
void *__wrap_calloc(size_t nmemb, size_t size) {
  unsigned state = irq_disable();
  void *ptr = __real_calloc(nmemb, size);
  irq_restore(state);
  return ptr;
}


x86 assembly (clang, -O0):
<__wrap_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <irq_disable@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__real_calloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <irq_restore@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_calloc>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <irq_disable@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <__real_calloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1050 <irq_restore@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @__wrap_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
%6 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = call i32 (...) @irq_disable()
store i32 %7, i32* %5
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = call i8* @__real_calloc(i64 %8, i64 %9)
store i8* %10, i8** %6
%11 = load i32, i32* %5
%12 = call i32 @irq_restore(i32 %11)
%13 = load i8*, i8** %6
ret i8* %13
}

LLVM IR (-O2):
define i8* @__wrap_calloc(i64 %0, i64 %1) {
%3 = tail call i32 (...) @irq_disable()
%4 = tail call i8* @__real_calloc(i64 %0, i64 %1)
%5 = tail call i32 @irq_restore(i32 %3)
ret i8* %4
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ printf(char *, char);
void invalid_acces_function() {
  char *p = malloc(4);
  printf("%c", p[4]);
}


x86 assembly (clang, -O0):
<invalid_acces_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
lea    0xebf(%rip),%rdi
movsbl 0x4(%rax),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalid_acces_function>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @invalid_acces_function() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 4)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = getelementptr inbounds i8, i8* %3, i64 4
%5 = load i8, i8* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @invalid_acces_function() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext undef)
ret void
}
void check_logfs_segment_entry(void) { ; }


x86 assembly (clang, -O0):
<check_logfs_segment_entry>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_logfs_segment_entry>:
ret

LLVM IR (-O0):
define void @check_logfs_segment_entry() {
ret void
}

LLVM IR (-O2):
define void @check_logfs_segment_entry() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_RSquareRootF_init(void) {
  _hmt_register_covercase("HMM_RSquareRootF", "1");
}


x86 assembly (clang, -O0):
<_hmt_covercase_HMM_RSquareRootF_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeef(%rip),%rsi
call   1030 <_hmt_register_covercase@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_RSquareRootF_init>:
lea    0xee9(%rip),%rdi
lea    0xef3(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"HMM_RSquareRootF\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_RSquareRootF_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"HMM_RSquareRootF\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_RSquareRootF_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int next_utf8(char const *, int *);
int fn_cl_1_33_35_4294967295(const char *text) {
  int pos = 0;
  unsigned int c = next_utf8(text, &pos);
  if (c >= 1 && c <= 33)
    return pos;
  if (c >= 35 && c <= 4294967295)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_cl_1_33_35_4294967295>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <next_utf8@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jb     1152 <fn_cl_1_33_35_4294967295+0x42>
cmpl   $0x21,-0x18(%rbp)
ja     1152 <fn_cl_1_33_35_4294967295+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117f <fn_cl_1_33_35_4294967295+0x6f>
cmpl   $0x23,-0x18(%rbp)
jb     1178 <fn_cl_1_33_35_4294967295+0x68>
mov    -0x18(%rbp),%eax
mov    $0xffffffff,%ecx
cmp    %rcx,%rax
jg     1178 <fn_cl_1_33_35_4294967295+0x68>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117f <fn_cl_1_33_35_4294967295+0x6f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_cl_1_33_35_4294967295>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
lea    -0x1(%rax),%ecx
cmp    $0x21,%ecx
mov    0x4(%rsp),%edx
mov    $0xffffffff,%ecx
cmovb  %edx,%ecx
cmp    $0x23,%eax
cmovae %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fn_cl_1_33_35_4294967295(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @next_utf8(i8* %6, i32* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp uge i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i32, i32* %5
%12 = icmp ule i32 %11, 33
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %25
15: ; preds = %10, %1
%16 = load i32, i32* %5
%17 = icmp uge i32 %16, 35
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = load i32, i32* %5
%20 = zext i32 %19 to i64
%21 = icmp sle i64 %20, 4294967295
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = load i32, i32* %4
store i32 %23, i32* %2
br label %25
24: ; preds = %18, %15
store i32 -1, i32* %2
br label %25
25: ; preds = %24, %22, %13
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @fn_cl_1_33_35_4294967295(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @next_utf8(i8* %0, i32* %2)
%5 = add i32 %4, -1
%6 = icmp ult i32 %5, 33
%7 = load i32, i32* %2
%8 = icmp ugt i32 %4, 34
%9 = or i1 %8, %6
%10 = select i1 %9, i32 %7, i32 -1
ret i32 %10
}
int bcf_enc_inttype(long x) {
  if (x <= (0x7f) && x >= (-120))
    return 1;
  if (x <= (0x7fff) && x >= (-32760))
    return 2;
  return 3;
}


x86 assembly (clang, -O0):
<bcf_enc_inttype>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x7f,-0x10(%rbp)
jg     112a <bcf_enc_inttype+0x2a>
cmpq   $0xffffffffffffff88,-0x10(%rbp)
jl     112a <bcf_enc_inttype+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1159 <bcf_enc_inttype+0x59>
cmpq   $0x7fff,-0x10(%rbp)
jg     1152 <bcf_enc_inttype+0x52>
cmpq   $0xffffffffffff8008,-0x10(%rbp)
ff
jl     1152 <bcf_enc_inttype+0x52>
movl   $0x2,-0x4(%rbp)
jmp    1159 <bcf_enc_inttype+0x59>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcf_enc_inttype>:
lea    0x78(%rdi),%rax
add    $0x7ff8,%rdi
cmp    $0xfff8,%rdi
mov    $0x3,%ecx
sbb    $0x0,%ecx
cmp    $0xf8,%rax
mov    $0x1,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bcf_enc_inttype(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp sle i64 %4, 127
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* %3
%8 = icmp sge i64 %7, -120
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %18
10: ; preds = %6, %1
%11 = load i64, i64* %3
%12 = icmp sle i64 %11, 32767
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i64, i64* %3
%15 = icmp sge i64 %14, -32760
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 2, i32* %2
br label %18
17: ; preds = %13, %10
store i32 3, i32* %2
br label %18
18: ; preds = %17, %16, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @bcf_enc_inttype(i64 %0) {
%2 = add i64 %0, 120
%3 = icmp ult i64 %2, 248
%4 = add i64 %0, 32760
%5 = icmp ult i64 %4, 65528
%6 = select i1 %5, i32 2, i32 3
%7 = select i1 %3, i32 1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ zcoroutine_sleep_millisecond(int);
void *test_sleep1(void *context) {
  while (1) {
    sleep(1);
    zcoroutine_sleep_millisecond(10);
    printf("test_sleep1, 1s + 10ms \n");
  }
  return context;
}


x86 assembly (clang, -O0):
<test_sleep1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0xa,%edi
call   1040 <zcoroutine_sleep_millisecond@plt>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    113c <test_sleep1+0xc>

x86 assembly (clang, -O2):
<test_sleep1>:
push   %rbx
lea    0xec8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0xa,%edi
call   1040 <zcoroutine_sleep_millisecond@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1140 <test_sleep1+0x10>

LLVM IR (-O0):
@.str = [25 x i8] c"test_sleep1, 1s + 10ms \0A\00"
define i8* @test_sleep1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @sleep(i32 1)
%5 = call i32 @zcoroutine_sleep_millisecond(i32 10)
%6 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %3
}

LLVM IR (-O2):
@str = [24 x i8] c"test_sleep1, 1s + 10ms \00"
define noalias i8* @test_sleep1(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 @zcoroutine_sleep_millisecond(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %2
}
/* Variables and functions */
double round(double);
long long duration_get(long long on, long long off) {
  long long duration;
  double d;
  d = (float)(on - off);
  d *= (1.5 / 8.0);
  d = round(d);
  return ((long long)d);
}


x86 assembly (clang, -O0):
<duration_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xec2(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <round@plt>
movsd  %xmm0,-0x20(%rbp)
cvttsd2si -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<duration_get>:
push   %rax
sub    %rsi,%rdi
cvtsi2ss %rdi,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xedb(%rip),%xmm0
call   1030 <round@plt>
cvttsd2si %xmm0,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @duration_get(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca double
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = sub nsw i64 %7, %8
%10 = sitofp i64 %9 to float
%11 = fpext float %10 to double
store double %11, double* %6
%12 = load double, double* %6
%13 = fmul double %12, 1.875000e-01
store double %13, double* %6
%14 = load double, double* %6
%15 = call double @llvm.round.f64(double %14)
store double %15, double* %6
%16 = load double, double* %6
%17 = fptosi double %16 to i64
ret i64 %17
}

LLVM IR (-O2):
define i64 @duration_get(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = sitofp i64 %3 to float
%5 = fpext float %4 to double
%6 = fmul double %5, 1.875000e-01
%7 = tail call double @llvm.round.f64(double %6)
%8 = fptosi double %7 to i64
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int x = 5;
  x = 42;
  int i = x;
  if (i != 42) {
    printf("Error %d\n", (int)99);
    exit(99);
  };
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x2a,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x2a,-0xc(%rbp)
je     116a <main+0x4a>
lea    0xeac(%rip),%rdi
mov    $0x63,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x63,%edi
call   1040 <exit@plt>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Error %d\0A\00"
@.str.1 = [9 x i8] c"Success\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 42, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 42
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 99)
%9 = call i32 @exit(i32 99)
unreachable
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [8 x i8] c"Success\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _SSIBaseValid(scalar_t__ volatile);
uint32_t SSIIntStatus(uint32_t ui32Base, bool bMasked) {
  ASSERT(_SSIBaseValid(ui32Base));
  if (bMasked) {
    return ((*((volatile uint32_t *)(ui32Base + 0x0000001C))));
  } else {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000018))));
  }
}


x86 assembly (clang, -O0):
<SSIIntStatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_SSIBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
cmpl   $0x0,-0x14(%rbp)
je     115a <SSIIntStatus+0x3a>
mov    -0x10(%rbp),%rax
mov    0x1c(%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1166 <SSIIntStatus+0x46>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIIntStatus>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,0x8(%rsp)
mov    0x8(%rsp),%rdi
call   1030 <_SSIBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
xor    %eax,%eax
test   %ebx,%ebx
setne  %al
mov    0x8(%rsp),%rcx
mov    0x18(%rcx,%rax,4),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i64 @SSIIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store volatile i64 %0, i64* %4
store i32 %1, i32* %5
%6 = load volatile i64, i64* %4
%7 = call i32 @_SSIBaseValid(i64 %6)
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load volatile i64, i64* %4
%13 = add nsw i64 %12, 28
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
store i64 %15, i64* %3
br label %21
16: ; preds = %2
%17 = load volatile i64, i64* %4
%18 = add nsw i64 %17, 24
%19 = inttoptr i64 %18 to i64*
%20 = load volatile i64, i64* %19
store i64 %20, i64* %3
br label %21
21: ; preds = %16, %11
%22 = load i64, i64* %3
ret i64 %22
}

LLVM IR (-O2):
define i64 @SSIIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
store volatile i64 %0, i64* %3
%4 = load volatile i64, i64* %3
%5 = tail call i32 @_SSIBaseValid(i64 %4)
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp eq i32 %1, 0
%8 = load volatile i64, i64* %3
%9 = select i1 %7, i64 24, i64 28
%10 = add nsw i64 %8, %9
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello, ps3\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"hello, ps3\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"hello, ps3\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mini_printf(char *, int);
void usage() {
  mini_printf("gpm2-daemon: written by Nico Schottelius\n", 1);
  mini_printf("\n", 1);
  mini_printf("  -c <cconfig>: specify configuration directory\n", 1);
  mini_printf("  -f:           fork into background after startup \n", 1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <mini_printf@plt>
lea    0xf62(%rip),%rdi
mov    $0x1,%esi
call   1030 <mini_printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x1,%esi
call   1030 <mini_printf@plt>
lea    0xf0d(%rip),%rdi
mov    $0x1,%esi
call   1030 <mini_printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <mini_printf@plt>
lea    0xf65(%rip),%rdi
mov    $0x1,%esi
call   1030 <mini_printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x1,%esi
call   1030 <mini_printf@plt>
lea    0xf10(%rip),%rdi
mov    $0x1,%esi
pop    %rax
jmp    1030 <mini_printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"gpm2-daemon: written by Nico Schottelius\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [49 x i8] c" -c <cconfig>: specify configuration directory\0A\00"
@.str.3 = [53 x i8] c" -f: fork into background after startup \0A\00"
define void @usage() {
%1 = call i32 @mini_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = call i32 @mini_printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = call i32 @mini_printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i32 1)
%4 = call i32 @mini_printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"gpm2-daemon: written by Nico Schottelius\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [49 x i8] c" -c <cconfig>: specify configuration directory\0A\00"
@.str.3 = [53 x i8] c" -f: fork into background after startup \0A\00"
define void @usage() {
%1 = tail call i32 @mini_printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @mini_printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 @mini_printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i32 1)
%4 = tail call i32 @mini_printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0), i32 1)
ret void
}
void swap(int array[], int i, int j) {
  int temp;
  temp = array[i];
  array[i] = array[j];
  array[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int help() {
  fprintf(stdout, "Entering what you want to write after prompt '>'\n");
  fprintf(stdout,
          "Press Ctrl-D after prompt '>', if you finish your writing\n");
  return 0;
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xef9(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf03(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [50 x i8] c"Entering what you want to write after prompt '>'\0A\00"
@.str.1 = [59 x i8] c"Press Ctrl-D after prompt '>', if you finish your writing\0A\00"
define i32 @help() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [50 x i8] c"Entering what you want to write after prompt '>'\0A\00"
@.str.1 = [59 x i8] c"Press Ctrl-D after prompt '>', if you finish your writing\0A\00"
define i32 @help() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void die(const char *c) {
  printf("Fatal error: %s\n", c);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Fatal error: %s\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"Fatal error: %s\0A\00"
define void @die(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("HAHA\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"HAHA\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"HAHA\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int initialize_dobldobl_Laurent_sampler(int dim) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(805, &dim, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_dobldobl_Laurent_sampler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x325,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_dobldobl_Laurent_sampler>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x325,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @initialize_dobldobl_Laurent_sampler(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 805, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @initialize_dobldobl_Laurent_sampler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 805, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
double fat(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  double result;
  printf("\nEntre com o numero:");
  scanf("%d", &num);
  result = fat(num);
  printf("\nO fatorial de %d = %f\n", num, result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1050 <fat@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
lea    0xe9f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <fat@plt>
mov    0x4(%rsp),%esi
lea    0xeb4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"\0AEntre com o numero:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"\0AO fatorial de %d = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call double @fat(i32 %6)
store double %7, double* %3
%8 = load i32, i32* %2
%9 = load double, double* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0AEntre com o numero:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"\0AO fatorial de %d = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call double @fat(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %7, double %6)
ret i32 0
}