xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
void test(void) {
  void *ptr = malloc(512);
  free(ptr);
  free(ptr);
}


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

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    $0x200,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @test() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 512)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @free(i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call dereferenceable_or_null(512) i8* @malloc(i32 512)
%2 = tail call i32 @free(i8* %1)
%3 = tail call i32 @free(i8* %1)
ret void
}
void foo087() {}


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

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

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

LLVM IR (-O2):
define void @foo087() {
ret void
}
void VecCopy3iv(int v[3], const int a[3]) {
  v[0] = a[0];
  v[1] = a[1];
  v[2] = a[2];
}


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

x86 assembly (clang, -O2):
<VecCopy3iv>:
mov    (%rsi),%eax
mov    %eax,(%rdi)
mov    0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
mov    0x8(%rsi),%eax
mov    %eax,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @VecCopy3iv(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = getelementptr inbounds i32, i32* %1, i64 2
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chmod(char *, int);
int main(int argc, char *argv[]) {
  chmod(argv[1], 0777);
  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    $0x1ff,%esi
call   1030 <chmod@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    $0x1ff,%esi
call   1030 <chmod@plt>
xor    %eax,%eax
pop    %rcx
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 = call i32 @chmod(i8* %8, i32 511)
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 = tail call i32 @chmod(i8* %4, i32 511)
ret i32 0
}
/* Variables and functions */
void *SDL_memcpy_inline(void *, void const *, size_t);
__attribute__((always_)) void *SDL_memcpy4(void *dst, const void *src,
                                           size_t dwords) {
  return SDL_memcpy_inline(dst, src, dwords * 4);
}


x86 assembly (clang, -O0):
<SDL_memcpy4>:
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
shl    $0x2,%rdx
call   1030 <SDL_memcpy_inline@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDL_memcpy4>:
shl    $0x2,%rdx
jmp    1030 <SDL_memcpy_inline@plt>

LLVM IR (-O0):
define i8* @SDL_memcpy4(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 = mul i64 %9, 4
%11 = call i8* @SDL_memcpy_inline(i8* %7, i8* %8, i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @SDL_memcpy4(i8* %0, i8* %1, i64 %2) {
%4 = shl i64 %2, 2
%5 = tail call i8* @SDL_memcpy_inline(i8* %0, i8* %1, i64 %4)
ret i8* %5
}
int test_imm_AFint16_reg(short val) {
  return ((val) & (-0xAF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AFint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff51,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_AFint16_reg>:
test   $0xff51,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_AFint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -175
%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_AFint16_reg(i16 signext %0) {
%2 = and i16 %0, -175
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int sumI(int Array[], int n) {
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    sum = Array[i];
  }
  return sum;
}


x86 assembly (clang, -O0):
<sumI>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1141 <sumI+0x41>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <sumI+0x19>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumI>:
test   %esi,%esi
jle    110b <sumI+0xb>
add    $0xffffffff,%esi
mov    (%rdi,%rsi,4),%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sumI(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = add nsw i32 %1, -1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %4, %2
%10 = phi i32 [ %8, %4 ], [ 0, %2 ]
ret i32 %10
}
void my_strcpy3(char *dst, const char *src) {
  while (*dst++ = *src++)
    ;
}


x86 assembly (clang, -O0):
<my_strcpy3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     113b <my_strcpy3+0x3b>
jmp    110c <my_strcpy3+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcpy3>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <my_strcpy3+0x10>
ret

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

LLVM IR (-O2):
define void @my_strcpy3(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
int M_PI;
double pow(double, double);
double sqrt(double);
double calcSemiMajor(double time) {
  return pow(time * sqrt(3.986E5) / (2 * M_PI), 2.0 / 3.0);
}


x86 assembly (clang, -O0):
<calcSemiMajor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec9(%rip),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  0xe94(%rip),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcSemiMajor>:
mulsd  0xee8(%rip),%xmm0
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
@M_PI = global i32 0
define double @calcSemiMajor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sqrt(double 3.986000e+05)
%5 = fmul double %3, %4
%6 = load i32, i32* @M_PI
%7 = mul nsw i32 2, %6
%8 = sitofp i32 %7 to double
%9 = fdiv double %5, %8
%10 = call double @pow(double %9, double 0x3FE5555555555555)
ret double %10
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @calcSemiMajor(double %0) {
%2 = fmul double %0, 0x4083BAC838DCCBD9
%3 = load i32, i32* @M_PI
%4 = shl nsw i32 %3, 1
%5 = sitofp i32 %4 to double
%6 = fdiv double %2, %5
%7 = tail call double @pow(double %6, double 0x3FE5555555555555)
ret double %7
}
/* Variables and functions */
unsigned long addis(unsigned char, int /*<<< orphan*/, unsigned short);
unsigned long lis(unsigned char rd, unsigned short value) {
  return addis(rd, 0, value);
}


x86 assembly (clang, -O0):
<lis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
xor    %esi,%esi
movzbl %al,%edi
movzwl -0x4(%rbp),%edx
call   1030 <addis@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @lis(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
%7 = call i64 @addis(i8 zeroext %5, i32 0, i16 zeroext %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @lis(i8 zeroext %0, i16 zeroext %1) {
%3 = tail call i64 @addis(i8 zeroext %0, i32 0, i16 zeroext %1)
ret i64 %3
}
/* Type definitions */
struct apacheAccessLog {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ badFormat(struct apacheAccessLog **, char *, char *, int,
                             char *);
void unterminatedQuote(struct apacheAccessLog **pLl, char *line, char *fileName,
                       int lineIx) {
  badFormat(pLl, line, fileName, lineIx, "missing closing quote");
}


x86 assembly (clang, -O0):
<unterminatedQuote>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xec3(%rip),%r8
call   1030 <badFormat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unterminatedQuote>:
lea    0xee9(%rip),%r8
jmp    1030 <badFormat@plt>

LLVM IR (-O0):
%struct.apacheAccessLog = type { i32 }
@.str = [22 x i8] c"missing closing quote\00"
define void @unterminatedQuote(%struct.apacheAccessLog** %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca %struct.apacheAccessLog**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store %struct.apacheAccessLog** %0, %struct.apacheAccessLog*** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct.apacheAccessLog**, %struct.apacheAccessLog*** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @badFormat(%struct.apacheAccessLog** %9, i8* %10, i8* %11, i32 %12, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.apacheAccessLog = type { i32 }
@.str = [22 x i8] c"missing closing quote\00"
define void @unterminatedQuote(%struct.apacheAccessLog** %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @badFormat(%struct.apacheAccessLog** %0, i8* %1, i8* %2, i32 %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int umount2(const char *special_file, int flags) {
  fprintf(stderr,
          "\n\nTo make this application work, you will need to recompile\n");
  fprintf(stderr,
          "with a kernel supporting the umount2 system call. -Erik\n\n");
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<umount2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xef9(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%ecx
mov    0x2e77(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umount2>:
push   %rbx
mov    0x2ec0(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0e(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    0x2e8c(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [61 x i8] c"\0A\0ATo make this application work, you will need to recompile\0A\00"
@.str.1 = [58 x i8] c"with a kernel supporting the umount2 system call. -Erik\0A\0A\00"
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @umount2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @ENOSYS
store i32 %9, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [61 x i8] c"\0A\0ATo make this application work, you will need to recompile\0A\00"
@.str.1 = [58 x i8] c"with a kernel supporting the umount2 system call. -Erik\0A\0A\00"
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @umount2(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}
int test_imm_67int16_reg(short val) {
  return ((val) & (0x67 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_67int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x67,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_67int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 103
%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_67int16_reg(i16 signext %0) {
%2 = and i16 %0, 103
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
double lattice_background_plaquette_action_sf(int, double, double, double);
double lattice_lo_effective_plaquette_action_sf(int t, double beta, double ct,
                                                double eta) {
  double eff_lo;
  double plaq_back;
  plaq_back = lattice_background_plaquette_action_sf(t, beta, ct, eta);
  eff_lo = (6. / beta) * plaq_back;
  return eff_lo;
}


x86 assembly (clang, -O0):
<lattice_lo_effective_plaquette_action_sf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1030 <lattice_background_plaquette_action_sf@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  0xeb2(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lattice_lo_effective_plaquette_action_sf>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <lattice_background_plaquette_action_sf@plt>
movsd  0xedd(%rip),%xmm1
divsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @lattice_lo_effective_plaquette_action_sf(i32 %0, double %1, double %2, double %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 %0, i32* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%11 = load i32, i32* %5
%12 = load double, double* %6
%13 = load double, double* %7
%14 = load double, double* %8
%15 = call double @lattice_background_plaquette_action_sf(i32 %11, double %12, double %13, double %14)
store double %15, double* %10
%16 = load double, double* %6
%17 = fdiv double 6.000000e+00, %16
%18 = load double, double* %10
%19 = fmul double %17, %18
store double %19, double* %9
%20 = load double, double* %9
ret double %20
}

LLVM IR (-O2):
define double @lattice_lo_effective_plaquette_action_sf(i32 %0, double %1, double %2, double %3) {
%5 = tail call double @lattice_background_plaquette_action_sf(i32 %0, double %1, double %2, double %3)
%6 = fdiv double 6.000000e+00, %1
%7 = fmul double %6, %5
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_u64_t1ha64s_data32(float const *, size_t, uintptr_t);
uint64_t rgph_u64_t1ha64s_f32a(const float *key, size_t len, uintptr_t seed) {
  return rgph_u64_t1ha64s_data32(key, len, seed);
}


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

x86 assembly (clang, -O2):
<rgph_u64_t1ha64s_f32a>:
jmp    1030 <rgph_u64_t1ha64s_data32@plt>

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

LLVM IR (-O2):
define i32 @rgph_u64_t1ha64s_f32a(float* %0, i64 %1, i64 %2) {
%4 = tail call i32 @rgph_u64_t1ha64s_data32(float* %0, i64 %1, i64 %2)
ret i32 %4
}
void g_cache_value_foreach() {}


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

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

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

LLVM IR (-O2):
define void @g_cache_value_foreach() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Stg_Object_Delete(void *);
void _Stg_PrimitiveObject_Delete(void *primitive) {
  _Stg_Object_Delete(primitive);
}


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

x86 assembly (clang, -O2):
<_Stg_PrimitiveObject_Delete>:
jmp    1030 <_Stg_Object_Delete@plt>

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

LLVM IR (-O2):
define void @_Stg_PrimitiveObject_Delete(i8* %0) {
%2 = tail call i32 @_Stg_Object_Delete(i8* %0)
ret void
}
unsigned long long int vcd_get_time(void) {}


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

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

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

LLVM IR (-O2):
define i64 @vcd_get_time() {
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
int print_insn_spu(unsigned long insn, unsigned long memaddr) {
  printf("%.8lx", insn);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%.8lx\00"
define i32 @print_insn_spu(i64 %0, i64 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i32 0
}
void on_init(void) {}


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

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

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

LLVM IR (-O2):
define void @on_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ util_msleep(int);
void sleep_one_sec(void) {
  util_msleep(200);
  util_msleep(200);
}


x86 assembly (clang, -O0):
<sleep_one_sec>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc8,%edi
call   1030 <util_msleep@plt>
mov    $0xc8,%edi
call   1030 <util_msleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_one_sec>:
push   %rax
mov    $0xc8,%edi
call   1030 <util_msleep@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1030 <util_msleep@plt>

LLVM IR (-O0):
define void @sleep_one_sec() {
%1 = call i32 @util_msleep(i32 200)
%2 = call i32 @util_msleep(i32 200)
ret void
}

LLVM IR (-O2):
define void @sleep_one_sec() {
%1 = tail call i32 @util_msleep(i32 200)
%2 = tail call i32 @util_msleep(i32 200)
ret void
}
void coroutine_flush_register_windows() {}


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

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

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

LLVM IR (-O2):
define void @coroutine_flush_register_windows() {
ret void
}
/* Variables and functions */
int detect();
int /*<<< orphan*/ printf(char *);
void get_subarchitecture(void) {
  if (detect() == 1) {
    printf("P5600");
  } else {
    printf("UNKNOWN");
  }
}


x86 assembly (clang, -O0):
<get_subarchitecture>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <detect@plt>
cmp    $0x1,%eax
jne    1145 <get_subarchitecture+0x25>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
jmp    1151 <get_subarchitecture+0x31>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_subarchitecture>:
push   %rax
xor    %eax,%eax
call   1040 <detect@plt>
cmp    $0x1,%eax
lea    0xece(%rip),%rax
lea    0xecd(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"P5600\00"
@.str.1 = [8 x i8] c"UNKNOWN\00"
define void @get_subarchitecture() {
%1 = call i32 (...) @detect()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"P5600\00"
@.str.1 = [8 x i8] c"UNKNOWN\00"
define void @get_subarchitecture() {
%1 = tail call i32 (...) @detect()
%2 = icmp eq i32 %1, 1
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret void
}
int cfs_size_round(int val) { return (val + 7) & (~0x7); }


x86 assembly (clang, -O0):
<cfs_size_round>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x7,%eax
and    $0xfffffff8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfs_size_round>:
lea    0x7(%rdi),%eax
and    $0xfffffff8,%eax
ret

LLVM IR (-O0):
define i32 @cfs_size_round(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 7
%5 = and i32 %4, -8
ret i32 %5
}

LLVM IR (-O2):
define i32 @cfs_size_round(i32 %0) {
%2 = add nsw i32 %0, 7
%3 = and i32 %2, -8
ret i32 %3
}
int hashingByDiv(int key, int HASH_TABLE_SIZE) {
  return (key & 0x7FFFFFFF) % HASH_TABLE_SIZE;
}


x86 assembly (clang, -O0):
<hashingByDiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7fffffff,%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashingByDiv>:
mov    %edi,%eax
and    $0x7fffffff,%eax
xor    %edx,%edx
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @hashingByDiv(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 = and i32 %5, 2147483647
%7 = load i32, i32* %4
%8 = srem i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @hashingByDiv(i32 %0, i32 %1) {
%3 = and i32 %0, 2147483647
%4 = srem i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int main(void) {
  int i;
  char c;
  c = '1';
  printf("%c %d\n", c, 'c');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x31,-0x9(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x63,%edx
movsbl -0x9(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext 49, i8 signext 99)
ret i32 0
}
void gtk_accel_groups_from_object() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_groups_from_object() {
ret void
}
/* Type definitions */
struct termios {
  int /*<<< orphan*/ c_lflag;
};

/* Variables and functions */
int /*<<< orphan*/ ISIG;
int /*<<< orphan*/ TCSANOW;
int /*<<< orphan*/ tcgetattr(int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ tcsetattr(int /*<<< orphan*/, int /*<<< orphan*/,
                             struct termios *);
void enable_signals(void) {
  struct termios term;
  tcgetattr(0, &term);
  term.c_lflag |= ISIG;
  tcsetattr(0, TCSANOW, &term);
}


x86 assembly (clang, -O0):
<enable_signals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
call   1030 <tcgetattr@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_signals>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <tcgetattr@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
or     %eax,0x8(%rsp)
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
mov    %rbx,%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@ISIG = global i32 0
@TCSANOW = global i32 0
define void @enable_signals() {
%1 = alloca %struct.termios
%2 = call i32 @tcgetattr(i32 0, %struct.termios* %1)
%3 = load i32, i32* @ISIG
%4 = getelementptr inbounds %struct.termios, %struct.termios* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = or i32 %5, %3
store i32 %6, i32* %4
%7 = load i32, i32* @TCSANOW
%8 = call i32 @tcsetattr(i32 0, i32 %7, %struct.termios* %1)
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@ISIG = global i32 0
@TCSANOW = global i32 0
define void @enable_signals() {
%1 = alloca %struct.termios
%2 = bitcast %struct.termios* %1 to i8*
%3 = call i32 @tcgetattr(i32 0, %struct.termios* %1)
%4 = load i32, i32* @ISIG
%5 = getelementptr inbounds %struct.termios, %struct.termios* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = or i32 %6, %4
store i32 %7, i32* %5
%8 = load i32, i32* @TCSANOW
%9 = call i32 @tcsetattr(i32 0, i32 %8, %struct.termios* %1)
ret void
}
int f() {
  int x;
  while (x < 3) {
    double x = 4;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x3,-0x8(%rbp)
jge    1120 <f+0x20>
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1104 <f+0x4>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 3
br i1 %6, label %7, label %8
7: ; preds = %4
store double 4.000000e+00, double* %3
br label %4
8: ; preds = %4
%9 = load i32, i32* %1
ret i32 %9
}

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

/* Variables and functions */
char *asctime(int /*<<< orphan*/);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ const *);
char *ctime(const time_t *time) { return asctime(localtime(time)); }


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

x86 assembly (clang, -O2):
<ctime>:
push   %rax
call   1030 <localtime@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <asctime@plt>

LLVM IR (-O0):
define i8* @ctime(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @localtime(i32* %3)
%5 = call i8* @asctime(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @ctime(i32* %0) {
%2 = tail call i32 @localtime(i32* %0)
%3 = tail call i8* @asctime(i32 %2)
ret i8* %3
}
float absoluteValue(float x) {
  if (x < 0) {
    x = -x;
  }
  return x;
}


x86 assembly (clang, -O0):
<absoluteValue>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    112d <absoluteValue+0x2d>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absoluteValue>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @absoluteValue(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fneg float %6
store float %7, float* %2
br label %8
8: ; preds = %5, %1
%9 = load float, float* %2
ret float %9
}

LLVM IR (-O2):
define float @absoluteValue(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int x_root;
};
typedef TYPE_1__ XKeyReleasedEvent;

/* Variables and functions */
void set_XKeyReleasedEvent_x_root(void *_p, int _v) {
  ((XKeyReleasedEvent *)_p)->x_root = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XKeyReleasedEvent_x_root>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XKeyReleasedEvent_x_root(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XKeyReleasedEvent_x_root(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void lcd_setup() {}


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

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

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

LLVM IR (-O2):
define void @lcd_setup() {
ret void
}
int test_imm_98uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x98 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_98uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 152
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ GioInit();
int /*<<< orphan*/ N2hetInit();
void IoInit(void) {
  GioInit();
  N2hetInit();
}


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

x86 assembly (clang, -O2):
<IoInit>:
push   %rax
xor    %eax,%eax
call   1030 <GioInit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <N2hetInit@plt>

LLVM IR (-O0):
define void @IoInit() {
%1 = call i32 (...) @GioInit()
%2 = call i32 (...) @N2hetInit()
ret void
}

LLVM IR (-O2):
define void @IoInit() {
%1 = tail call i32 (...) @GioInit()
%2 = tail call i32 (...) @N2hetInit()
ret void
}
/* Variables and functions */
int __utmpname(char const *);
int utmpxname(const char *file) { return __utmpname(file); }


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

x86 assembly (clang, -O2):
<utmpxname>:
jmp    1030 <__utmpname@plt>

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

LLVM IR (-O2):
define i32 @utmpxname(i8* %0) {
%2 = tail call i32 @__utmpname(i8* %0)
ret i32 %2
}
int LowertoUpper(char c) { c = c - 32; }


x86 assembly (clang, -O0):
<LowertoUpper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @LowertoUpper(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = sub nsw i32 %5, 32
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @LowertoUpper(i8 signext %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ vafunction(char *, int, int, int, int, int, int, int, int,
                              int);
int main(void) {
  vafunction("", 1., 2., 3., 4., 5., 6., 7., 8., 9.);
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
movl   $0x6,(%rsp)
movl   $0x7,0x8(%rsp)
movl   $0x8,0x10(%rsp)
movl   $0x9,0x18(%rsp)
call   1030 <vafunction@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
push   $0x9
push   $0x8
push   $0x7
push   $0x6
call   1030 <vafunction@plt>
add    $0x20,%rsp
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @vafunction(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 @vafunction(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9)
%2 = tail call i32 @exit(i32 0)
unreachable
}
char *hash_plugin_detailed(void) {
  return ("bitcoin - A bitcoin miner\n"
          "------------------------\n"
          "Use this module to mine bitcoins :)\n"
          "Several pools are supported.\n"
          "Input should be in form: \'user:pass:host:port\'\n"
          "Known software that uses this password hashing method:\n"
          "Bitcoin cryptocurrency system.\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [295 x i8] c"bitcoin - A bitcoin miner\0A------------------------\0AUse this module to mine bitcoins :)\0ASeveral pools are supported.\0AInput should be in form: 'user:pass:host:port'\0AKnown software that uses this password hashing method:\0ABitcoin cryptocurrency system.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([295 x i8], [295 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [295 x i8] c"bitcoin - A bitcoin miner\0A------------------------\0AUse this module to mine bitcoins :)\0ASeveral pools are supported.\0AInput should be in form: 'user:pass:host:port'\0AKnown software that uses this password hashing method:\0ABitcoin cryptocurrency system.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([295 x i8], [295 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc_or_die(unsigned int);
int /*<<< orphan*/ parse_ftrace_printk(char *, unsigned int);
unsigned int read4();
int /*<<< orphan*/ read_or_die(char *, unsigned int);
void read_ftrace_printk(void) {
  unsigned int size;
  char *buf;
  size = read4();
  if (!size)
    return;
  buf = malloc_or_die(size);
  read_or_die(buf, size);
  parse_ftrace_printk(buf, size);
  free(buf);
}


x86 assembly (clang, -O0):
<read_ftrace_printk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <read4@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1171 <read_ftrace_printk+0x21>
jmp    119e <read_ftrace_printk+0x4e>
mov    -0x4(%rbp),%edi
call   1060 <malloc_or_die@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1070 <read_or_die@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1050 <parse_ftrace_printk@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_ftrace_printk>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <read4@plt>
test   %eax,%eax
je     118e <read_ftrace_printk+0x3e>
mov    %eax,%ebx
mov    %eax,%edi
call   1060 <malloc_or_die@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %ebx,%esi
call   1070 <read_or_die@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <parse_ftrace_printk@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @read_ftrace_printk() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 (...) @read4()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %0
br label %18
7: ; preds = %0
%8 = load i32, i32* %1
%9 = call i8* @malloc_or_die(i32 %8)
store i8* %9, i8** %2
%10 = load i8*, i8** %2
%11 = load i32, i32* %1
%12 = call i32 @read_or_die(i8* %10, i32 %11)
%13 = load i8*, i8** %2
%14 = load i32, i32* %1
%15 = call i32 @parse_ftrace_printk(i8* %13, i32 %14)
%16 = load i8*, i8** %2
%17 = call i32 @free(i8* %16)
br label %18
18: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
define void @read_ftrace_printk() {
%1 = tail call i32 (...) @read4()
%2 = icmp eq i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i8* @malloc_or_die(i32 %1)
%5 = tail call i32 @read_or_die(i8* %4, i32 %1)
%6 = tail call i32 @parse_ftrace_printk(i8* %4, i32 %1)
%7 = tail call i32 @free(i8* %4)
br label %8
8: ; preds = %0, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t rfcomm_event_remote_modem_status_get_rfcomm_cid(const uint8_t *event) {
  return little_endian_read_16(event, 2);
}


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

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

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

LLVM IR (-O2):
define i32 @rfcomm_event_remote_modem_status_get_rfcomm_cid(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 2)
ret i32 %2
}
/* Variables and functions */
int creat(char *, int);
int /*<<< orphan*/ perror(char *);
int main() {
  int fd = creat("a.txt", 00700);
  if (fd == -1) {
    perror("creat");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x1c0,%esi
call   1040 <creat@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1159 <main+0x39>
lea    0xeb2(%rip),%rdi
call   1030 <perror@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1c0,%esi
call   1040 <creat@plt>
cmp    $0xffffffff,%eax
je     113b <main+0x1b>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec4(%rip),%rdi
call   1030 <perror@plt>
jmp    1137 <main+0x17>

LLVM IR (-O0):
@.str = [6 x i8] c"a.txt\00"
@.str.1 = [6 x i8] c"creat\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @creat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 448)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"a.txt\00"
@.str.1 = [6 x i8] c"creat\00"
define i32 @main() {
%1 = tail call i32 @creat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 448)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int /*<<< orphan*/ ftok(char const *const, int);
key_t get_key(char const *const address, int code) {
  return ftok(address, code);
}


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

x86 assembly (clang, -O2):
<get_key>:
jmp    1030 <ftok@plt>

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

LLVM IR (-O2):
define i32 @get_key(i8* %0, i32 %1) {
%3 = tail call i32 @ftok(i8* %0, i32 %1)
ret i32 %3
}