xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ alloc_fini();
int /*<<< orphan*/ alloc_init(int);
int /*<<< orphan*/ allocation_stress(int);
int /*<<< orphan*/ pthread_yield();
void *thread(void *e) {
  alloc_init(2000 * 1000);
  pthread_yield();
  allocation_stress(3000000);
  alloc_fini();
  return NULL;
}


x86 assembly (clang, -O0):
<thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1e8480,%edi
call   1050 <alloc_init@plt>
mov    $0x0,%al
call   1040 <pthread_yield@plt>
mov    $0x2dc6c0,%edi
call   1030 <allocation_stress@plt>
mov    $0x0,%al
call   1060 <alloc_fini@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread>:
push   %rax
mov    $0x1e8480,%edi
call   1050 <alloc_init@plt>
xor    %eax,%eax
call   1040 <pthread_yield@plt>
mov    $0x2dc6c0,%edi
call   1030 <allocation_stress@plt>
xor    %eax,%eax
call   1060 <alloc_fini@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @alloc_init(i32 2000000)
%4 = call i32 (...) @pthread_yield()
%5 = call i32 @allocation_stress(i32 3000000)
%6 = call i32 (...) @alloc_fini()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thread(i8* nocapture readnone %0) {
%2 = tail call i32 @alloc_init(i32 2000000)
%3 = tail call i32 (...) @pthread_yield()
%4 = tail call i32 @allocation_stress(i32 3000000)
%5 = tail call i32 (...) @alloc_fini()
ret i8* null
}
void writeInt(int n) {
  int volatile *IO = (int *)(0x3c000000 + 4 * 0x00000020);
  *IO = n;
}


x86 assembly (clang, -O0):
<writeInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x3c000080,%eax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeInt>:
mov    %edi,0x3c000080
ret

LLVM IR (-O0):
define void @writeInt(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
store i32* inttoptr (i64 1006633088 to i32*), i32** %3
%4 = load i32, i32* %2
%5 = load i32*, i32** %3
store volatile i32 %4, i32* %5
ret void
}

LLVM IR (-O2):
define void @writeInt(i32 %0) {
store volatile i32 %0, i32* inttoptr (i64 1006633088 to i32*)
ret void
}
void RTHeapSimpleRelocate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTHeapSimpleRelocate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void memzero(void *ptr, int size) { memset(ptr, 0, size); }


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

x86 assembly (clang, -O2):
<memzero>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @memzero(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
ret void
}
int regulator_set_optimum_mode(struct regulator *regulator, int load_uA) {
  return 0x2;
}


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

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

LLVM IR (-O0):
%struct.regulator = type opaque
define i32 @regulator_set_optimum_mode(%struct.regulator* %0, i32 %1) {
%3 = alloca %struct.regulator*
%4 = alloca i32
store %struct.regulator* %0, %struct.regulator** %3
store i32 %1, i32* %4
ret i32 2
}

LLVM IR (-O2):
%struct.regulator = type opaque
define i32 @regulator_set_optimum_mode(%struct.regulator* nocapture readnone %0, i32 %1) {
ret i32 2
}
int ttrie__iter(struct ttrie__obj *tt) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ttrie__obj = type opaque
define i32 @ttrie__iter(%struct.ttrie__obj* nocapture readnone %0) {
ret i32 0
}
byteoff() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @byteoff() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void *malloc(size_t);
void *emalloc(size_t size) {
  void *ret;
  if (NULL == (ret = malloc(size)))
    die("out of memory");
  return ret;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    %rcx,-0x10(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    1153 <emalloc+0x33>
lea    0xeb2(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <emalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @emalloc(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 = icmp eq i8* null, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @emalloc(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 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void TimerOC3PolarityConfigure(unsigned long ulBase, unsigned long ulPolarity) {
  unsigned long ulTempccer = 0;

  ;

  ;
  ulTempccer = (*((volatile unsigned long *)(ulBase + 0x00000020)));
  ulTempccer &= ~0x00000200;
  ulTempccer |= (ulPolarity << 8);
  (*((volatile unsigned long *)(ulBase + 0x00000020))) = ulTempccer;
}


x86 assembly (clang, -O0):
<TimerOC3PolarityConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0xfffffffffffffdff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerOC3PolarityConfigure>:
mov    $0xfffffffffffffdff,%rax
and    0x20(%rdi),%rax
shl    $0x8,%rsi
or     %rax,%rsi
mov    %rsi,0x20(%rdi)
ret

LLVM IR (-O0):
define void @TimerOC3PolarityConfigure(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
%6 = load i64, i64* %3
%7 = add i64 %6, 32
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = and i64 %10, -513
store i64 %11, i64* %5
%12 = load i64, i64* %4
%13 = shl i64 %12, 8
%14 = load i64, i64* %5
%15 = or i64 %14, %13
store i64 %15, i64* %5
%16 = load i64, i64* %5
%17 = load i64, i64* %3
%18 = add i64 %17, 32
%19 = inttoptr i64 %18 to i64*
store volatile i64 %16, i64* %19
ret void
}

LLVM IR (-O2):
define void @TimerOC3PolarityConfigure(i64 %0, i64 %1) {
%3 = add i64 %0, 32
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -513
%7 = shl i64 %1, 8
%8 = or i64 %6, %7
store volatile i64 %8, i64* %4
ret void
}
void mdp4_mddi_kickoff_video(struct msm_fb_data_type *mfd,
                             struct mdp4_overlay_pipe *pipe) {}


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

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

LLVM IR (-O0):
%struct.msm_fb_data_type = type opaque
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_mddi_kickoff_video(%struct.msm_fb_data_type* %0, %struct.mdp4_overlay_pipe* %1) {
%3 = alloca %struct.msm_fb_data_type*
%4 = alloca %struct.mdp4_overlay_pipe*
store %struct.msm_fb_data_type* %0, %struct.msm_fb_data_type** %3
store %struct.mdp4_overlay_pipe* %1, %struct.mdp4_overlay_pipe** %4
ret void
}

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_mddi_kickoff_video(%struct.msm_fb_data_type* nocapture %0, %struct.mdp4_overlay_pipe* nocapture %1) {
ret void
}
/* Variables and functions */
int factorial(int);
int choose(int n, int k) {
  if (k > n) {
    return 0;
  }
  return factorial(n) / (factorial(k) * factorial(n - k));
}


x86 assembly (clang, -O0):
<choose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1136 <choose+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1168 <choose+0x58>
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x14(%rbp),%ecx
mov    %eax,%edx
mov    -0x10(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<choose>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
mov    %edi,%ebx
sub    %esi,%ebx
jl     1141 <choose+0x31>
mov    %esi,%ebp
call   1030 <factorial@plt>
mov    %eax,%r14d
mov    %ebp,%edi
call   1030 <factorial@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
imul   %ebp,%ecx
mov    %r14d,%eax
cltd
idiv   %ecx
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @choose(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = tail call i32 @factorial(i32 %0)
%6 = tail call i32 @factorial(i32 %1)
%7 = sub nsw i32 %0, %1
%8 = tail call i32 @factorial(i32 %7)
%9 = mul nsw i32 %8, %6
%10 = sdiv i32 %5, %9
br label %11
11: ; preds = %2, %4
%12 = phi i32 [ %10, %4 ], [ 0, %2 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xb9() {
  Assert_real((islower(185) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              930, ("islower should be 0 for 0xb9"));
}


x86 assembly (clang, -O0):
<t_islower_0xb9>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb9,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3a2,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0xb9>:
push   %rax
mov    $0xb9,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3a2,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xb9\00"
define void @t_islower_0xb9() {
%1 = call i64 @islower(i32 185)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 930, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xb9\00"
define void @t_islower_0xb9() {
%1 = tail call i64 @islower(i32 185)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 930, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void smpte_fec_set_ts_recovery(uint8_t *p_fec, uint32_t snbase) {
  p_fec[8] = (snbase >> 24) & 0xff;
  p_fec[9] = (snbase >> 16) & 0xff;
  p_fec[10] = (snbase >> 8) & 0xff;
  p_fec[11] = (snbase >> 0) & 0xff;
}


x86 assembly (clang, -O0):
<smpte_fec_set_ts_recovery>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x24(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x28(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x0,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x2c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpte_fec_set_ts_recovery>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
shr    $0x18,%eax
mov    %eax,0x20(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x24(%rdi)
mov    %edx,0x28(%rdi)
mov    %esi,0x2c(%rdi)
ret

LLVM IR (-O0):
define void @smpte_fec_set_ts_recovery(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 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 8
store i32 %7, i32* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 9
store i32 %12, i32* %14
%15 = load i32, i32* %4
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 10
store i32 %17, i32* %19
%20 = load i32, i32* %4
%21 = ashr i32 %20, 0
%22 = and i32 %21, 255
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i32, i32* %23, i64 11
store i32 %22, i32* %24
ret void
}

LLVM IR (-O2):
define void @smpte_fec_set_ts_recovery(i32* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = getelementptr inbounds i32, i32* %0, i64 8
store i32 %3, i32* %4
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = getelementptr inbounds i32, i32* %0, i64 9
store i32 %6, i32* %7
%8 = lshr i32 %1, 8
%9 = and i32 %8, 255
%10 = getelementptr inbounds i32, i32* %0, i64 10
store i32 %9, i32* %10
%11 = and i32 %1, 255
%12 = getelementptr inbounds i32, i32* %0, i64 11
store i32 %11, i32* %12
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ spiGetByte();
void SPI_Read(uint8_t *buf, long Length) {
  int i;
  for (i = 0; i < Length; i++) {
    buf[i] = spiGetByte();
  }
}


x86 assembly (clang, -O0):
<SPI_Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1157 <SPI_Read+0x47>
mov    $0x0,%al
call   1030 <spiGetByte@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <SPI_Read+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPI_Read>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
jle    1144 <SPI_Read+0x34>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <spiGetByte@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <SPI_Read+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @SPI_Read(i32* nocapture writeonly %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi i64 [ %8, %4 ], [ 0, %2 ]
%6 = tail call i32 (...) @spiGetByte()
%7 = getelementptr inbounds i32, i32* %0, i64 %5
store i32 %6, i32* %7
%8 = add nuw nsw i64 %5, 1
%9 = icmp eq i64 %8, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
ret void
}
/* Variables and functions */
scalar_t__ strlen(char const *);
unsigned char contain_prefix_number(const char *c) {
  if (strlen(c) == 0)
    return 0;
  return ('0' <= c[0] && c[0] <= '9');
}


x86 assembly (clang, -O0):
<contain_prefix_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jne    1138 <contain_prefix_number+0x28>
movb   $0x0,-0x1(%rbp)
jmp    116c <contain_prefix_number+0x5c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
jg     1161 <contain_prefix_number+0x51>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<contain_prefix_number>:
mov    (%rdi),%al
add    $0xd0,%al
cmp    $0xa,%al
setb   %al
ret

LLVM IR (-O0):
define zeroext i8 @contain_prefix_number(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strlen(i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 0, i8* %2
br label %24
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 48, %12
br i1 %13, label %14, label %20
14: ; preds = %8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 0
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 57
br label %20
20: ; preds = %14, %8
%21 = phi i1 [ false, %8 ], [ %19, %14 ]
%22 = zext i1 %21 to i32
%23 = trunc i32 %22 to i8
store i8 %23, i8* %2
br label %24
24: ; preds = %20, %7
%25 = load i8, i8* %2
ret i8 %25
}

LLVM IR (-O2):
define zeroext i8 @contain_prefix_number(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
%5 = zext i1 %4 to i8
ret i8 %5
}
void *dummy(void) { return (void *)0; }


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

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

LLVM IR (-O0):
define i8* @dummy() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @dummy() {
ret i8* null
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int __stat(char const *, struct stat *);
int stat(const char *pathname, struct stat *buf) {
  return __stat(pathname, buf);
}


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

x86 assembly (clang, -O2):
<stat>:
jmp    1030 <__stat@plt>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = tail call i32 @__stat(i8* %0, %struct.stat* %1)
ret i32 %3
}
void willusgui_thread_terminate(void *pid, int exitcode) {}


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

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

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

LLVM IR (-O2):
define void @willusgui_thread_terminate(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SA1Direct(int);
int /*<<< orphan*/ STA16(int /*<<< orphan*/, int);
void Op85M0(void) { STA16(SA1Direct(2), 0xFFFF); }


x86 assembly (clang, -O0):
<Op85M0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <SA1Direct@plt>
mov    %eax,%edi
mov    $0xffff,%esi
call   1040 <STA16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op85M0>:
push   %rax
mov    $0x2,%edi
call   1030 <SA1Direct@plt>
mov    %eax,%edi
mov    $0xffff,%esi
pop    %rax
jmp    1040 <STA16@plt>

LLVM IR (-O0):
define void @Op85M0() {
%1 = call i32 @SA1Direct(i32 2)
%2 = call i32 @STA16(i32 %1, i32 65535)
ret void
}

LLVM IR (-O2):
define void @Op85M0() {
%1 = tail call i32 @SA1Direct(i32 2)
%2 = tail call i32 @STA16(i32 %1, i32 65535)
ret void
}
void cluster_list_rdlock_(void) {}


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

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

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

LLVM IR (-O2):
define void @cluster_list_rdlock_() {
ret void
}
/* Variables and functions */
double recfact(double);
double factorial(int N) {
  double i, ans;
  i = (double)N;
  ans = recfact(i);
  return ans;
}


x86 assembly (clang, -O0):
<factorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <recfact@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<factorial>:
cvtsi2sd %edi,%xmm0
jmp    1030 <recfact@plt>

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

LLVM IR (-O2):
define double @factorial(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call double @recfact(double %2)
ret double %3
}
__attribute__((always_)) void rcu_copy_process(struct task_struct *p) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @rcu_copy_process(%struct.task_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  printf("sizeof(void *) = %d\n", sizeof(void *));
  printf("sizeof(long long) = %d\n", sizeof(long long));
  printf("sizeof(long) = %d\n", sizeof(long));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"sizeof(void *) = %d\0A\00"
@.str.1 = [24 x i8] c"sizeof(long long) = %d\0A\00"
@.str.2 = [19 x i8] c"sizeof(long) = %d\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 8)
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 8)
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"sizeof(void *) = %d\0A\00"
@.str.1 = [24 x i8] c"sizeof(long long) = %d\0A\00"
@.str.2 = [19 x i8] c"sizeof(long) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 8)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ v4l2_ioctl(int, unsigned long, void *);
int v4l2_ioctl_swift(int fd, unsigned long int request, void *arg2) {
  v4l2_ioctl(fd, request, arg2);
}


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

x86 assembly (clang, -O2):
<v4l2_ioctl_swift>:
jmp    1030 <v4l2_ioctl@plt>

LLVM IR (-O0):
define i32 @v4l2_ioctl_swift(i32 %0, i64 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
%7 = alloca i8*
store i32 %0, i32* %5
store i64 %1, i64* %6
store i8* %2, i8** %7
%8 = load i32, i32* %5
%9 = load i64, i64* %6
%10 = load i8*, i8** %7
%11 = call i32 @v4l2_ioctl(i32 %8, i64 %9, i8* %10)
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
define i32 @v4l2_ioctl_swift(i32 %0, i64 %1, i8* %2) {
%4 = tail call i32 @v4l2_ioctl(i32 %0, i64 %1, i8* %2)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ log_monitor_init();
int /*<<< orphan*/ printf(char *);
int main() {
  log_monitor_init();
  printf("===========================log_monitor_init\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [44 x i8] c"===========================log_monitor_init\00"
define i32 @main() {
%1 = tail call i32 (...) @log_monitor_init()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ vcpuinsFinal();
void vcpuFinal() { vcpuinsFinal(); }


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

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

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

LLVM IR (-O2):
define void @vcpuFinal() {
%1 = tail call i32 (...) @vcpuinsFinal()
ret void
}
void BSPUT(s) int s;
{
  int i;
  i = 32;
  while (i > 0) {
    printf("%d", (((s >> (i - 1)) % 2) + 2) % 2);
    i = i - 1;
  };
}


x86 assembly (clang, -O0):
<BSPUT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x20,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    116a <BSPUT+0x5a>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
sar    %cl,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x2,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <BSPUT+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSPUT>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
mov    $0x21,%ebx
lea    0xede(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x2(%rbx),%ecx
mov    %ebp,%esi
shr    %cl,%esi
and    $0x1,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <BSPUT+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @BSPUT(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 32, %1 ], [ %4, %2 ]
%4 = add nsw i32 %3, -1
%5 = lshr i32 %0, %4
%6 = and i32 %5, 1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = icmp ugt i32 %3, 1
br i1 %8, label %2, label %9
9: ; preds = %2
ret void
}
void t24_helper(void) {}


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

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

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

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

/* Variables and functions */
__attribute__((always_)) void BME_OR_B(volatile uint8_t *addr,
                                       register uint8_t wdata) {
  *(volatile uint8_t *)((uint32_t)addr | (1 << 27)) = wdata;
}


x86 assembly (clang, -O0):
<BME_OR_B>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     $0x8000000,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BME_OR_B>:
movslq %edi,%rax
or     $0x8000000,%rax
mov    %esi,(%rax)
ret

LLVM IR (-O0):
define void @BME_OR_B(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 = ptrtoint i32* %6 to i32
%8 = or i32 %7, 134217728
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store volatile i32 %5, i32* %10
ret void
}

LLVM IR (-O2):
define void @BME_OR_B(i32* %0, i32 %1) {
%3 = ptrtoint i32* %0 to i64
%4 = shl i64 %3, 32
%5 = ashr exact i64 %4, 32
%6 = or i64 %5, 134217728
%7 = inttoptr i64 %6 to i32*
store volatile i32 %1, i32* %7
ret void
}
unsigned short rev2(unsigned short x) {
  return ((x & 0x00ff) << 8) | ((x & 0xff00) >> 8);
}


x86 assembly (clang, -O0):
<rev2>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
movzwl -0x2(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev2>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @rev2(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 255
%6 = shl i32 %5, 8
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = and i32 %8, 65280
%10 = ashr i32 %9, 8
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @rev2(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
double pon(int n) {
  double ans = 1.0;
  for (int i = 1; i < n; i++)
    ans *= -1;
  return ans;
}


x86 assembly (clang, -O0):
<pon>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  0xef1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1147 <pon+0x47>
movsd  0xed9(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <pon+0x1b>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pon>:
movsd  0xef8(%rip),%xmm0
cmp    $0x2,%edi
jl     1148 <pon+0x48>
lea    -0x1(%rdi),%ecx
add    $0xfffffffe,%edi
mov    %ecx,%eax
and    $0x7,%eax
cmp    $0x7,%edi
jb     1125 <pon+0x25>
and    $0xfffffff8,%ecx
add    $0xfffffff8,%ecx
jne    1120 <pon+0x20>
test   %eax,%eax
je     1148 <pon+0x48>
movsd  0xecf(%rip),%xmm0
movaps 0xed8(%rip),%xmm1
nopl   0x0(%rax,%rax,1)
xorps  %xmm1,%xmm0
add    $0xffffffff,%eax
jne    1140 <pon+0x40>
ret

LLVM IR (-O0):
define double @pon(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
store i32 %0, i32* %2
store double 1.000000e+00, double* %3
store i32 1, i32* %4
br label %5
5: ; preds = %12, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load double, double* %3
%11 = fmul double %10, -1.000000e+00
store double %11, double* %3
br label %12
12: ; preds = %9
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
br label %5
15: ; preds = %5
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
define double @pon(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %18
3: ; preds = %1
%4 = add i32 %0, -1
%5 = add i32 %0, -2
%6 = and i32 %4, 7
%7 = icmp ult i32 %5, 7
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = and i32 %4, -8
br label %20
10: ; preds = %20, %3
%11 = icmp eq i32 %6, 0
br i1 %11, label %18, label %12
12: ; preds = %10, %12
%13 = phi double [ %15, %12 ], [ 1.000000e+00, %10 ]
%14 = phi i32 [ %16, %12 ], [ 0, %10 ]
%15 = fneg double %13
%16 = add i32 %14, 1
%17 = icmp eq i32 %16, %6
br i1 %17, label %18, label %12
18: ; preds = %10, %12, %1
%19 = phi double [ 1.000000e+00, %1 ], [ 1.000000e+00, %10 ], [ %15, %12 ]
ret double %19
20: ; preds = %20, %8
%21 = phi i32 [ 0, %8 ], [ %22, %20 ]
%22 = add i32 %21, 8
%23 = icmp eq i32 %22, %9
br i1 %23, label %10, label %20
}
/* Variables and functions */
int /*<<< orphan*/ musicfree(void *);
void musicunload(const char *path, void *music, void *_info) {
  musicfree(music);
}


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

x86 assembly (clang, -O2):
<musicunload>:
mov    %rsi,%rdi
jmp    1030 <musicfree@plt>

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

LLVM IR (-O2):
define void @musicunload(i8* nocapture readnone %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @musicfree(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WRITETEST(char *);
void HomeUp() { WRITETEST("\033[H"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[H\00"
define void @HomeUp() {
%1 = call i32 @WRITETEST(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[H\00"
define void @HomeUp() {
%1 = tail call i32 @WRITETEST(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
char *langRomTypeSonyHbi55() { return "Sony HBI-55"; }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Sony HBI-55\00"
define i8* @langRomTypeSonyHbi55() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"Sony HBI-55\00"
define i8* @langRomTypeSonyHbi55() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
double carg(__complex__ double x) { return atan2(__imag__ x, __real__ x); }


x86 assembly (clang, -O0):
<carg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<carg>:
movaps %xmm0,%xmm2
movaps %xmm1,%xmm0
movaps %xmm2,%xmm1
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define double @carg(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 1
%7 = load double, double* %6
%8 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%9 = load double, double* %8
%10 = call double @atan2(double %7, double %9)
ret double %10
}

LLVM IR (-O2):
define double @carg(double %0, double %1) {
%3 = tail call double @atan2(double %1, double %0)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(long *, double *, int);
long Double_to_MINUS_bytes(double x) {
  long y;
  memcpy(&y, &x, sizeof(double));
  return y;
}


x86 assembly (clang, -O0):
<Double_to_MINUS_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Double_to_MINUS_bytes>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @Double_to_MINUS_bytes(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = call i32 @memcpy(i64* %3, double* %2, i32 8)
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @Double_to_MINUS_bytes(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = bitcast i64* %3 to i8*
%5 = call i32 @memcpy(i64* %3, double* %2, i32 8)
%6 = load i64, i64* %3
ret i64 %6
}
void delayacct_freepages_start(void) {}


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

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

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

LLVM IR (-O2):
define void @delayacct_freepages_start() {
ret void
}
long long GetVote(long long i) { return i % 2; }


x86 assembly (clang, -O0):
<GetVote>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetVote>:
mov    %rdi,%rax
mov    %rdi,%rcx
shr    $0x3f,%rcx
add    %rdi,%rcx
and    $0xfffffffffffffffe,%rcx
sub    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @GetVote(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = srem i64 %3, 2
ret i64 %4
}

LLVM IR (-O2):
define i64 @GetVote(i64 %0) {
%2 = srem i64 %0, 2
ret i64 %2
}
/* Type definitions */
struct regcache {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ alpha_supply_fp_regs(struct regcache *, int, char const *,
                                        char const *);
void alphabsd_supply_fpreg(struct regcache *regcache, const char *fpregs,
                           int regno) {
  alpha_supply_fp_regs(regcache, regno, fpregs, fpregs + 32 * 8);
}


x86 assembly (clang, -O0):
<alphabsd_supply_fpreg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x10(%rbp),%rcx
add    $0x100,%rcx
call   1030 <alpha_supply_fp_regs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alphabsd_supply_fpreg>:
mov    %rsi,%rax
lea    0x100(%rsi),%rcx
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <alpha_supply_fp_regs@plt>

LLVM IR (-O0):
%struct.regcache = type { i32 }
define void @alphabsd_supply_fpreg(%struct.regcache* %0, i8* %1, i32 %2) {
%4 = alloca %struct.regcache*
%5 = alloca i8*
%6 = alloca i32
store %struct.regcache* %0, %struct.regcache** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.regcache*, %struct.regcache** %4
%8 = load i32, i32* %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 256
%12 = call i32 @alpha_supply_fp_regs(%struct.regcache* %7, i32 %8, i8* %9, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.regcache = type { i32 }
define void @alphabsd_supply_fpreg(%struct.regcache* %0, i8* %1, i32 %2) {
%4 = getelementptr inbounds i8, i8* %1, i64 256
%5 = tail call i32 @alpha_supply_fp_regs(%struct.regcache* %0, i32 %2, i8* %1, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ puts(char *);
void printUsage(const char *command) {
  printf("Usage: %s [OPTION] file.IFF\n\n", command);
  puts(
      "The command `ilbmpp' displays a textual representation of a given IFF "
      "file\n"
      "containing ILBM form chunks, which can be used for manual inspection. "
      "If no\n"
      "IFF file is specified, it reads an IFF file from the standard input.\n"
      "Options:\n\n"
      "  -c, --disable-check    Do not check the IFF file\n"
      "  -h, --help             Shows the usage of this command to the user\n"
      "  -v, --version          Shows the version of this command to the user");
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: %s [OPTION] file.IFF\0A\0A\00"
@.str.1 = [421 x i8] c"The command `ilbmpp' displays a textual representation of a given IFF file\0Acontaining ILBM form chunks, which can be used for manual inspection. If no\0AIFF file is specified, it reads an IFF file from the standard input.\0AOptions:\0A\0A -c, --disable-check Do not check the IFF file\0A -h, --help Shows the usage of this command to the user\0A -v, --version Shows the version of this command to the user\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([421 x i8], [421 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Usage: %s [OPTION] file.IFF\0A\0A\00"
@.str.1 = [421 x i8] c"The command `ilbmpp' displays a textual representation of a given IFF file\0Acontaining ILBM form chunks, which can be used for manual inspection. If no\0AIFF file is specified, it reads an IFF file from the standard input.\0AOptions:\0A\0A -c, --disable-check Do not check the IFF file\0A -h, --help Shows the usage of this command to the user\0A -v, --version Shows the version of this command to the user\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([421 x i8], [421 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_unlock(pthread_mutex_t *mutex) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_mutex_unlock(i32* nocapture readnone %0) {
ret i32 1
}