xunge/DecIR huggingface dataset:
/* Variables and functions */
bool less(int excepted, int actual) { return actual < excepted; }


x86 assembly (clang, -O0):
<less>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<less>:
xor    %eax,%eax
cmp    %edi,%esi
setl   %al
ret

LLVM IR (-O0):
define i32 @less(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 = load i32, i32* %3
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @less(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ CyEEPROM_Stop();
void EEPROM_1_Stop(void) { CyEEPROM_Stop(); }


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

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

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

LLVM IR (-O2):
define void @EEPROM_1_Stop() {
%1 = tail call i32 (...) @CyEEPROM_Stop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void programExit(int curmode, unsigned int value) {
  unsigned int negsign = -1u;
  int sv = value;
  (void)curmode;
  if (value & 0400000u)
    sv |= (negsign & ~0777777u);
  printf("Program exited with %d.\n", sv);
  exit(sv);
}


x86 assembly (clang, -O0):
<programExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0x20000,%eax
cmp    $0x0,%eax
je     115a <programExit+0x3a>
mov    -0xc(%rbp),%eax
and    $0xfffc0000,%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<programExit>:
push   %rbx
mov    %esi,%ebx
or     $0xfffc0000,%ebx
test   $0x20000,%esi
cmove  %esi,%ebx
lea    0xec7(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Program exited with %d.\0A\00"
define void @programExit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 -1, i32* %5
%7 = load i32, i32* %4
store i32 %7, i32* %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = and i32 %9, 131072
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i32, i32* %5
%14 = and i32 %13, -262144
%15 = load i32, i32* %6
%16 = or i32 %15, %14
store i32 %16, i32* %6
br label %17
17: ; preds = %12, %2
%18 = load i32, i32* %6
%19 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %6
%21 = call i32 @exit(i32 %20)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"Program exited with %d.\0A\00"
define void @programExit(i32 %0, i32 %1) {
%3 = and i32 %1, 131072
%4 = icmp eq i32 %3, 0
%5 = or i32 %1, -262144
%6 = select i1 %4, i32 %1, i32 %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 @exit(i32 %6)
unreachable
}
int do_599() { return 599; }


x86 assembly (clang, -O0):
<do_599>:
push   %rbp
mov    %rsp,%rbp
mov    $0x257,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_599>:
mov    $0x257,%eax
ret

LLVM IR (-O0):
define i32 @do_599() {
ret i32 599
}

LLVM IR (-O2):
define i32 @do_599() {
ret i32 599
}
void fc84(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
    a:
      goto a;
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc84>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc84+0x7>

x86 assembly (clang, -O2):
<fc84>:
jmp    1100 <fc84>

LLVM IR (-O0):
define void @fc84(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
br label %9
9: ; preds = %9, %1
br label %9
10: ; No predecessors!
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc84(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t lg(uint64_t x) {
  uint8_t l = 0;
  while (x >>= 1)
    l++;
  return l;
}


x86 assembly (clang, -O0):
<lg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1132 <lg+0x32>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110f <lg+0xf>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lg>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111d <lg+0x1d>
mov    %edi,%ecx
nopl   0x0(%rax)
sar    %ecx
add    $0x1,%rax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <lg+0x10>
ret

LLVM IR (-O0):
define i64 @lg(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
store i64 0, i64* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
store i32 %6, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i64, i64* %3
%10 = add nsw i64 %9, 1
store i64 %10, i64* %3
br label %4
11: ; preds = %4
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @lg(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i64 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 0, %1 ], [ %7, %3 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndirectLong(int);
int /*<<< orphan*/ STA8(int /*<<< orphan*/);
void Op87M1(void) { STA8(DirectIndirectLong(2)); }


x86 assembly (clang, -O0):
<Op87M1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <DirectIndirectLong@plt>
mov    %eax,%edi
call   1040 <STA8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op87M1>:
push   %rax
mov    $0x2,%edi
call   1030 <DirectIndirectLong@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <STA8@plt>

LLVM IR (-O0):
define void @Op87M1() {
%1 = call i32 @DirectIndirectLong(i32 2)
%2 = call i32 @STA8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op87M1() {
%1 = tail call i32 @DirectIndirectLong(i32 2)
%2 = tail call i32 @STA8(i32 %1)
ret void
}
int do_709() { return 709; }


x86 assembly (clang, -O0):
<do_709>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2c5,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_709>:
mov    $0x2c5,%eax
ret

LLVM IR (-O0):
define i32 @do_709() {
ret i32 709
}

LLVM IR (-O2):
define i32 @do_709() {
ret i32 709
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ rename(char *, char *);
char *wPopString();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasRename() {
  char *oldName, *newName;
  newName = wPopString();
  oldName = wPopString();
  rename(oldName, newName);
  free(oldName);
  free(newName);
  wPushNumber(0);
}


x86 assembly (clang, -O0):
<wBasRename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <wPopString@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <wPopString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <rename@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1050 <wPushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasRename>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <wPopString@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1040 <wPopString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1060 <rename@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %edi,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasRename() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* (...) @wPopString()
store i8* %3, i8** %2
%4 = call i8* (...) @wPopString()
store i8* %4, i8** %1
%5 = load i8*, i8** %1
%6 = load i8*, i8** %2
%7 = call i32 @rename(i8* %5, i8* %6)
%8 = load i8*, i8** %1
%9 = call i32 @free(i8* %8)
%10 = load i8*, i8** %2
%11 = call i32 @free(i8* %10)
%12 = call i32 @wPushNumber(i32 0)
ret void
}

LLVM IR (-O2):
define void @wBasRename() {
%1 = tail call i8* (...) @wPopString()
%2 = tail call i8* (...) @wPopString()
%3 = tail call i32 @rename(i8* %2, i8* %1)
%4 = tail call i32 @free(i8* %2)
%5 = tail call i32 @free(i8* %1)
%6 = tail call i32 @wPushNumber(i32 0)
ret void
}
const char *ctm_get_time(void) { return "09:57:31"; }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"09:57:31\00"
define i8* @ctm_get_time() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"09:57:31\00"
define i8* @ctm_get_time() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
void RTTestBanner(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTestBanner() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handler(int status) { printf("Received signal %d\n", status); }


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Received signal %d\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Received signal %d\0A\00"
define void @handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void rotateCounterClockwise() {}


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

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

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

LLVM IR (-O2):
define void @rotateCounterClockwise() {
ret void
}
int get_max_pids(void) { return 32768; }


x86 assembly (clang, -O0):
<get_max_pids>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_max_pids>:
mov    $0x8000,%eax
ret

LLVM IR (-O0):
define i32 @get_max_pids() {
ret i32 32768
}

LLVM IR (-O2):
define i32 @get_max_pids() {
ret i32 32768
}
int g1(int a) { return a + 255; }


x86 assembly (clang, -O0):
<g1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g1>:
lea    0xff(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @g1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 255
ret i32 %4
}

LLVM IR (-O2):
define i32 @g1(i32 %0) {
%2 = add nsw i32 %0, 255
ret i32 %2
}
int mc91(int n) {
  if (n > 100)
    return n - 10;
  else
    return mc91(mc91(n + 11));
}


x86 assembly (clang, -O0):
<mc91>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jle    1133 <mc91+0x23>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <mc91+0x38>
mov    -0x8(%rbp),%edi
add    $0xb,%edi
call   1030 <mc91@plt>
mov    %eax,%edi
call   1030 <mc91@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc91>:
push   %rax
mov    %edi,%eax
cmp    $0x64,%edi
jg     112f <mc91+0x1f>
nopl   0x0(%rax,%rax,1)
add    $0xb,%eax
mov    %eax,%edi
call   1030 <mc91@plt>
cmp    $0x64,%eax
jbe    1120 <mc91+0x10>
add    $0xfffffff6,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @mc91(i32 %0) {
%2 = icmp sgt i32 %0, 100
br i1 %2, label %3, label %6
3: ; preds = %6, %1
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = add nsw i32 %4, -10
ret i32 %5
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ %0, %1 ]
%8 = add nsw i32 %7, 11
%9 = tail call i32 @mc91(i32 %8)
%10 = icmp ugt i32 %9, 100
br i1 %10, label %3, label %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fileno(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char const *, int, char, int);
int check(const char *name, FILE *stream, int fd) {
  int sfd = fileno(stream);
  printf("(fileno (%s) = %d) %c= %d\n", name, sfd, sfd == fd ? '=' : '!', fd);
  return sfd != fd;
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <fileno@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%edx
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%r8d
mov    $0x21,%eax
mov    $0x3d,%ecx
cmp    %r8d,%edi
cmove  %ecx,%eax
mov    -0x14(%rbp),%r8d
lea    0xe98(%rip),%rdi
movsbl %al,%ecx
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <fileno@plt>
xor    %ebp,%ebp
cmp    %ebx,%eax
mov    $0x3d,%edx
mov    $0x21,%ecx
cmove  %edx,%ecx
lea    0xeb7(%rip),%rdi
setne  %bpl
mov    %r14,%rsi
mov    %eax,%edx
mov    %ebx,%r8d
call   1030 <printf@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"(fileno (%s) = %d) %c= %d\0A\00"
define i32 @check(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%8 = load i32*, i32** %5
%9 = call i32 @fileno(i32* %8)
store i32 %9, i32* %7
%10 = load i8*, i8** %4
%11 = load i32, i32* %7
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 61, i32 33
%17 = trunc i32 %16 to i8
%18 = load i32, i32* %6
%19 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11, i8 signext %17, i32 %18)
%20 = load i32, i32* %7
%21 = load i32, i32* %6
%22 = icmp ne i32 %20, %21
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
@.str = [27 x i8] c"(fileno (%s) = %d) %c= %d\0A\00"
define i32 @check(i8* %0, i32* nocapture %1, i32 %2) {
%4 = tail call i32 @fileno(i32* %1)
%5 = icmp eq i32 %4, %2
%6 = select i1 %5, i8 61, i8 33
%7 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4, i8 signext %6, i32 %2)
%8 = icmp ne i32 %4, %2
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ NewtonRaphson(double);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void TestNewtonRaphson() {
  printf("Test Newton-Raphson method: root = %lf\n", NewtonRaphson(6.0));
}


x86 assembly (clang, -O0):
<TestNewtonRaphson>:
push   %rbp
mov    %rsp,%rbp
movsd  0xed4(%rip),%xmm0
call   1030 <NewtonRaphson@plt>
mov    %eax,%esi
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestNewtonRaphson>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1030 <NewtonRaphson@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Test Newton-Raphson method: root = %lf\0A\00"
define void @TestNewtonRaphson() {
%1 = call i32 @NewtonRaphson(double 6.000000e+00)
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Test Newton-Raphson method: root = %lf\0A\00"
define void @TestNewtonRaphson() {
%1 = tail call i32 @NewtonRaphson(double 6.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(size_t *);
void freeMatrix(size_t **matrix, size_t nbLines) {
  size_t i;
  for (i = 0; i < nbLines; i++)
    free(matrix[i]);
}


x86 assembly (clang, -O0):
<freeMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1158 <freeMatrix+0x48>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <freeMatrix+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeMatrix>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1142 <freeMatrix+0x32>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeMatrix+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @freeMatrix(i64** nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i64*, i64** %0, i64 %5
%7 = load i64*, i64** %6
%8 = tail call i32 @free(i64* %7)
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
void gtk_toolbar_unset_style() {}


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

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

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

LLVM IR (-O2):
define void @gtk_toolbar_unset_style() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cl_int;
typedef int /*<<< orphan*/ cl_event;
typedef scalar_t__ cl_context;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, unsigned int *);
cl_event clCreateUserEvent(cl_context context, cl_int *errcode_ret) {
  unsigned int sys_args[2];
  sys_args[0] = (unsigned int)context;
  sys_args[1] = (unsigned int)errcode_ret;
  return (cl_event)syscall(325, 1045, sys_args);
}


x86 assembly (clang, -O0):
<clCreateUserEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
lea    -0x18(%rbp),%rdx
mov    $0x145,%edi
mov    $0x415,%esi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clCreateUserEvent>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%rdx
mov    $0x145,%edi
mov    $0x415,%esi
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @clCreateUserEvent(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
%5 = alloca [2 x i32]
store i64 %0, i64* %3
store i32* %1, i32** %4
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %7, i32* %8
%9 = load i32*, i32** %4
%10 = ptrtoint i32* %9 to i32
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %10, i32* %11
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%13 = call i32 @syscall(i32 325, i32 1045, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @clCreateUserEvent(i64 %0, i32* %1) {
%3 = alloca [2 x i32]
%4 = bitcast [2 x i32]* %3 to i8*
%5 = trunc i64 %0 to i32
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 %5, i32* %6
%7 = ptrtoint i32* %1 to i64
%8 = trunc i64 %7 to i32
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 %8, i32* %9
%10 = call i32 @syscall(i32 325, i32 1045, i32* %6)
ret i32 %10
}
void REMR3Reset(void) {}


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

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

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

LLVM IR (-O2):
define void @REMR3Reset() {
ret void
}
int notification_backend_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @notification_backend_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @notification_backend_init() {
ret i32 0
}
int test_imm_AAuint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xAA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AAuint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xaa,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_AAuint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 170
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *xmalloc(size_t sz) {
  void *p = malloc(sz);
  if (!p)
    abort();
  memset(p, 0, sz);
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <xmalloc+0x2b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <malloc@plt>
test   %rax,%rax
je     115c <xmalloc+0x2c>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = load i64, i64* %2
%13 = call i32 @memset(i8* %11, i32 0, i64 %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
%7 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ log_err(int /*<<< orphan*/, char *, ...);
void log_errn_read(char *fname) {
  if (fname != NULL)
    log_err(0, "Could not read from %s", fname);
  else
    log_err(0, "Could not read input.");
}


x86 assembly (clang, -O0):
<log_errn_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <log_errn_read+0x30>
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <log_err@plt>
jmp    1150 <log_errn_read+0x40>
xor    %edi,%edi
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1030 <log_err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_errn_read>:
test   %rdi,%rdi
je     1128 <log_errn_read+0x18>
mov    %rdi,%rdx
lea    0xee1(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <log_err@plt>
lea    0xee8(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <log_err@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Could not read from %s\00"
@.str.1 = [22 x i8] c"Could not read input.\00"
define void @log_errn_read(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @log_err(i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %10
8: ; preds = %1
%9 = call i32 (i32, i8*, ...) @log_err(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Could not read from %s\00"
@.str.1 = [22 x i8] c"Could not read input.\00"
define void @log_errn_read(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i32, i8*, ...) @log_err(i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
5: ; preds = %1
%6 = tail call i32 (i32, i8*, ...) @log_err(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int sqrt(int);
double _ProblemFunction(double x, double y) {
  return 1 / 4 * sqrt(30 * (30 - x) * (30 - y) * (x + y));
}


x86 assembly (clang, -O0):
<_ProblemFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xed6(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xebd(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqrt@plt>
imul   $0x0,%eax,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ProblemFunction>:
push   %rax
movsd  0xee7(%rip),%xmm2
movapd %xmm2,%xmm3
subsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm3
subsd  %xmm1,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqrt@plt>
xorpd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @_ProblemFunction(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fsub double 3.000000e+01, %5
%7 = fmul double 3.000000e+01, %6
%8 = load double, double* %4
%9 = fsub double 3.000000e+01, %8
%10 = fmul double %7, %9
%11 = load double, double* %3
%12 = load double, double* %4
%13 = fadd double %11, %12
%14 = fmul double %10, %13
%15 = fptosi double %14 to i32
%16 = call i32 @sqrt(i32 %15)
%17 = mul nsw i32 0, %16
%18 = sitofp i32 %17 to double
ret double %18
}

LLVM IR (-O2):
define double @_ProblemFunction(double %0, double %1) {
%3 = fsub double 3.000000e+01, %0
%4 = fmul double %3, 3.000000e+01
%5 = fsub double 3.000000e+01, %1
%6 = fmul double %4, %5
%7 = fadd double %0, %1
%8 = fmul double %7, %6
%9 = fptosi double %8 to i32
%10 = tail call i32 @sqrt(i32 %9)
ret double 0.000000e+00
}
OP(ed, c8) { illegal_2(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_2()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
double(cimag)(double _Complex x) { return __builtin_cimag(x); }


x86 assembly (clang, -O0):
<cimag>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cimag>:
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @cimag(double %0, double %1) {
%3 = alloca { double, double }
%4 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
store double %0, double* %4
%5 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %1, double* %5
%6 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%7 = load double, double* %6
%8 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%9 = load double, double* %8
ret double %9
}

LLVM IR (-O2):
define double @cimag(double %0, double returned %1) {
ret double %1
}
/* Variables and functions */
int /*<<< orphan*/ GyrCon_OFILM(int);
int /*<<< orphan*/ SrvCon_OFILM(int, int);
void OisEna_OFILM(void) {
  SrvCon_OFILM(0x00, 0x01);
  SrvCon_OFILM(0x01, 0x01);
  GyrCon_OFILM(0x01);
}


x86 assembly (clang, -O0):
<OisEna_OFILM>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <SrvCon_OFILM@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <SrvCon_OFILM@plt>
mov    $0x1,%edi
call   1030 <GyrCon_OFILM@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OisEna_OFILM>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <SrvCon_OFILM@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <SrvCon_OFILM@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <GyrCon_OFILM@plt>

LLVM IR (-O0):
define void @OisEna_OFILM() {
%1 = call i32 @SrvCon_OFILM(i32 0, i32 1)
%2 = call i32 @SrvCon_OFILM(i32 1, i32 1)
%3 = call i32 @GyrCon_OFILM(i32 1)
ret void
}

LLVM IR (-O2):
define void @OisEna_OFILM() {
%1 = tail call i32 @SrvCon_OFILM(i32 0, i32 1)
%2 = tail call i32 @SrvCon_OFILM(i32 1, i32 1)
%3 = tail call i32 @GyrCon_OFILM(i32 1)
ret void
}
/* Variables and functions */
int sqrt(int);
int check_prime(int num) {
  int i;
  for (i = 2; i <= sqrt(num); i++) {
    if (num % i == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<check_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jg     116c <check_prime+0x5c>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1159 <check_prime+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1173 <check_prime+0x63>
jmp    115e <check_prime+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <check_prime+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_prime>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <sqrt@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x2,%ecx
jl     1150 <check_prime+0x40>
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
mov    %ebx,%eax
cltd
idiv   %ebp
test   %edx,%edx
je     114e <check_prime+0x3e>
mov    %ebx,%edi
call   1030 <sqrt@plt>
cmp    %eax,%ebp
jl     1130 <check_prime+0x20>
mov    $0x1,%eax
jmp    1150 <check_prime+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @check_prime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 2, i32* %4
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = call i32 @sqrt(i32 %7)
%9 = icmp sle i32 %6, %8
br i1 %9, label %10, label %20
10: ; preds = %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = srem i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 0, i32* %2
br label %21
16: ; preds = %10
br label %17
17: ; preds = %16
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %5
20: ; preds = %5
store i32 1, i32* %2
br label %21
21: ; preds = %20, %15
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @check_prime(i32 %0) {
%2 = tail call i32 @sqrt(i32 %0)
%3 = icmp slt i32 %2, 2
br i1 %3, label %12, label %8
4: ; preds = %8
%5 = add nuw nsw i32 %9, 1
%6 = tail call i32 @sqrt(i32 %0)
%7 = icmp slt i32 %9, %6
br i1 %7, label %8, label %12
8: ; preds = %1, %4
%9 = phi i32 [ %5, %4 ], [ 2, %1 ]
%10 = srem i32 %0, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %8, %4, %1
%13 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %13
}
/* Variables and functions */
int chaz_CC_gcc_version_num();
int chaz_Probe_gcc_version_num(void) { return chaz_CC_gcc_version_num(); }


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

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

LLVM IR (-O0):
define i32 @chaz_Probe_gcc_version_num() {
%1 = call i32 (...) @chaz_CC_gcc_version_num()
ret i32 %1
}

LLVM IR (-O2):
define i32 @chaz_Probe_gcc_version_num() {
%1 = tail call i32 (...) @chaz_CC_gcc_version_num()
ret i32 %1
}
int test2(int a, int b) { return a ? a, b : a; }


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111f <test2+0x1f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <test2+0x25>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
mov    %esi,%eax
test   %edi,%edi
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @test2(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i32 0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led0Toggle();
void TestAppP__Leds__led0Toggle(void) { LedsP__Leds__led0Toggle(); }


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

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

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

LLVM IR (-O2):
define void @TestAppP__Leds__led0Toggle() {
%1 = tail call i32 (...) @LedsP__Leds__led0Toggle()
ret void
}
/* Variables and functions */
float strtol(char *, int /*<<< orphan*/ *, int);
int extract_cutoff(void *data, int argc, char **argv, char **azColName) {
  ((float *)data)[0] = strtol(argv[0], NULL, 10);
  ((float *)data)[0] = strtol(argv[1], NULL, 10);
  return 0;
}


x86 assembly (clang, -O0):
<extract_cutoff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_cutoff>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
mov    (%rdx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
movss  %xmm0,(%r14)
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
movss  %xmm0,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @extract_cutoff(i8* %0, i32 %1, i8** %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8**
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i8** %3, i8*** %8
%9 = load i8**, i8*** %7
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call float @strtol(i8* %11, i32* null, i32 10)
%13 = load i8*, i8** %5
%14 = bitcast i8* %13 to float*
%15 = getelementptr inbounds float, float* %14, i64 0
store float %12, float* %15
%16 = load i8**, i8*** %7
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call float @strtol(i8* %18, i32* null, i32 10)
%20 = load i8*, i8** %5
%21 = bitcast i8* %20 to float*
%22 = getelementptr inbounds float, float* %21, i64 0
store float %19, float* %22
ret i32 0
}

LLVM IR (-O2):
define i32 @extract_cutoff(i8* nocapture writeonly %0, i32 %1, i8** nocapture %2, i8** nocapture readnone %3) {
%5 = load i8*, i8** %2
%6 = tail call float @strtol(i8* nocapture %5, i32* null, i32 10)
%7 = bitcast i8* %0 to float*
store float %6, float* %7
%8 = getelementptr inbounds i8*, i8** %2, i64 1
%9 = load i8*, i8** %8
%10 = tail call float @strtol(i8* nocapture %9, i32* null, i32 10)
store float %10, float* %7
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("%s", "Hello World! \n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [15 x i8] c"Hello World! \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void XtCreateWidget() {}


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

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

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

LLVM IR (-O2):
define void @XtCreateWidget() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_MediaServer_ContentDirectory_GetSystemUpdateID(void *, int);
int /*<<< orphan*/ printf(char *);
void UpnpMediaServer_ContentDirectory_GetSystemUpdateID(void *upnptoken) {
  printf("Invoke: UpnpMediaServer_ContentDirectory_GetSystemUpdateID();\r\n");
  UpnpResponse_MediaServer_ContentDirectory_GetSystemUpdateID(upnptoken, 250);
}


x86 assembly (clang, -O0):
<UpnpMediaServer_ContentDirectory_GetSystemUpdateID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0xfa,%esi
call   1040 <UpnpResponse_MediaServer_ContentDirectory_GetSystemUpdateID@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpMediaServer_ContentDirectory_GetSystemUpdateID>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0xfa,%esi
pop    %rbx
jmp    1040 <UpnpResponse_MediaServer_ContentDirectory_GetSystemUpdateID@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"Invoke: UpnpMediaServer_ContentDirectory_GetSystemUpdateID();\0D\0A\00"
define void @UpnpMediaServer_ContentDirectory_GetSystemUpdateID(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UpnpResponse_MediaServer_ContentDirectory_GetSystemUpdateID(i8* %4, i32 250)
ret void
}

LLVM IR (-O2):
@str = [63 x i8] c"Invoke: UpnpMediaServer_ContentDirectory_GetSystemUpdateID();\0D\00"
define void @UpnpMediaServer_ContentDirectory_GetSystemUpdateID(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_MediaServer_ContentDirectory_GetSystemUpdateID(i8* %0, i32 250)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ heap(int *, int);
void qsort_heap(int *values, int n) { heap(values, n); }


x86 assembly (clang, -O0):
<qsort_heap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <heap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_heap>:
jmp    1030 <heap@plt>

LLVM IR (-O0):
define void @qsort_heap(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @heap(i32* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @qsort_heap(i32* %0, i32 %1) {
%3 = tail call i32 @heap(i32* %0, i32 %1)
ret void
}
/* Type definitions */
struct b_tonegen {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ setMIDIDrawBar(struct b_tonegen *, int, unsigned char);
void setDrawbar21(void *d, unsigned char v) {
  setMIDIDrawBar((struct b_tonegen *)d, 21, v);
}


x86 assembly (clang, -O0):
<setDrawbar21>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x15,%esi
movzbl -0x9(%rbp),%edx
call   1030 <setMIDIDrawBar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDrawbar21>:
mov    %esi,%edx
mov    $0x15,%esi
jmp    1030 <setMIDIDrawBar@plt>

LLVM IR (-O0):
%struct.b_tonegen = type { i32 }
define void @setDrawbar21(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.b_tonegen*
%7 = load i8, i8* %4
%8 = call i32 @setMIDIDrawBar(%struct.b_tonegen* %6, i32 21, i8 zeroext %7)
ret void
}

LLVM IR (-O2):
%struct.b_tonegen = type { i32 }
define void @setDrawbar21(i8* %0, i8 zeroext %1) {
%3 = bitcast i8* %0 to %struct.b_tonegen*
%4 = tail call i32 @setMIDIDrawBar(%struct.b_tonegen* %3, i32 21, i8 zeroext %1)
ret void
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_script(void *buf) {
  uint8_t *str = (uint8_t *)buf;
  printf("%s", str);
}


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

x86 assembly (clang, -O2):
<print_script>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @print_script(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fdopen(int, char *);
void resourceLeak_fdopen(int fd) { FILE *f = fdopen(fd, "r"); }


x86 assembly (clang, -O0):
<resourceLeak_fdopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <fdopen@plt>
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resourceLeak_fdopen>:
lea    0xee9(%rip),%rsi
jmp    1030 <fdopen@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define void @resourceLeak_fdopen(i32 %0) {
%2 = tail call i32* @fdopen(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int serial_getc();
int getDebugChar() { return serial_getc(); }


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

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

LLVM IR (-O0):
define i32 @getDebugChar() {
%1 = call i32 (...) @serial_getc()
ret i32 %1
}

LLVM IR (-O2):
define i32 @getDebugChar() {
%1 = tail call i32 (...) @serial_getc()
ret i32 %1
}