xunge/DecIR huggingface dataset:
/* Variables and functions */
int EXDEV;
char Platform_DifferentFilesystems(int e) {
  char _o_result;
  _o_result = e == EXDEV;
  return _o_result;
}


x86 assembly (clang, -O0):
<Platform_DifferentFilesystems>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ecf(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Platform_DifferentFilesystems>:
mov    0x2ed9(%rip),%rax
cmp    %edi,(%rax)
sete   %al
ret

LLVM IR (-O0):
@EXDEV = global i32 0
define signext i8 @Platform_DifferentFilesystems(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @EXDEV
%6 = icmp eq i32 %4, %5
%7 = zext i1 %6 to i32
%8 = trunc i32 %7 to i8
store i8 %8, i8* %3
%9 = load i8, i8* %3
ret i8 %9
}

LLVM IR (-O2):
@EXDEV = global i32 0
define signext i8 @Platform_DifferentFilesystems(i32 %0) {
%2 = load i32, i32* @EXDEV
%3 = icmp eq i32 %2, %0
%4 = zext i1 %3 to i8
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void countTillNum(int n) {
  int *ptr = &n;
  if (*ptr == 0)
    return;
  countTillNum(*ptr - 1);
  printf("%d\n", *ptr);
}


x86 assembly (clang, -O0):
<countTillNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1145 <countTillNum+0x25>
jmp    1165 <countTillNum+0x45>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
sub    $0x1,%edi
call   1040 <countTillNum@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countTillNum>:
test   %edi,%edi
je     113e <countTillNum+0x1e>
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1040 <countTillNum@plt>
lea    0xeca(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @countTillNum(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1, %4
ret void
4: ; preds = %1
%5 = add nsw i32 %0, -1
tail call void @countTillNum(i32 %5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y_root;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
int get_XCrossingEvent_y_root(void *_p) {
  return (int)((XCrossingEvent *)_p)->y_root;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XCrossingEvent_y_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int HelpItem145(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem145() {
ret i32 0
}
void audio_music_set_volume(int vol) {}


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

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

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

LLVM IR (-O2):
define void @audio_music_set_volume(i32 %0) {
ret void
}
/* Variables and functions */
int parse_ipv6(unsigned short ipv6[8], char *str) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @parse_ipv6(i16* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
float MSK_ScaleRange(float in, float oldMin, float oldMax, float newMin,
                     float newMax) {
  return (in / ((oldMax - oldMin) / (newMax - newMin))) + newMin;
}


x86 assembly (clang, -O0):
<MSK_ScaleRange>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
subss  -0x10(%rbp),%xmm2
divss  %xmm2,%xmm1
divss  %xmm1,%xmm0
addss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MSK_ScaleRange>:
subss  %xmm1,%xmm2
subss  %xmm3,%xmm4
divss  %xmm4,%xmm2
divss  %xmm2,%xmm0
addss  %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @MSK_ScaleRange(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float, float* %6
%12 = load float, float* %8
%13 = load float, float* %7
%14 = fsub float %12, %13
%15 = load float, float* %10
%16 = load float, float* %9
%17 = fsub float %15, %16
%18 = fdiv float %14, %17
%19 = fdiv float %11, %18
%20 = load float, float* %9
%21 = fadd float %19, %20
ret float %21
}

LLVM IR (-O2):
define float @MSK_ScaleRange(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float %2, %1
%7 = fsub float %4, %3
%8 = fdiv float %6, %7
%9 = fdiv float %0, %8
%10 = fadd float %9, %3
ret float %10
}
/* Variables and functions */
double const log(double);
double my_log2(double x) {
  static const double LOG2SCALE = 1.442695040888963;
  return log(x) * LOG2SCALE;
}


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

x86 assembly (clang, -O2):
<my_log2>:
push   %rax
call   1030 <log@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@my_log2.LOG2SCALE = internal constant double 0x3FF71547652B82FC
define double @my_log2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log(double %3)
%5 = fmul double %4, 0x3FF71547652B82FC
ret double %5
}

LLVM IR (-O2):
define double @my_log2(double %0) {
%2 = tail call double @log(double %0)
%3 = fmul double %2, 0x3FF71547652B82FC
ret double %3
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
void h_u32_to_le(uint8_t *buf, int val) {
  buf[3] = (uint8_t)(val >> 24);
  buf[2] = (uint8_t)(val >> 16);
  buf[1] = (uint8_t)(val >> 8);
  buf[0] = (uint8_t)(val >> 0);
}


x86 assembly (clang, -O0):
<h_u32_to_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
sar    $0x0,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_u32_to_le>:
mov    %esi,%eax
sar    $0x18,%eax
cltq
mov    %rax,0x18(%rdi)
mov    %esi,%eax
sar    $0x10,%eax
cltq
mov    %rax,0x10(%rdi)
movslq %esi,%rax
sar    $0x8,%esi
movslq %esi,%rcx
mov    %rcx,0x8(%rdi)
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @h_u32_to_le(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 24
%7 = sext i32 %6 to i64
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 3
store i64 %7, i64* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = sext i32 %11 to i64
%13 = load i64*, i64** %3
%14 = getelementptr inbounds i64, i64* %13, i64 2
store i64 %12, i64* %14
%15 = load i32, i32* %4
%16 = ashr i32 %15, 8
%17 = sext i32 %16 to i64
%18 = load i64*, i64** %3
%19 = getelementptr inbounds i64, i64* %18, i64 1
store i64 %17, i64* %19
%20 = load i32, i32* %4
%21 = ashr i32 %20, 0
%22 = sext i32 %21 to i64
%23 = load i64*, i64** %3
%24 = getelementptr inbounds i64, i64* %23, i64 0
store i64 %22, i64* %24
ret void
}

LLVM IR (-O2):
define void @h_u32_to_le(i64* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %4, i64* %5
%6 = ashr i32 %1, 16
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %7, i64* %8
%9 = ashr i32 %1, 8
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %10, i64* %11
%12 = sext i32 %1 to i64
store i64 %12, i64* %0
ret void
}
void osIdleLoop(void) {

  ;
  for (;;) {
  }
}


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

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

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

LLVM IR (-O2):
define void @osIdleLoop() {
br label %1
1: ; preds = %1, %0
br label %1
}
int test_imm_F2uint32_mem(unsigned int *val) {
  return ((*val) & (0xF2 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F2uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 242
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteIndexedXX1(int);
int /*<<< orphan*/ ROR8(int /*<<< orphan*/);
void Op7EM1X1(void) { ROR8(AbsoluteIndexedXX1(3)); }


x86 assembly (clang, -O0):
<Op7EM1X1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <AbsoluteIndexedXX1@plt>
mov    %eax,%edi
call   1030 <ROR8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op7EM1X1>:
push   %rax
mov    $0x3,%edi
call   1040 <AbsoluteIndexedXX1@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ROR8@plt>

LLVM IR (-O0):
define void @Op7EM1X1() {
%1 = call i32 @AbsoluteIndexedXX1(i32 3)
%2 = call i32 @ROR8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op7EM1X1() {
%1 = tail call i32 @AbsoluteIndexedXX1(i32 3)
%2 = tail call i32 @ROR8(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(unsigned long long);
int main() {
  foo(0);
  foo(0l);
  foo(0ll);
  foo(0u);
  foo(0ul);
  foo(0ull);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <foo@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <foo@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <foo@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <foo@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <foo@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @foo(i64 0)
%2 = call i32 @foo(i64 0)
%3 = call i32 @foo(i64 0)
%4 = call i32 @foo(i64 0)
%5 = call i32 @foo(i64 0)
%6 = call i32 @foo(i64 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i64 0)
%2 = tail call i32 @foo(i64 0)
%3 = tail call i32 @foo(i64 0)
%4 = tail call i32 @foo(i64 0)
%5 = tail call i32 @foo(i64 0)
%6 = tail call i32 @foo(i64 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Usage(void) {
  printf("Usage: sandesh_gen <file name>\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"Usage: sandesh_gen <file name>\0A\00"
define void @Usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"Usage: sandesh_gen <file name>\00"
define void @Usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int ui32Value;

/* Variables and functions */
uint32_t Kentec320x240x16_SSD2119ColorTranslate(void *pvDisplayData,
                                                uint32_t ui32Value) {
  return (((((ui32Value)&0x00f80000) >> 8) | (((ui32Value)&0x0000fc00) >> 5) |
           (((ui32Value)&0x000000f8) >> 3)));
}


x86 assembly (clang, -O0):
<Kentec320x240x16_SSD2119ColorTranslate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xf80000,%eax
sar    $0x8,%eax
mov    -0xc(%rbp),%ecx
and    $0xfc00,%ecx
sar    $0x5,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
and    $0xf8,%ecx
sar    $0x3,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kentec320x240x16_SSD2119ColorTranslate>:
mov    %esi,%ecx
shr    $0x8,%ecx
and    $0xf800,%ecx
mov    %esi,%eax
shr    $0x5,%eax
and    $0x7e0,%eax
or     %ecx,%eax
shr    $0x3,%esi
and    $0x1f,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @Kentec320x240x16_SSD2119ColorTranslate(i8* %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 = and i32 %5, 16252928
%7 = ashr i32 %6, 8
%8 = load i32, i32* %4
%9 = and i32 %8, 64512
%10 = ashr i32 %9, 5
%11 = or i32 %7, %10
%12 = load i32, i32* %4
%13 = and i32 %12, 248
%14 = ashr i32 %13, 3
%15 = or i32 %11, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @Kentec320x240x16_SSD2119ColorTranslate(i8* nocapture readnone %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = and i32 %3, 63488
%5 = lshr i32 %1, 5
%6 = and i32 %5, 2016
%7 = or i32 %4, %6
%8 = lshr i32 %1, 3
%9 = and i32 %8, 31
%10 = or i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ F();
int /*<<< orphan*/ S();
int /*<<< orphan*/ print_ln(char *);
void T() {
  print_ln("T->FS");
  F();
  S();
}


x86 assembly (clang, -O0):
<T>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <print_ln@plt>
mov    $0x0,%al
call   1030 <F@plt>
mov    $0x0,%al
call   1050 <S@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<T>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <print_ln@plt>
xor    %eax,%eax
call   1030 <F@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <S@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"T->FS\00"
define void @T() {
%1 = call i32 @print_ln(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @F()
%3 = call i32 (...) @S()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"T->FS\00"
define void @T() {
%1 = tail call i32 @print_ln(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @F()
%3 = tail call i32 (...) @S()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mask;
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int sched_getaffinity(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int main(void) {
  cpu_set_t mask;
  return sched_getaffinity(0, sizeof(mask), &mask);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
mov    $0x4,%esi
lea    -0x8(%rbp),%rdx
call   1030 <sched_getaffinity@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdx
xor    %edi,%edi
mov    $0x4,%esi
call   1030 <sched_getaffinity@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sched_getaffinity(i32 0, i32 4, i32* %1)
ret i32 %3
}
/* Variables and functions */
int f1();
int f0(int a) { return a ? f1() : ((void *)0); }


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1137 <f0+0x27>
mov    $0x0,%al
call   1030 <f1@plt>
cltq
mov    %rax,-0x10(%rbp)
jmp    1142 <f0+0x32>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1142 <f0+0x32>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f0>:
test   %edi,%edi
je     111b <f0+0xb>
xor    %eax,%eax
jmp    1030 <f1@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @f0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 (...) @f1()
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %5
%11 = phi i8* [ %8, %5 ], [ null, %9 ]
%12 = ptrtoint i8* %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @f0(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @f1()
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
unsigned long VIM_USER_WriteFile(void *, unsigned char *, unsigned long);
unsigned long Avi_WriteFile(void *pFile_Ptr, unsigned char *pbBuffer,
                            unsigned long dFile_Size) {
  return VIM_USER_WriteFile(pFile_Ptr, pbBuffer, dFile_Size);
}


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

x86 assembly (clang, -O2):
<Avi_WriteFile>:
jmp    1030 <VIM_USER_WriteFile@plt>

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

LLVM IR (-O2):
define i64 @Avi_WriteFile(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @VIM_USER_WriteFile(i8* %0, i8* %1, i64 %2)
ret i64 %4
}
/* Type definitions */
struct pull_down_menu {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pull_down_menu_clear_internal(struct pull_down_menu *, int);
void pull_down_menu_clear(struct pull_down_menu *m) {
  pull_down_menu_clear_internal(m, 1);
}


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

x86 assembly (clang, -O2):
<pull_down_menu_clear>:
mov    $0x1,%esi
jmp    1030 <pull_down_menu_clear_internal@plt>

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

LLVM IR (-O2):
%struct.pull_down_menu = type { i32 }
define void @pull_down_menu_clear(%struct.pull_down_menu* %0) {
%2 = tail call i32 @pull_down_menu_clear_internal(%struct.pull_down_menu* %0, i32 1)
ret void
}
/* Variables and functions */
double c(double, double, double);
double fr(double x, double y) { return c(x * 1.1 - 0.3, y + 0.1, 0.15); }


x86 assembly (clang, -O0):
<fr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xedd(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xec1(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  0xeac(%rip),%xmm2
call   1030 <c@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fr>:
mulsd  0xee8(%rip),%xmm0
addsd  0xee8(%rip),%xmm0
addsd  0xee8(%rip),%xmm1
movsd  0xee8(%rip),%xmm2
jmp    1030 <c@plt>

LLVM IR (-O0):
define double @fr(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 = call double @llvm.fmuladd.f64(double %5, double 1.100000e+00, double -3.000000e-01)
%7 = load double, double* %4
%8 = fadd double %7, 1.000000e-01
%9 = call double @c(double %6, double %8, double 1.500000e-01)
ret double %9
}

LLVM IR (-O2):
define double @fr(double %0, double %1) {
%3 = tail call double @llvm.fmuladd.f64(double %0, double 1.100000e+00, double -3.000000e-01)
%4 = fadd double %1, 1.000000e-01
%5 = tail call double @c(double %3, double %4, double 1.500000e-01)
ret double %5
}
char *Diss_endstring(char *pString) {
  pString[0] = '\0';
  ++pString;
  return pString;
}


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

x86 assembly (clang, -O2):
<Diss_endstring>:
movb   $0x0,(%rdi)
lea    0x1(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @Diss_endstring(i8* writeonly %0) {
store i8 0, i8* %0
%2 = getelementptr inbounds i8, i8* %0, i64 1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sigal_function(int signum, siginfo_t *info, void *myaction) {
  printf("receive signum is %d\n", signum);
}


x86 assembly (clang, -O0):
<sigal_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigal_function>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"receive signum is %d\0A\00"
define void @sigal_function(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"receive signum is %d\0A\00"
define void @sigal_function(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
double Sleef_ceil(double x) { return __builtin_ceil(x); }


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

x86 assembly (clang, -O2):
<Sleef_ceil>:
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define double @Sleef_ceil(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.ceil.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @Sleef_ceil(double %0) {
%2 = tail call double @llvm.ceil.f64(double %0)
ret double %2
}
void rom_print_info() {}


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

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

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

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


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

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

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

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

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ __getuid(int /*<<< orphan*/);
int /*<<< orphan*/ __loguid(int /*<<< orphan*/, char *);
int /*<<< orphan*/ __setuid(int /*<<< orphan*/);
int /*<<< orphan*/ geteuid();
int main(void) {
  uid_t uid = __getuid(0);
  __loguid(uid, "before setuid");
  __setuid(0);
  __loguid(geteuid(), "after setuid");
  __setuid(uid);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <__getuid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    0xe9d(%rip),%rsi
call   1060 <__loguid@plt>
xor    %edi,%edi
call   1030 <__setuid@plt>
mov    $0x0,%al
call   1050 <geteuid@plt>
mov    %eax,%edi
lea    0xe8f(%rip),%rsi
call   1060 <__loguid@plt>
mov    -0x8(%rbp),%edi
call   1030 <__setuid@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1040 <__getuid@plt>
mov    %eax,%ebx
lea    0xeaf(%rip),%rsi
mov    %eax,%edi
call   1060 <__loguid@plt>
xor    %edi,%edi
call   1030 <__setuid@plt>
xor    %eax,%eax
call   1050 <geteuid@plt>
lea    0xea1(%rip),%rsi
mov    %eax,%edi
call   1060 <__loguid@plt>
mov    %ebx,%edi
call   1030 <__setuid@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"before setuid\00"
@.str.1 = [13 x i8] c"after setuid\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @__getuid(i32 0)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @__loguid(i32 %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @__setuid(i32 0)
%7 = call i32 (...) @geteuid()
%8 = call i32 @__loguid(i32 %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = call i32 @__setuid(i32 %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str = [14 x i8] c"before setuid\00"
@.str.1 = [13 x i8] c"after setuid\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @__getuid(i32 0)
%2 = tail call i32 @__loguid(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @__setuid(i32 0)
%4 = tail call i32 (...) @geteuid()
%5 = tail call i32 @__loguid(i32 %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @__setuid(i32 %1)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Variables and functions */
int strlen(const char *string) {
  char *string_end = (char *)string;
  while (*string_end)
    string_end++;
  return string_end - string;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     112e <strlen+0x2e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void pinfo() {
  fprintf(stderr, "usage:\n");
  fprintf(stderr, "\thlink make src_dir target_dir\n");
  fprintf(stderr, "\thlink remove target_dir\n");
}


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

x86 assembly (clang, -O2):
<pinfo>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeeb(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"usage:\0A\00"
@.str.1 = [32 x i8] c"\09hlink make src_dir target_dir\0A\00"
@.str.2 = [26 x i8] c"\09hlink remove target_dir\0A\00"
define void @pinfo() {
%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))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"usage:\0A\00"
@.str.1 = [32 x i8] c"\09hlink make src_dir target_dir\0A\00"
@.str.2 = [26 x i8] c"\09hlink remove target_dir\0A\00"
define void @pinfo() {
%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))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_remove_state(int /*<<< orphan*/);
int /*<<< orphan*/ EVP_cleanup();
void rsa_remove(void) {
  CRYPTO_cleanup_all_ex_data();
  ERR_free_strings();
  ERR_remove_state(0);
  EVP_cleanup();
}


x86 assembly (clang, -O0):
<rsa_remove>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
mov    $0x0,%al
call   1060 <ERR_free_strings@plt>
xor    %edi,%edi
call   1030 <ERR_remove_state@plt>
mov    $0x0,%al
call   1050 <EVP_cleanup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsa_remove>:
push   %rax
xor    %eax,%eax
call   1040 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
call   1060 <ERR_free_strings@plt>
xor    %edi,%edi
call   1030 <ERR_remove_state@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <EVP_cleanup@plt>

LLVM IR (-O0):
define void @rsa_remove() {
%1 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%2 = call i32 (...) @ERR_free_strings()
%3 = call i32 @ERR_remove_state(i32 0)
%4 = call i32 (...) @EVP_cleanup()
ret void
}

LLVM IR (-O2):
define void @rsa_remove() {
%1 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
%2 = tail call i32 (...) @ERR_free_strings()
%3 = tail call i32 @ERR_remove_state(i32 0)
%4 = tail call i32 (...) @EVP_cleanup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char const *, char const *);
char *xcalloc(int, int);
char *get_pid_file(const char *pid_dir, const char *name) {
  char *buffer = xcalloc(512, sizeof(char));
  snprintf(buffer, 511, "%s/%s", pid_dir, name);
  return buffer;
}


x86 assembly (clang, -O0):
<get_pid_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x200,%edi
mov    $0x1,%esi
call   1040 <xcalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    $0x1ff,%esi
lea    0xea5(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pid_file>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x200,%edi
mov    $0x1,%esi
call   1040 <xcalloc@plt>
mov    %rax,%rbx
lea    0xebc(%rip),%rdx
mov    %rax,%rdi
mov    $0x1ff,%esi
mov    %r15,%rcx
mov    %r14,%r8
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
define i8* @get_pid_file(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = call i8* @xcalloc(i32 512, i32 1)
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @snprintf(i8* %7, i32 511, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i8*, i8** %5
ret i8* %11
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define i8* @get_pid_file(i8* %0, i8* %1) {
%3 = tail call i8* @xcalloc(i32 512, i32 1)
%4 = tail call i32 @snprintf(i8* %3, i32 511, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
unsigned int const rand();
int /*<<< orphan*/ stderr;
unsigned int ranInt(const unsigned int n) {
  if (n == 0) {
    fprintf(
        stderr,
        "Invalid argument for random integer: expected greater than 1 value\n");
    exit(EX_USAGE);
  }
  return (rand() % n) + 1;
}


x86 assembly (clang, -O0):
<ranInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1168 <ranInt+0x38>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    $0x0,%al
call   1050 <rand@plt>
xor    %edx,%edx
divl   -0x4(%rbp)
mov    %edx,%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ranInt>:
push   %rbx
test   %edi,%edi
je     1147 <ranInt+0x17>
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <rand@plt>
xor    %edx,%edx
div    %ebx
lea    0x1(%rdx),%eax
pop    %rbx
ret
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [68 x i8] c"Invalid argument for random integer: expected greater than 1 value\0A\00"
@EX_USAGE = global i32 0
define i32 @ranInt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EX_USAGE
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
%11 = call i32 (...) @rand()
%12 = load i32, i32* %2
%13 = urem i32 %11, %12
%14 = add i32 %13, 1
ret i32 %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [68 x i8] c"Invalid argument for random integer: expected greater than 1 value\0A\00"
@EX_USAGE = global i32 0
define i32 @ranInt(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EX_USAGE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
%9 = tail call i32 (...) @rand()
%10 = urem i32 %9, %0
%11 = add nuw i32 %10, 1
ret i32 %11
}
int next_toggle(p)
int p;
{ return (p >= 0) ? -p - 1 : -p; }


x86 assembly (clang, -O0):
<next_toggle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1121 <next_toggle+0x21>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <next_toggle+0x29>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_toggle>:
mov    %edi,%eax
neg    %eax
test   %edi,%edi
not    %edi
cmovns %edi,%eax
ret

LLVM IR (-O0):
define i32 @next_toggle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
%8 = sub nsw i32 %7, 1
br label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = sub nsw i32 0, %10
br label %12
12: ; preds = %9, %5
%13 = phi i32 [ %8, %5 ], [ %11, %9 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @next_toggle(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = xor i32 %0, -1
%4 = sub nsw i32 0, %0
%5 = select i1 %2, i32 %3, i32 %4
ret i32 %5
}
char *strcat(char *dst, const char *src) {
  char *cp = dst;
  while (*cp)
    cp++;
  while ((*cp++ = *src++) != '\0')
    ;
  return dst;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <strcat+0x32>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <strcat+0x14>
jmp    1137 <strcat+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     116a <strcat+0x6a>
jmp    1137 <strcat+0x37>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
void pci_yes_msi(void) {}


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

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

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

LLVM IR (-O2):
define void @pci_yes_msi() {
ret void
}
int utf8islower(int chr) {
  if (('A' <= chr) && ('Z' >= chr)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<utf8islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    $0x41,%eax
cmp    -0x8(%rbp),%eax
jg     112f <utf8islower+0x2f>
mov    $0x5a,%eax
cmp    -0x8(%rbp),%eax
jl     112f <utf8islower+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1136 <utf8islower+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8islower>:
add    $0xffffffa5,%edi
xor    %eax,%eax
cmp    $0xffffffe6,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @utf8islower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 65, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sge i32 90, %7
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 0, i32* %2
br label %11
10: ; preds = %6, %1
store i32 1, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @utf8islower(i32 %0) {
%2 = add i32 %0, -91
%3 = icmp ult i32 %2, -26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *ft_strcpy(char *, char const *);
int /*<<< orphan*/ ft_strlen(char const *);
char *ft_strnew(int /*<<< orphan*/);
char *ft_strdup(const char *s1) {
  char *s2;
  s2 = ft_strnew(ft_strlen(s1));
  if (s2)
    s2 = ft_strcpy(s2, s1);
  return (s2);
}


x86 assembly (clang, -O0):
<ft_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    %eax,%edi
call   1050 <ft_strnew@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116c <ft_strdup+0x3c>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <ft_strcpy@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
mov    %eax,%edi
call   1050 <ft_strnew@plt>
test   %rax,%rax
je     1151 <ft_strdup+0x21>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <ft_strcpy@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ft_strdup(i8* %0) {
%2 = tail call i32 @ft_strlen(i8* %0)
%3 = tail call i8* @ft_strnew(i32 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i8* @ft_strcpy(i8* %3, i8* %0)
br label %7
7: ; preds = %5, %1
%8 = phi i8* [ %6, %5 ], [ null, %1 ]
ret i8* %8
}
unsigned size_sub_alac(const struct qt_atom *self) { return 36; }


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

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

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

LLVM IR (-O2):
%struct.qt_atom = type opaque
define i32 @size_sub_alac(%struct.qt_atom* nocapture readnone %0) {
ret i32 36
}
void msm_rtb_disable(void) { return; }


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

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

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

LLVM IR (-O2):
define void @msm_rtb_disable() {
ret void
}
int test_imm_48uint8_reg(unsigned char val) {
  return ((val) & (0x48 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_48uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 72
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}