xunge/DecIR huggingface dataset:
char get_bit(char b, int pos) {
  b >>= pos;
  b &= 0x01;
  return b;
}


x86 assembly (clang, -O0):
<get_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
movsbl -0x1(%rbp),%eax
sar    %cl,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x1,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%al
ret

LLVM IR (-O0):
define signext i8 @get_bit(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = ashr i32 %7, %5
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = and i32 %11, 1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %3
%14 = load i8, i8* %3
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @get_bit(i8 signext %0, i32 %1) {
%3 = sext i8 %0 to i32
%4 = lshr i32 %3, %1
%5 = trunc i32 %4 to i8
%6 = and i8 %5, 1
ret i8 %6
}
void cbmap_nop_deallocator(void *data) { ; }


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

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

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

LLVM IR (-O2):
define void @cbmap_nop_deallocator(i8* nocapture %0) {
ret void
}
void RTRandAdvDestroy(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int *foo() {
  int i;
  int array[5];
  printf("%p\n", array);
  printf("%lu\n", sizeof(array));
  for (i = 0; i < 5; i++) {
    array[i] = 42;
  }
  return array;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rsi
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x14,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1168 <foo+0x58>
movslq -0x4(%rbp),%rax
movl   $0x2a,-0x20(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <foo+0x34>
lea    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
sub    $0x20,%rsp
lea    0xee4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%p\0A\00"
@.str.1 = [5 x i8] c"%lu\0A\00"
define i32* @foo() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 20)
store i32 0, i32* %1
br label %6
6: ; preds = %13, %0
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 5
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %11
store i32 42, i32* %12
br label %13
13: ; preds = %9
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %6
16: ; preds = %6
%17 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
ret i32* %17
}

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
@.str.1 = [5 x i8] c"%lu\0A\00"
define i32* @foo() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 20)
ret i32* %3
}
void deallocRedis() {}


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

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

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

LLVM IR (-O2):
define void @deallocRedis() {
ret void
}
int bit_DR(unsigned char reg_value) { return (reg_value & 0x02) == 0x02; }


x86 assembly (clang, -O0):
<bit_DR>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x2,%eax
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_DR>:
shr    %dil
and    $0x1,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @bit_DR(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 2
%6 = icmp eq i32 %5, 2
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @bit_DR(i8 zeroext %0) {
%2 = lshr i8 %0, 1
%3 = and i8 %2, 1
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR62_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR62_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMR62_swap(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 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMR62_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
int rte_oo_objects(unsigned long x) { return x & ((1UL << 16) - 1); }


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

x86 assembly (clang, -O2):
<rte_oo_objects>:
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @rte_oo_objects(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 65535
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @rte_oo_objects(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 65535
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
uint64_t bound_uint64(uint64_t val, uint64_t min, uint64_t max) {
  return val < min ? min : (val > max ? max : val);
}


x86 assembly (clang, -O0):
<bound_uint64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    112b <bound_uint64+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1156 <bound_uint64+0x56>
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1146 <bound_uint64+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    114e <bound_uint64+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bound_uint64>:
mov    %rdx,%rax
cmp    %rdx,%rdi
cmovle %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @bound_uint64(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = icmp slt i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i64, i64* %5
br label %22
12: ; preds = %3
%13 = load i64, i64* %4
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i64, i64* %6
br label %20
18: ; preds = %12
%19 = load i64, i64* %4
br label %20
20: ; preds = %18, %16
%21 = phi i64 [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi i64 [ %11, %10 ], [ %21, %20 ]
ret i64 %23
}

LLVM IR (-O2):
define i64 @bound_uint64(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = icmp sgt i64 %0, %2
%6 = select i1 %5, i64 %2, i64 %0
%7 = select i1 %4, i64 %1, i64 %6
ret i64 %7
}
/* Variables and functions */
int foo(long long);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int r = foo(4294967295LL);
  printf("foo = %d\n", r);
  return r;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffffffff,%edi
call   1040 <foo@plt>
mov    %eax,%ebx
lea    0xecc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

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

/* Variables and functions */
char *appendString(char *, char *);
int /*<<< orphan*/ puts(char *);
void removeComment(FILE *oldFile, char *originalFileName) {
  char *foo = appendString(originalFileName, ".strip");
  puts(foo);
}


x86 assembly (clang, -O0):
<removeComment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <appendString@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c".strip\00"
define void @removeComment(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i8* @appendString(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = call i32 @puts(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c".strip\00"
define void @removeComment(i32* nocapture readnone %0, i8* %1) {
%3 = tail call i8* @appendString(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
void swap(int *v1, int *v2) {
  int tmp = *v1;
  *v1 = *v2;
  *v2 = tmp;
}


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

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

LLVM IR (-O0):
define void @swap(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 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
double divisao(double v1, double v2) { return v1 / v2; }


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

x86 assembly (clang, -O2):
<divisao>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @divisao(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @divisao(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ usicSendCh0Byte();
void usicSendCh0(void) {
  (*((volatile unsigned int *const)(0x48000000 + 0x108))) |= (1 << 30);
  usicSendCh0Byte();
}


x86 assembly (clang, -O0):
<usicSendCh0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x48000108,%eax
mov    (%rax),%ecx
or     $0x40000000,%ecx
mov    $0x48000108,%eax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <usicSendCh0Byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usicSendCh0>:
orl    $0x40000000,0x48000108
xor    %eax,%eax
jmp    1030 <usicSendCh0Byte@plt>

LLVM IR (-O0):
define void @usicSendCh0() {
%1 = load volatile i32, i32* inttoptr (i64 1207959816 to i32*)
%2 = or i32 %1, 1073741824
store volatile i32 %2, i32* inttoptr (i64 1207959816 to i32*)
%3 = call i32 (...) @usicSendCh0Byte()
ret void
}

LLVM IR (-O2):
define void @usicSendCh0() {
%1 = load volatile i32, i32* inttoptr (i64 1207959816 to i32*)
%2 = or i32 %1, 1073741824
store volatile i32 %2, i32* inttoptr (i64 1207959816 to i32*)
%3 = tail call i32 (...) @usicSendCh0Byte()
ret void
}
void av_twofish_init() {}


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

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

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

LLVM IR (-O2):
define void @av_twofish_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ULONG_MAX;
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  printf("ULONG_MAX: %lu\n", ULONG_MAX);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"ULONG_MAX: %lu\0A\00"
@ULONG_MAX = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @ULONG_MAX
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"ULONG_MAX: %lu\0A\00"
@ULONG_MAX = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @ULONG_MAX
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
struct t_hashtable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(void *);
void string_shared_free_key(struct t_hashtable *hashtable, void *key) {
  (void)hashtable;
  free(key);
}


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

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

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

LLVM IR (-O2):
%struct.t_hashtable = type { i32 }
define void @string_shared_free_key(%struct.t_hashtable* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
int ti_linreg_start(double const *options) { return (int)options[0] - 1; }


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

x86 assembly (clang, -O2):
<ti_linreg_start>:
cvttsd2si (%rdi),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ti_linreg_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @ti_linreg_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = add nsw i32 %3, -1
ret i32 %4
}
void pktrelease(struct modemchannel *chan) {}


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

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

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

LLVM IR (-O2):
%struct.modemchannel = type opaque
define void @pktrelease(%struct.modemchannel* nocapture %0) {
ret void
}
/* Variables and functions */
double sin(double);
double wdsin_(double *x) { return sin(*x); }


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

x86 assembly (clang, -O2):
<wdsin_>:
movsd  (%rdi),%xmm0
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @wdsin_(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call double @sin(double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wifidirect_peristent_group_usage(void) {
  printf("\nUsage : wifidirect_cfg_persistent_group_record [index]             "
         "<role> <bssid> <groupdevid> <ssid> <psk>>             [<peermac1> "
         "<peermac2> ]\n");
  printf("\nIssue set or get request using appropriate parameters.\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_wifidirect_peristent_group_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6f(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [148 x i8] c"\0AUsage : wifidirect_cfg_persistent_group_record [index] <role> <bssid> <groupdevid> <ssid> <psk>> [<peermac1> <peermac2> ]\0A\00"
@.str.1 = [57 x i8] c"\0AIssue set or get request using appropriate parameters.\0A\00"
define void @print_wifidirect_peristent_group_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [147 x i8] c"\0AUsage : wifidirect_cfg_persistent_group_record [index] <role> <bssid> <groupdevid> <ssid> <psk>> [<peermac1> <peermac2> ]\00"
@str.2 = [56 x i8] c"\0AIssue set or get request using appropriate parameters.\00"
define void @print_wifidirect_peristent_group_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([147 x i8], [147 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct memb_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memb_free(struct memb_s *);
int /*<<< orphan*/ memset(struct memb_s *, int /*<<< orphan*/, int);
void memb_wipe(struct memb_s *memb, int size) {
  if (memb) {
    memb_free(memb);
    memset((memb), 0, (size));
  }
}


x86 assembly (clang, -O0):
<memb_wipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1151 <memb_wipe+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <memb_free@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1040 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memb_wipe>:
test   %rdi,%rdi
je     1144 <memb_wipe+0x24>
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <memb_free@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <memset@plt>
ret

LLVM IR (-O0):
%struct.memb_s = type { i32 }
define void @memb_wipe(%struct.memb_s* %0, i32 %1) {
%3 = alloca %struct.memb_s*
%4 = alloca i32
store %struct.memb_s* %0, %struct.memb_s** %3
store i32 %1, i32* %4
%5 = load %struct.memb_s*, %struct.memb_s** %3
%6 = icmp ne %struct.memb_s* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load %struct.memb_s*, %struct.memb_s** %3
%9 = call i32 @memb_free(%struct.memb_s* %8)
%10 = load %struct.memb_s*, %struct.memb_s** %3
%11 = load i32, i32* %4
%12 = call i32 @memset(%struct.memb_s* %10, i32 0, i32 %11)
br label %13
13: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
%struct.memb_s = type { i32 }
define void @memb_wipe(%struct.memb_s* %0, i32 %1) {
%3 = icmp eq %struct.memb_s* %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @memb_free(%struct.memb_s* %0)
%6 = tail call i32 @memset(%struct.memb_s* %0, i32 0, i32 %1)
br label %7
7: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, char const *);
void _list_one_line(unsigned char nl, long l, const char *ln) {
  printf(nl ? "%ld]%s\n" : "%ld]%s", l, ln);
}


x86 assembly (clang, -O0):
<_list_one_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movzbl -0x1(%rbp),%ecx
lea    0xed7(%rip),%rdi
lea    0xec8(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_list_one_line>:
test   %edi,%edi
lea    0xeef(%rip),%rax
lea    0xee0(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%ld]%s\0A\00"
@.str.1 = [7 x i8] c"%ld]%s\00"
define void @_list_one_line(i8 zeroext %0, i64 %1, i8* %2) {
%4 = alloca i8
%5 = alloca i64
%6 = alloca i8*
store i8 %0, i8* %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
%12 = load i64, i64* %5
%13 = load i8*, i8** %6
%14 = call i32 @printf(i8* %11, i64 %12, i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%ld]%s\0A\00"
@.str.1 = [7 x i8] c"%ld]%s\00"
define void @_list_one_line(i8 zeroext %0, i64 %1, i8* %2) {
%4 = icmp eq i8 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @printf(i8* %5, i64 %1, i8* %2)
ret void
}
void gtk_message_dialog_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_message_dialog_new() {
ret void
}
int chdir(const char *path) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(path);
  return -1;
}


x86 assembly (clang, -O0):
<chdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chdir>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.chdir = [6 x i8] c"chdir\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @chdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.chdir, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%7 = load i8*, i8** %2
ret i32 -1
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.chdir = [6 x i8] c"chdir\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @chdir(i8* nocapture readnone %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.chdir, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret i32 -1
}
void ESS_mcdisplay_flat(double geometry) {}


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

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

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

LLVM IR (-O2):
define void @ESS_mcdisplay_flat(double %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EMLINK;
int /*<<< orphan*/ errno;
__attribute__((weak)) int _link(char *old, char *new) {
  do {
    (void)(old);
  } while (0);
  do {
    (void)(new);
  } while (0);
  errno = EMLINK;
  return -1;
}


x86 assembly (clang, -O0):
<_link>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1111 <_link+0x11>
mov    0x2ed8(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb7(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_link>:
mov    0x2ee9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EMLINK = global i32 0
@errno = global i32 0
define weak i32 @_link(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %2
%6 = load i8*, i8** %3
br label %7
7: ; preds = %5
br label %8
8: ; preds = %7
%9 = load i8*, i8** %4
br label %10
10: ; preds = %8
%11 = load i32, i32* @EMLINK
store i32 %11, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EMLINK = global i32 0
@errno = global i32 0
define weak i32 @_link(i8* %0, i8* %1) {
%3 = load i32, i32* @EMLINK
store i32 %3, i32* @errno
ret i32 -1
}
int do_129() { return 129; }


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

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

LLVM IR (-O0):
define i32 @do_129() {
ret i32 129
}

LLVM IR (-O2):
define i32 @do_129() {
ret i32 129
}
/* Variables and functions */
double atof(char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
main() {
  char s[20];
  double f;
  printf("input:");
  gets(s);
  f = atof(s);
  printf("%f\n", f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x20(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <atof@plt>
lea    0xeaa(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"input:\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca double
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%7 = call double @atof(i8* %6)
store double %7, double* %2
%8 = load double, double* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"input:\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call double @atof(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %5)
ret i32 0
}
int *hops(int *elem) { return elem + *elem; }


x86 assembly (clang, -O0):
<hops>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hops>:
movslq (%rdi),%rax
lea    (%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
define i32* @hops(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %3, i64 %6
ret i32* %7
}

LLVM IR (-O2):
define i32* @hops(i32* %0) {
%2 = load i32, i32* %0
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void consoleOutputCharacter(int c) { fprintf(stdout, "%c", c); }


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

x86 assembly (clang, -O2):
<consoleOutputCharacter>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"%c\00"
define void @consoleOutputCharacter(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delwin(void *);
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ refresh();
void visual_cleanup(int status, void *win) {
  delwin(win);
  endwin();
  refresh();
}


x86 assembly (clang, -O0):
<visual_cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <delwin@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visual_cleanup>:
push   %rax
mov    %rsi,%rdi
call   1030 <delwin@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <refresh@plt>

LLVM IR (-O0):
define void @visual_cleanup(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @delwin(i8* %5)
%7 = call i32 (...) @endwin()
%8 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
define void @visual_cleanup(i32 %0, i8* %1) {
%3 = tail call i32 @delwin(i8* %1)
%4 = tail call i32 (...) @endwin()
%5 = tail call i32 (...) @refresh()
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
struct riku_devfs_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ser_putch(struct riku_devfs_node *, char const);
int serial_write(struct riku_devfs_node *self, const char *buf,
                 uint32_t count) {
  for (uint32_t i = 0; i < count; i++)
    ser_putch(self, *(buf + i));
  return 0;
}


x86 assembly (clang, -O0):
<serial_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1160 <serial_write+0x50>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <ser_putch@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <serial_write+0x1c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_write>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
jle    1146 <serial_write+0x36>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <ser_putch@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <serial_write+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.riku_devfs_node = type { i32 }
define i32 @serial_write(%struct.riku_devfs_node* %0, i8* %1, i64 %2) {
%4 = alloca %struct.riku_devfs_node*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store %struct.riku_devfs_node* %0, %struct.riku_devfs_node** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
store i64 0, i64* %7
br label %8
8: ; preds = %19, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = icmp slt i64 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load %struct.riku_devfs_node*, %struct.riku_devfs_node** %4
%14 = load i8*, i8** %5
%15 = load i64, i64* %7
%16 = getelementptr inbounds i8, i8* %14, i64 %15
%17 = load i8, i8* %16
%18 = call i32 @ser_putch(%struct.riku_devfs_node* %13, i8 signext %17)
br label %19
19: ; preds = %12
%20 = load i64, i64* %7
%21 = add nsw i64 %20, 1
store i64 %21, i64* %7
br label %8
22: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
%struct.riku_devfs_node = type { i32 }
define i32 @serial_write(%struct.riku_devfs_node* %0, i8* nocapture %1, i64 %2) {
%4 = icmp sgt i64 %2, 0
br i1 %4, label %6, label %5
5: ; preds = %6, %3
ret i32 0
6: ; preds = %3, %6
%7 = phi i64 [ %11, %6 ], [ 0, %3 ]
%8 = getelementptr inbounds i8, i8* %1, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @ser_putch(%struct.riku_devfs_node* %0, i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %2
br i1 %12, label %5, label %6
}
int cfg_processor_get_int_attr(void *attr, const char *name) {
  const char *str_attr;
  int value = -1;
  str_attr = mxml_get_attr_value(attr, name);
  if (((void *)0) != str_attr) {
    value = atoi(str_attr);
    mxml_release_string(str_attr);
  }
  return value;
}


x86 assembly (clang, -O0):
<cfg_processor_get_int_attr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <mxml_get_attr_value@plt>
cltq
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
je     1181 <cfg_processor_get_int_attr+0x51>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <mxml_release_string@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_processor_get_int_attr>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <mxml_get_attr_value@plt>
test   %eax,%eax
je     115b <cfg_processor_get_int_attr+0x2b>
movslq %eax,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <mxml_release_string@plt>
mov    %ebp,%eax
jmp    1160 <cfg_processor_get_int_attr+0x30>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @cfg_processor_get_int_attr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 -1, i32* %6
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @mxml_get_attr_value to i32 (i8*, i8*, ...)*)(i8* %7, i8* %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = icmp ne i8* null, %12
br i1 %13, label %14, label %19
14: ; preds = %2
%15 = load i8*, i8** %5
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %15)
store i32 %16, i32* %6
%17 = load i8*, i8** %5
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @mxml_release_string to i32 (i8*, ...)*)(i8* %17)
br label %19
19: ; preds = %14, %2
%20 = load i32, i32* %6
ret i32 %20
}

LLVM IR (-O2):
define i32 @cfg_processor_get_int_attr(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @mxml_get_attr_value to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i32 %3, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %5)
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mxml_release_string to i32 (i8*, ...)*)(i8* %5)
br label %10
10: ; preds = %7, %2
%11 = phi i32 [ %8, %7 ], [ -1, %2 ]
ret i32 %11
}
void test_no_clause() {
  int i;
#pragma omp simd
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd
  ++i;
}


x86 assembly (clang, -O0):
<test_no_clause>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_no_clause+0x28>
jmp    111a <test_no_clause+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_no_clause+0xb>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_no_clause() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ G_ResetLevel();
void Svcmd_Reset_f(void) { G_ResetLevel(); }


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

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

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

LLVM IR (-O2):
define void @Svcmd_Reset_f() {
%1 = tail call i32 (...) @G_ResetLevel()
ret void
}
int test_imm_14uint8_mem(unsigned char *val) {
  return ((*val) & (0x14 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_14uint8_mem>:
testb  $0x14,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_14uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 20
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void set_g2X(g2, fc) float *g2, *fc;
{
  float f;
  f = (1.0) / (*fc);
  *g2 = ((2.0) * f - f * f) / (((1.0) - f) * ((1.0) - f));
}


x86 assembly (clang, -O0):
<set_g2X>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee0(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xe8c(%rip),%xmm1
subsd  %xmm2,%xmm1
movss  -0x14(%rbp),%xmm2
cvtss2sd %xmm2,%xmm3
movsd  0xe77(%rip),%xmm2
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_g2X>:
movss  0xef8(%rip),%xmm0
divss  (%rsi),%xmm0
cvtss2sd %xmm0,%xmm1
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee8(%rip),%xmm2
subsd  %xmm1,%xmm2
addsd  %xmm1,%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm2
divsd  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @set_g2X(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %4
%7 = load float, float* %6
%8 = fpext float %7 to double
%9 = fdiv double 1.000000e+00, %8
%10 = fptrunc double %9 to float
store float %10, float* %5
%11 = load float, float* %5
%12 = fpext float %11 to double
%13 = load float, float* %5
%14 = load float, float* %5
%15 = fmul float %13, %14
%16 = fpext float %15 to double
%17 = fneg double %16
%18 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %12, double %17)
%19 = load float, float* %5
%20 = fpext float %19 to double
%21 = fsub double 1.000000e+00, %20
%22 = load float, float* %5
%23 = fpext float %22 to double
%24 = fsub double 1.000000e+00, %23
%25 = fmul double %21, %24
%26 = fdiv double %18, %25
%27 = fptrunc double %26 to float
%28 = load float*, float** %3
store float %27, float* %28
ret void
}

LLVM IR (-O2):
define void @set_g2X(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = fdiv float 1.000000e+00, %3
%5 = fpext float %4 to double
%6 = fmul float %4, %4
%7 = fpext float %6 to double
%8 = fneg double %7
%9 = tail call double @llvm.fmuladd.f64(double %5, double 2.000000e+00, double %8)
%10 = fsub double 1.000000e+00, %5
%11 = fmul double %10, %10
%12 = fdiv double %9, %11
%13 = fptrunc double %12 to float
store float %13, float* %0
ret void
}
void spin(void) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<spin>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <spin+0x9>
jmp    1109 <spin+0x9>

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

LLVM IR (-O0):
define void @spin() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @spin() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ memset_func(void *, int /*<<< orphan*/, size_t);
void mbedtls_platform_zeroize(void *buf, size_t len) {
  do {
  } while (0);
  if (len > 0)
    memset_func(buf, 0, len);
}


x86 assembly (clang, -O0):
<mbedtls_platform_zeroize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1125 <mbedtls_platform_zeroize+0x15>
cmpq   $0x0,-0x10(%rbp)
jbe    113f <mbedtls_platform_zeroize+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset_func@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbedtls_platform_zeroize>:
test   %rsi,%rsi
je     111f <mbedtls_platform_zeroize+0xf>
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <memset_func@plt>
ret

LLVM IR (-O0):
define void @mbedtls_platform_zeroize(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
br label %5
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i64, i64* %4
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = call i32 @memset_func(i8* %10, i32 0, i64 %11)
br label %13
13: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
define void @mbedtls_platform_zeroize(i8* %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @memset_func(i8* %0, i32 0, i64 %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close_drive(int *device) { close(*device); }


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

x86 assembly (clang, -O2):
<close_drive>:
mov    (%rdi),%edi
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @close_drive(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @close(i32 %2)
ret void
}
void lowlevel_gpio_init(void) {}


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

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

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

LLVM IR (-O2):
define void @lowlevel_gpio_init() {
ret void
}