xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned long long getGcm(unsigned long long, unsigned long long);
int /*<<< orphan*/ printf(char *, unsigned long long);
int /*<<< orphan*/ scanf(char *, unsigned long long *, unsigned long long *);
int main(int argc, char *argv[]) {
  unsigned long long num1, num2;
  unsigned long long gcm;
  scanf("%lld %lld", &num1, &num2);
  gcm = getGcm(num1, num2);
  printf("%lld\n", gcm);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <getGcm@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1050 <getGcm@plt>
lea    0xeaa(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%lld %lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64* %6, i64* %7)
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = call i64 @getGcm(i64 %10, i64 %11)
store i64 %12, i64* %8
%13 = load i64, i64* %8
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%lld %lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca i64
%5 = bitcast i64* %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64* %3, i64* %4)
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = call i64 @getGcm(i64 %8, i64 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %10)
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
char *mkstr(const char *s, int len) {
  char *result = (char *)malloc(len + 1);
  memcpy(result, s, len);
  result[len] = '\0';
  return result;
}


x86 assembly (clang, -O0):
<mkstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstr>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1030 <memcpy@plt>
movslq %r15d,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @mkstr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = call i32 @memcpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %5
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @mkstr(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i32 %1)
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 0, i8* %8
ret i8* %5
}
void _M2_foo_finish(__attribute__((unused)) int argc,
                    __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_foo_finish(i32 %0, i8** nocapture %1) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rev8(int);
uint32_t decode_voltage(uint32_t v) {
  return (0x78 - (rev8(v >> 8) >> 1)) * 125;
}


x86 assembly (clang, -O0):
<decode_voltage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
call   1030 <rev8@plt>
mov    %eax,%ecx
sar    $0x1,%ecx
mov    $0x78,%eax
sub    %ecx,%eax
imul   $0x7d,%eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_voltage>:
push   %rax
sar    $0x8,%edi
call   1030 <rev8@plt>
sar    %eax
mov    $0x78,%ecx
sub    %eax,%ecx
imul   $0x7d,%ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @decode_voltage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = call i32 @rev8(i32 %4)
%6 = ashr i32 %5, 1
%7 = sub nsw i32 120, %6
%8 = mul nsw i32 %7, 125
ret i32 %8
}

LLVM IR (-O2):
define i32 @decode_voltage(i32 %0) {
%2 = ashr i32 %0, 8
%3 = tail call i32 @rev8(i32 %2)
%4 = ashr i32 %3, 1
%5 = sub nsw i32 120, %4
%6 = mul nsw i32 %5, 125
ret i32 %6
}
int isign(int a) { return a > 0 ? 1 : a < 0 ? -1 : 0; }


x86 assembly (clang, -O0):
<isign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111e <isign+0x1e>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1131 <isign+0x31>
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isign>:
xor    %ecx,%ecx
test   %edi,%edi
setne  %cl
neg    %ecx
test   %edi,%edi
mov    $0x1,%eax
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @isign(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 -1, i32 0
br label %11
11: ; preds = %6, %5
%12 = phi i32 [ 1, %5 ], [ %10, %6 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @isign(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = sext i1 %2 to i32
%4 = icmp slt i32 %0, 1
%5 = select i1 %4, i32 %3, i32 1
ret i32 %5
}
int sub1(int a, int b) { return (a - b) != 0; }


x86 assembly (clang, -O0):
<sub1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub1>:
xor    %eax,%eax
cmp    %esi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @sub1(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int _NSIG;
int __rt_sigsuspend(int /*<<< orphan*/ const *, int);
int __libc_sigsuspend(const sigset_t *mask) {
  return __rt_sigsuspend(mask, _NSIG / 8);
}


x86 assembly (clang, -O0):
<__libc_sigsuspend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1030 <__rt_sigsuspend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_sigsuspend>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
lea    0x7(%rax),%esi
test   %eax,%eax
cmovns %eax,%esi
sar    $0x3,%esi
jmp    1030 <__rt_sigsuspend@plt>

LLVM IR (-O0):
@_NSIG = global i32 0
define i32 @__libc_sigsuspend(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @_NSIG
%5 = sdiv i32 %4, 8
%6 = call i32 @__rt_sigsuspend(i32* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@_NSIG = global i32 0
define i32 @__libc_sigsuspend(i32* %0) {
%2 = load i32, i32* @_NSIG
%3 = sdiv i32 %2, 8
%4 = tail call i32 @__rt_sigsuspend(i32* %0, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("Hello world \n "); }


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"Hello world \0A \00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ filter_setup();
void leitshow_init() { filter_setup(); }


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

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

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

LLVM IR (-O2):
define void @leitshow_init() {
%1 = tail call i32 (...) @filter_setup()
ret void
}
float repl2(float vary) {
  if (vary > 1.0)
    return 1.0;
  else if (vary < 0.0)
    return 0.0;
  else
    return vary;
}


x86 assembly (clang, -O0):
<repl2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1136 <repl2+0x36>
movss  0xedc(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1163 <repl2+0x63>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1159 <repl2+0x59>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1163 <repl2+0x63>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @repl2(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fcmp ogt double %5, 1.000000e+00
br i1 %6, label %7, label %8
7: ; preds = %1
store float 1.000000e+00, float* %2
br label %15
8: ; preds = %1
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fcmp olt double %10, 0.000000e+00
br i1 %11, label %12, label %13
12: ; preds = %8
store float 0.000000e+00, float* %2
br label %15
13: ; preds = %8
%14 = load float, float* %3
store float %14, float* %2
br label %15
15: ; preds = %13, %12, %7
%16 = load float, float* %2
ret float %16
}

LLVM IR (-O2):
define float @repl2(float %0) {
%2 = fcmp ogt float %0, 1.000000e+00
%3 = fcmp olt float %0, 0.000000e+00
%4 = select i1 %3, float 0.000000e+00, float %0
%5 = select i1 %2, float 1.000000e+00, float %4
ret float %5
}
/* Type definitions */
struct FNVHash256 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fnv256UpdateBuffer(struct FNVHash256 *, char const *,
                                      int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void fnv256UpdateString(struct FNVHash256 *hval, const char *str) {
  fnv256UpdateBuffer(hval, str, strlen(str));
}


x86 assembly (clang, -O0):
<fnv256UpdateString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <fnv256UpdateBuffer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnv256UpdateString>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fnv256UpdateBuffer@plt>

LLVM IR (-O0):
%struct.FNVHash256 = type { i32 }
define void @fnv256UpdateString(%struct.FNVHash256* %0, i8* %1) {
%3 = alloca %struct.FNVHash256*
%4 = alloca i8*
store %struct.FNVHash256* %0, %struct.FNVHash256** %3
store i8* %1, i8** %4
%5 = load %struct.FNVHash256*, %struct.FNVHash256** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @fnv256UpdateBuffer(%struct.FNVHash256* %5, i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.FNVHash256 = type { i32 }
define void @fnv256UpdateString(%struct.FNVHash256* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @fnv256UpdateBuffer(%struct.FNVHash256* %0, i8* %1, i32 %3)
ret void
}
int main() {
  unsigned char arg1 = 0x55;
  unsigned char arg2 = 0xAA;
  unsigned char arg3 = 0x55;
  unsigned char out1 = 0;
  unsigned char out2 = 0;
  __asm__("cmpxchgb %%cl, %%dl"
          : "=a"(out1), "=d"(out2)
          : "a"(arg1), "c"(arg2), "d"(arg3));
  return (out1 == 0x55) && (out2 == 0xAA);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x55,-0x5(%rbp)
movb   $0xaa,-0x6(%rbp)
movb   $0x55,-0x7(%rbp)
movb   $0x0,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x5(%rbp),%al
mov    -0x6(%rbp),%cl
mov    -0x7(%rbp),%dl
cmpxchg %cl,%dl
mov    %al,-0x8(%rbp)
mov    %dl,-0x9(%rbp)
movzbl -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    $0x55,%ecx
mov    %al,-0xa(%rbp)
jne    1152 <main+0x52>
movzbl -0x9(%rbp),%eax
cmp    $0xaa,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x55,%al
mov    $0xaa,%cl
mov    $0x55,%dl
cmpxchg %cl,%dl
xor    $0x55,%al
xor    $0xaa,%dl
xor    %ecx,%ecx
or     %al,%dl
sete   %cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i32 0, i32* %1
store i8 85, i8* %2
store i8 -86, i8* %3
store i8 85, i8* %4
store i8 0, i8* %5
store i8 0, i8* %6
%7 = load i8, i8* %2
%8 = load i8, i8* %3
%9 = load i8, i8* %4
%10 = call { i8, i8 } asm "cmpxchgb %cl, %dl", "={ax},={dx},{ax},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i8 %7, i8 %8, i8 %9)
%11 = extractvalue { i8, i8 } %10, 0
%12 = extractvalue { i8, i8 } %10, 1
store i8 %11, i8* %5
store i8 %12, i8* %6
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = icmp eq i32 %14, 85
br i1 %15, label %16, label %20
16: ; preds = %0
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = icmp eq i32 %18, 170
br label %20
20: ; preds = %16, %0
%21 = phi i1 [ false, %0 ], [ %19, %16 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call { i8, i8 } asm "cmpxchgb %cl, %dl", "={ax},={dx},{ax},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i8 85, i8 -86, i8 85)
%2 = extractvalue { i8, i8 } %1, 0
%3 = extractvalue { i8, i8 } %1, 1
%4 = icmp eq i8 %2, 85
%5 = icmp eq i8 %3, -86
%6 = select i1 %4, i1 %5, i1 false
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
double ceil(double);
double floor(double);
double trunc(double d) { return (d > 0) ? floor(d) : ceil(d); }


x86 assembly (clang, -O0):
<trunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1153 <trunc+0x33>
movsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1162 <trunc+0x42>
movsd  -0x8(%rbp),%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trunc>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112f <trunc+0xf>
jmp    1040 <floor@plt>
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define double @trunc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = call double @llvm.floor.f64(double %6)
br label %11
8: ; preds = %1
%9 = load double, double* %2
%10 = call double @llvm.ceil.f64(double %9)
br label %11
11: ; preds = %8, %5
%12 = phi double [ %7, %5 ], [ %10, %8 ]
ret double %12
}

LLVM IR (-O2):
define double @trunc(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call double @llvm.floor.f64(double %0)
br label %7
5: ; preds = %1
%6 = tail call double @llvm.ceil.f64(double %0)
br label %7
7: ; preds = %5, %3
%8 = phi double [ %4, %3 ], [ %6, %5 ]
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int printf(char *, char *);
char *strerror(int /*<<< orphan*/);
int main(int argc, char **argv) {
  return printf("%s\n", strerror(atoi(argv[1] ? argv[1] : "0")));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     1166 <main+0x36>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1176 <main+0x46>
lea    0xe97(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1176 <main+0x46>
mov    -0x18(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <strerror@plt>
mov    %rax,%rsi
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rax
test   %rax,%rax
lea    0xec5(%rip),%rdi
cmovne %rax,%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <strerror@plt>
lea    0xeaa(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [2 x i8] c"0\00"
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 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %10
%16 = phi i8* [ %13, %10 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %14 ]
%17 = call i32 @atoi(i8* %16)
%18 = call i8* @strerror(i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
ret i32 %19
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [2 x i8] c"0\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
%6 = select i1 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %4
%7 = tail call i32 @atoi(i8* %6)
%8 = tail call i8* @strerror(i32 %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 %9
}
stripq(s) char *s;
{
  char *t;
  while (*s) {
    if (*s == '\\') {
      for (t = s; *t != '\0'; t++)
        *t = *(t + 1);
    }
    s++;
  }
}


x86 assembly (clang, -O0):
<stripq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1171 <stripq+0x71>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    1160 <stripq+0x60>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115b <stripq+0x5b>
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    112d <stripq+0x2d>
jmp    1160 <stripq+0x60>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <stripq+0x8>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stripq>:
lea    0x1(%rdi),%rax
jmp    111c <stripq+0x1c>
cs nopw 0x0(%rax,%rax,1)
test   %cl,%cl
je     1140 <stripq+0x40>
add    $0x1,%rdi
add    $0x1,%rax
mov    (%rdi),%cl
cmp    $0x5c,%cl
jne    1110 <stripq+0x10>
mov    %rax,%rcx
cs nopw 0x0(%rax,%rax,1)
movzbl (%rcx),%edx
mov    %dl,-0x1(%rcx)
add    $0x1,%rcx
test   %dl,%dl
jne    1130 <stripq+0x30>
jmp    1114 <stripq+0x14>
ret

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

LLVM IR (-O2):
define i32 @stripq(i8* nocapture %0) {
br label %2
2: ; preds = %10, %1
%3 = phi i8* [ %0, %1 ], [ %11, %10 ]
%4 = load i8, i8* %3
switch i8 %4, label %10 [
i8 0, label %12
i8 92, label %5
]
5: ; preds = %2, %5
%6 = phi i8* [ %7, %5 ], [ %3, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
store i8 %8, i8* %6
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
12: ; preds = %2
ret i32 undef
}
int quirk_amdprefetch(struct ohci_hcd *ohci) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ohci_hcd = type opaque
define i32 @quirk_amdprefetch(%struct.ohci_hcd* nocapture readnone %0) {
ret i32 0
}
unsigned long load_bswap64(unsigned long *p) { return __builtin_bswap64(*p); }


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

x86 assembly (clang, -O2):
<load_bswap64>:
mov    (%rdi),%rax
bswap  %rax
ret

LLVM IR (-O0):
define i64 @load_bswap64(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = call i64 @llvm.bswap.i64(i64 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @load_bswap64(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i64 @llvm.bswap.i64(i64 %2)
ret i64 %3
}
int elg_pform_hw_core_id(int tid) { return tid; }


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

x86 assembly (clang, -O2):
<elg_pform_hw_core_id>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @elg_pform_hw_core_id(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void decodeFirstByte(uint8_t *src, uint32_t *p32_dest) {
  uint8_t *p8_dest = (uint8_t *)p32_dest;
  *p8_dest = *src;
}


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

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

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

LLVM IR (-O2):
define void @decodeFirstByte(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
store i32 %3, i32* %1
ret void
}
int flashrom_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @flashrom_shutdown() {
ret i32 0
}
/* Variables and functions */
char *PlatformName();
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("Platform is '%s'\n", PlatformName());
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Platform is '%s'\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i8* (...) @PlatformName()
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Platform is '%s'\0A\00"
define i32 @main() {
%1 = tail call i8* (...) @PlatformName()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("foo\n");
  printf("bar\n");
}


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"foo\00"
@str.2 = [4 x i8] c"bar\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a, b, *p1, *p2;
  a = 4;
  b = 3;
  p1 = &a;
  p2 = p1;
  *p2 = *p1 + 3;
  b = b * (*p1);
  (*p2)++;
  p1 = &b;
  printf("%d %d\n", *p1, *p2);
  printf("%d %d\n", a, b);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x4,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x3,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
imul   (%rcx),%eax
mov    %eax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getch@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x15,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x15,%edx
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getch@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
store i32 4, i32* %1
store i32 3, i32* %2
store i32* %1, i32** %3
%5 = load i32*, i32** %3
store i32* %5, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 3
%9 = load i32*, i32** %4
store i32 %8, i32* %9
%10 = load i32, i32* %2
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = mul nsw i32 %10, %12
store i32 %13, i32* %2
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = add nsw i32 %15, 1
store i32 %16, i32* %14
store i32* %2, i32** %3
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = load i32*, i32** %4
%20 = load i32, i32* %19
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %20)
%22 = load i32, i32* %1
%23 = load i32, i32* %2
%24 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %23)
%25 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %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), i32 21, i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 8, i32 21)
%3 = tail call i32 (...) @getch()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int n;
  int triangularNumber = 0;
  for (n = 1; n <= 200; n++) {
    triangularNumber += n;
  }
  printf("The 200th triangular number is %i\n", triangularNumber);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xc8,-0x8(%rbp)
jg     1151 <main+0x41>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea5(%rip),%rdi
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    $0x4e84,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"The 200th triangular number is %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 1, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 200
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, %8
store i32 %10, i32* %3
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"The 200th triangular number is %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 20100)
ret i32 0
}
int lt(int a, int b) { return a < b; }


x86 assembly (clang, -O0):
<lt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lt>:
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @lt(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int crecv(void) { return 0; }


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

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

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

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

/* Variables and functions */
void cpu_nswap16p(uint16_t *outp, uint16_t in) { *outp = in; }


x86 assembly (clang, -O0):
<cpu_nswap16p>:
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):
<cpu_nswap16p>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @cpu_nswap16p(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 = load i32*, i32** %3
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @cpu_nswap16p(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int d;
  scanf("%d", &d);
  int t = d / ((90 / 60.0) - (60 / 60.0));
  printf("%d minutos\n", t);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
add    %esi,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = sitofp i32 %5 to double
%7 = fdiv double %6, 5.000000e-01
%8 = fptosi double %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = shl i32 %4, 1
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
char a() {
  char *x = "supercalifragilisticoespialidoso";
  return x[2];
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
mov    $0x70,%al
ret

LLVM IR (-O0):
@.str = [33 x i8] c"supercalifragilisticoespialidoso\00"
define signext i8 @a() {
%1 = alloca i8*
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = getelementptr inbounds i8, i8* %2, i64 2
%4 = load i8, i8* %3
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @a() {
ret i8 112
}
/* Type definitions */
struct intel_super {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __free_imsm(struct intel_super *, int);
int /*<<< orphan*/ free(struct intel_super *);
void free_imsm(struct intel_super *super) {
  __free_imsm(super, 1);
  free(super);
}


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

x86 assembly (clang, -O2):
<free_imsm>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1040 <__free_imsm@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.intel_super = type { i32 }
define void @free_imsm(%struct.intel_super* %0) {
%2 = tail call i32 @__free_imsm(%struct.intel_super* %0, i32 1)
%3 = tail call i32 @free(%struct.intel_super* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long int filesize(FILE *fd) {
  long int len;
  fseek(fd, 0, SEEK_END);
  len = ftell(fd);
  fseek(fd, 0, SEEK_SET);
  return len;
}


x86 assembly (clang, -O0):
<filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e80(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filesize>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @filesize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i32 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i64 @ftell(i32* %7)
store i64 %8, i64* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* @SEEK_SET
%11 = call i32 @fseek(i32* %9, i32 0, i32 %10)
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @filesize(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
%4 = tail call i64 @ftell(i32* %0)
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @fseek(i32* %0, i32 0, i32 %5)
ret i64 %4
}
/* Variables and functions */
int atoi_len(char const *, int);
int packet_unpack_login_resp(const char *packet) {
  int len = (4 + 2);
  return atoi_len(packet + len, 2);
}


x86 assembly (clang, -O0):
<packet_unpack_login_resp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
add    %rax,%rdi
mov    $0x2,%esi
call   1030 <atoi_len@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<packet_unpack_login_resp>:
add    $0x6,%rdi
mov    $0x2,%esi
jmp    1030 <atoi_len@plt>

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

LLVM IR (-O2):
define i32 @packet_unpack_login_resp(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 6
%3 = tail call i32 @atoi_len(i8* %2, i32 2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float, float, float, float);
int main() {
  float a1, a2, b1, b2;
  scanf("%f %f %f %f", a1, a2, b1, b2);
  printf("%f %f %f %f", a1 + a2 + b1 + b2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
lea    0xeb6(%rip),%rdi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%f %f %f %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = load float, float* %2
%7 = load float, float* %3
%8 = load float, float* %4
%9 = load float, float* %5
%10 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %6, float %7, float %8, float %9)
%11 = load float, float* %2
%12 = load float, float* %3
%13 = fadd float %11, %12
%14 = load float, float* %4
%15 = fadd float %13, %14
%16 = load float, float* %5
%17 = fadd float %15, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%f %f %f %f\00"
define i32 @main() {
%1 = tail call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float undef, float undef, float undef, float undef)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float undef)
ret i32 0
}
void fn00401761() { return; }


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @fn00401761() {
ret void
}
/* Variables and functions */
void puts(const char *s) {
  while (*s) {
    *((char *)0xffffffff) = *s++;
  }
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <puts+0x32>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    $0xffffffff,%eax
mov    %cl,(%rax)
jmp    1108 <puts+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
mov    (%rdi),%al
test   %al,%al
je     111d <puts+0x1d>
add    $0x1,%rdi
mov    $0xffffffff,%ecx
nop
mov    %al,(%rcx)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <puts+0x10>
ret

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

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %8, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %5, i8* inttoptr (i64 4294967295 to i8*)
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4, %1
ret void
}
void gtk_text_tag_table_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_tag_table_new() {
ret void
}
/* Variables and functions */
scalar_t__ hypotf(float, float);
int /*<<< orphan*/ link_failure_hypotf();
void test_hypotf(float f1, float f2) {
  if (hypotf(f1, f2) != hypotf(f1, f2))
    link_failure_hypotf();
}


x86 assembly (clang, -O0):
<test_hypotf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <hypotf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <hypotf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     116b <test_hypotf+0x4b>
mov    $0x0,%al
call   1040 <link_failure_hypotf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_hypotf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
call   1030 <hypotf@plt>
mov    %rax,%rbx
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1030 <hypotf@plt>
cmp    %rax,%rbx
jne    1155 <test_hypotf+0x35>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_hypotf@plt>

LLVM IR (-O0):
define void @test_hypotf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call i64 @hypotf(float %5, float %6)
%8 = load float, float* %3
%9 = load float, float* %4
%10 = call i64 @hypotf(float %8, float %9)
%11 = icmp ne i64 %7, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @link_failure_hypotf()
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
define void @test_hypotf(float %0, float %1) {
%3 = tail call i64 @hypotf(float %0, float %1)
%4 = tail call i64 @hypotf(float %0, float %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_hypotf()
br label %8
8: ; preds = %6, %2
ret void
}
void radeon_bo_ref(struct radeon_bo *bo) { return; }


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

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

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

LLVM IR (-O2):
%struct.radeon_bo = type opaque
define void @radeon_bo_ref(%struct.radeon_bo* nocapture %0) {
ret void
}
/* Variables and functions */
int signbitf(float);
int testf(float x) { return signbitf(x); }


x86 assembly (clang, -O0):
<testf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <signbitf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testf>:
jmp    1030 <signbitf@plt>

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

LLVM IR (-O2):
define i32 @testf(float %0) {
%2 = tail call i32 @signbitf(float %0)
ret i32 %2
}