xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ mock_push(int /*<<< orphan*/);
int /*<<< orphan*/ pack_glXGetAGPOffsetMESA(int /*<<< orphan*/ *, void const *);
unsigned int glXGetAGPOffsetMESA(const void *pointer) {
  { mock_push(pack_glXGetAGPOffsetMESA(NULL, pointer)); };
  return (unsigned int)0;
}


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

x86 assembly (clang, -O2):
<glXGetAGPOffsetMESA>:
push   %rax
mov    %rdi,%rsi
xor    %edi,%edi
call   1040 <pack_glXGetAGPOffsetMESA@plt>
mov    %eax,%edi
call   1030 <mock_push@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @glXGetAGPOffsetMESA(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @pack_glXGetAGPOffsetMESA(i32* null, i8* %3)
%5 = call i32 @mock_push(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @glXGetAGPOffsetMESA(i8* %0) {
%2 = tail call i32 @pack_glXGetAGPOffsetMESA(i32* null, i8* %0)
%3 = tail call i32 @mock_push(i32 %2)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
uint32_t power2round(uint32_t a, uint32_t *a0) {
  int32_t t;
  t = a & ((1 << 14U) - 1);
  t -= (1 << (14U - 1)) + 1;
  t += (t >> 31) & (1 << 14U);
  t -= (1 << (14U - 1)) - 1;
  *a0 = 8380417U + t;
  a = (a - t) >> 14U;
  return a;
}


x86 assembly (clang, -O0):
<power2round>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3fff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x2001,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1f,%eax
and    $0x4000,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1fff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
add    $0x7fe001,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
sub    -0x14(%rbp),%eax
sar    $0xe,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power2round>:
mov    %edi,%eax
and    $0x3fff,%eax
xor    %ecx,%ecx
sub    $0x2001,%eax
setb   %cl
shl    $0xe,%ecx
lea    (%rax,%rcx,1),%edx
add    $0x7fc002,%edx
add    %ecx,%eax
mov    %edx,(%rsi)
sub    %eax,%edi
lea    0x1fff(%rdi),%eax
sar    $0xe,%eax
ret

LLVM IR (-O0):
define i32 @power2round(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = and i32 %6, 16383
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = sub nsw i32 %8, 8193
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = ashr i32 %10, 31
%12 = and i32 %11, 16384
%13 = load i32, i32* %5
%14 = add nsw i32 %13, %12
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, 8191
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = add i32 8380417, %17
%19 = load i32*, i32** %4
store i32 %18, i32* %19
%20 = load i32, i32* %3
%21 = load i32, i32* %5
%22 = sub nsw i32 %20, %21
%23 = ashr i32 %22, 14
store i32 %23, i32* %3
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @power2round(i32 %0, i32* nocapture writeonly %1) {
%3 = and i32 %0, 16383
%4 = add nsw i32 %3, -8193
%5 = icmp ult i32 %3, 8193
%6 = select i1 %5, i32 16384, i32 0
%7 = add nsw i32 %4, %6
%8 = add nsw i32 %7, 8372226
store i32 %8, i32* %1
%9 = add i32 %0, 8191
%10 = sub i32 %9, %7
%11 = ashr i32 %10, 14
ret i32 %11
}
/* Type definitions */
struct MIDITimer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct MIDITimer *);
void MIDITimerDestroy(struct MIDITimer *timer) { free(timer); }


x86 assembly (clang, -O0):
<MIDITimerDestroy>:
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):
<MIDITimerDestroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.MIDITimer = type { i32 }
define void @MIDITimerDestroy(%struct.MIDITimer* nocapture %0) {
%2 = tail call i32 @free(%struct.MIDITimer* %0)
ret void
}
const char *jac_chain_nm3_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  case 1:
    return "i1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<jac_chain_nm3_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <jac_chain_nm3_name_in+0x2b>
jmp    111a <jac_chain_nm3_name_in+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <jac_chain_nm3_name_in+0x3b>
jmp    114b <jac_chain_nm3_name_in+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <jac_chain_nm3_name_in+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <jac_chain_nm3_name_in+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm3_name_in>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @jac_chain_nm3_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @jac_chain_nm3_name_in(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ SYS_setsid;
long syscall1(int /*<<< orphan*/, int /*<<< orphan*/);
long setsid(void) { return syscall1(SYS_setsid, 0); }


x86 assembly (clang, -O0):
<setsid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <syscall1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setsid>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <syscall1@plt>

LLVM IR (-O0):
@SYS_setsid = global i32 0
define i64 @setsid() {
%1 = load i32, i32* @SYS_setsid
%2 = call i64 @syscall1(i32 %1, i32 0)
ret i64 %2
}

LLVM IR (-O2):
@SYS_setsid = global i32 0
define i64 @setsid() {
%1 = load i32, i32* @SYS_setsid
%2 = tail call i64 @syscall1(i32 %1, i32 0)
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int main() {
  FILE *a = fopen("good.c", "r");
  if (!a)
    return 0;
  fclose(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115d <main+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    116d <main+0x4d>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <main+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"good.c\00"
@.str.1 = [2 x i8] c"r\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = icmp ne i32* %4, null
br i1 %5, label %7, label %6
6: ; preds = %0
store i32 0, i32* %1
br label %10
7: ; preds = %0
%8 = load i32*, i32** %2
%9 = call i32 @fclose(i32* %8)
store i32 0, i32* %1
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"good.c\00"
@.str.1 = [2 x i8] c"r\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @fclose(i32* %1)
br label %5
5: ; preds = %0, %3
ret i32 0
}
/* Variables and functions */
int mp_snprint_internal(char *, int, char const **);
int mp_snprint(char *buf, int size, const char *data) {
  return mp_snprint_internal(buf, size, &data);
}


x86 assembly (clang, -O0):
<mp_snprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x18(%rbp),%rdx
call   1030 <mp_snprint_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_snprint>:
push   %rax
mov    %rdx,(%rsp)
mov    %rsp,%rdx
call   1030 <mp_snprint_internal@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @mp_snprint(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
store i8* %2, i8** %4
%5 = call i32 @mp_snprint_internal(i8* %0, i32 %1, i8** %4)
ret i32 %5
}
/* Variables and functions */
short ulaw_to_s16(unsigned char);
void mulaw_dec(char *mulaw_data, char *s16_data) {
  int i;
  for (i = 0; i < 160; i++) {
    *((signed short *)s16_data) = ulaw_to_s16((unsigned char)mulaw_data[i]);
    s16_data += 2;
  }
}


x86 assembly (clang, -O0):
<mulaw_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa0,-0x14(%rbp)
jge    1169 <mulaw_dec+0x59>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1030 <ulaw_to_s16@plt>
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <mulaw_dec+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mulaw_dec>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   (%rax)
movzbl (%r15,%rbx,1),%edi
call   1030 <ulaw_to_s16@plt>
mov    %ax,(%r14,%rbx,2)
add    $0x1,%rbx
cmp    $0xa0,%rbx
jne    1120 <mulaw_dec+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @mulaw_dec(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 = %20, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 160
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i8*, i8** %3
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = call signext i16 @ulaw_to_s16(i8 zeroext %14)
%16 = load i8*, i8** %4
%17 = bitcast i8* %16 to i16*
store i16 %15, i16* %17
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 2
store i8* %19, i8** %4
br label %20
20: ; preds = %9
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %6
23: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @mulaw_dec(i8* nocapture %0, i8* nocapture writeonly %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %11, %3 ]
%5 = phi i8* [ %1, %2 ], [ %10, %3 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %4
%7 = load i8, i8* %6
%8 = tail call signext i16 @ulaw_to_s16(i8 zeroext %7)
%9 = bitcast i8* %5 to i16*
store i16 %8, i16* %9
%10 = getelementptr inbounds i8, i8* %5, i64 2
%11 = add nuw nsw i64 %4, 1
%12 = icmp eq i64 %11, 160
br i1 %12, label %13, label %3
13: ; preds = %3
ret void
}
/* Type definitions */
struct timespec {
  unsigned long long tv_sec;
  unsigned long long tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
unsigned long long rdclock(void) {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
}


x86 assembly (clang, -O0):
<rdclock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdclock>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x8(%rsp),%rax
9a 3b
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @rdclock() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @rdclock() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = mul i64 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %7, %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set(int, int);
void go_up() {
  gpio_set((27), 1);
  gpio_set((47), 0);
}


x86 assembly (clang, -O0):
<go_up>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x2f,%edi
xor    %esi,%esi
call   1030 <gpio_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_up>:
push   %rax
mov    $0x1b,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x2f,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <gpio_set@plt>

LLVM IR (-O0):
define void @go_up() {
%1 = call i32 @gpio_set(i32 27, i32 1)
%2 = call i32 @gpio_set(i32 47, i32 0)
ret void
}

LLVM IR (-O2):
define void @go_up() {
%1 = tail call i32 @gpio_set(i32 27, i32 1)
%2 = tail call i32 @gpio_set(i32 47, i32 0)
ret void
}
void RTCritSectSetSubClass(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCritSectSetSubClass() {
ret void
}
/* Variables and functions */
long double expm1(long double);
long double expm1l(long double a1) { return expm1(a1); }


x86 assembly (clang, -O0):
<expm1l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <expm1@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expm1l>:
jmp    1030 <expm1@plt>

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

LLVM IR (-O2):
define x86_fp80 @expm1l(x86_fp80 %0) {
%2 = tail call x86_fp80 @expm1(x86_fp80 %0)
ret x86_fp80 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int const, int const, int);
uint16_t ReadUint16BE(const uint8_t *data) {
  assert(data != NULL);
  uint16_t be = data[0] << 8 | data[1] << 0;
  printf("R 16 BE: \"0x%02x%02x\" -> 0x%04x\n", data[0], data[1], be);
  return be;
}


x86 assembly (clang, -O0):
<ReadUint16BE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0xc(%rbp),%ecx
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadUint16BE>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    (%rbx),%esi
mov    0x4(%rbx),%edx
mov    %esi,%ebx
shl    $0x8,%ebx
or     %edx,%ebx
lea    0xebb(%rip),%rdi
mov    %ebx,%ecx
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"R 16 BE: \220x%02x%02x\22 -> 0x%04x\0A\00"
define i32 @ReadUint16BE(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = shl i32 %10, 8
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = shl i32 %14, 0
%16 = or i32 %11, %15
store i32 %16, i32* %3
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 0
%19 = load i32, i32* %18
%20 = load i32*, i32** %2
%21 = getelementptr inbounds i32, i32* %20, i64 1
%22 = load i32, i32* %21
%23 = load i32, i32* %3
%24 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %19, i32 %22, i32 %23)
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str = [33 x i8] c"R 16 BE: \220x%02x%02x\22 -> 0x%04x\0A\00"
define i32 @ReadUint16BE(i32* %0) {
%2 = icmp ne i32* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load i32, i32* %0
%6 = shl i32 %5, 8
%7 = getelementptr inbounds i32, i32* %0, i64 1
%8 = load i32, i32* %7
%9 = or i32 %6, %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8, i32 %9)
ret i32 %9
}
int airtime_policy_new_sta(struct hostapd_data *hapd, struct sta_info *sta) {
  return -1;
}


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

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

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

LLVM IR (-O2):
%struct.hostapd_data = type opaque
%struct.sta_info = type opaque
define i32 @airtime_policy_new_sta(%struct.hostapd_data* nocapture readnone %0, %struct.sta_info* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
size_t strlcpy(char *, char const *, size_t);
size_t strxfrm(char *restrict dest, const char *restrict source, size_t size) {
  return strlcpy(dest, source, size);
}


x86 assembly (clang, -O0):
<strxfrm>:
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
mov    -0x18(%rbp),%rdx
call   1030 <strlcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strxfrm>:
jmp    1030 <strlcpy@plt>

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

LLVM IR (-O2):
define i64 @strxfrm(i8* noalias %0, i8* noalias %1, i64 %2) {
%4 = tail call i64 @strlcpy(i8* %0, i8* %1, i64 %2)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void main() {
  long long a = 1112744053;
  puts((char *)&a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x42532075,-0x8(%rbp)
42
lea    -0x8(%rbp),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movq   $0x42532075,(%rsp)
42
mov    %rsp,%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i64
store i64 1112744053, i64* %1
%2 = bitcast i64* %1 to i8*
%3 = call i32 @puts(i8* %2)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 1112744053, i64* %1
%3 = call i32 @puts(i8* %2)
ret void
}
/* Variables and functions */
__attribute__((visibility("default"))) void *
sd_bus_slot_get_current_handler(void *slot) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @sd_bus_slot_get_current_handler(i8* nocapture readnone %0) {
ret i8* null
}
unsigned int bit_one_contagious_uint(unsigned int val) {
  return (((val) << 1) | (val) | ((val) >> 1));
}


x86 assembly (clang, -O0):
<bit_one_contagious_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
or     -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_one_contagious_uint>:
lea    (%rdi,%rdi,1),%eax
or     %edi,%eax
shr    %edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @bit_one_contagious_uint(i32 %0) {
%2 = shl i32 %0, 1
%3 = or i32 %2, %0
%4 = lshr i32 %0, 1
%5 = or i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  int a = 2;
  int b = 2;
  __VERIFIER_assert(a != b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp ne i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @__VERIFIER_assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void print_error(char *description, char *error) {
  fprintf(stderr, "[annelid]: %s failed: %s.\n", description, error);
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error>:
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"[annelid]: %s failed: %s.\0A\00"
define void @print_error(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"[annelid]: %s failed: %s.\0A\00"
define void @print_error(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int, int);
char *print_csid(char *csid) {
  static char buf[128];
  int *icsid = (int *)csid;
  sprintf(buf, "[%x.%x.%x.%x]", icsid[0], icsid[1], icsid[2], icsid[3]);
  return buf;
}


x86 assembly (clang, -O0):
<print_csid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%r8d
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%r9d
lea    0x2ef8(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ee5(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_csid>:
push   %rbx
mov    (%rdi),%edx
mov    0x4(%rdi),%ecx
mov    0x8(%rdi),%r8d
mov    0xc(%rdi),%r9d
lea    0x2f1b(%rip),%rbx
lea    0xed4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@print_csid.buf = internal global [128 x i8] zeroinitializer
@.str = [14 x i8] c"[%x.%x.%x.%x]\00"
define i8* @print_csid(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 3
%17 = load i32, i32* %16
%18 = call i32 @sprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @print_csid.buf, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %11, i32 %14, i32 %17)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @print_csid.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@print_csid.buf = internal global [128 x i8] zeroinitializer
@.str = [14 x i8] c"[%x.%x.%x.%x]\00"
define i8* @print_csid(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = getelementptr inbounds i8, i8* %0, i64 4
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = getelementptr inbounds i8, i8* %0, i64 8
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
%10 = getelementptr inbounds i8, i8* %0, i64 12
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
%13 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @print_csid.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6, i32 %9, i32 %12)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @print_csid.buf, i64 0, i64 0)
}
int f1() {
  int x;
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @f1() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ide_read_data(int, int);
uint16_t readidew(int ide_board) { return ide_read_data(ide_board, 2); }


x86 assembly (clang, -O0):
<readidew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <ide_read_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readidew>:
mov    $0x2,%esi
jmp    1030 <ide_read_data@plt>

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

LLVM IR (-O2):
define i32 @readidew(i32 %0) {
%2 = tail call i32 @ide_read_data(i32 %0, i32 2)
ret i32 %2
}
/* Variables and functions */
scalar_t__ get_pid_from_proc_self();
scalar_t__ getpid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("PID reported by /proc/self is: %d\n", (int)get_pid_from_proc_self());
  printf("PID reported by getpid() is: %d\n", (int)getpid());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <get_pid_from_proc_self@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"PID reported by /proc/self is: %d\0A\00"
@.str.1 = [33 x i8] c"PID reported by getpid() is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @get_pid_from_proc_self()
%3 = trunc i64 %2 to i32
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i64 (...) @getpid()
%6 = trunc i64 %5 to i32
%7 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"PID reported by /proc/self is: %d\0A\00"
@.str.1 = [33 x i8] c"PID reported by getpid() is: %d\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @get_pid_from_proc_self()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i64 (...) @getpid()
%5 = trunc i64 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ get_uint24(int /*<<< orphan*/ *, int /*<<< orphan*/);
uint32_t format_address_physical_cylinder(uint8_t *data) {
  return get_uint24(data, 0);
}


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

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

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

LLVM IR (-O2):
define i32 @format_address_physical_cylinder(i32* %0) {
%2 = tail call i32 @get_uint24(i32* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_pstream_send_memblock() {
  printf("NOT IMPLEMENTED:"
         "pa_pstream_send_memblock"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_pstream_send_memblock\00"
define i32 @pa_pstream_send_memblock() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
double T_me(double hw, int n1, int n2, int l) {
  if (n1 == n2)
    return hw * (2 * n1 + l + 1.5);
  else
    return 0.;
}


x86 assembly (clang, -O0):
<T_me>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    114a <T_me+0x4a>
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
add    -0x1c(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xec8(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1152 <T_me+0x52>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<T_me>:
xorpd  %xmm1,%xmm1
cmp    %esi,%edi
jne    111e <T_me+0x1e>
lea    (%rdx,%rdi,2),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
addsd  0xee6(%rip),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @T_me(double %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store double %0, double* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %22
13: ; preds = %4
%14 = load double, double* %6
%15 = load i32, i32* %7
%16 = mul nsw i32 2, %15
%17 = load i32, i32* %9
%18 = add nsw i32 %16, %17
%19 = sitofp i32 %18 to double
%20 = fadd double %19, 1.500000e+00
%21 = fmul double %14, %20
store double %21, double* %5
br label %23
22: ; preds = %4
store double 0.000000e+00, double* %5
br label %23
23: ; preds = %22, %13
%24 = load double, double* %5
ret double %24
}

LLVM IR (-O2):
define double @T_me(double %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %1, %2
br i1 %5, label %6, label %12
6: ; preds = %4
%7 = shl nsw i32 %1, 1
%8 = add nsw i32 %7, %3
%9 = sitofp i32 %8 to double
%10 = fadd double %9, 1.500000e+00
%11 = fmul double %10, %0
br label %12
12: ; preds = %4, %6
%13 = phi double [ %11, %6 ], [ 0.000000e+00, %4 ]
ret double %13
}
int hamming_distance(int v_1, int v_2) {
  int i, count;
  count = 0;
  for (i = 0; i < sizeof(int) * 8; i++) {
    count += ((v_1 & (1 << i)) ^ (v_2 & (1 << i))) >> i;
  }
  return count;
}


x86 assembly (clang, -O0):
<hamming_distance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x20,%rax
jae    1167 <hamming_distance+0x67>
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x14(%rbp),%ecx
and    %edx,%ecx
xor    %ecx,%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1118 <hamming_distance+0x18>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hamming_distance>:
xor    %esi,%edi
xor    %eax,%eax
xor    %r8d,%r8d
nopw   0x0(%rax,%rax,1)
mov    $0x1,%edx
mov    %r8d,%ecx
shl    %cl,%edx
and    %edi,%edx
sar    %cl,%edx
lea    0x1(%r8),%ecx
mov    $0x1,%esi
shl    %cl,%esi
and    %edi,%esi
sar    %cl,%esi
add    %eax,%edx
add    %edx,%esi
lea    0x2(%r8),%ecx
mov    $0x1,%edx
shl    %cl,%edx
and    %edi,%edx
sar    %cl,%edx
lea    0x3(%r8),%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %edi,%eax
sar    %cl,%eax
add    %esi,%edx
add    %edx,%eax
add    $0x4,%r8d
cmp    $0x20,%r8d
jne    1110 <hamming_distance+0x10>
ret

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

LLVM IR (-O2):
define i32 @hamming_distance(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
br label %4
4: ; preds = %4, %2
%5 = phi i32 [ 0, %2 ], [ %25, %4 ]
%6 = phi i32 [ 0, %2 ], [ %26, %4 ]
%7 = shl nuw i32 1, %6
%8 = and i32 %7, %3
%9 = ashr i32 %8, %6
%10 = add nsw i32 %9, %5
%11 = or i32 %6, 1
%12 = shl nuw i32 1, %11
%13 = and i32 %12, %3
%14 = ashr i32 %13, %11
%15 = add nsw i32 %14, %10
%16 = or i32 %6, 2
%17 = shl nuw i32 1, %16
%18 = and i32 %17, %3
%19 = ashr i32 %18, %16
%20 = add nsw i32 %19, %15
%21 = or i32 %6, 3
%22 = shl nuw i32 1, %21
%23 = and i32 %22, %3
%24 = ashr i32 %23, %21
%25 = add nsw i32 %24, %20
%26 = add nuw nsw i32 %6, 4
%27 = icmp eq i32 %26, 32
br i1 %27, label %28, label %4
28: ; preds = %4
ret i32 %25
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ height;
};
struct TYPE_4__ {
  TYPE_1__ xexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xexpose_height(void *_p) {
  return (int)((XEvent *)_p)->xexpose.height;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xexpose_height(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xexpose_height(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
double tan(double);
double fpu_ftan(double a) {
  double b;
  b = tan(a);
  return b;
}


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

x86 assembly (clang, -O2):
<fpu_ftan>:
jmp    1030 <tan@plt>

LLVM IR (-O0):
define double @fpu_ftan(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @tan(double %4)
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @fpu_ftan(double %0) {
%2 = tail call double @tan(double %0)
ret double %2
}
float *tv(float x, float y, float z) {
  static int index;
  static float vecs[8][3];
  float *v;
  v = vecs[index];
  index = (index + 1) & 7;
  v[0] = x;
  v[1] = y;
  v[2] = z;
  return v;
}


x86 assembly (clang, -O0):
<tv>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movslq 0x2f16(%rip),%rcx
lea    0x2f1f(%rip),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    0x2efe(%rip),%eax
add    $0x1,%eax
and    $0x7,%eax
mov    %eax,0x2ef2(%rip)
movss  -0x4(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tv>:
mov    0x2f2a(%rip),%ecx
lea    (%rcx,%rcx,2),%rdx
lea    0x2f2f(%rip),%rsi
lea    (%rsi,%rdx,4),%rax
add    $0x1,%ecx
and    $0x7,%ecx
mov    %ecx,0x2f0f(%rip)
movss  %xmm0,(%rsi,%rdx,4)
movss  %xmm1,0x4(%rsi,%rdx,4)
movss  %xmm2,0x8(%rsi,%rdx,4)
ret

LLVM IR (-O0):
@tv.index = internal global i32 0
@tv.vecs = internal global [8 x [3 x float]] zeroinitializer
define float* @tv(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float*
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load i32, i32* @tv.index
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [8 x [3 x float]], [8 x [3 x float]]* @tv.vecs, i64 0, i64 %9
%11 = getelementptr inbounds [3 x float], [3 x float]* %10, i64 0, i64 0
store float* %11, float** %7
%12 = load i32, i32* @tv.index
%13 = add nsw i32 %12, 1
%14 = and i32 %13, 7
store i32 %14, i32* @tv.index
%15 = load float, float* %4
%16 = load float*, float** %7
%17 = getelementptr inbounds float, float* %16, i64 0
store float %15, float* %17
%18 = load float, float* %5
%19 = load float*, float** %7
%20 = getelementptr inbounds float, float* %19, i64 1
store float %18, float* %20
%21 = load float, float* %6
%22 = load float*, float** %7
%23 = getelementptr inbounds float, float* %22, i64 2
store float %21, float* %23
%24 = load float*, float** %7
ret float* %24
}

LLVM IR (-O2):
@tv.index = internal unnamed_addr global i32 0
@tv.vecs = internal global [8 x [3 x float]] zeroinitializer
define float* @tv(float %0, float %1, float %2) {
%4 = load i32, i32* @tv.index
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds [8 x [3 x float]], [8 x [3 x float]]* @tv.vecs, i64 0, i64 %5, i64 0
%7 = add nsw i32 %4, 1
%8 = and i32 %7, 7
store i32 %8, i32* @tv.index
store float %0, float* %6
%9 = getelementptr inbounds [8 x [3 x float]], [8 x [3 x float]]* @tv.vecs, i64 0, i64 %5, i64 1
store float %1, float* %9
%10 = getelementptr inbounds [8 x [3 x float]], [8 x [3 x float]]* @tv.vecs, i64 0, i64 %5, i64 2
store float %2, float* %10
ret float* %6
}
/* Variables and functions */
scalar_t__ ECONNRESET;
scalar_t__ errno;
int connection_reset() { return errno == ECONNRESET; }


x86 assembly (clang, -O0):
<connection_reset>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%rax
mov    0x2ecb(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<connection_reset>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%rcx
mov    0x2ecf(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
sete   %al
ret

LLVM IR (-O0):
@errno = global i64 0
@ECONNRESET = global i64 0
define i32 @connection_reset() {
%1 = load i64, i64* @errno
%2 = load i64, i64* @ECONNRESET
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
@errno = global i64 0
@ECONNRESET = global i64 0
define i32 @connection_reset() {
%1 = load i64, i64* @errno
%2 = load i64, i64* @ECONNRESET
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
int fputc(int ch, FILE *stream) {
  SendChar(ch);
  return ch;
}


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

x86 assembly (clang, -O2):
<fputc>:
push   %rbx
mov    %edi,%ebx
call   1030 <SendChar@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fputc(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 = call i32 @SendChar(i32 %5)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @fputc(i32 returned %0, i32* nocapture readnone %1) {
%3 = tail call i32 @SendChar(i32 %0)
ret i32 %0
}
/* Variables and functions */
scalar_t__ pthread_self();
void *backend_get_thread(void) { return (void *)pthread_self(); }


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

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

LLVM IR (-O0):
define i8* @backend_get_thread() {
%1 = call i64 (...) @pthread_self()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @backend_get_thread() {
%1 = tail call i64 (...) @pthread_self()
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
/* Variables and functions */
scalar_t__ syscall(int, unsigned int);
long ledctl(unsigned int mask) { return (long)syscall(316, mask); }


x86 assembly (clang, -O0):
<ledctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x13c,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ledctl>:
mov    %edi,%esi
mov    $0x13c,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i64 @ledctl(i32 %0) {
%2 = tail call i64 @syscall(i32 316, i32 %0)
ret i64 %2
}