xunge/DecIR huggingface dataset:
/* Type definitions */
struct timespec {
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_getres(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ printf(char *, int);
void printClockResolution() {
  struct timespec tick;
  clock_getres(CLOCK_REALTIME, &tick);
  printf("Clock resolution: %ins\n", tick.tv_nsec);
}


x86 assembly (clang, -O0):
<printClockResolution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1040 <clock_getres@plt>
mov    -0x8(%rbp),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printClockResolution>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1040 <clock_getres@plt>
mov    (%rsp),%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
@.str = [24 x i8] c"Clock resolution: %ins\0A\00"
define void @printClockResolution() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_getres(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
@.str = [24 x i8] c"Clock resolution: %ins\0A\00"
define void @printClockResolution() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_getres(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
int minimum(int *tableau) {
  int i, mini = tableau[0];
  for (i = 1; i < 6; i++) {
    if (tableau[i] < mini)
      mini = tableau[i];
  }
  return mini;
}


x86 assembly (clang, -O0):
<minimum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    1157 <minimum+0x57>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
jge    1144 <minimum+0x44>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
jmp    1149 <minimum+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1118 <minimum+0x18>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minimum>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
mov    0x8(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
mov    0xc(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
mov    0x10(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
mov    0x14(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @minimum(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, %2
%6 = select i1 %5, i32 %4, i32 %2
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, %6
%10 = select i1 %9, i32 %8, i32 %6
%11 = getelementptr inbounds i32, i32* %0, i64 3
%12 = load i32, i32* %11
%13 = icmp slt i32 %12, %10
%14 = select i1 %13, i32 %12, i32 %10
%15 = getelementptr inbounds i32, i32* %0, i64 4
%16 = load i32, i32* %15
%17 = icmp slt i32 %16, %14
%18 = select i1 %17, i32 %16, i32 %14
%19 = getelementptr inbounds i32, i32* %0, i64 5
%20 = load i32, i32* %19
%21 = icmp slt i32 %20, %18
%22 = select i1 %21, i32 %20, i32 %18
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ disabletx();
int /*<<< orphan*/ enabletx();
void toggletx(void) {
  static bool txstate = false;
  if (txstate) {
    disabletx();
    txstate = false;
  } else {
    enabletx();
    txstate = true;
  }
}


x86 assembly (clang, -O0):
<toggletx>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f09(%rip)
je     1147 <toggletx+0x27>
mov    $0x0,%al
call   1030 <disabletx@plt>
movl   $0x0,0x2ef2(%rip)
jmp    1158 <toggletx+0x38>
mov    $0x0,%al
call   1040 <enabletx@plt>
movl   $0x1,0x2edc(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<toggletx>:
push   %rbx
mov    0x2f0d(%rip),%bl
xor    %eax,%eax
cmp    $0x1,%bl
jne    1135 <toggletx+0x15>
call   1030 <disabletx@plt>
jmp    113a <toggletx+0x1a>
call   1040 <enabletx@plt>
xor    $0x1,%bl
mov    %bl,0x2ef1(%rip)
pop    %rbx
ret

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

LLVM IR (-O2):
@toggletx.txstate = internal unnamed_addr global i1 false
define void @toggletx() {
%1 = load i1, i1* @toggletx.txstate
br i1 %1, label %2, label %4
2: ; preds = %0
%3 = tail call i32 (...) @disabletx()
br label %6
4: ; preds = %0
%5 = tail call i32 (...) @enabletx()
br label %6
6: ; preds = %4, %2
%7 = xor i1 %1, true
store i1 %7, i1* @toggletx.txstate
ret void
}
/* Variables and functions */
int maxcifra(int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int n;
  scanf("%d", &n);
  printf("maxcifra(%d) = %d\n", n, maxcifra(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <maxcifra@plt>
mov    -0x18(%rbp),%esi
mov    %eax,%edx
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1040 <maxcifra@plt>
lea    0xeab(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [19 x i8] c"maxcifra(%d) = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%8 = load i32, i32* %6
%9 = load i32, i32* %6
%10 = call i32 @maxcifra(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [19 x i8] c"maxcifra(%d) = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @maxcifra(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
int test_imm_12uint8_reg(unsigned char val) {
  return ((val) & (0x12 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_12uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 18
%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_12uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 18
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int hammingDistance(int x, int y) {
  int distance = 0;
  x ^= y;
  while (x) {
    distance += x & 1;
    x >>= 1;
  }
  return distance;
}


x86 assembly (clang, -O0):
<hammingDistance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113e <hammingDistance+0x3e>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111a <hammingDistance+0x1a>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hammingDistance>:
xor    %eax,%eax
xor    %esi,%edi
je     1120 <hammingDistance+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
sar    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <hammingDistance+0x10>
ret

LLVM IR (-O0):
define i32 @hammingDistance(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = xor i32 %7, %6
store i32 %8, i32* %3
br label %9
9: ; preds = %12, %2
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %3
%14 = and i32 %13, 1
%15 = load i32, i32* %5
%16 = add nsw i32 %15, %14
store i32 %16, i32* %5
%17 = load i32, i32* %3
%18 = ashr i32 %17, 1
store i32 %18, i32* %3
br label %9
19: ; preds = %9
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @hammingDistance(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %9, %5 ], [ 0, %2 ]
%7 = phi i32 [ %10, %5 ], [ %3, %2 ]
%8 = and i32 %7, 1
%9 = add nuw nsw i32 %6, %8
%10 = ashr i32 %7, 1
%11 = icmp ult i32 %7, 2
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i32 [ 0, %2 ], [ %9, %5 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ td_thragent_t;
typedef int /*<<< orphan*/ td_thr_events_t;
typedef int /*<<< orphan*/ td_err_e;

/* Variables and functions */
int /*<<< orphan*/ TD_OK;
td_err_e td_ta_clear_event(const td_thragent_t *ta_arg,
                           td_thr_events_t *event) {
  return TD_OK;
}


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

x86 assembly (clang, -O2):
<td_ta_clear_event>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@TD_OK = global i32 0
define i32 @td_ta_clear_event(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32, i32* @TD_OK
ret i32 %5
}

LLVM IR (-O2):
@TD_OK = global i32 0
define i32 @td_ta_clear_event(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @TD_OK
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ usaF(int *);
void usaF2(int *x) { usaF(x); }


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

x86 assembly (clang, -O2):
<usaF2>:
jmp    1030 <usaF@plt>

LLVM IR (-O0):
define void @usaF2(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @usaF(i32* %3)
ret void
}

LLVM IR (-O2):
define void @usaF2(i32* %0) {
%2 = tail call i32 @usaF(i32* %0)
ret void
}
int f(int a, int b) {}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *benchmark_result() {
  static char result = '\0';
  (void)fprintf(stderr, "benchmark_result\n");
  return (&result);
}


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

x86 assembly (clang, -O2):
<benchmark_result>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
lea    0x2eff(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@benchmark_result.result = internal global i8 0
@stderr = global i32 0
@.str = [18 x i8] c"benchmark_result\0A\00"
define i8* @benchmark_result() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i8* @benchmark_result.result
}

LLVM IR (-O2):
@benchmark_result.result = internal global i8 0
@stderr = global i32 0
@.str = [18 x i8] c"benchmark_result\0A\00"
define i8* @benchmark_result() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i8* @benchmark_result.result
}
void mspack_destroy_cab_compressor(struct mscab_compressor *self) {}


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

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

LLVM IR (-O0):
%struct.mscab_compressor = type opaque
define void @mspack_destroy_cab_compressor(%struct.mscab_compressor* %0) {
%2 = alloca %struct.mscab_compressor*
store %struct.mscab_compressor* %0, %struct.mscab_compressor** %2
ret void
}

LLVM IR (-O2):
%struct.mscab_compressor = type opaque
define void @mspack_destroy_cab_compressor(%struct.mscab_compressor* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ia64_mfa();
void ___ia64_mmiowb(void) { ia64_mfa(); }


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

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

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

LLVM IR (-O2):
define void @___ia64_mmiowb() {
%1 = tail call i32 (...) @ia64_mfa()
ret void
}
void testBackward() {
  UnitTest_expect_fail(("write me"), __func__, 13);
  ;
}


x86 assembly (clang, -O0):
<testBackward>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0xd,%edx
mov    $0x0,%al
call   1030 <UnitTest_expect_fail@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBackward>:
lea    0xee9(%rip),%rdi
lea    0xeeb(%rip),%rsi
mov    $0xd,%edx
xor    %eax,%eax
jmp    1030 <UnitTest_expect_fail@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"write me\00"
@__func__.testBackward = [13 x i8] c"testBackward\00"
define void @testBackward() {
%1 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @UnitTest_expect_fail to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.testBackward, i64 0, i64 0), i32 13)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"write me\00"
@__func__.testBackward = [13 x i8] c"testBackward\00"
define void @testBackward() {
%1 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @UnitTest_expect_fail to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.testBackward, i64 0, i64 0), i32 13)
ret void
}
extern int _lseek(int file, int ptr, int dir) {
  (void)file;
  (void)ptr;
  (void)dir;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_EqualsVec3_init(void) {
  _hmt_register_covercase("HMM_EqualsVec3", "1");
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"HMM_EqualsVec3\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_EqualsVec3_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ **segment_internal(int /*<<< orphan*/ *, int /*<<< orphan*/);
wchar_t **segment(wchar_t *word) { return segment_internal(word, 0); }


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

x86 assembly (clang, -O2):
<segment>:
xor    %esi,%esi
jmp    1030 <segment_internal@plt>

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

LLVM IR (-O2):
define i32** @segment(i32* %0) {
%2 = tail call i32** @segment_internal(i32* %0, i32 0)
ret i32** %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ taskAdd_example();
void dispatch_test(void) {
  printf("------------------------dispatch_test:-------------------------\n");
  taskAdd_example();
}


x86 assembly (clang, -O0):
<dispatch_test>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <taskAdd_example@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dispatch_test>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <taskAdd_example@plt>

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

LLVM IR (-O2):
@str = [64 x i8] c"------------------------dispatch_test:-------------------------\00"
define void @dispatch_test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @taskAdd_example()
ret void
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int /*<<< orphan*/ fstat(int, struct stat *);
int rr_filesize(int fd) {
  struct stat file_stat;
  fstat(fd, &file_stat);
  return (file_stat.st_size);
}


x86 assembly (clang, -O0):
<rr_filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1030 <fstat@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rr_filesize>:
push   %rax
mov    %rsp,%rsi
call   1030 <fstat@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @rr_filesize(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.stat
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fstat(i32 %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @rr_filesize(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
void XSharpTextExtentsPCF(void *dpy, void *fontSet, void *str, long offset,
                          long count, void *overall_ink_return,
                          void *overall_logical_return) {}


x86 assembly (clang, -O0):
<XSharpTextExtentsPCF>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @XSharpTextExtentsPCF(i8* %0, i8* %1, i8* %2, i64 %3, i64 %4, i8* %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i8*
%14 = alloca i8*
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i64 %3, i64* %11
store i64 %4, i64* %12
store i8* %5, i8** %13
store i8* %6, i8** %14
ret void
}

LLVM IR (-O2):
define void @XSharpTextExtentsPCF(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i64 %3, i64 %4, i8* nocapture %5, i8* nocapture %6) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ escape(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
main() {
  char t[] = "the test\tstring\nshould print\tescape \nsequences\n";
  char s[1000];
  printf("%s\n", t);
  escape(s, t);
  printf("%s\n", s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
lea    -0x30(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x30,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    -0x420(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <escape@plt>
lea    -0x420(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x420,%rsp
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeda(%rip),%r14
mov    %rsp,%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <printf@plt>
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <escape@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.t = [48 x i8] c"the test\09string\0Ashould print\09escape \0Asequences\0A\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [48 x i8]
%2 = alloca [1000 x i8]
%3 = bitcast [48 x i8]* %1 to i8*
%4 = getelementptr inbounds [48 x i8], [48 x i8]* %1, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [48 x i8], [48 x i8]* %1, i64 0, i64 0
%8 = call i32 @escape(i8* %6, i8* %7)
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.t = [48 x i8] c"the test\09string\0Ashould print\09escape \0Asequences\0A\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [48 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [48 x i8], [48 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = call i32 @escape(i8* %4, i8* %3)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n[10] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
  int i;
  int total = 0;
  for (i = 0; i < 10; i++) {
    total = total + n[i];
  }
  printf("The sum is %d\n", total);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    1178 <main+0x58>
mov    -0x38(%rbp),%eax
movslq -0x34(%rbp),%rcx
add    -0x30(%rbp,%rcx,4),%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1152 <main+0x32>
mov    -0x38(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.n = [10 x i32] [i32 10, i32 20, i32 30, i32 40, i32 50, i32 60, i32 70, i32 80, i32 90, i32 100]
@.str = [15 x i8] c"The sum is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [10 x i32]* %2 to i8*
store i32 0, i32* %4
store i32 0, i32* %3
br label %6
6: ; preds = %16, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = add nsw i32 %10, %14
store i32 %15, i32* %4
br label %16
16: ; preds = %9
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %6
%20 = load i32, i32* %4
%21 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@.str = [15 x i8] c"The sum is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 550)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_buf_sum(char *, int);
void write_addr(unsigned int addr) {
  char buf[4];
  buf[3] = addr & 0xff;
  addr <<= 8;
  buf[2] = addr & 0xff;
  addr <<= 8;
  buf[1] = addr & 0xff;
  addr <<= 8;
  buf[0] = addr & 0xff;
  write_buf_sum(buf, 4);
}


x86 assembly (clang, -O0):
<write_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x7(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <write_buf_sum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_addr>:
push   %rax
mov    %dil,0x7(%rsp)
movb   $0x0,0x6(%rsp)
movw   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <write_buf_sum@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @write_addr(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 255
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 %6, i8* %7
%8 = load i32, i32* %2
%9 = shl i32 %8, 8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 255
%12 = trunc i32 %11 to i8
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 %12, i8* %13
%14 = load i32, i32* %2
%15 = shl i32 %14, 8
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = and i32 %16, 255
%18 = trunc i32 %17 to i8
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 %18, i8* %19
%20 = load i32, i32* %2
%21 = shl i32 %20, 8
store i32 %21, i32* %2
%22 = load i32, i32* %2
%23 = and i32 %22, 255
%24 = trunc i32 %23 to i8
%25 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
store i8 %24, i8* %25
%26 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%27 = call i32 @write_buf_sum(i8* %26, i32 4)
ret void
}

LLVM IR (-O2):
define void @write_addr(i32 %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = trunc i32 %0 to i8
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
store i8 %4, i8* %5
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 0, i8* %6
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 0, i8* %7
store i8 0, i8* %3
%8 = call i32 @write_buf_sum(i8* %3, i32 4)
ret void
}
void iommu_add(struct iommu *iommu) {}


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

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

LLVM IR (-O0):
%struct.iommu = type opaque
define void @iommu_add(%struct.iommu* %0) {
%2 = alloca %struct.iommu*
store %struct.iommu* %0, %struct.iommu** %2
ret void
}

LLVM IR (-O2):
%struct.iommu = type opaque
define void @iommu_add(%struct.iommu* nocapture %0) {
ret void
}
/* Variables and functions */
int lc4_lfsr();
int rand16() {
  int lfsr;
  lfsr = lc4_lfsr();
  lfsr = lc4_lfsr();
  lfsr = lc4_lfsr();
  lfsr = lc4_lfsr();
  lfsr = lc4_lfsr();
  lfsr = lc4_lfsr();
  lfsr = lc4_lfsr();
  return (lfsr & 0x7F);
}


x86 assembly (clang, -O0):
<rand16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <lc4_lfsr@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <lc4_lfsr@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <lc4_lfsr@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <lc4_lfsr@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <lc4_lfsr@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <lc4_lfsr@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <lc4_lfsr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7f,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand16>:
push   %rax
xor    %eax,%eax
call   1030 <lc4_lfsr@plt>
xor    %eax,%eax
call   1030 <lc4_lfsr@plt>
xor    %eax,%eax
call   1030 <lc4_lfsr@plt>
xor    %eax,%eax
call   1030 <lc4_lfsr@plt>
xor    %eax,%eax
call   1030 <lc4_lfsr@plt>
xor    %eax,%eax
call   1030 <lc4_lfsr@plt>
xor    %eax,%eax
call   1030 <lc4_lfsr@plt>
and    $0x7f,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rand16() {
%1 = alloca i32
%2 = call i32 (...) @lc4_lfsr()
store i32 %2, i32* %1
%3 = call i32 (...) @lc4_lfsr()
store i32 %3, i32* %1
%4 = call i32 (...) @lc4_lfsr()
store i32 %4, i32* %1
%5 = call i32 (...) @lc4_lfsr()
store i32 %5, i32* %1
%6 = call i32 (...) @lc4_lfsr()
store i32 %6, i32* %1
%7 = call i32 (...) @lc4_lfsr()
store i32 %7, i32* %1
%8 = call i32 (...) @lc4_lfsr()
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = and i32 %9, 127
ret i32 %10
}

LLVM IR (-O2):
define i32 @rand16() {
%1 = tail call i32 (...) @lc4_lfsr()
%2 = tail call i32 (...) @lc4_lfsr()
%3 = tail call i32 (...) @lc4_lfsr()
%4 = tail call i32 (...) @lc4_lfsr()
%5 = tail call i32 (...) @lc4_lfsr()
%6 = tail call i32 (...) @lc4_lfsr()
%7 = tail call i32 (...) @lc4_lfsr()
%8 = and i32 %7, 127
ret i32 %8
}
float EvalCube(float *q, float x) {
  return ((((q[0] * x) + q[1]) * x + q[2]) * x + q[3]);
}


x86 assembly (clang, -O0):
<EvalCube>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  -0xc(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<EvalCube>:
movss  (%rdi),%xmm1
mulss  %xmm0,%xmm1
addss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm1
addss  0x8(%rdi),%xmm1
mulss  %xmm1,%xmm0
addss  0xc(%rdi),%xmm0
ret

LLVM IR (-O0):
define float @EvalCube(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
store float* %0, float** %3
store float %1, float* %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float, float* %4
%9 = load float*, float** %3
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = call float @llvm.fmuladd.f32(float %7, float %8, float %11)
%13 = load float, float* %4
%14 = load float*, float** %3
%15 = getelementptr inbounds float, float* %14, i64 2
%16 = load float, float* %15
%17 = call float @llvm.fmuladd.f32(float %12, float %13, float %16)
%18 = load float, float* %4
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 3
%21 = load float, float* %20
%22 = call float @llvm.fmuladd.f32(float %17, float %18, float %21)
ret float %22
}

LLVM IR (-O2):
define float @EvalCube(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = tail call float @llvm.fmuladd.f32(float %3, float %1, float %5)
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = tail call float @llvm.fmuladd.f32(float %6, float %1, float %8)
%10 = getelementptr inbounds float, float* %0, i64 3
%11 = load float, float* %10
%12 = tail call float @llvm.fmuladd.f32(float %9, float %1, float %11)
ret float %12
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int mallopt(int param, int value) {
  (void)param;
  (void)value;
  puts("mallinfo: not implemented");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"mallinfo: not implemented\00"
define i32 @mallopt(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 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"mallinfo: not implemented\00"
define i32 @mallopt(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void throws(char *str) { free(str); }


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

x86 assembly (clang, -O2):
<throws>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @throws(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
void _timespec_reset(struct timespec *__restrict ts) {
  ts->tv_sec = 0;
  ts->tv_nsec = 0;
}


x86 assembly (clang, -O0):
<_timespec_reset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,0x8(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_timespec_reset>:
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define void @_timespec_reset(%struct.timespec* noalias %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 0, i64* %4
%5 = load %struct.timespec*, %struct.timespec** %2
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
store i64 0, i64* %6
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define void @_timespec_reset(%struct.timespec* noalias nocapture writeonly %0) {
%2 = bitcast %struct.timespec* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IntEnable(unsigned long);
int /*<<< orphan*/ IntRegister(unsigned long, void (*)());
unsigned long SSIIntNumberGet(unsigned long);
void SSIIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) {
  unsigned long ulInt;
  ;
  ulInt = SSIIntNumberGet(ulBase);
  IntRegister(ulInt, pfnHandler);
  IntEnable(ulInt);
}


x86 assembly (clang, -O0):
<SSIIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <SSIIntNumberGet@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <IntRegister@plt>
mov    -0x18(%rbp),%rdi
call   1030 <IntEnable@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIIntRegister>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <SSIIntNumberGet@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <IntRegister@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @SSIIntRegister(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
%5 = alloca i64
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%6 = load i64, i64* %3
%7 = call i64 @SSIIntNumberGet(i64 %6)
store i64 %7, i64* %5
%8 = load i64, i64* %5
%9 = load void ()*, void ()** %4
%10 = bitcast void ()* %9 to void (...)*
%11 = call i32 @IntRegister(i64 %8, void (...)* %10)
%12 = load i64, i64* %5
%13 = call i32 @IntEnable(i64 %12)
ret void
}

LLVM IR (-O2):
define void @SSIIntRegister(i64 %0, void ()* %1) {
%3 = tail call i64 @SSIIntNumberGet(i64 %0)
%4 = bitcast void ()* %1 to void (...)*
%5 = tail call i32 @IntRegister(i64 %3, void (...)* %4)
%6 = tail call i32 @IntEnable(i64 %3)
ret void
}
void foo113() {}


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

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

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

LLVM IR (-O2):
define void @foo113() {
ret void
}
/* Type definitions */
struct nlmsg_entry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_free(struct nlmsg_entry *, int /*<<< orphan*/ *);
void nlmsg_free(struct nlmsg_entry *entry) { list_free(entry, NULL); }


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

x86 assembly (clang, -O2):
<nlmsg_free>:
xor    %esi,%esi
jmp    1030 <list_free@plt>

LLVM IR (-O0):
%struct.nlmsg_entry = type { i32 }
define void @nlmsg_free(%struct.nlmsg_entry* %0) {
%2 = alloca %struct.nlmsg_entry*
store %struct.nlmsg_entry* %0, %struct.nlmsg_entry** %2
%3 = load %struct.nlmsg_entry*, %struct.nlmsg_entry** %2
%4 = call i32 @list_free(%struct.nlmsg_entry* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.nlmsg_entry = type { i32 }
define void @nlmsg_free(%struct.nlmsg_entry* %0) {
%2 = tail call i32 @list_free(%struct.nlmsg_entry* %0, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_one_line_t32(int, int, int);
void print_4_t32(int k) {
  for (int loop = 0; loop < 1; ++loop) {
    print_one_line_t32(k, 0, 3);
    print_one_line_t32(k, 1, 2);
  }
}


x86 assembly (clang, -O0):
<print_4_t32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    115b <print_4_t32+0x4b>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <print_one_line_t32@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <print_one_line_t32@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <print_4_t32+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_4_t32>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <print_one_line_t32@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x2,%edx
pop    %rbx
jmp    1030 <print_one_line_t32@plt>

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

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

/* Variables and functions */
scalar_t__ buf_bptr(struct buffer const *);
char *buf_str(const struct buffer *buf) { return (char *)buf_bptr(buf); }


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

x86 assembly (clang, -O2):
<buf_str>:
jmp    1030 <buf_bptr@plt>

LLVM IR (-O0):
%struct.buffer = type { i32 }
define i8* @buf_str(%struct.buffer* %0) {
%2 = alloca %struct.buffer*
store %struct.buffer* %0, %struct.buffer** %2
%3 = load %struct.buffer*, %struct.buffer** %2
%4 = call i64 @buf_bptr(%struct.buffer* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define i8* @buf_str(%struct.buffer* %0) {
%2 = tail call i64 @buf_bptr(%struct.buffer* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
__attribute__((weak)) void fd_nrf8001_close_remote_pipe_success(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define weak void @fd_nrf8001_close_remote_pipe_success() {
ret void
}
/* Variables and functions */
scalar_t__ s_size_t_overflow(size_t, size_t);
size_t s_size_t_add(size_t a, size_t b, size_t val_if_saturated) {
  return s_size_t_overflow(a, b) ? val_if_saturated : a + b;
}


x86 assembly (clang, -O0):
<s_size_t_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <s_size_t_overflow@plt>
cmp    $0x0,%rax
je     1148 <s_size_t_add+0x38>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1154 <s_size_t_add+0x44>
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_size_t_add>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
call   1030 <s_size_t_overflow@plt>
add    %r15,%rbx
test   %rax,%rax
cmovne %r14,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @s_size_t_add(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 @s_size_t_overflow(i64 %0, i64 %1)
%5 = icmp eq i64 %4, 0
%6 = add i64 %1, %0
%7 = select i1 %5, i64 %6, i64 %2
ret i64 %7
}
void xxx(char *to, const char *from) {
  int i = 0;
  while ((to[i] = from[i]) != '\0') {
    i++;
  }
}


x86 assembly (clang, -O0):
<xxx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1143 <xxx+0x43>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <xxx+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xxx>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <xxx+0x10>
ret

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

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