xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  a += 100;
  b %= 10;
  printf("%d %d", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x64,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
add    $0x64,%esi
mov    %esi,0xc(%rsp)
movslq 0x8(%rsp),%rdx
imul   $0x66666667,%rdx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%edx
mov    %edx,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 100
store i32 %6, i32* %2
%7 = load i32, i32* %3
%8 = srem i32 %7, 10
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 100
store i32 %7, i32* %1
%8 = load i32, i32* %2
%9 = srem i32 %8, 10
store i32 %9, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
ret i32 0
}
int process_control_message(void *buf, int len) {}


x86 assembly (clang, -O0):
<process_control_message>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @process_control_message(i8* nocapture readnone %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ rffti1(int, float *, int *);
void rffti(int n, float wsave[]) {
  if (n == 1)
    return;
  rffti1(n, wsave + n, (int *)(wsave + 2 * n));
}


x86 assembly (clang, -O0):
<rffti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    112e <rffti+0x1e>
jmp    1158 <rffti+0x48>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
call   1030 <rffti1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rffti>:
cmp    $0x1,%edi
jne    1116 <rffti+0x6>
ret
movslq %edi,%rax
lea    (%rsi,%rax,4),%rax
lea    (%rdi,%rdi,1),%ecx
movslq %ecx,%rcx
lea    (%rsi,%rcx,4),%rdx
mov    %rax,%rsi
jmp    1030 <rffti1@plt>

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

LLVM IR (-O2):
define void @rffti(i32 %0, float* %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = getelementptr inbounds float, float* %1, i64 %5
%7 = shl nsw i32 %0, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds float, float* %1, i64 %8
%10 = bitcast float* %9 to i32*
%11 = tail call i32 @rffti1(i32 %0, float* %6, i32* %10)
br label %12
12: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log(double);
int /*<<< orphan*/ logf(float);
int /*<<< orphan*/ logl(long double);
void uninitvar_log(void) {
  float f;
  (void)logf(f);
  double d;
  (void)log(d);
  long double ld;
  (void)logl(ld);
}


x86 assembly (clang, -O0):
<uninitvar_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  -0x4(%rbp),%xmm0
call   1030 <logf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <log@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <logl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_log>:
sub    $0x18,%rsp
call   1030 <logf@plt>
call   1050 <log@plt>
call   1040 <logl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_log() {
%1 = alloca float
%2 = alloca double
%3 = alloca x86_fp80
%4 = load float, float* %1
%5 = call i32 @logf(float %4)
%6 = load double, double* %2
%7 = call i32 @log(double %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = call i32 @logl(x86_fp80 %8)
ret void
}

LLVM IR (-O2):
define void @uninitvar_log() {
%1 = tail call i32 @logf(float undef)
%2 = tail call i32 @log(double undef)
%3 = tail call i32 @logl(x86_fp80 undef)
ret void
}
/* Variables and functions */
int foo_func();
int test();
int main(void) { return foo_func() + test(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <foo_func@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <test@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <foo_func@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <test@plt>
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo_func()
%2 = tail call i32 (...) @test()
%3 = add nsw i32 %2, %1
ret i32 %3
}
void fmPlayTone(int channel, unsigned int pitch, unsigned long int duration,
                unsigned int volume) {}


x86 assembly (clang, -O0):
<fmPlayTone>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @fmPlayTone(i32 %0, i32 %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @fmPlayTone(i32 %0, i32 %1, i64 %2, i32 %3) {
ret void
}
int josephus(int n, int k) {
  if (n == 1)
    return 1;
  else
    return (josephus(n - 1, k) + k - 1) % n + 1;
}


x86 assembly (clang, -O0):
<josephus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1134 <josephus+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1152 <josephus+0x42>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <josephus@plt>
add    -0xc(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<josephus>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     1140 <josephus+0x30>
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1030 <josephus@plt>
add    %r14d,%eax
add    $0xffffffff,%eax
cltd
idiv   %ebx
mov    %edx,%eax
add    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @josephus(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2, %6
%5 = phi i32 [ %12, %6 ], [ 1, %2 ]
ret i32 %5
6: ; preds = %2
%7 = add nsw i32 %0, -1
%8 = tail call i32 @josephus(i32 %7, i32 %1)
%9 = add i32 %1, -1
%10 = add i32 %9, %8
%11 = srem i32 %10, %0
%12 = add nsw i32 %11, 1
br label %4
}
/* Variables and functions */
int getLine(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
int main(void) {
  int c, len;
  char line[1000];
  while ((len = getLine(line, 1000)) > 0) {
    reverse(line);
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x400(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getLine@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jle    1183 <main+0x53>
lea    -0x400(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x400(%rbp),%rsi
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getLine@plt>
test   %eax,%eax
jle    1184 <main+0x54>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getLine@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1000 x i8]
store i32 0, i32* %1
br label %5
5: ; preds = %9, %0
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%7 = call i32 @getLine(i8* %6, i32 1000)
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%11 = call i32 @reverse(i8* %10)
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %5
14: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getLine(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = call i32 @reverse(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i32 @getLine(i8* %2, i32 1000)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ int80(int, char *, int *, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void isRunning(int cargs, void **pargs) {
  char *psName = (((char **)pargs)[1]);
  int ret;
  int80(41, psName, &ret, 0, 0, 0);
  printf("%s\n", ret == 0 ? "No" : "Yes");
}


x86 assembly (clang, -O0):
<isRunning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    $0x29,%edi
lea    -0x1c(%rbp),%rdx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1040 <int80@plt>
mov    -0x1c(%rbp),%ecx
lea    0xea7(%rip),%rsi
lea    0xe9d(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rsi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isRunning>:
push   %rax
mov    0x8(%rsi),%rsi
lea    0x4(%rsp),%rdx
mov    $0x29,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <int80@plt>
cmpl   $0x0,0x4(%rsp)
lea    0xebc(%rip),%rax
lea    0xeb8(%rip),%rsi
cmove  %rax,%rsi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [3 x i8] c"No\00"
@.str.2 = [4 x i8] c"Yes\00"
define void @isRunning(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = bitcast i32* %3 to i8*
%7 = call i32 @int80(i32 41, i8* %5, i32* %3, i32 0, i32 0, i32 0)
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_mulhi_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test50(__m64 a, __m64 b) { return _mm_mulhi_pi16(a, b); }


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

x86 assembly (clang, -O2):
<test50>:
jmp    1030 <_mm_mulhi_pi16@plt>

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

LLVM IR (-O2):
define i32 @test50(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_mulhi_pi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
double texel_error(double, double);
double texel_squared_error(double score, double result) {
  double error;
  error = texel_error(score, result);
  return error * error;
}


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

x86 assembly (clang, -O2):
<texel_squared_error>:
push   %rax
call   1030 <texel_error@plt>
mulsd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @texel_squared_error(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = call double @texel_error(double %6, double %7)
store double %8, double* %5
%9 = load double, double* %5
%10 = load double, double* %5
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @texel_squared_error(double %0, double %1) {
%3 = tail call double @texel_error(double %0, double %1)
%4 = fmul double %3, %3
ret double %4
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  {
    state[0UL] = (input[0UL] + 51238316UL) + 274866410U;
    if ((state[0UL] >> 4U) & 1U) {
      state[0UL] += state[0UL];
    }
    output[0UL] = (state[0UL] - 515147141UL) * 709125895U;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x30dd5ac,%rax
add    $0x106220ea,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shr    $0x4,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113c <RandomFunc+0x3c>
mov    -0x14(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1eb48585,%rax
imul   $0x2a446707,%rax,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0x136ff696,%eax
add    (%rdi),%eax
mov    %eax,%ecx
shr    $0x4,%cl
and    $0x1,%cl
shl    %cl,%eax
imul   $0x2a446707,%eax,%eax
add    $0x3e03d65d,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = zext i32 %8 to i64
%10 = add i64 %9, 51238316
%11 = add i64 %10, 274866410
%12 = trunc i64 %11 to i32
%13 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %12, i32* %13
%14 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%15 = load i32, i32* %14
%16 = lshr i32 %15, 4
%17 = and i32 %16, 1
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %25
19: ; preds = %2
%20 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%21 = load i32, i32* %20
%22 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%23 = load i32, i32* %22
%24 = add i32 %23, %21
store i32 %24, i32* %22
br label %25
25: ; preds = %19, %2
%26 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%27 = load i32, i32* %26
%28 = zext i32 %27 to i64
%29 = sub i64 %28, 515147141
%30 = mul i64 %29, 709125895
%31 = trunc i64 %30 to i32
%32 = load i32*, i32** %4
%33 = getelementptr inbounds i32, i32* %32, i64 0
store i32 %31, i32* %33
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = add i32 %3, 326104726
%5 = lshr i32 %4, 4
%6 = and i32 %5, 1
%7 = shl i32 %4, %6
%8 = mul i32 %7, 709125895
%9 = add i32 %8, 1040438877
store i32 %9, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
void fun0() {
  char buf0[100];
  printf("What is 1 divided by 0?\n");
  gets(buf0);
}


x86 assembly (clang, -O0):
<fun0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <gets@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun0>:
sub    $0x68,%rsp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rdi
call   1040 <gets@plt>
add    $0x68,%rsp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"What is 1 divided by 0?\0A\00"
define void @fun0() {
%1 = alloca [100 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"What is 1 divided by 0?\00"
define void @fun0() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
ret void
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int bindresvport_sa(int, struct sockaddr *);
int bindresvport(int sd, struct sockaddr_in *sin) {
  return bindresvport_sa(sd, (struct sockaddr *)sin);
}


x86 assembly (clang, -O0):
<bindresvport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <bindresvport_sa@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bindresvport>:
jmp    1030 <bindresvport_sa@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @bindresvport(i32 %0, %struct.sockaddr_in* %1) {
%3 = alloca i32
%4 = alloca %struct.sockaddr_in*
store i32 %0, i32* %3
store %struct.sockaddr_in* %1, %struct.sockaddr_in** %4
%5 = load i32, i32* %3
%6 = load %struct.sockaddr_in*, %struct.sockaddr_in** %4
%7 = bitcast %struct.sockaddr_in* %6 to %struct.sockaddr*
%8 = call i32 @bindresvport_sa(i32 %5, %struct.sockaddr* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @bindresvport(i32 %0, %struct.sockaddr_in* %1) {
%3 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%4 = tail call i32 @bindresvport_sa(i32 %0, %struct.sockaddr* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ default_cpu_header(char const *, int);
void default_wakeup_cpu_header(const char *cpu,
                               __attribute__((unused)) void *report_data) {
  default_cpu_header(cpu, 55);
}


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

x86 assembly (clang, -O2):
<default_wakeup_cpu_header>:
mov    $0x37,%esi
jmp    1030 <default_cpu_header@plt>

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

LLVM IR (-O2):
define void @default_wakeup_cpu_header(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @default_cpu_header(i8* %0, i32 55)
ret void
}
void g_source_new() {}


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

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

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

LLVM IR (-O2):
define void @g_source_new() {
ret void
}
/* Variables and functions */
double log(double);
int /*<<< orphan*/ printf(char *, double, double);
double sinh(double);
int main() {
  double param, result;
  param = log(2.0);
  result = sinh(param);
  printf("The hyperbolic sine of %f is %f.\n", param, result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb9(%rip),%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sinh@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"The hyperbolic sine of %f is %f.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call double @log(double 2.000000e+00)
store double %4, double* %2
%5 = load double, double* %2
%6 = call double @sinh(double %5)
store double %6, double* %3
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), double %7, double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"The hyperbolic sine of %f is %f.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), double 0x3FE62E42FEFA39EF, double 7.500000e-01)
ret i32 0
}
void INT_Excep_DMAC_DMTEND3(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_DMAC_DMTEND3() {
ret void
}
/* Variables and functions */
scalar_t__ r_syscmd_mv(char const *);
int cmd_mv(void *data, const char *input) { return r_syscmd_mv(input) ? 1 : 0; }


x86 assembly (clang, -O0):
<cmd_mv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <r_syscmd_mv@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mv>:
push   %rax
mov    %rsi,%rdi
call   1030 <r_syscmd_mv@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @cmd_mv(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i64 @r_syscmd_mv(i8* %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
unsigned addval_391(unsigned x) { return x + 3279479768U; }


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

x86 assembly (clang, -O2):
<addval_391>:
lea    -0x3c871c28(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @addval_391(i32 %0) {
%2 = add i32 %0, -1015487528
ret i32 %2
}
double ln_get_ell_smajor_diam(double e, double q) { return q / (1.0 - e); }


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

x86 assembly (clang, -O2):
<ln_get_ell_smajor_diam>:
movsd  0xef8(%rip),%xmm2
subsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ln_get_ell_smajor_diam(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = fsub double 1.000000e+00, %6
%8 = fdiv double %5, %7
ret double %8
}

LLVM IR (-O2):
define double @ln_get_ell_smajor_diam(double %0, double %1) {
%3 = fsub double 1.000000e+00, %0
%4 = fdiv double %1, %3
ret double %4
}
/* Variables and functions */
void str_clear(char *str) {
  if (str != NULL)
    str[0] = '\0';
}


x86 assembly (clang, -O0):
<str_clear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111a <str_clear+0x1a>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_clear>:
test   %rdi,%rdi
je     1108 <str_clear+0x8>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @str_clear(i8* writeonly %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %4, label %3
3: ; preds = %1
store i8 0, i8* %0
br label %4
4: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _putchar(char);
void _puts(char *str) {
  int i = 0;
  while (str[i] != '\0') {
    _putchar(str[i]);
    i++;
  }
  _putchar('\n');
}


x86 assembly (clang, -O0):
<_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <_puts+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <_puts+0x13>
mov    $0xa,%edi
call   1030 <_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <_puts+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <_putchar@plt>

LLVM IR (-O0):
define void @_puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %21
12: ; preds = %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = call i32 @_putchar(i8 signext %17)
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
%22 = call i32 @_putchar(i8 signext 10)
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 %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @_putchar(i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @_putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int strlen(char const *);
void puts_pad(const char *str, int len) {
  fputs(str, stdout);
  for (int i = strlen(str); i < len; i++)
    fputc(' ', stdout);
}


x86 assembly (clang, -O0):
<puts_pad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118a <puts_pad+0x5a>
mov    0x2e70(%rip),%rax
mov    (%rax),%esi
mov    $0x20,%edi
call   1050 <fputc@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    115d <puts_pad+0x2d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts_pad>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
mov    0x2e9f(%rip),%r15
mov    (%r15),%esi
call   1040 <fputs@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
cmp    %ebx,%eax
jge    1172 <puts_pad+0x42>
sub    %eax,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r15),%esi
mov    $0x20,%edi
call   1050 <fputc@plt>
add    $0xffffffff,%ebx
jne    1160 <puts_pad+0x30>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @puts_pad(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* @stdout
%8 = call i32 @fputs(i8* %6, i32 %7)
%9 = load i8*, i8** %3
%10 = call i32 @strlen(i8* %9)
store i32 %10, i32* %5
br label %11
11: ; preds = %18, %2
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %21
15: ; preds = %11
%16 = load i32, i32* @stdout
%17 = call i32 @fputc(i8 signext 32, i32 %16)
br label %18
18: ; preds = %15
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %11
21: ; preds = %11
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @puts_pad(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* %0, i32 %3)
%5 = tail call i32 @strlen(i8* %0)
%6 = icmp slt i32 %5, %1
br i1 %6, label %8, label %7
7: ; preds = %8, %2
ret void
8: ; preds = %2, %8
%9 = phi i32 [ %12, %8 ], [ %5, %2 ]
%10 = load i32, i32* @stdout
%11 = tail call i32 @fputc(i8 signext 32, i32 %10)
%12 = add i32 %9, 1
%13 = icmp eq i32 %12, %1
br i1 %13, label %7, label %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: unexpand [-a | -t tablist] [file ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"usage: unexpand [-a | -t tablist] [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"usage: unexpand [-a | -t tablist] [file ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int char_to_bitmap(char);
int match(char a, char b) {
  return (char_to_bitmap(a) & char_to_bitmap(b)) != 0;
}


x86 assembly (clang, -O0):
<match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <char_to_bitmap@plt>
mov    %eax,-0x8(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <char_to_bitmap@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <char_to_bitmap@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <char_to_bitmap@plt>
xor    %ecx,%ecx
test   %ebp,%eax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @match(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = call i32 @char_to_bitmap(i8 signext %5)
%7 = load i8, i8* %4
%8 = call i32 @char_to_bitmap(i8 signext %7)
%9 = and i32 %6, %8
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @match(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @char_to_bitmap(i8 signext %0)
%4 = tail call i32 @char_to_bitmap(i8 signext %1)
%5 = and i32 %4, %3
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
struct arena_block {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct arena_block *);
void arena_block_delete(struct arena_block *self) { free(self); }


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

x86 assembly (clang, -O2):
<arena_block_delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.arena_block = type { i32 }
define void @arena_block_delete(%struct.arena_block* nocapture %0) {
%2 = tail call i32 @free(%struct.arena_block* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ NOROM_IntUnregister(int);
void stub1(uint32_t);
void TRNGIntUnregister(void) {
  ((void (*)(uint32_t ui32Interrupt))(
      (uint32_t *)(((uint32_t *)0x10000180)[12]))[5])(49);
  NOROM_IntUnregister(49);
}


x86 assembly (clang, -O0):
<TRNGIntUnregister>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000180,%eax
mov    0x60(%rax),%rax
mov    $0x31,%edi
call   *0x28(%rax)
mov    $0x31,%edi
call   1030 <NOROM_IntUnregister@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TRNGIntUnregister>:
push   %rax
mov    0x100001e0,%rax
10
mov    $0x31,%edi
call   *0x28(%rax)
mov    $0x31,%edi
pop    %rax
jmp    1030 <NOROM_IntUnregister@plt>

LLVM IR (-O0):
define void @TRNGIntUnregister() {
%1 = load i64, i64* getelementptr inbounds (i64, i64* inttoptr (i64 268435840 to i64*), i64 12)
%2 = inttoptr i64 %1 to i64*
%3 = getelementptr inbounds i64, i64* %2, i64 5
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to void (i64)*
%6 = call i32 @NOROM_IntUnregister(i32 49)
ret void
}

LLVM IR (-O2):
define void @TRNGIntUnregister() {
%1 = load i64, i64* inttoptr (i64 268435936 to i64*)
%2 = inttoptr i64 %1 to i64*
%3 = getelementptr inbounds i64, i64* %2, i64 5
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to void (i64)*
tail call void %5(i64 49)
%6 = tail call i32 @NOROM_IntUnregister(i32 49)
ret void
}
void mremap_userfaultfd_prep(struct vm_area_struct *vma,
                             struct vm_userfaultfd_ctx *ctx) {}


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

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

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

LLVM IR (-O2):
%struct.vm_area_struct = type opaque
%struct.vm_userfaultfd_ctx = type opaque
define void @mremap_userfaultfd_prep(%struct.vm_area_struct* nocapture %0, %struct.vm_userfaultfd_ctx* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ getresgid(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *);
gid_t getgid(void) {
  gid_t gid;
  getresgid(&gid, NULL, NULL);
  return gid;
}


x86 assembly (clang, -O0):
<getgid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <getresgid@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getgid>:
push   %rax
lea    0x4(%rsp),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <getresgid@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getgid() {
%1 = alloca i32
%2 = call i32 @getresgid(i32* %1, i32* null, i32* null)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @getgid() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @getresgid(i32* %1, i32* null, i32* null)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
size_t memoryAlign(size_t size, size_t alignment) {
  return (size + alignment - 1) & ~(alignment - 1);
}


x86 assembly (clang, -O0):
<memoryAlign>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memoryAlign>:
lea    (%rdi,%rsi,1),%rax
add    $0xffffffffffffffff,%rax
neg    %rsi
and    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @memoryAlign(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 = load i64, i64* %4
%7 = add i64 %5, %6
%8 = sub i64 %7, 1
%9 = load i64, i64* %4
%10 = sub i64 %9, 1
%11 = xor i64 %10, -1
%12 = and i64 %8, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @memoryAlign(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = sub i64 0, %1
%6 = and i64 %4, %5
ret i64 %6
}
/* Variables and functions */
int foooo();
int main(int argc, char *argv[]) {
  int bar = foooo();
  struct {
    int a;
    float b;
  } a;
  a.b = 5;
  return 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    $0x0,%al
call   1030 <foooo@plt>
mov    %eax,-0x14(%rbp)
movss  0xec8(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32, float }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.anon
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (...) @foooo()
store i32 %8, i32* %6
%9 = getelementptr inbounds %struct.anon, %struct.anon* %7, i32 0, i32 1
store float 5.000000e+00, float* %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @foooo()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int some_library_function();
int main(int argc, char *arg[]) {
  printf("some_library_function returned %d\n", some_library_function());
  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    $0x0,%al
call   1040 <some_library_function@plt>
mov    %eax,%esi
lea    0xeba(%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 <some_library_function@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"some_library_function returned %d\0A\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 = call i32 (...) @some_library_function()
%7 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"some_library_function returned %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @some_library_function()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
int strlequ(char *s, char *t) {
  int length = 0;
  while (*s && (*s++ == *t++))
    length++;
  return length;
}


x86 assembly (clang, -O0):
<strlequ>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     1154 <strlequ+0x54>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1164 <strlequ+0x64>
jmp    1172 <strlequ+0x72>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strlequ+0x13>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @strlequ(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2, %12
%6 = phi i8 [ %16, %12 ], [ %3, %2 ]
%7 = phi i32 [ %15, %12 ], [ 0, %2 ]
%8 = phi i8* [ %13, %12 ], [ %1, %2 ]
%9 = phi i8* [ %14, %12 ], [ %0, %2 ]
%10 = load i8, i8* %8
%11 = icmp eq i8 %6, %10
br i1 %11, label %12, label %18
12: ; preds = %5
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = add nuw nsw i32 %7, 1
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %5
18: ; preds = %5, %12, %2
%19 = phi i32 [ 0, %2 ], [ %15, %12 ], [ %7, %5 ]
ret i32 %19
}
void ff_hevc_put_hevc_uni_epel_h12_8_sse4() {}


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

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

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

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