xunge/DecIR huggingface dataset:
unsigned char SetBit(unsigned char pin, unsigned char number,
                     unsigned char bin_value) {
  return (bin_value ? pin | (0x01 << number) : pin & ~(0x01 << number));
}


x86 assembly (clang, -O0):
<SetBit>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
cmp    $0x0,%eax
je     113d <SetBit+0x3d>
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <SetBit+0x56>
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetBit>:
mov    %edi,%eax
bts    %esi,%eax
btr    %esi,%edi
test   %edx,%edx
cmove  %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @SetBit(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %3
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = shl i32 1, %14
%16 = or i32 %12, %15
br label %25
17: ; preds = %3
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = shl i32 1, %21
%23 = xor i32 %22, -1
%24 = and i32 %19, %23
br label %25
25: ; preds = %17, %10
%26 = phi i32 [ %16, %10 ], [ %24, %17 ]
%27 = trunc i32 %26 to i8
ret i8 %27
}

LLVM IR (-O2):
define zeroext i8 @SetBit(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = icmp eq i8 %2, 0
%5 = zext i8 %0 to i32
%6 = zext i8 %1 to i32
%7 = shl nuw i32 1, %6
%8 = or i32 %7, %5
%9 = xor i32 %7, -1
%10 = and i32 %9, %5
%11 = select i1 %4, i32 %10, i32 %8
%12 = trunc i32 %11 to i8
ret i8 %12
}
double expten(unsigned int e) {
  double exp = 10.0;
  double res = 1.0;
  for (; e; e >>= 1) {
    if (e & 1)
      res *= exp;
    exp *= exp;
  }
  return res;
}


x86 assembly (clang, -O0):
<expten>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  0xef9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee4(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1166 <expten+0x66>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1149 <expten+0x49>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1121 <expten+0x21>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<expten>:
test   %edi,%edi
je     1144 <expten+0x44>
movsd  0xefc(%rip),%xmm1
movsd  0xeec(%rip),%xmm2
movapd %xmm2,%xmm0
jmp    1133 <expten+0x33>
nopw   0x0(%rax,%rax,1)
mulsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm1
mov    %edi,%eax
shr    %eax
cmp    $0x1,%edi
mov    %eax,%edi
jbe    1143 <expten+0x43>
movapd %xmm2,%xmm3
test   $0x1,%dil
je     1120 <expten+0x20>
movapd %xmm1,%xmm3
jmp    1120 <expten+0x20>
ret
movsd  0xeb4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @expten(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store i32 %0, i32* %2
store double 1.000000e+01, double* %3
store double 1.000000e+00, double* %4
br label %5
5: ; preds = %20, %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = load i32, i32* %2
%10 = and i32 %9, 1
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load double, double* %3
%14 = load double, double* %4
%15 = fmul double %14, %13
store double %15, double* %4
br label %16
16: ; preds = %12, %8
%17 = load double, double* %3
%18 = load double, double* %3
%19 = fmul double %18, %17
store double %19, double* %3
br label %20
20: ; preds = %16
%21 = load i32, i32* %2
%22 = lshr i32 %21, 1
store i32 %22, i32* %2
br label %5
23: ; preds = %5
%24 = load double, double* %4
ret double %24
}

LLVM IR (-O2):
define double @expten(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi double [ %10, %3 ], [ 1.000000e+00, %1 ]
%5 = phi double [ %11, %3 ], [ 1.000000e+01, %1 ]
%6 = phi i32 [ %12, %3 ], [ %0, %1 ]
%7 = and i32 %6, 1
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, double 1.000000e+00, double %5
%10 = fmul double %4, %9
%11 = fmul double %5, %5
%12 = lshr i32 %6, 1
%13 = icmp ult i32 %6, 2
br i1 %13, label %14, label %3
14: ; preds = %3, %1
%15 = phi double [ 1.000000e+00, %1 ], [ %10, %3 ]
ret double %15
}
/* Variables and functions */
long _InterlockedAdd(long volatile *, int);
long test_InterlockedAdd_constant(long volatile *Addend) {
  return _InterlockedAdd(Addend, -1);
}


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

x86 assembly (clang, -O2):
<test_InterlockedAdd_constant>:
mov    $0xffffffff,%esi
jmp    1030 <_InterlockedAdd@plt>

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

LLVM IR (-O2):
define i64 @test_InterlockedAdd_constant(i64* %0) {
%2 = tail call i64 @_InterlockedAdd(i64* %0, i32 -1)
ret i64 %2
}
void yy_1_PostParaWs(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_PostParaWs(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int LetterIndex(char);
void RecordLetter(char ch, int letterCounts[]) {
  int index;
  index = LetterIndex(ch);
  if (index != -1)
    letterCounts[index]++;
}


x86 assembly (clang, -O0):
<RecordLetter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <LetterIndex@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1149 <RecordLetter+0x39>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RecordLetter>:
push   %rbx
mov    %rsi,%rbx
call   1030 <LetterIndex@plt>
cmp    $0xffffffff,%eax
je     1124 <RecordLetter+0x14>
cltq
addl   $0x1,(%rbx,%rax,4)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @RecordLetter(i8 signext %0, i32* nocapture %1) {
%3 = tail call i32 @LetterIndex(i8 signext %0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds i32, i32* %1, i64 %6
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1
store i32 %9, i32* %7
br label %10
10: ; preds = %5, %2
ret void
}
int quan(int val, const int *table, int size) {
  int i;
  for (i = 0; i < size; i++)
    if (val < *table++)
      break;
  return (i);
}


x86 assembly (clang, -O0):
<quan>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1153 <quan+0x53>
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
cmp    (%rcx),%eax
jge    1140 <quan+0x40>
jmp    1153 <quan+0x53>
jmp    1145 <quan+0x45>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <quan+0x15>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quan>:
test   %edx,%edx
jle    111e <quan+0x1e>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %edi,(%rsi,%rcx,4)
jg     1121 <quan+0x21>
add    $0x1,%rcx
cmp    %ecx,%eax
jne    1110 <quan+0x10>
ret
xor    %eax,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @quan(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3, %10
%6 = phi i32 [ %12, %10 ], [ 0, %3 ]
%7 = phi i32* [ %11, %10 ], [ %1, %3 ]
%8 = load i32, i32* %7
%9 = icmp sgt i32 %8, %0
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = getelementptr inbounds i32, i32* %7, i64 1
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %12, %2
br i1 %13, label %14, label %5
14: ; preds = %10, %5, %3
%15 = phi i32 [ 0, %3 ], [ %6, %5 ], [ %2, %10 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ write_word_data(int /*<<< orphan*/, int, int /*<<< orphan*/);
void set_interrupt_on_bus(uint8_t address, uint16_t value) {
  write_word_data(address, 0x04, value);
}


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

x86 assembly (clang, -O2):
<set_interrupt_on_bus>:
mov    %esi,%edx
mov    $0x4,%esi
jmp    1030 <write_word_data@plt>

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

LLVM IR (-O2):
define void @set_interrupt_on_bus(i32 %0, i32 %1) {
%3 = tail call i32 @write_word_data(i32 %0, i32 4, i32 %1)
ret void
}
int udg_test_param_decl(int x) {}


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

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

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

LLVM IR (-O2):
define i32 @udg_test_param_decl(i32 %0) {
ret i32 undef
}
int is_relative_path(const char *path) {
  if (path && (*path != '/'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_relative_path>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     112f <is_relative_path+0x2f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     112f <is_relative_path+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1136 <is_relative_path+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_relative_path>:
test   %rdi,%rdi
je     110f <is_relative_path+0xf>
mov    $0x1,%eax
cmpb   $0x2f,(%rdi)
jne    1111 <is_relative_path+0x11>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_relative_path(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 47
br i1 %10, label %11, label %12
11: ; preds = %6
store i32 1, i32* %2
br label %13
12: ; preds = %6, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_relative_path(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 47
br i1 %5, label %6, label %7
6: ; preds = %3, %1
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ GMP_RNDU;
int /*<<< orphan*/ mpfr_set_default_rounding_mode(int /*<<< orphan*/);
double div_hi(double x, double y) {
  double z;
  mpfr_set_default_rounding_mode(GMP_RNDU);
  ;
  z = x / y;
  return (z);
}


x86 assembly (clang, -O0):
<div_hi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
call   1030 <mpfr_set_default_rounding_mode@plt>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_hi>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
call   1030 <mpfr_set_default_rounding_mode@plt>
movsd  0x8(%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@GMP_RNDU = global i32 0
define double @div_hi(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load i32, i32* @GMP_RNDU
%7 = call i32 @mpfr_set_default_rounding_mode(i32 %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fdiv double %8, %9
store double %10, double* %5
%11 = load double, double* %5
ret double %11
}

LLVM IR (-O2):
@GMP_RNDU = global i32 0
define double @div_hi(double %0, double %1) {
%3 = load i32, i32* @GMP_RNDU
%4 = tail call i32 @mpfr_set_default_rounding_mode(i32 %3)
%5 = fdiv double %0, %1
ret double %5
}
void v9fs_fscache_wait_on_page_write(struct inode *inode, struct page *page) {
  return;
}


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
%struct.page = type opaque
define void @v9fs_fscache_wait_on_page_write(%struct.inode* nocapture %0, %struct.page* nocapture %1) {
ret void
}
/* Type definitions */
struct sched_param {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int syscall(int, int /*<<< orphan*/, struct sched_param const *);
int sched_setparam(pid_t pid, const struct sched_param *param) {
  static const struct sched_param def;
  return syscall(154, pid, &def);
}


x86 assembly (clang, -O0):
<sched_setparam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x9a,%edi
lea    0xed2(%rip),%rdx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sched_setparam>:
mov    %edi,%esi
lea    0xee7(%rip),%rdx
mov    $0x9a,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@sched_setparam.def = internal constant %struct.sched_param zeroinitializer
define i32 @sched_setparam(i32 %0, %struct.sched_param* %1) {
%3 = alloca i32
%4 = alloca %struct.sched_param*
store i32 %0, i32* %3
store %struct.sched_param* %1, %struct.sched_param** %4
%5 = load i32, i32* %3
%6 = call i32 @syscall(i32 154, i32 %5, %struct.sched_param* @sched_setparam.def)
ret i32 %6
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@sched_setparam.def = internal constant %struct.sched_param zeroinitializer
define i32 @sched_setparam(i32 %0, %struct.sched_param* nocapture readnone %1) {
%3 = tail call i32 @syscall(i32 154, i32 %0, %struct.sched_param* @sched_setparam.def)
ret i32 %3
}
void RTPipeSelectOne(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPipeSelectOne() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _free(void *ptr) {
  if (ptr)
    free(ptr);
}


x86 assembly (clang, -O0):
<_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_free>:
test   %rdi,%rdi
je     111a <_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
double difftime(int time1, int time0) { return (double)time1 - (double)time0; }


x86 assembly (clang, -O0):
<difftime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<difftime>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @difftime(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 = sitofp i32 %5 to double
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = fsub double %6, %8
ret double %9
}

LLVM IR (-O2):
define double @difftime(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = sitofp i32 %1 to double
%5 = fsub double %3, %4
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p448_opp(uintptr_t, uintptr_t);
void fiat_p448_opp(uint64_t out1[8], const uint64_t arg1[8]) {
  internal_fiat_p448_opp((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p448_opp>:
jmp    1030 <internal_fiat_p448_opp@plt>

LLVM IR (-O0):
define void @fiat_p448_opp(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p448_opp(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p448_opp(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p448_opp(i64 %3, i64 %4)
ret void
}
float to_celsius(float f) {
  float c;
  c = (5.0 / 9.0) * (f - 32.0);
  return c;
}


x86 assembly (clang, -O0):
<to_celsius>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeee(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_celsius>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @to_celsius(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fsub double %5, 3.200000e+01
%7 = fmul double 0x3FE1C71C71C71C72, %6
%8 = fptrunc double %7 to float
store float %8, float* %3
%9 = load float, float* %3
ret float %9
}

LLVM IR (-O2):
define float @to_celsius(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptrunc double %4 to float
ret float %5
}
int encontrakVETOR(int vector[], int n, int k) {
  for (; --n >= 0;)
    if (vector[n] == k)
      return n;
  return -1;
}


x86 assembly (clang, -O0):
<encontrakVETOR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jl     1144 <encontrakVETOR+0x44>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    113f <encontrakVETOR+0x3f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <encontrakVETOR+0x4b>
jmp    110e <encontrakVETOR+0xe>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encontrakVETOR>:
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %eax,%eax
jle    1120 <encontrakVETOR+0x20>
add    $0xffffffffffffffff,%rax
mov    %eax,%ecx
cmp    %edx,(%rdi,%rcx,4)
jne    1110 <encontrakVETOR+0x10>
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @encontrakVETOR(i32* nocapture %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
br label %5
5: ; preds = %10, %3
%6 = phi i64 [ %7, %10 ], [ %4, %3 ]
%7 = add nsw i64 %6, -1
%8 = trunc i64 %6 to i32
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %5
%11 = and i64 %7, 4294967295
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = icmp eq i32 %13, %2
br i1 %14, label %15, label %5
15: ; preds = %10
%16 = trunc i64 %7 to i32
br label %17
17: ; preds = %5, %15
%18 = phi i32 [ %16, %15 ], [ -1, %5 ]
ret i32 %18
}
int c40_reset(c40)
int c40;
{ return (ioctl(c40, (_IO('v', 1)), 0)); }


x86 assembly (clang, -O0):
<c40_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x76,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c40_reset>:
push   %rbx
mov    %edi,%ebx
mov    $0x76,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %edx,%edx
xor    %eax,%eax
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @c40_reset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @_IO to i32 (i32, i32, ...)*)(i32 118, i32 1)
%5 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @ioctl to i32 (i32, i32, i32, ...)*)(i32 %3, i32 %4, i32 0)
ret i32 %5
}

LLVM IR (-O2):
define i32 @c40_reset(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @_IO to i32 (i32, i32, ...)*)(i32 118, i32 1)
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @ioctl to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %2, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ link(char *, char *);
int /*<<< orphan*/ unlink(char *);
int main(int argc, char *argv[]) {
  link(argv[1], argv[2]);
  unlink(argv[2]);
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <link@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <unlink@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <link@plt>
mov    0x10(%rbx),%rdi
call   1030 <unlink@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 2
%11 = load i8*, i8** %10
%12 = call i32 @link(i8* %8, i8* %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @unlink(i8* %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @link(i8* %4, i8* %6)
%8 = load i8*, i8** %5
%9 = tail call i32 @unlink(i8* %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void perr(char *err, char *par) {
  char x[256];
  sprintf(x, err, par);
  perror(x);
  exit(1);
}


x86 assembly (clang, -O0):
<perr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<perr>:
push   %rbx
sub    $0x100,%rsp
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @perr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [256 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @sprintf(i8* %6, i8* %7, i8* %8)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i32 @perror(i8* %10)
%12 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @perr(i8* nocapture %0, i8* %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) %0, i8* %1)
%6 = call i32 @perror(i8* %4)
%7 = tail call i32 @exit(i32 1)
unreachable
}
void os_set_line_buffering(void) {}


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

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

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

LLVM IR (-O2):
define void @os_set_line_buffering() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glutMainLoop();
void glLoop(void) { glutMainLoop(); }


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

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

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

LLVM IR (-O2):
define void @glLoop() {
%1 = tail call i32 (...) @glutMainLoop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_msg(char *);
int /*<<< orphan*/ tswrite_help_testing();
void print_help_testing() {
  tswrite_help_testing();
  print_msg("\n"
            "  -drop <k> <d>     As TS packets are output, for every <k>+<d> "
            "packets,\n"
            "                    keep <k> and then drop (throw away) <d>.\n"
            "                    This can be useful when testing other "
            "applications.\n");
}


x86 assembly (clang, -O0):
<print_help_testing>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tswrite_help_testing@plt>
lea    0xece(%rip),%rdi
call   1040 <print_msg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help_testing>:
push   %rax
xor    %eax,%eax
call   1030 <tswrite_help_testing@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <print_msg@plt>

LLVM IR (-O0):
@.str = [208 x i8] c"\0A -drop <k> <d> As TS packets are output, for every <k>+<d> packets,\0A keep <k> and then drop (throw away) <d>.\0A This can be useful when testing other applications.\0A\00"
define void @print_help_testing() {
%1 = call i32 (...) @tswrite_help_testing()
%2 = call i32 @print_msg(i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [208 x i8] c"\0A -drop <k> <d> As TS packets are output, for every <k>+<d> packets,\0A keep <k> and then drop (throw away) <d>.\0A This can be useful when testing other applications.\0A\00"
define void @print_help_testing() {
%1 = tail call i32 (...) @tswrite_help_testing()
%2 = tail call i32 @print_msg(i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str, i64 0, i64 0))
ret void
}
int commitChanges() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @commitChanges() {
ret i32 0
}
void TR_cleanup() {}


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

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

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

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

/* Variables and functions */
void *vm_map_gpa(struct vmctx *, uintptr_t, size_t);
void *paddr_guest2host(struct vmctx *ctx, uintptr_t gaddr, size_t len) {
  return vm_map_gpa(ctx, gaddr, len);
}


x86 assembly (clang, -O0):
<paddr_guest2host>:
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 <vm_map_gpa@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paddr_guest2host>:
jmp    1030 <vm_map_gpa@plt>

LLVM IR (-O0):
%struct.vmctx = type { i32 }
define i8* @paddr_guest2host(%struct.vmctx* %0, i64 %1, i64 %2) {
%4 = alloca %struct.vmctx*
%5 = alloca i64
%6 = alloca i64
store %struct.vmctx* %0, %struct.vmctx** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load %struct.vmctx*, %struct.vmctx** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i8* @vm_map_gpa(%struct.vmctx* %7, i64 %8, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
%struct.vmctx = type { i32 }
define i8* @paddr_guest2host(%struct.vmctx* %0, i64 %1, i64 %2) {
%4 = tail call i8* @vm_map_gpa(%struct.vmctx* %0, i64 %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ set_ioprio_rt();
void pcap_sg_init_once(void) { set_ioprio_rt(); }


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

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

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

LLVM IR (-O2):
define void @pcap_sg_init_once() {
%1 = tail call i32 (...) @set_ioprio_rt()
ret void
}
void TOSH_rfm_enable_timer(void) {}


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

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

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

LLVM IR (-O2):
define void @TOSH_rfm_enable_timer() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
char *compat_strdup(const char *s) {
  size_t len = strlen(s);
  char *buf = (char *)malloc(len + 1);
  strcpy(buf, s);
  return buf;
}


x86 assembly (clang, -O0):
<compat_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compat_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @compat_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = add i64 %7, 1
%9 = call i64 @malloc(i64 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %4
ret i8* %14
}

LLVM IR (-O2):
define i8* @compat_strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
char *__strpadr(char *str, char pad, size_t len, size_t cur_len) {
  char *dest, *padend;
  dest = str + cur_len;
  padend = str + len;
  while (padend > dest)
    *dest++ = pad;
  return dest;
}


x86 assembly (clang, -O0):
<__strpadr>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
jbe    1155 <__strpadr+0x55>
mov    -0x9(%rbp),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
jmp    112e <__strpadr+0x2e>
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__strpadr>:
lea    (%rdi,%rcx,1),%rax
cmp    %rcx,%rdx
jle    1144 <__strpadr+0x34>
push   %rbx
mov    %rdx,%rbx
add    %rdi,%rcx
add    $0x1,%rcx
add    %rdi,%rbx
cmp    %rbx,%rcx
cmova  %rcx,%rbx
mov    %rbx,%rdx
sub    %rax,%rdx
movzbl %sil,%esi
mov    %rax,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @__strpadr(i8* writeonly %0, i8 signext %1, i64 %2, i64 %3) {
%5 = ptrtoint i8* %0 to i64
%6 = getelementptr i8, i8* %0, i64 %3
%7 = icmp sgt i64 %2, %3
br i1 %7, label %8, label %17
8: ; preds = %4
%9 = add i64 %5, %3
%10 = add i64 %9, 1
%11 = add i64 %5, %2
%12 = call i64 @llvm.umax.i64(i64 %10, i64 %11)
%13 = add i64 %5, %3
%14 = sub i64 %12, %13
%15 = sub i64 %12, %5
%16 = getelementptr i8, i8* %0, i64 %15
br label %17
17: ; preds = %8, %4
%18 = phi i8* [ %6, %4 ], [ %16, %8 ]
ret i8* %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  switch (2 * 3) {
  case 6:
    printf("hello\n");
    break;
  }
}


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
long lround(double x) {
  return (long)((x - ((long)x) >= 0.5f) ? (((long)x) + 1) : ((long)x));
}


x86 assembly (clang, -O0):
<lround>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
cvttsd2si -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm1
subsd  %xmm1,%xmm0
movsd  0xedb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1142 <lround+0x42>
cvttsd2si -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    114c <lround+0x4c>
cvttsd2si -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lround>:
cvttsd2si %xmm0,%rax
cvtsi2sd %rax,%xmm1
subsd  %xmm1,%xmm0
ucomisd 0xeea(%rip),%xmm0
sbb    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @lround(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i64
%6 = sitofp i64 %5 to double
%7 = fsub double %3, %6
%8 = fcmp oge double %7, 5.000000e-01
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load double, double* %2
%11 = fptosi double %10 to i64
%12 = add nsw i64 %11, 1
br label %16
13: ; preds = %1
%14 = load double, double* %2
%15 = fptosi double %14 to i64
br label %16
16: ; preds = %13, %9
%17 = phi i64 [ %12, %9 ], [ %15, %13 ]
ret i64 %17
}

LLVM IR (-O2):
define i64 @lround(double %0) {
%2 = fptosi double %0 to i64
%3 = sitofp i64 %2 to double
%4 = fsub double %0, %3
%5 = fcmp oge double %4, 5.000000e-01
%6 = zext i1 %5 to i64
%7 = add nsw i64 %6, %2
ret i64 %7
}
void vclib_release_VRF(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(void *);
void sortedTableTreeFree(struct libavl_allocator *allocator, void *ptr) {
  free(ptr);
}


x86 assembly (clang, -O0):
<sortedTableTreeFree>:
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):
<sortedTableTreeFree>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.libavl_allocator = type { i32 }
define void @sortedTableTreeFree(%struct.libavl_allocator* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int f(void) {
  fprintf(stderr, "I'm f!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"I'm f!\0A\00"
define i32 @f() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"I'm f!\0A\00"
define i32 @f() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *level2_1_s(char *, size_t, int, char *, size_t *);
int /*<<< orphan*/ ntos(int, char *, size_t *);
char *level2_1(int num, int ge, char *regstr, size_t *reglen) {
  char str[128], *s = str, d;
  size_t len = sizeof str;
  ntos(num, str, &len);
  return level2_1_s(str, len, ge, regstr, reglen);
}


x86 assembly (clang, -O0):
<level2_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
lea    -0xa0(%rbp),%rax
mov    %rax,-0xa8(%rbp)
movq   $0x80,-0xb8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xa0(%rbp),%rsi
lea    -0xb8(%rbp),%rdx
call   1030 <ntos@plt>
lea    -0xa0(%rbp),%rdi
mov    -0xb8(%rbp),%rsi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1040 <level2_1_s@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<level2_1>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x98,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%ebp
movq   $0x80,0x8(%rsp)
lea    0x10(%rsp),%r15
lea    0x8(%rsp),%rdx
mov    %r15,%rsi
call   1030 <ntos@plt>
mov    0x8(%rsp),%rsi
mov    %r15,%rdi
mov    %ebp,%edx
mov    %rbx,%rcx
mov    %r14,%r8
call   1040 <level2_1_s@plt>
add    $0x98,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @level2_1(i32 %0, i32 %1, i8* %2, i64* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca [128 x i8]
%10 = alloca i8*
%11 = alloca i8
%12 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64* %3, i64** %8
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %9, i64 0, i64 0
store i8* %13, i8** %10
store i64 128, i64* %12
%14 = load i32, i32* %5
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %9, i64 0, i64 0
%16 = call i32 @ntos(i32 %14, i8* %15, i64* %12)
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %9, i64 0, i64 0
%18 = load i64, i64* %12
%19 = load i32, i32* %6
%20 = load i8*, i8** %7
%21 = load i64*, i64** %8
%22 = call i8* @level2_1_s(i8* %17, i64 %18, i32 %19, i8* %20, i64* %21)
ret i8* %22
}

LLVM IR (-O2):
define i8* @level2_1(i32 %0, i32 %1, i8* %2, i64* %3) {
%5 = alloca [128 x i8]
%6 = alloca i64
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%8 = bitcast i64* %6 to i8*
store i64 128, i64* %6
%9 = call i32 @ntos(i32 %0, i8* %7, i64* %6)
%10 = load i64, i64* %6
%11 = call i8* @level2_1_s(i8* %7, i64 %10, i32 %1, i8* %2, i64* %3)
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ unsetenv(char const *);
void UTILS_unsetenv(const char *name) {
  unsetenv(name);
  setlocale(LC_ALL, "");
}


x86 assembly (clang, -O0):
<UTILS_unsetenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <unsetenv@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
call   1030 <setlocale@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UTILS_unsetenv>:
push   %rax
call   1040 <unsetenv@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
pop    %rax
jmp    1030 <setlocale@plt>

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
define void @UTILS_unsetenv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @unsetenv(i8* %3)
%5 = load i32, i32* @LC_ALL
%6 = call i32 @setlocale(i32 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
define void @UTILS_unsetenv(i8* nocapture %0) {
%2 = tail call i32 @unsetenv(i8* %0)
%3 = load i32, i32* @LC_ALL
%4 = tail call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ cond(int);
int f() {
  int x = 5;
  if (cond(x))
    x += 1;
  else
    x += 2;
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <cond@plt>
cmp    $0x0,%rax
je     113f <f+0x2f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <f+0x38>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    $0x5,%edi
call   1030 <cond@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
or     $0x6,%ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i64 @cond(i32 5)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i32 7, i32 6
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ set_bit(int, unsigned long volatile *);
int test_bit(int, unsigned long volatile *);
int test_and_set_bit(int nr, volatile unsigned long *addr) {
  int oldbit = test_bit(nr, addr);
  set_bit(nr, addr);
  return oldbit;
}


x86 assembly (clang, -O0):
<test_and_set_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <test_bit@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <set_bit@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_and_set_bit>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <test_bit@plt>
mov    %eax,%r14d
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <set_bit@plt>
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @test_and_set_bit(i32 %0, i64* %1) {
%3 = tail call i32 @test_bit(i32 %0, i64* %1)
%4 = tail call i32 @set_bit(i32 %0, i64* %1)
ret i32 %3
}