xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ session_enqueue_info_message(int /*<<< orphan*/, char *);
int enqueueInfoMessage(char *msg) {
  session_enqueue_info_message(0, msg);
  return 200;
}


x86 assembly (clang, -O0):
<enqueueInfoMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <session_enqueue_info_message@plt>
mov    $0xc8,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enqueueInfoMessage>:
push   %rax
mov    %rdi,%rsi
xor    %edi,%edi
call   1030 <session_enqueue_info_message@plt>
mov    $0xc8,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @enqueueInfoMessage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @session_enqueue_info_message(i32 0, i8* %3)
ret i32 200
}

LLVM IR (-O2):
define i32 @enqueueInfoMessage(i8* %0) {
%2 = tail call i32 @session_enqueue_info_message(i32 0, i8* %0)
ret i32 200
}
/* Variables and functions */
int /*<<< orphan*/ AssertFailure(char *, int);
int /*<<< orphan*/ UARTBaseValid(unsigned long);
void UARTDisableSIR(unsigned long ulBase) {
  {
    if (!(UARTBaseValid(ulBase))) {
      AssertFailure(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/"
          "Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          676);
    }
  };
  (*((volatile unsigned long *)(ulBase + 0x00000030))) &=
      ~(0x00000002 | 0x00000004);
}


x86 assembly (clang, -O0):
<UARTDisableSIR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <UARTBaseValid@plt>
cmp    $0x0,%eax
jne    114f <UARTDisableSIR+0x2f>
lea    0xebb(%rip),%rdi
mov    $0x2a4,%esi
call   1030 <AssertFailure@plt>
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rcx
and    $0xfffffffffffffff9,%rcx
mov    %rcx,0x30(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTDisableSIR>:
push   %rbx
mov    %rdi,%rbx
call   1040 <UARTBaseValid@plt>
test   %eax,%eax
jne    113e <UARTDisableSIR+0x1e>
lea    0xecc(%rip),%rdi
mov    $0x2a4,%esi
call   1030 <AssertFailure@plt>
andq   $0xfffffffffffffff9,0x30(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTDisableSIR(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @UARTBaseValid(i64 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 676)
br label %8
8: ; preds = %6, %1
%9 = load i64, i64* %2
%10 = add i64 %9, 48
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = and i64 %12, -7
store volatile i64 %13, i64* %11
ret void
}

LLVM IR (-O2):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTDisableSIR(i64 %0) {
%2 = tail call i32 @UARTBaseValid(i64 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 676)
br label %6
6: ; preds = %4, %1
%7 = add i64 %0, 48
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = and i64 %9, -7
store volatile i64 %10, i64* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ doublereg();
int /*<<< orphan*/ threereg();
void sixreg(void) {
  threereg();
  doublereg();
}


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

x86 assembly (clang, -O2):
<sixreg>:
push   %rax
xor    %eax,%eax
call   1030 <threereg@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <doublereg@plt>

LLVM IR (-O0):
define void @sixreg() {
%1 = call i32 (...) @threereg()
%2 = call i32 (...) @doublereg()
ret void
}

LLVM IR (-O2):
define void @sixreg() {
%1 = tail call i32 (...) @threereg()
%2 = tail call i32 (...) @doublereg()
ret void
}
void regcheck(s) char *s;
{
  if (*s == ' ') {
    strcpy(s, "reg.");
    *(s + 4) = ' ';
    *(s + 5) += 'A' - 'a';
  }
}


x86 assembly (clang, -O0):
<regcheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1152 <regcheck+0x42>
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
movb   $0x20,0x4(%rax)
mov    -0x8(%rbp),%rax
movsbl 0x5(%rax),%ecx
add    $0xffffffe0,%ecx
mov    %cl,0x5(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regcheck>:
cmpb   $0x20,(%rdi)
jne    1113 <regcheck+0x13>
movl   $0x2e676572,(%rdi)
movb   $0x20,0x4(%rdi)
addb   $0xe0,0x5(%rdi)
ret

LLVM IR (-O0):
@.str = [5 x i8] c"reg.\00"
define void @regcheck(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i8* @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 4
store i8 32, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 5
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = add nsw i32 %15, -32
%17 = trunc i32 %16 to i8
store i8 %17, i8* %13
br label %18
18: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @regcheck(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 32
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = bitcast i8* %0 to i32*
store i32 778528114, i32* %5
%6 = getelementptr inbounds i8, i8* %0, i64 4
store i8 32, i8* %6
%7 = getelementptr inbounds i8, i8* %0, i64 5
%8 = load i8, i8* %7
%9 = add i8 %8, -32
store i8 %9, i8* %7
br label %10
10: ; preds = %4, %1
ret void
}
int cmp0Desc(const void *pa, const void *pb) {
  const short *a = (const short *)pa;
  const short *b = (const short *)pb;
  if (a[0] < b[0])
    return +1;
  if (a[0] > b[0])
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp0Desc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movswl (%rax),%eax
mov    -0x28(%rbp),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jge    113e <cmp0Desc+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1167 <cmp0Desc+0x67>
mov    -0x20(%rbp),%rax
movswl (%rax),%eax
mov    -0x28(%rbp),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
jle    1160 <cmp0Desc+0x60>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <cmp0Desc+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp0Desc>:
movzwl (%rdi),%eax
movzwl (%rsi),%ecx
xor    %edx,%edx
cmp    %cx,%ax
setg   %dl
neg    %edx
cmp    %cx,%ax
mov    $0x1,%eax
cmovge %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp0Desc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i16*
%4 = bitcast i8* %1 to i16*
%5 = load i16, i16* %3
%6 = load i16, i16* %4
%7 = icmp slt i16 %5, %6
%8 = icmp sgt i16 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
unsigned char f88(unsigned char x, long int y) {
  return (x << (8 - y)) + (x >> y);
}


x86 assembly (clang, -O0):
<f88>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x8,%ecx
sub    -0x10(%rbp),%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f88>:
mov    $0x8,%cl
sub    %sil,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f88(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = sub nsw i64 8, %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %6, %9
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = load i64, i64* %4
%14 = trunc i64 %13 to i32
%15 = ashr i32 %12, %14
%16 = add nsw i32 %10, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f88(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 8, %4
%6 = shl i32 %3, %5
%7 = lshr i32 %3, %4
%8 = add nsw i32 %6, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}
void getkey(key) char const *key;
{
  if (!getkeyopt(key))
    fatserror("missing '%s' keyword", key);
}


x86 assembly (clang, -O0):
<getkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <getkeyopt@plt>
cmp    $0x0,%eax
jne    1152 <getkey+0x32>
mov    -0x8(%rbp),%rsi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <fatserror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getkey>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <getkeyopt@plt>
test   %eax,%eax
je     1131 <getkey+0x11>
pop    %rbx
ret
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fatserror@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"missing '%s' keyword\00"
define void @getkey(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @getkeyopt to i32 (i8*, ...)*)(i8* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @fatserror to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"missing '%s' keyword\00"
define void @getkey(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @getkeyopt to i32 (i8*, ...)*)(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @fatserror to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret void
}
void scm_init_readline() {}


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

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

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

LLVM IR (-O2):
define void @scm_init_readline() {
ret void
}
char *hash_plugin_summary(void) { return ("md5md5 \t\tmd5(md5(pass)) plugin"); }


x86 assembly (clang, -O0):
<hash_plugin_summary>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_summary>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [31 x i8] c"md5md5 \09\09md5(md5(pass)) plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [31 x i8] c"md5md5 \09\09md5(md5(pass)) plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int findOdd(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int arr[] = {12, 12, 14, 90, 14, 14, 14};
  int n = sizeof(arr) / sizeof(arr[0]);
  printf("The odd occurring element is %d ", findOdd(arr, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x7,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1040 <findOdd@plt>
mov    %eax,%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movups 0xee1(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x7,%esi
call   1040 <findOdd@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [7 x i32] [i32 12, i32 12, i32 14, i32 90, i32 14, i32 14, i32 14]
@.str = [33 x i8] c"The odd occurring element is %d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [7 x i32]* %2 to i8*
store i32 7, i32* %3
%5 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @findOdd(i32* %5, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [7 x i32] [i32 12, i32 12, i32 14, i32 90, i32 14, i32 14, i32 14]
@.str = [33 x i8] c"The odd occurring element is %d \00"
define i32 @main() {
%1 = alloca [7 x i32]
%2 = bitcast [7 x i32]* %1 to i8*
%3 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%4 = call i32 @findOdd(i32* %3, i32 7)
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void outer_enable(void) {}


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

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

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

LLVM IR (-O2):
define void @outer_enable() {
ret void
}
int test_imm_8Duint16_mem(unsigned short *val) {
  return ((*val) & (-0x8D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Duint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff73,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_8Duint16_mem>:
movzwl (%rdi),%eax
test   $0xff73,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_8Duint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -141
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_8Duint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -141
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int slib_export(int);
int main() {
  printf("The answer is: %d\n", slib_export(42));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1030 <slib_export@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"The answer is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @slib_export(i32 42)
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"The answer is: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @slib_export(i32 42)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_arithmetic();
int /*<<< orphan*/ test_attr();
int /*<<< orphan*/ test_bool_ops();
int /*<<< orphan*/ test_bool_vals();
int /*<<< orphan*/ test_cmp_ops();
int /*<<< orphan*/ test_compound();
int /*<<< orphan*/ test_conv();
int /*<<< orphan*/ test_param();
int main() {
  test_bool_vals();
  test_bool_ops();
  test_cmp_ops();
  test_arithmetic();
  test_attr();
  test_param();
  test_compound();
  test_conv();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <test_bool_vals@plt>
mov    $0x0,%al
call   10a0 <test_bool_ops@plt>
mov    $0x0,%al
call   1060 <test_cmp_ops@plt>
mov    $0x0,%al
call   1030 <test_arithmetic@plt>
mov    $0x0,%al
call   1040 <test_attr@plt>
mov    $0x0,%al
call   1080 <test_param@plt>
mov    $0x0,%al
call   1050 <test_compound@plt>
mov    $0x0,%al
call   1090 <test_conv@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <test_bool_vals@plt>
xor    %eax,%eax
call   10a0 <test_bool_ops@plt>
xor    %eax,%eax
call   1060 <test_cmp_ops@plt>
xor    %eax,%eax
call   1030 <test_arithmetic@plt>
xor    %eax,%eax
call   1040 <test_attr@plt>
xor    %eax,%eax
call   1080 <test_param@plt>
xor    %eax,%eax
call   1050 <test_compound@plt>
xor    %eax,%eax
call   1090 <test_conv@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_bool_vals()
%3 = call i32 (...) @test_bool_ops()
%4 = call i32 (...) @test_cmp_ops()
%5 = call i32 (...) @test_arithmetic()
%6 = call i32 (...) @test_attr()
%7 = call i32 (...) @test_param()
%8 = call i32 (...) @test_compound()
%9 = call i32 (...) @test_conv()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_bool_vals()
%2 = tail call i32 (...) @test_bool_ops()
%3 = tail call i32 (...) @test_cmp_ops()
%4 = tail call i32 (...) @test_arithmetic()
%5 = tail call i32 (...) @test_attr()
%6 = tail call i32 (...) @test_param()
%7 = tail call i32 (...) @test_compound()
%8 = tail call i32 (...) @test_conv()
ret i32 0
}
void loini(void) { return; }


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

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

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

LLVM IR (-O2):
define void @loini() {
ret void
}
/* Variables and functions */
int log(int x, int y) {
  if (x >= y && y > 1) {
    return 1 + log(x / y, y);
  }
  return 0;
}


x86 assembly (clang, -O0):
<log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1150 <log+0x40>
cmpl   $0x1,-0xc(%rbp)
jle    1150 <log+0x40>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1030 <log@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <log+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log>:
xor    %ecx,%ecx
cmp    $0x2,%esi
jl     111a <log+0x1a>
mov    %edi,%eax
cmp    %esi,%edi
jl     111a <log+0x1a>
xor    %ecx,%ecx
nop
cltd
idiv   %esi
add    $0x1,%ecx
cmp    %esi,%eax
jge    1110 <log+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @log(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* %4
%7 = load i32, i32* %5
%8 = icmp sge i32 %6, %7
br i1 %8, label %9, label %19
9: ; preds = %2
%10 = load i32, i32* %5
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = sdiv i32 %13, %14
%16 = load i32, i32* %5
%17 = call i32 @log(i32 %15, i32 %16)
%18 = add nsw i32 1, %17
store i32 %18, i32* %3
br label %20
19: ; preds = %9, %2
store i32 0, i32* %3
br label %20
20: ; preds = %19, %12
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @log(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
%4 = icmp sge i32 %0, %1
%5 = and i1 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %0, %2 ]
%8 = phi i32 [ %10, %6 ], [ 0, %2 ]
%9 = sdiv i32 %7, %1
%10 = add nuw nsw i32 %8, 1
%11 = icmp slt i32 %9, %1
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = phi i32 [ 0, %2 ], [ %10, %6 ]
ret i32 %13
}
void test_shift_byte() {
  printf("d = %x\n", first_digit());
  assertTrue("first_digit(0xEF) == 14", first_digit(0xEF) == 14);
  ;
}


x86 assembly (clang, -O0):
<test_shift_byte>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <first_digit@plt>
mov    %eax,%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xef,%edi
mov    $0x0,%al
call   1050 <first_digit@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1040 <assertTrue@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_shift_byte>:
push   %rax
xor    %eax,%eax
call   1050 <first_digit@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xef,%edi
xor    %eax,%eax
call   1050 <first_digit@plt>
xor    %esi,%esi
cmp    $0xe,%eax
sete   %sil
lea    0xea4(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <assertTrue@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"d = %x\0A\00"
@.str.1 = [24 x i8] c"first_digit(0xEF) == 14\00"
define void @test_shift_byte() {
%1 = call i32 (...) @first_digit()
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (i32, ...) bitcast (i32 (...)* @first_digit to i32 (i32, ...)*)(i32 239)
%4 = icmp eq i32 %3, 14
%5 = zext i1 %4 to i32
%6 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"d = %x\0A\00"
@.str.1 = [24 x i8] c"first_digit(0xEF) == 14\00"
define void @test_shift_byte() {
%1 = tail call i32 (...) @first_digit()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @first_digit to i32 (i32, ...)*)(i32 239)
%4 = icmp eq i32 %3, 14
%5 = zext i1 %4 to i32
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
float saturate(float);
float TriAceSpecularOcclusion(float NdotV, float ao) {
  float q = (NdotV + ao);
  return saturate(q * q - 1.f + ao);
}


x86 assembly (clang, -O0):
<TriAceSpecularOcclusion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xeb9(%rip),%xmm1
addss  %xmm1,%xmm0
addss  -0x8(%rbp),%xmm0
call   1030 <saturate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TriAceSpecularOcclusion>:
addss  %xmm1,%xmm0
mulss  %xmm0,%xmm0
addss  0xee0(%rip),%xmm0
addss  %xmm1,%xmm0
jmp    1030 <saturate@plt>

LLVM IR (-O0):
define float @TriAceSpecularOcclusion(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fadd float %6, %7
store float %8, float* %5
%9 = load float, float* %5
%10 = load float, float* %5
%11 = call float @llvm.fmuladd.f32(float %9, float %10, float -1.000000e+00)
%12 = load float, float* %4
%13 = fadd float %11, %12
%14 = call float @saturate(float %13)
ret float %14
}

LLVM IR (-O2):
define float @TriAceSpecularOcclusion(float %0, float %1) {
%3 = fadd float %0, %1
%4 = tail call float @llvm.fmuladd.f32(float %3, float %3, float -1.000000e+00)
%5 = fadd float %4, %1
%6 = tail call float @saturate(float %5)
ret float %6
}
void test6(void) {
  int a[100];
  int *p = a;
  int i = 0;
  for (i = 0; i < 100; ++i) {
    a[i] = i;
  }
}


x86 assembly (clang, -O0):
<test6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
lea    -0x190(%rbp),%rax
mov    %rax,-0x198(%rbp)
movl   $0x0,-0x19c(%rbp)
movl   $0x0,-0x19c(%rbp)
cmpl   $0x64,-0x19c(%rbp)
jge    1162 <test6+0x62>
mov    -0x19c(%rbp),%ecx
movslq -0x19c(%rbp),%rax
mov    %ecx,-0x190(%rbp,%rax,4)
mov    -0x19c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c(%rbp)
jmp    112d <test6+0x2d>
add    $0x120,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test6() {
%1 = alloca [100 x i32]
%2 = alloca i32*
%3 = alloca i32
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
store i32* %4, i32** %2
store i32 0, i32* %3
store i32 0, i32* %3
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32, i32* %3
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %11
store i32 %9, i32* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %5
16: ; preds = %5
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ perror(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
FILE *err_fopen(const char *filename, const char *permits) {
  FILE *rval = fopen(filename, permits);
  if (!rval) {
    fprintf(stderr, "'%s' not opened ", filename);
    perror(NULL);
    exit(-1);
  }
  return (rval);
}


x86 assembly (clang, -O0):
<err_fopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1198 <err_fopen+0x58>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe80(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_fopen>:
push   %rbx
mov    %rdi,%rbx
call   1040 <fopen@plt>
test   %rax,%rax
je     1150 <err_fopen+0x10>
pop    %rbx
ret
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"'%s' not opened \00"
define i32* @err_fopen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = icmp ne i32* %9, null
br i1 %10, label %17, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %3
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = call i32 @perror(i32* null)
%16 = call i32 @exit(i32 -1)
unreachable
17: ; preds = %2
%18 = load i32*, i32** %5
ret i32* %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"'%s' not opened \00"
define noalias i32* @err_fopen(i8* %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @perror(i32* null)
%9 = tail call i32 @exit(i32 -1)
unreachable
10: ; preds = %2
ret i32* %3
}
/* Variables and functions */
int watchoids(int, int *);
int cmd_watch_hdr(int argc, char **argv) {
  int oid = 0x1065;
  return watchoids(1, &oid);
}


x86 assembly (clang, -O0):
<cmd_watch_hdr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1065,-0x14(%rbp)
mov    $0x1,%edi
lea    -0x14(%rbp),%rsi
call   1030 <watchoids@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_watch_hdr>:
push   %rax
movl   $0x1065,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
call   1030 <watchoids@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @cmd_watch_hdr(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 4197, i32* %3
%5 = call i32 @watchoids(i32 1, i32* %3)
ret i32 %5
}
float _celsius_to_celsius(float input) { return input; }


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

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

LLVM IR (-O0):
define float @_celsius_to_celsius(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
ret float %3
}

LLVM IR (-O2):
define float @_celsius_to_celsius(float returned %0) {
ret float %0
}
int test_imm_A0int8_reg(signed char val) {
  return ((val) & (0xA0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A0int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xa0,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A0int8_reg>:
test   $0xa0,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A0int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 160
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_A0int8_reg(i8 signext %0) {
%2 = and i8 %0, -96
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
float fromRep32(int);
float makeInf32(void) { return fromRep32(0x7f800000U); }


x86 assembly (clang, -O0):
<makeInf32>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f800000,%edi
call   1030 <fromRep32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeInf32>:
mov    $0x7f800000,%edi
jmp    1030 <fromRep32@plt>

LLVM IR (-O0):
define float @makeInf32() {
%1 = call float @fromRep32(i32 2139095040)
ret float %1
}

LLVM IR (-O2):
define float @makeInf32() {
%1 = tail call float @fromRep32(i32 2139095040)
ret float %1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
void warn(char *msg) {
  printf("warning: %s\n", msg);
  free(msg);
}


x86 assembly (clang, -O0):
<warn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warn>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"warning: %s\0A\00"
define void @warn(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @free(i8* %0)
ret void
}
void CRYPTO_malloc(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_malloc() {
ret void
}
/* Variables and functions */
void ext_status_store(const char *buffer, size_t buffer_size) {
  (void)buffer;
  (void)buffer_size;
}


x86 assembly (clang, -O0):
<ext_status_store>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ext_status_store(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
ret void
}

LLVM IR (-O2):
define void @ext_status_store(i8* nocapture %0, i64 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ _OSSwapInt16(int /*<<< orphan*/);
void OSWriteSwapInt16(volatile void *base, uintptr_t offset, uint16_t data) {
  *(uint16_t *)((uintptr_t)base + offset) = _OSSwapInt16(data);
}


x86 assembly (clang, -O0):
<OSWriteSwapInt16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <_OSSwapInt16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSWriteSwapInt16>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %edx,%edi
call   1030 <_OSSwapInt16@plt>
mov    %eax,(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @OSWriteSwapInt16(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @_OSSwapInt16(i32 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i64
%11 = load i64, i64* %5
%12 = add i64 %10, %11
%13 = inttoptr i64 %12 to i32*
store i32 %8, i32* %13
ret void
}

LLVM IR (-O2):
define void @OSWriteSwapInt16(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @_OSSwapInt16(i32 %2)
%5 = ptrtoint i8* %0 to i64
%6 = add i64 %5, %1
%7 = inttoptr i64 %6 to i32*
store i32 %4, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_numbers(int /*<<< orphan*/ *, int, int /*<<< orphan*/,
                                 int, int, int);
int main(void) {
  print_numbers(NULL, 4, 0, 98, -1024, 402);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
mov    $0x4,%esi
xor    %edx,%edx
mov    $0x62,%ecx
mov    $0xfffffc00,%r8d
mov    $0x192,%r9d
call   1030 <print_numbers@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x4,%esi
xor    %edx,%edx
mov    $0x62,%ecx
mov    $0xfffffc00,%r8d
mov    $0x192,%r9d
call   1030 <print_numbers@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @print_numbers(i32* null, i32 4, i32 0, i32 98, i32 -1024, i32 402)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print_numbers(i32* null, i32 4, i32 0, i32 98, i32 -1024, i32 402)
ret i32 0
}
/* Variables and functions */
int _ctype_lookup(int);
int isdigit(int c) { return _ctype_lookup(c) & (0x04); }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_ctype_lookup@plt>
and    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
push   %rax
call   1030 <_ctype_lookup@plt>
and    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_ctype_lookup(i32 %3)
%5 = and i32 %4, 4
ret i32 %5
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = tail call i32 @_ctype_lookup(i32 %0)
%3 = and i32 %2, 4
ret i32 %3
}
void RTStrAAppendExNVTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrAAppendExNVTag() {
ret void
}
void __attribute__((no, noclone)) fn1(void) {
  volatile int a[5];
  asm("" : : "r"(&a) : "memory");
  a[2] = a[5];
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
lea    -0x20(%rbp),%rax
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
lea    -0x18(%rsp),%rax
mov    -0x4(%rsp),%eax
mov    %eax,-0x10(%rsp)
ret

LLVM IR (-O0):
define void @fn1() {
%1 = alloca [5 x i32]
%2 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 5
%3 = load volatile i32, i32* %2
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 2
store volatile i32 %3, i32* %4
ret void
}

LLVM IR (-O2):
define void @fn1() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 5
%4 = load volatile i32, i32* %3
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 2
store volatile i32 %4, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_integers();
int /*<<< orphan*/ test_integers_multi(int);
int /*<<< orphan*/ test_strings();
int main(void) {
  int i;
  test_strings();
  test_integers();
  for (i = 10; i < 100; ++i)
    test_integers_multi(i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_strings@plt>
mov    $0x0,%al
call   1040 <test_integers@plt>
movl   $0xa,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1174 <main+0x44>
mov    -0x8(%rbp),%edi
call   1050 <test_integers_multi@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <test_strings@plt>
xor    %eax,%eax
call   1040 <test_integers@plt>
mov    $0xa,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%edi
call   1050 <test_integers_multi@plt>
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @test_strings()
%4 = call i32 (...) @test_integers()
store i32 10, i32* %2
br label %5
5: ; preds = %11, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = load i32, i32* %2
%10 = call i32 @test_integers_multi(i32 %9)
br label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %5
14: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_strings()
%2 = tail call i32 (...) @test_integers()
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 10, %0 ], [ %6, %3 ]
%5 = tail call i32 @test_integers_multi(i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 100
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 0
}
int Operand_bt4_decode(unsigned int *valp) {
  *valp = *valp << 2;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_bt4_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shl    $0x2,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_bt4_decode>:
shll   $0x2,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_bt4_decode(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = shl i32 %4, 2
%6 = load i32*, i32** %2
store i32 %5, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_bt4_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 2
store i32 %3, i32* %0
ret i32 0
}
/* Variables and functions */
int readjoy();
void waitstartkey() {
  for (; readjoy() != 0x10;)
    ;
  for (; readjoy() == 0x10;)
    ;
}


x86 assembly (clang, -O0):
<waitstartkey>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <waitstartkey+0x9>
mov    $0x0,%al
call   1030 <readjoy@plt>
cmp    $0x10,%eax
je     112e <waitstartkey+0x1e>
jmp    1119 <waitstartkey+0x9>
jmp    1133 <waitstartkey+0x23>
mov    $0x0,%al
call   1030 <readjoy@plt>
cmp    $0x10,%eax
jne    1148 <waitstartkey+0x38>
jmp    1133 <waitstartkey+0x23>
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitstartkey>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <readjoy@plt>
cmp    $0x10,%eax
jne    1120 <waitstartkey+0x10>
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <readjoy@plt>
cmp    $0x10,%eax
je     1130 <waitstartkey+0x20>
pop    %rax
ret

LLVM IR (-O0):
define void @waitstartkey() {
br label %1
1: ; preds = %4, %0
%2 = call i32 (...) @readjoy()
%3 = icmp ne i32 %2, 16
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
br label %6
6: ; preds = %9, %5
%7 = call i32 (...) @readjoy()
%8 = icmp eq i32 %7, 16
br i1 %8, label %9, label %10
9: ; preds = %6
br label %6
10: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @waitstartkey() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @readjoy()
%3 = icmp eq i32 %2, 16
br i1 %3, label %4, label %1
4: ; preds = %1, %4
%5 = tail call i32 (...) @readjoy()
%6 = icmp eq i32 %5, 16
br i1 %6, label %4, label %7
7: ; preds = %4
ret void
}
void _malloc_stats_r(void *reent) { return; }


x86 assembly (clang, -O0):
<_malloc_stats_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @_malloc_stats_r(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *malloc(int);
int sprintf(char *, char const *, float);
char *msg_app_flt(const char *msg1, float n) {
  char *p = malloc(200);
  int b = sprintf(p, msg1, n);
  return p;
}


x86 assembly (clang, -O0):
<msg_app_flt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    $0xc8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movss  -0xc(%rbp),%xmm0
call   1040 <sprintf@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_app_flt>:
push   %r14
push   %rbx
push   %rax
movss  %xmm0,0x4(%rsp)
mov    %rdi,%r14
mov    $0xc8,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
movss  0x4(%rsp),%xmm0
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @msg_app_flt(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store float %1, float* %4
%7 = call i8* @malloc(i32 200)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i8*, i8** %3
%10 = load float, float* %4
%11 = call i32 @sprintf(i8* %8, i8* %9, float %10)
store i32 %11, i32* %6
%12 = load i8*, i8** %5
ret i8* %12
}

LLVM IR (-O2):
define noalias i8* @msg_app_flt(i8* nocapture %0, float %1) {
%3 = tail call dereferenceable_or_null(200) i8* @malloc(i32 200)
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) %0, float %1)
ret i8* %3
}
/* Variables and functions */
scalar_t__ strncmp(char const *, char const *, int);
int starts_with_n(const char *str, const char *search, int length) {
  return strncmp(str, search, length) == 0;
}


x86 assembly (clang, -O0):
<starts_with_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<starts_with_n>:
push   %rax
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @starts_with_n(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i64 @strncmp(i8* %7, i8* %8, i32 %9)
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @starts_with_n(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ fenv_t;

/* Variables and functions */
int /*<<< orphan*/ fegetenv(int /*<<< orphan*/ *);
int /*<<< orphan*/ fesetenv(int /*<<< orphan*/ *);
long double rintl(long double);
long double nearbyintl(long double x) {
  volatile long double ret;
  fenv_t env;
  fegetenv(&env);
  ret = rintl(x);
  fesetenv(&env);
  return (ret);
}


x86 assembly (clang, -O0):
<nearbyintl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
lea    -0x24(%rbp),%rdi
mov    %rdi,-0x30(%rbp)
call   1050 <fegetenv@plt>
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <rintl@plt>
mov    -0x30(%rbp),%rdi
fstpt  -0x20(%rbp)
call   1040 <fesetenv@plt>
fldt   -0x20(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nearbyintl>:
push   %rbx
sub    $0x30,%rsp
fldt   0x40(%rsp)
fstpt  0x14(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <fegetenv@plt>
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1030 <rintl@plt>
fstpt  0x20(%rsp)
mov    %rbx,%rdi
call   1040 <fesetenv@plt>
fldt   0x20(%rsp)
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define x86_fp80 @nearbyintl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca i32
store x86_fp80 %0, x86_fp80* %2
%5 = call i32 @fegetenv(i32* %4)
%6 = load x86_fp80, x86_fp80* %2
%7 = call x86_fp80 @llvm.rint.f80(x86_fp80 %6)
store volatile x86_fp80 %7, x86_fp80* %3
%8 = call i32 @fesetenv(i32* %4)
%9 = load volatile x86_fp80, x86_fp80* %3
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @nearbyintl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca i32
%4 = bitcast x86_fp80* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @fegetenv(i32* %3)
%7 = call x86_fp80 @llvm.rint.f80(x86_fp80 %0)
store volatile x86_fp80 %7, x86_fp80* %2
%8 = call i32 @fesetenv(i32* %3)
%9 = load volatile x86_fp80, x86_fp80* %2
ret x86_fp80 %9
}