xunge/DecIR huggingface dataset:
/* Variables and functions */
int close(int);
int /*<<< orphan*/ errno_exit(char *);
void close_device(int fd) {
  if (-1 == close(fd))
    errno_exit("close");
}


x86 assembly (clang, -O0):
<close_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    114e <close_device+0x2e>
lea    0xeb7(%rip),%rdi
call   1030 <errno_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_device>:
push   %rax
call   1040 <close@plt>
cmp    $0xffffffff,%eax
je     112d <close_device+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <errno_exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"close\00"
define void @close_device(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
%5 = icmp eq i32 -1, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @errno_exit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"close\00"
define void @close_device(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @errno_exit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRC3_get(void) { return U_WMRCORENONE_get("U_WMRC3"); }


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

x86 assembly (clang, -O2):
<U_WMRC3_get>:
lea    0xee9(%rip),%rdi
jmp    1030 <U_WMRCORENONE_get@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRC3\00"
define i32 @U_WMRC3_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRC3\00"
define i32 @U_WMRC3_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ close(int);
int fstat(int, struct stat *);
int open(char *, int);
int stat(char *n, struct stat *st) {
  int fd;
  int r;
  fd = open(n, 0x000);
  if (fd < 0)
    return -1;
  r = fstat(fd, st);
  close(fd);
  return r;
}


x86 assembly (clang, -O0):
<stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <open@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1164 <stat+0x34>
movl   $0xffffffff,-0x4(%rbp)
jmp    1181 <stat+0x51>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1050 <fstat@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <close@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
xor    %esi,%esi
call   1040 <open@plt>
test   %eax,%eax
js     115a <stat+0x2a>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
call   1050 <fstat@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <close@plt>
mov    %ebx,%eax
jmp    115f <stat+0x2f>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.stat*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store %struct.stat* %1, %struct.stat** %5
%8 = load i8*, i8** %4
%9 = call i32 @open(i8* %8, i32 0)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 -1, i32* %3
br label %20
13: ; preds = %2
%14 = load i32, i32* %6
%15 = load %struct.stat*, %struct.stat** %5
%16 = call i32 @fstat(i32 %14, %struct.stat* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %6
%18 = call i32 @close(i32 %17)
%19 = load i32, i32* %7
store i32 %19, i32* %3
br label %20
20: ; preds = %13, %12
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @stat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @open(i8* %0, i32 0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @fstat(i32 %3, %struct.stat* %1)
%7 = tail call i32 @close(i32 %3)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ menu_load(int /*<<< orphan*/, int);
int /*<<< orphan*/ reset_all_save(int /*<<< orphan*/);
void menu_load_start(void) {
  if (menu_load(0, 1))
    reset_all_save(0);
}


x86 assembly (clang, -O0):
<menu_load_start>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <menu_load@plt>
cmp    $0x0,%rax
je     1141 <menu_load_start+0x21>
xor    %edi,%edi
call   1030 <reset_all_save@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_load_start>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <menu_load@plt>
test   %rax,%rax
je     113a <menu_load_start+0x1a>
xor    %edi,%edi
pop    %rax
jmp    1030 <reset_all_save@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @menu_load_start() {
%1 = call i64 @menu_load(i32 0, i32 1)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @reset_all_save(i32 0)
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @menu_load_start() {
%1 = tail call i64 @menu_load(i32 0, i32 1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @reset_all_save(i32 0)
br label %5
5: ; preds = %3, %0
ret void
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      if (state[0UL] > local1) {
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 371143069UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x0,%eax
jge    1155 <RandomFunc+0x55>
movzwl -0x12(%rbp),%eax
movzwl -0x14(%rbp),%ecx
cmp    %ecx,%eax
jle    1144 <RandomFunc+0x44>
jmp    1144 <RandomFunc+0x44>
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
add    $0x161f319d,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0x3ce2,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i32
%11 = add nsw i32 %10, 2885
%12 = trunc i32 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
store i16 0, i16* %6
br label %14
14: ; preds = %26, %2
%15 = load i16, i16* %6
%16 = zext i16 %15 to i32
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %31
18: ; preds = %14
%19 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%20 = load i16, i16* %19
%21 = zext i16 %20 to i32
%22 = load i16, i16* %6
%23 = zext i16 %22 to i32
%24 = icmp sgt i32 %21, %23
br i1 %24, label %25, label %26
25: ; preds = %18
br label %26
26: ; preds = %25, %18
%27 = load i16, i16* %6
%28 = zext i16 %27 to i64
%29 = add i64 %28, 2
%30 = trunc i64 %29 to i16
store i16 %30, i16* %6
br label %14
31: ; preds = %14
%32 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%33 = load i16, i16* %32
%34 = zext i16 %33 to i64
%35 = add i64 %34, 371143069
%36 = trunc i64 %35 to i16
%37 = load i16*, i16** %4
%38 = getelementptr inbounds i16, i16* %37, i64 0
store i16 %36, i16* %38
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, 15586
store i16 %4, i16* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t as_uint32(float x) {
  union {
    float x;
    uint32_t n;
  } data = {.x = x};
  return data.n;
}


x86 assembly (clang, -O0):
<as_uint32>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<as_uint32>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
%union.anon = type { float }
define i32 @as_uint32(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = bitcast %union.anon* %3 to float*
%5 = load float, float* %2
store float %5, float* %4
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @as_uint32(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ usleep(int);
int scmSleep(sqlite3_vfs *pVfs, int nMicro) {
  sleep(nMicro / 1000000);
  usleep(nMicro % 1000000);
  return nMicro;
}


x86 assembly (clang, -O0):
<scmSleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <sleep@plt>
mov    -0xc(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1040 <usleep@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scmSleep>:
push   %r14
push   %rbx
push   %rax
movslq %esi,%r14
imul   $0x431bde83,%r14,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x32,%rbx
add    %eax,%ebx
mov    %ebx,%edi
call   1030 <sleep@plt>
imul   $0xf4240,%ebx,%eax
mov    %r14d,%edi
sub    %eax,%edi
call   1040 <usleep@plt>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @scmSleep(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sdiv i32 %5, 1000000
%7 = call i32 @sleep(i32 %6)
%8 = load i32, i32* %4
%9 = srem i32 %8, 1000000
%10 = call i32 @usleep(i32 %9)
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @scmSleep(i32* nocapture readnone %0, i32 returned %1) {
%3 = sdiv i32 %1, 1000000
%4 = tail call i32 @sleep(i32 %3)
%5 = srem i32 %1, 1000000
%6 = tail call i32 @usleep(i32 %5)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
start:
  printf("%d\n", a);
  a++;
  if (a <= 7)
    goto start;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x7,-0x8(%rbp)
jg     1166 <main+0x46>
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
lea    0xec2(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
lea    0x1(%rax),%esi
mov    %esi,0xc(%rsp)
cmp    $0x7,%eax
jl     1150 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
br label %5
5: ; preds = %5, %0
%6 = phi i32 [ %9, %5 ], [ %4, %0 ]
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
%10 = icmp slt i32 %8, 7
br i1 %10, label %5, label %11
11: ; preds = %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ register_sil_function_list();
void sil_init() { register_sil_function_list(); }


x86 assembly (clang, -O0):
<sil_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <register_sil_function_list@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sil_init>:
xor    %eax,%eax
jmp    1030 <register_sil_function_list@plt>

LLVM IR (-O0):
define void @sil_init() {
%1 = call i32 (...) @register_sil_function_list()
ret void
}

LLVM IR (-O2):
define void @sil_init() {
%1 = tail call i32 (...) @register_sil_function_list()
ret void
}
/* Variables and functions */
int bar();
void __attribute__((no, noclone)) fn12(void) { int j[bar()]; }


x86 assembly (clang, -O0):
<fn12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <bar@plt>
mov    %eax,%eax
mov    %rsp,%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn12>:
xor    %eax,%eax
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @fn12() {
%1 = alloca i8*
%2 = alloca i64
%3 = call i32 (...) @bar()
%4 = zext i32 %3 to i64
%5 = call i8* @llvm.stacksave()
store i8* %5, i8** %1
%6 = alloca i32, i64 %4
store i64 %4, i64* %2
%7 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
define void @fn12() {
%1 = tail call i32 (...) @bar()
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ debug(int, char *, int);
int confSaveUidGid(char *value, short handling, void *result) {
  int *dest = (int *)result;
  *dest = atoi(value);
  debug(3, "set uid/gid: %d", *dest);
  return 0;
}


x86 assembly (clang, -O0):
<confSaveUidGid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    $0x3,%edi
lea    0xe9e(%rip),%rsi
call   1030 <debug@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<confSaveUidGid>:
push   %rbx
mov    %rdx,%rbx
call   1040 <atoi@plt>
mov    %eax,(%rbx)
lea    0xece(%rip),%rsi
mov    $0x3,%edi
mov    %eax,%edx
call   1030 <debug@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"set uid/gid: %d\00"
define i32 @confSaveUidGid(i8* %0, i16 signext %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i8*
%7 = alloca i32*
store i8* %0, i8** %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i8*, i8** %4
%11 = call i32 @atoi(i8* %10)
%12 = load i32*, i32** %7
store i32 %11, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = call i32 @debug(i32 3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"set uid/gid: %d\00"
define i32 @confSaveUidGid(i8* nocapture %0, i16 signext %1, i8* nocapture writeonly %2) {
%4 = bitcast i8* %2 to i32*
%5 = tail call i32 @atoi(i8* %0)
store i32 %5, i32* %4
%6 = tail call i32 @debug(i32 3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int isupper2(char);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char c = 'A';
  printf("%d\n", ((c) >= 'A' && (c) <= 'D'));
  printf("%d\n", isupper2(c));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x6(%rbp)
jl     1152 <main+0x32>
movsbl -0x5(%rbp),%eax
cmp    $0x44,%eax
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
movsbl -0x5(%rbp),%edi
call   1030 <isupper2@plt>
mov    %eax,%esi
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
mov    $0x41,%edi
call   1030 <isupper2@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 65, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 68
br label %10
10: ; preds = %6, %0
%11 = phi i1 [ false, %0 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i8, i8* %2
%15 = call i32 @isupper2(i8 signext %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @isupper2(i8 signext 65)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
scalar_t__ isdigit(int);
char toupper(int);
int luaO_hexavalue(int c) {
  ;
  if (isdigit(c))
    return c - '0';
  else
    return toupper(c) - 'A' + 10;
}


x86 assembly (clang, -O0):
<luaO_hexavalue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     114b <luaO_hexavalue+0x2b>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    115f <luaO_hexavalue+0x3f>
mov    -0x8(%rbp),%edi
call   1040 <toupper@plt>
movsbl %al,%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaO_hexavalue>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
je     1132 <luaO_hexavalue+0x12>
add    $0xffffffd0,%ebx
jmp    113f <luaO_hexavalue+0x1f>
mov    %ebx,%edi
call   1040 <toupper@plt>
movsbl %al,%ebx
add    $0xffffffc9,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @luaO_hexavalue(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isdigit(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 48
store i32 %9, i32* %2
br label %16
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call signext i8 @toupper(i32 %11)
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 65
%15 = add nsw i32 %14, 10
store i32 %15, i32* %2
br label %16
16: ; preds = %10, %7
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @luaO_hexavalue(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = add nsw i32 %0, -48
br label %10
6: ; preds = %1
%7 = tail call signext i8 @toupper(i32 %0)
%8 = sext i8 %7 to i32
%9 = add nsw i32 %8, -55
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ %5, %4 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
scalar_t__ SupportsTsx();
int /*<<< orphan*/ printf(char *);
int main() {
  if (SupportsTsx())
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <SupportsTsx@plt>
cmp    $0x0,%rax
je     1151 <main+0x31>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <main+0x3d>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"Yes\0A\00"
@.str.1 = [4 x i8] c"No\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @SupportsTsx()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@str = [3 x i8] c"No\00"
@str.2 = [4 x i8] c"Yes\00"
define i32 @main() {
%1 = tail call i64 (...) @SupportsTsx()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
void SIO1writeMode16(unsigned short val) {}


x86 assembly (clang, -O0):
<SIO1writeMode16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @SIO1writeMode16(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
ret void
}

LLVM IR (-O2):
define void @SIO1writeMode16(i16 zeroext %0) {
ret void
}
/* Type definitions */
struct rusage {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ WAIT_ANY;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ __waitpid(int /*<<< orphan*/, int *, int);
pid_t __wait3(int *stat_loc, int options, struct rusage *usage) {
  if (usage != NULL) {
    __set_errno(ENOSYS);
    return (pid_t)-1;
  }
  return __waitpid(WAIT_ANY, stat_loc, options);
}


x86 assembly (clang, -O0):
<__wait3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1158 <__wait3+0x38>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1170 <__wait3+0x50>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <__waitpid@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wait3>:
push   %rax
test   %rdx,%rdx
je     113b <__wait3+0x1b>
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
mov    %esi,%eax
mov    %rdi,%rsi
mov    0x2e99(%rip),%rcx
mov    (%rcx),%edi
mov    %eax,%edx
pop    %rax
jmp    1040 <__waitpid@plt>

LLVM IR (-O0):
%struct.rusage = type { i32 }
@ENOSYS = global i32 0
@WAIT_ANY = global i32 0
define i32 @__wait3(i32* %0, i32 %1, %struct.rusage* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca %struct.rusage*
store i32* %0, i32** %5
store i32 %1, i32* %6
store %struct.rusage* %2, %struct.rusage** %7
%8 = load %struct.rusage*, %struct.rusage** %7
%9 = icmp ne %struct.rusage* %8, null
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* @ENOSYS
%12 = call i32 @__set_errno(i32 %11)
store i32 -1, i32* %4
br label %18
13: ; preds = %3
%14 = load i32, i32* @WAIT_ANY
%15 = load i32*, i32** %5
%16 = load i32, i32* %6
%17 = call i32 @__waitpid(i32 %14, i32* %15, i32 %16)
store i32 %17, i32* %4
br label %18
18: ; preds = %13, %10
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
@ENOSYS = global i32 0
@WAIT_ANY = global i32 0
define i32 @__wait3(i32* %0, i32 %1, %struct.rusage* readnone %2) {
%4 = icmp eq %struct.rusage* %2, null
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = load i32, i32* @ENOSYS
%7 = tail call i32 @__set_errno(i32 %6)
br label %11
8: ; preds = %3
%9 = load i32, i32* @WAIT_ANY
%10 = tail call i32 @__waitpid(i32 %9, i32* %0, i32 %1)
br label %11
11: ; preds = %8, %5
%12 = phi i32 [ -1, %5 ], [ %10, %8 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void memory_error() {
  fprintf(stderr, "Out of memory.  Aborting...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<memory_error>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<memory_error>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Out of memory. Aborting...\0A\00"
define void @memory_error() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Out of memory. Aborting...\0A\00"
define void @memory_error() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int main() {
  long double a;
  typedef long double my_long_double;
  my_long_double d;
  long double e;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ scoreletter(char);
int scorearray(char *input) {
  int score = 0;
  int i = 0;
  while (input[i] != '\0')
    score += scoreletter(input[i++]);
  return score;
}


x86 assembly (clang, -O0):
<scorearray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     116c <scorearray+0x5c>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <scoreletter@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
jmp    112a <scorearray+0x1a>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scorearray>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1147 <scorearray+0x37>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <scoreletter@plt>
add    %eax,%ebp
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <scorearray+0x20>
jmp    1149 <scorearray+0x39>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @scorearray(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = add nuw i64 %5, 1
%9 = tail call i64 @scoreletter(i8 signext %6)
%10 = trunc i64 %9 to i32
%11 = add i32 %7, %10
%12 = getelementptr inbounds i8, i8* %0, i64 %8
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ zwave_sendClassCommand(unsigned int, int, int,
                                          unsigned char *, int);
void zwavecmd_association_set_buf(unsigned int id, unsigned int group,
                                  unsigned char *data, int len) {
  unsigned char buf[255];
  buf[0] = group;
  memcpy(buf + 1, data, len);
  zwave_sendClassCommand(id, 0x85, 0x1, buf, len + 1);
}


x86 assembly (clang, -O0):
<zwavecmd_association_set_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0x120(%rbp)
lea    -0x120(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x4(%rbp),%edi
lea    -0x120(%rbp),%rcx
mov    -0x14(%rbp),%r8d
add    $0x1,%r8d
mov    $0x85,%esi
mov    $0x1,%edx
call   1030 <zwave_sendClassCommand@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zwavecmd_association_set_buf>:
push   %rbp
push   %rbx
sub    $0x108,%rsp
mov    %ecx,%ebx
mov    %edi,%ebp
mov    %sil,(%rsp)
lea    0x1(%rsp),%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
call   1040 <memcpy@plt>
add    $0x1,%ebx
mov    %rsp,%rcx
mov    %ebp,%edi
mov    $0x85,%esi
mov    $0x1,%edx
mov    %ebx,%r8d
call   1030 <zwave_sendClassCommand@plt>
add    $0x108,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @zwavecmd_association_set_buf(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca [255 x i8]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i32, i32* %6
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
store i8 %11, i8* %12
%13 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = load i8*, i8** %7
%16 = load i32, i32* %8
%17 = call i32 @memcpy(i8* %14, i8* %15, i32 %16)
%18 = load i32, i32* %5
%19 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%20 = load i32, i32* %8
%21 = add nsw i32 %20, 1
%22 = call i32 @zwave_sendClassCommand(i32 %18, i32 133, i32 1, i8* %19, i32 %21)
ret void
}

LLVM IR (-O2):
define void @zwavecmd_association_set_buf(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca [255 x i8]
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%7 = trunc i32 %1 to i8
store i8 %7, i8* %6
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 1
%9 = call i32 @memcpy(i8* %8, i8* %2, i32 %3)
%10 = add nsw i32 %3, 1
%11 = call i32 @zwave_sendClassCommand(i32 %0, i32 133, i32 1, i8* %6, i32 %10)
ret void
}
/* Variables and functions */
int generateRandomNumber(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int c, n;
  printf("Random number in [1,100]\n");
  printf("%d\n", generateRandomNumber(100));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x64,%edi
call   1050 <generateRandomNumber@plt>
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Random number in [1,100]\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @generateRandomNumber(i32 100)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [25 x i8] c"Random number in [1,100]\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @generateRandomNumber(i32 100)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_support(uint64_t supported, char *feature, char *feature_type) {
  if (supported) {
    printf("[ YES |    ]");
  } else {
    printf("[     | NO ]");
  }
  printf("\t%-60s\t%s\n", feature, feature_type);
}


x86 assembly (clang, -O0):
<print_support>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1142 <print_support+0x32>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1150 <print_support+0x40>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_support>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
test   %rdi,%rdi
lea    0xee9(%rip),%rax
lea    0xed5(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"[ YES | ]\00"
@.str.1 = [13 x i8] c"[ | NO ]\00"
@.str.2 = [11 x i8] c"\09%-60s\09%s\0A\00"
define void @print_support(i64 %0, i8* %1, i8* %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i8*
store i64 %0, i64* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i64, i64* %4
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %13
11: ; preds = %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"[ YES | ]\00"
@.str.1 = [13 x i8] c"[ | NO ]\00"
@.str.2 = [11 x i8] c"\09%-60s\09%s\0A\00"
define void @print_support(i64 %0, i8* %1, i8* %2) {
%4 = icmp eq i64 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %5)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %1, i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void swap(uint32_t *e1, uint32_t *e2) {
  uint32_t temp = *(e1);
  *(e1) = *(e2);
  *(e2) = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void MoveForward(int seconds) {
  for (int i; i < seconds; i++) {
    printf("Action: Driving Forward for %d seconds\n", i);
  }
}


x86 assembly (clang, -O0):
<MoveForward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1144 <MoveForward+0x34>
mov    -0x8(%rbp),%esi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111b <MoveForward+0xb>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [40 x i8] c"Action: Driving Forward for %d seconds\0A\00"
define void @MoveForward(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %11, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @MoveForward(i32 %0) {
ret void
}
void r_tele_pi() {}


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

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

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

LLVM IR (-O2):
define void @r_tele_pi() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int bit_scan_forward_64(uint64_t *SetIndex, uint64_t Mask) { return 0; }


x86 assembly (clang, -O0):
<bit_scan_forward_64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_scan_forward_64>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @bit_scan_forward_64(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @bit_scan_forward_64(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
void EPIConfigHB8Set(unsigned long ulBase, unsigned long ulConfig,
                     unsigned long ulMaxWait) {
  ;
  ;
  ulConfig &= ~0x0000FF00;
  ulConfig |= ulMaxWait << 8;
  (*((volatile unsigned long *)(ulBase + 0x00000010))) = ulConfig;
}


x86 assembly (clang, -O0):
<EPIConfigHB8Set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0xffffffffffff00ff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIConfigHB8Set>:
and    $0xffffffffffff00ff,%rsi
shl    $0x8,%rdx
or     %rsi,%rdx
mov    %rdx,0x10(%rdi)
ret

LLVM IR (-O0):
define void @EPIConfigHB8Set(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = and i64 %7, -65281
store i64 %8, i64* %5
%9 = load i64, i64* %6
%10 = shl i64 %9, 8
%11 = load i64, i64* %5
%12 = or i64 %11, %10
store i64 %12, i64* %5
%13 = load i64, i64* %5
%14 = load i64, i64* %4
%15 = add i64 %14, 16
%16 = inttoptr i64 %15 to i64*
store volatile i64 %13, i64* %16
ret void
}

LLVM IR (-O2):
define void @EPIConfigHB8Set(i64 %0, i64 %1, i64 %2) {
%4 = and i64 %1, -65281
%5 = shl i64 %2, 8
%6 = or i64 %5, %4
%7 = add i64 %0, 16
%8 = inttoptr i64 %7 to i64*
store volatile i64 %6, i64* %8
ret void
}
/* Variables and functions */
double floor(double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double a, b;
  printf("Input a real number:");
  scanf("%lf", &a);
  b = floor(a);
  printf("\t    Integer:%f\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <floor@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xea1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%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
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
call   1050 <floor@plt>
lea    0xeba(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Input a real number:\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [17 x i8] c"\09 Integer:%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%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 ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @llvm.floor.f64(double %6)
store double %7, double* %3
%8 = load double, double* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Input a real number:\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [17 x i8] c"\09 Integer:%f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %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 ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = call double @llvm.floor.f64(double %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void display_i16(unsigned short it) {
  int c = '0' + it % 10;
  it /= 10;
  if (it > 0)
    display_i16(it);
  putchar(c);
}


x86 assembly (clang, -O0):
<display_i16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %edx,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0x0,%eax
jle    1167 <display_i16+0x47>
movzwl -0x2(%rbp),%edi
call   1040 <display_i16@plt>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_i16>:
push   %rbx
movzwl %di,%ebx
cmp    $0xa,%di
jb     1138 <display_i16+0x18>
imul   $0xcccd,%ebx,%edi
shr    $0x13,%edi
call   1040 <display_i16@plt>
imul   $0xcccd,%ebx,%eax
shr    $0x12,%eax
and    $0xfffffffe,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
or     $0x30,%ebx
movzwl %bx,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @display_i16(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = zext i16 %4 to i32
%6 = srem i32 %5, 10
%7 = add nsw i32 48, %6
store i32 %7, i32* %3
%8 = load i16, i16* %2
%9 = zext i16 %8 to i32
%10 = sdiv i32 %9, 10
%11 = trunc i32 %10 to i16
store i16 %11, i16* %2
%12 = load i16, i16* %2
%13 = zext i16 %12 to i32
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %1
%16 = load i16, i16* %2
br label %17
17: ; preds = %15, %1
%18 = load i32, i32* %3
%19 = call i32 @putchar(i32 %18)
ret void
}

LLVM IR (-O2):
define void @display_i16(i16 zeroext %0) {
%2 = icmp ult i16 %0, 10
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = udiv i16 %0, 10
tail call void @display_i16(i16 zeroext %4)
br label %5
5: ; preds = %3, %1
%6 = urem i16 %0, 10
%7 = or i16 %6, 48
%8 = zext i16 %7 to i32
%9 = tail call i32 @putchar(i32 %8)
ret void
}
/* Variables and functions */
int mct_perform_tests(int);
int main(int argc, char *argv[]) { return mct_perform_tests(1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1030 <mct_perform_tests@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
jmp    1030 <mct_perform_tests@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @mct_perform_tests(i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @mct_perform_tests(i32 1)
ret i32 %3
}