xunge/DecIR huggingface dataset:
/* Variables and functions */
float fabsf(float);
float truncf(float);
float remainderf(float x, float y) {
  float q = x / y;
  float n = truncf(q);
  if (fabsf(n - q) >= 0.5F)
    ++n;
  return x - n * y;
}


x86 assembly (clang, -O0):
<remainderf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <truncf@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movaps 0xebf(%rip),%xmm1
pand   %xmm1,%xmm0
movss  0xea3(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1178 <remainderf+0x68>
movss  0xe96(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remainderf>:
sub    $0x18,%rsp
movss  %xmm1,0x10(%rsp)
movss  %xmm0,0x14(%rsp)
divss  %xmm1,%xmm0
movss  %xmm0,0xc(%rsp)
call   1030 <truncf@plt>
movaps %xmm0,%xmm1
subss  0xc(%rsp),%xmm1
andps  0xec1(%rip),%xmm1
movss  0xec9(%rip),%xmm2
addss  %xmm0,%xmm2
movss  0xec1(%rip),%xmm3
cmpnless %xmm1,%xmm3
andps  %xmm3,%xmm0
andnps %xmm2,%xmm3
orps   %xmm0,%xmm3
mulss  0x10(%rsp),%xmm3
movss  0x14(%rsp),%xmm0
subss  %xmm3,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @remainderf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %3
store float %1, float* %4
%7 = load float, float* %3
%8 = load float, float* %4
%9 = fdiv float %7, %8
store float %9, float* %5
%10 = load float, float* %5
%11 = call float @llvm.trunc.f32(float %10)
store float %11, float* %6
%12 = load float, float* %6
%13 = load float, float* %5
%14 = fsub float %12, %13
%15 = call float @llvm.fabs.f32(float %14)
%16 = fcmp oge float %15, 5.000000e-01
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load float, float* %6
%19 = fadd float %18, 1.000000e+00
store float %19, float* %6
br label %20
20: ; preds = %17, %2
%21 = load float, float* %3
%22 = load float, float* %6
%23 = load float, float* %4
%24 = fneg float %22
%25 = call float @llvm.fmuladd.f32(float %24, float %23, float %21)
ret float %25
}

LLVM IR (-O2):
define float @remainderf(float %0, float %1) {
%3 = fdiv float %0, %1
%4 = tail call float @llvm.trunc.f32(float %3)
%5 = fsub float %4, %3
%6 = tail call float @llvm.fabs.f32(float %5)
%7 = fcmp ult float %6, 5.000000e-01
%8 = fadd float %4, 1.000000e+00
%9 = select i1 %7, float %4, float %8
%10 = fneg float %9
%11 = tail call float @llvm.fmuladd.f32(float %10, float %1, float %0)
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ print_char(char);
void print(char *s) {
  while (*s) {
    print_char(*s);
    ++s;
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <print+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <print_char@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <print+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @print(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 %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call i32 @print_char(i8 signext %9)
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @print(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @print_char(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void foo_2_2_2_2_2_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_2_2_1_2_2_2() {
ret void
}
int hwnat_qos_bandwidth_setup(int total_tandwidth) {}


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

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

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

LLVM IR (-O2):
define i32 @hwnat_qos_bandwidth_setup(i32 %0) {
ret i32 undef
}
long long longlong_ignoring_signedlonglong(long long x, signed long long y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @longlong_ignoring_signedlonglong(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
ret i64 %5
}

LLVM IR (-O2):
define i64 @longlong_ignoring_signedlonglong(i64 returned %0, i64 %1) {
ret i64 %0
}
void XUnmapWindow() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTVfsUtilPumpIoStreams() {
ret void
}
/* Variables and functions */
int booster_statvfs(char const *, void *);
int statvfs(const char *pathname, void *buf) {
  return booster_statvfs(pathname, buf);
}


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

x86 assembly (clang, -O2):
<statvfs>:
jmp    1030 <booster_statvfs@plt>

LLVM IR (-O0):
define i32 @statvfs(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 = load i8*, i8** %4
%7 = call i32 @booster_statvfs(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @statvfs(i8* %0, i8* %1) {
%3 = tail call i32 @booster_statvfs(i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ gzFile;

/* Variables and functions */
scalar_t__ Z_OK;
int /*<<< orphan*/ fatal_error_with_errno(char *);
scalar_t__ gzclose(int /*<<< orphan*/);
void xgzclose(void *fp) {
  if (fp && gzclose((gzFile)fp) != Z_OK)
    fatal_error_with_errno("Failed to close output file");
}


x86 assembly (clang, -O0):
<xgzclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115e <xgzclose+0x3e>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1030 <gzclose@plt>
mov    0x2ea7(%rip),%rcx
cmp    (%rcx),%rax
je     115e <xgzclose+0x3e>
lea    0xea7(%rip),%rdi
call   1040 <fatal_error_with_errno@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xgzclose>:
test   %rdi,%rdi
je     113c <xgzclose+0x1c>
push   %rax
call   1030 <gzclose@plt>
mov    0x2ebe(%rip),%rcx
cmp    (%rcx),%rax
lea    0x8(%rsp),%rsp
jne    113d <xgzclose+0x1d>
ret
lea    0xebc(%rip),%rdi
jmp    1040 <fatal_error_with_errno@plt>

LLVM IR (-O0):
@Z_OK = global i64 0
@.str = [28 x i8] c"Failed to close output file\00"
define void @xgzclose(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 %13
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = ptrtoint i8* %6 to i32
%8 = call i64 @gzclose(i32 %7)
%9 = load i64, i64* @Z_OK
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %5
%12 = call i32 @fatal_error_with_errno(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %5, %1
ret void
}

LLVM IR (-O2):
@Z_OK = global i64 0
@.str = [28 x i8] c"Failed to close output file\00"
define void @xgzclose(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = ptrtoint i8* %0 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i64 @gzclose(i32 %5)
%7 = load i64, i64* @Z_OK
%8 = icmp eq i64 %6, %7
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i32 @fatal_error_with_errno(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %3, %1
ret void
}
/* Variables and functions */
char game_winner(char *, char, char);
int evaluate(char *br, char player1, char player2) {
  char winner = game_winner(br, player1, player2);
  if (winner == player1) {
    return -1;
  } else if (winner == player2) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<evaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x11(%rbp),%al
movsbl %al,%esi
movsbl -0x12(%rbp),%edx
call   1030 <game_winner@plt>
mov    %al,-0x13(%rbp)
movsbl -0x13(%rbp),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1159 <evaluate+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    117c <evaluate+0x6c>
movsbl -0x13(%rbp),%eax
movsbl -0x12(%rbp),%ecx
cmp    %ecx,%eax
jne    1175 <evaluate+0x65>
movl   $0x1,-0x4(%rbp)
jmp    117c <evaluate+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evaluate>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <game_winner@plt>
xor    %ecx,%ecx
cmp    %bl,%al
sete   %cl
cmp    %bpl,%al
mov    $0xffffffff,%eax
cmovne %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @evaluate(i8* %0, i8 signext %1, i8 signext %2) {
%4 = tail call signext i8 @game_winner(i8* %0, i8 signext %1, i8 signext %2)
%5 = icmp eq i8 %4, %1
%6 = icmp eq i8 %4, %2
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
main() {
  int f, g;
  f == 1;
  g == 1;
  printf("Для продолжения операции введите 1 , если вы желаете её закончить "
         "введите любое другое число\n");
  while (g = 1)
    ;
  {
    f = f * 2;
    printf("%d                                             ", &f);
    scanf("%d\n", g);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xc(%rbp)
jmp    112d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [170 x i8] c"\D0\94\D0\BB\D1\8F \D0\BF\D1\80\D0\BE\D0\B4\D0\BE\D0\BB\D0\B6\D0\B5\D0\BD\D0\B8\D1\8F \D0\BE\D0\BF\D0\B5\D1\80\D0\B0\D1\86\D0\B8\D0\B8 \D0\B2\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 1 , \D0\B5\D1\81\D0\BB\D0\B8 \D0\B2\D1\8B \D0\B6\D0\B5\D0\BB\D0\B0\D0\B5\D1\82\D0\B5 \D0\B5\D1\91 \D0\B7\D0\B0\D0\BA\D0\BE\D0\BD\D1\87\D0\B8\D1\82\D1\8C \D0\B2\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BB\D1\8E\D0\B1\D0\BE\D0\B5 \D0\B4\D1\80\D1\83\D0\B3\D0\BE\D0\B5 \D1\87\D0\B8\D1\81\D0\BB\D0\BE\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %12, %0
store i32 1, i32* %3
br label %12
12: ; preds = %11
br label %11
}

LLVM IR (-O2):
@str = [169 x i8] c"\D0\94\D0\BB\D1\8F \D0\BF\D1\80\D0\BE\D0\B4\D0\BE\D0\BB\D0\B6\D0\B5\D0\BD\D0\B8\D1\8F \D0\BE\D0\BF\D0\B5\D1\80\D0\B0\D1\86\D0\B8\D0\B8 \D0\B2\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 1 , \D0\B5\D1\81\D0\BB\D0\B8 \D0\B2\D1\8B \D0\B6\D0\B5\D0\BB\D0\B0\D0\B5\D1\82\D0\B5 \D0\B5\D1\91 \D0\B7\D0\B0\D0\BA\D0\BE\D0\BD\D1\87\D0\B8\D1\82\D1\8C \D0\B2\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BB\D1\8E\D0\B1\D0\BE\D0\B5 \D0\B4\D1\80\D1\83\D0\B3\D0\BE\D0\B5 \D1\87\D0\B8\D1\81\D0\BB\D0\BE\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([169 x i8], [169 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
/* Variables and functions */
double get_double(char *, double, double);
int /*<<< orphan*/ pow(int, double);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int argc, char const *argv[]) {
  double a = get_double("Enter a number:", 1.0, 100.0);
  printf("%lf\n", pow(2, a));
  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)
lea    0xec3(%rip),%rdi
movsd  0xeab(%rip),%xmm0
movsd  0xeab(%rip),%xmm1
call   1040 <get_double@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
movsd  0xec0(%rip),%xmm0
movsd  0xec0(%rip),%xmm1
call   1040 <get_double@plt>
mov    $0x2,%edi
call   1050 <pow@plt>
lea    0xec2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Enter a number:\00"
@.str.1 = [5 x i8] c"%lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call double @get_double(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 1.000000e+02)
store double %7, double* %6
%8 = load double, double* %6
%9 = call i32 @pow(i32 2, double %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Enter a number:\00"
@.str.1 = [5 x i8] c"%lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @get_double(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 1.000000e+02)
%4 = tail call i32 @pow(i32 2, double %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
void genc_ole_s() {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @WIN32_InstallService() {
ret void
}
void foo769(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo769(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ terminal_putc(char);
int putchar(int character) {
  char ch = (char)character;
  terminal_putc(ch);
  return character;
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <terminal_putc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
push   %rbx
mov    %edi,%ebx
movsbl %bl,%edi
call   1030 <terminal_putc@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @putchar(i32 returned %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @terminal_putc(i8 signext %2)
ret i32 %0
}
/* Variables and functions */
long double _strtold(char const *, char **);
long double strtold(const char *s00, char **se) { return _strtold(s00, se); }


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

x86 assembly (clang, -O2):
<strtold>:
jmp    1030 <_strtold@plt>

LLVM IR (-O0):
define x86_fp80 @strtold(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 = load i8**, i8*** %4
%7 = call x86_fp80 @_strtold(i8* %5, i8** %6)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @strtold(i8* %0, i8** %1) {
%3 = tail call x86_fp80 @_strtold(i8* %0, i8** %1)
ret x86_fp80 %3
}
void testTortureExecute(void) {
  unsigned char z = 0;
  do
    ;
  while (--z > 0);
  return;
}


x86 assembly (clang, -O0):
<testTortureExecute>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
jmp    110d <testTortureExecute+0xd>
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movzbl %al,%eax
cmp    $0x0,%eax
jg     1108 <testTortureExecute+0x8>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testTortureExecute() {
%1 = alloca i8
store i8 0, i8* %1
br label %2
2: ; preds = %3, %0
br label %3
3: ; preds = %2
%4 = load i8, i8* %1
%5 = add i8 %4, -1
store i8 %5, i8* %1
%6 = zext i8 %5 to i32
%7 = icmp sgt i32 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @testTortureExecute() {
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int opt_speed(char *opt) {
  if (strcmp(opt, "-v") == 0)
    return 1;
  if (strcmp(opt, "--velocity") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<opt_speed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <opt_speed+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_speed+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <opt_speed+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_speed+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_speed>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <opt_speed+0x31>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"-v\00"
@.str.1 = [11 x i8] c"--velocity\00"
define i32 @opt_speed(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
short test_37_2(short *mem) { return __atomic_add_fetch(mem + 4, 1, 4); }


x86 assembly (clang, -O0):
<test_37_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,%ax
lock xadd %ax,0x8(%rdx)
add    %cx,%ax
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_37_2>:
mov    $0x1,%ax
lock xadd %ax,0x8(%rdi)
add    $0x1,%eax
ret

LLVM IR (-O0):
define signext i16 @test_37_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 4
store i16 1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw add i16* %6, i16 %7 acq_rel
%9 = add i16 %8, %7
store i16 %9, i16* %4
%10 = load i16, i16* %4
ret i16 %10
}

LLVM IR (-O2):
define signext i16 @test_37_2(i16* nocapture %0) {
%2 = getelementptr inbounds i16, i16* %0, i64 4
%3 = atomicrmw add i16* %2, i16 1 acq_rel
%4 = add i16 %3, 1
ret i16 %4
}
void dummy_nolog() { return; }


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

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

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

LLVM IR (-O2):
define void @dummy_nolog() {
ret void
}
int bsq_compare(double a, double b) {
  return (a > ((b) * (b))) - (a < ((b) * (b)));
}


x86 assembly (clang, -O0):
<bsq_compare>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsq_compare>:
mulsd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bsq_compare(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %4
%8 = fmul double %6, %7
%9 = fcmp ogt double %5, %8
%10 = zext i1 %9 to i32
%11 = load double, double* %3
%12 = load double, double* %4
%13 = load double, double* %4
%14 = fmul double %12, %13
%15 = fcmp olt double %11, %14
%16 = zext i1 %15 to i32
%17 = sub nsw i32 %10, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @bsq_compare(double %0, double %1) {
%3 = fmul double %1, %1
%4 = fcmp olt double %3, %0
%5 = zext i1 %4 to i32
%6 = fcmp ogt double %3, %0
%7 = sext i1 %6 to i32
%8 = add nsw i32 %7, %5
ret i32 %8
}
int test_imm_7Eint16_mem(short *val) {
  return ((*val) & (0x7E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_7Eint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 126
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ getParent(int, int *);
int hasUnion(int u, int v, int *set) {
  return getParent(u, set) == getParent(v, set);
}


x86 assembly (clang, -O0):
<hasUnion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <getParent@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <getParent@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hasUnion>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdx,%rsi
call   1030 <getParent@plt>
mov    %rax,%rbp
mov    %r14d,%edi
mov    %rbx,%rsi
call   1030 <getParent@plt>
xor    %ecx,%ecx
cmp    %rax,%rbp
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hasUnion(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %6
%9 = call i64 @getParent(i32 %7, i32* %8)
%10 = load i32, i32* %5
%11 = load i32*, i32** %6
%12 = call i64 @getParent(i32 %10, i32* %11)
%13 = icmp eq i64 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @hasUnion(i32 %0, i32 %1, i32* %2) {
%4 = tail call i64 @getParent(i32 %0, i32* %2)
%5 = tail call i64 @getParent(i32 %1, i32* %2)
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int dllist_free_node(void *arg) {
  free(arg);
  return (1);
}


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

x86 assembly (clang, -O2):
<dllist_free_node>:
push   %rax
call   1030 <free@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @dllist_free_node(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 1
}
void swap(char *word, int i, int j) {
  char temp;
  temp = word[i];
  word[i] = word[j];
  word[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%sil
movslq %edx,%rdx
mov    (%rdi,%rdx,1),%cl
mov    %cl,(%rdi,%rax,1)
mov    %sil,(%rdi,%rdx,1)
ret

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void x1(void) { fprintf(0, "asdf"); }


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

x86 assembly (clang, -O2):
<x1>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"asdf\00"
define void @x1() {
%1 = call i32 @fprintf(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"asdf\00"
define void @x1() {
%1 = tail call i32 @fprintf(i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
void jpeg_idct_2x2(void) {}


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

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

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

LLVM IR (-O2):
define void @jpeg_idct_2x2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello mktpl\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [12 x i8] c"hello mktpl\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x;
};
typedef TYPE_1__ XEnterWindowEvent;

/* Variables and functions */
int get_XEnterWindowEvent_x(void *_p) {
  return (int)((XEnterWindowEvent *)_p)->x;
}


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

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

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

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


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ Write(int, struct ship *, long, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void send_drift(struct ship *ship, long a) { Write(6, ship, a, 0, 0, 0); }


x86 assembly (clang, -O0):
<send_drift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x6,%edi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <Write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_drift>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x6,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <Write@plt>

LLVM IR (-O0):
%struct.ship = type { i32 }
define void @send_drift(%struct.ship* %0, i64 %1) {
%3 = alloca %struct.ship*
%4 = alloca i64
store %struct.ship* %0, %struct.ship** %3
store i64 %1, i64* %4
%5 = load %struct.ship*, %struct.ship** %3
%6 = load i64, i64* %4
%7 = call i32 @Write(i32 6, %struct.ship* %5, i64 %6, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.ship = type { i32 }
define void @send_drift(%struct.ship* %0, i64 %1) {
%3 = tail call i32 @Write(i32 6, %struct.ship* %0, i64 %1, i32 0, i32 0, i32 0)
ret void
}
void Plain_NullCoordScale(float hfactor, float vfactor) {}


x86 assembly (clang, -O0):
<Plain_NullCoordScale>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @Plain_NullCoordScale(float %0, float %1) {
ret void
}
int test_imm_1Buint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x1B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_1Buint64_highword_reg>:
movabs $0x1b00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Buint64_highword_reg(i64 %0) {
%2 = and i64 %0, 115964116992
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char *jfes_boolean_to_string(int value) { return value ? "true" : "false"; }


x86 assembly (clang, -O0):
<jfes_boolean_to_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef4(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jfes_boolean_to_string>:
test   %edi,%edi
lea    0xefc(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i8* @jfes_boolean_to_string(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i8* @jfes_boolean_to_string(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
void cast2_Bad() {
  int32_t arr[4];
  *(((char *)arr) + 20) = 123;
}


x86 assembly (clang, -O0):
<cast2_Bad>:
push   %rbp
mov    %rsp,%rbp
movb   $0x7b,0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @cast2_Bad() {
%1 = alloca [4 x i32]
%2 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%3 = bitcast i32* %2 to i8*
%4 = getelementptr inbounds i8, i8* %3, i64 20
store i8 123, i8* %4
ret void
}

LLVM IR (-O2):
define void @cast2_Bad() {
ret void
}
/* Variables and functions */
char *agstrcanon(char *, int /*<<< orphan*/);
int /*<<< orphan*/ getoutputbuffer(char *);
char *agcanonStr(char *str) { return agstrcanon(str, getoutputbuffer(str)); }


x86 assembly (clang, -O0):
<agcanonStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getoutputbuffer@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <agstrcanon@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<agcanonStr>:
push   %rbx
mov    %rdi,%rbx
call   1040 <getoutputbuffer@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <agstrcanon@plt>

LLVM IR (-O0):
define i8* @agcanonStr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @getoutputbuffer(i8* %4)
%6 = call i8* @agstrcanon(i8* %3, i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @agcanonStr(i8* %0) {
%2 = tail call i32 @getoutputbuffer(i8* %0)
%3 = tail call i8* @agstrcanon(i8* %0, i32 %2)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int writeWords(int /*<<< orphan*/, int /*<<< orphan*/, int,
               int /*<<< orphan*/ *);
int writeWord(uint8_t devAddr, uint8_t regAddr, uint16_t data) {
  return writeWords(devAddr, regAddr, 1, &data);
}


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

x86 assembly (clang, -O2):
<writeWord>:
push   %rax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rcx
mov    $0x1,%edx
call   1030 <writeWords@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @writeWord(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = call i32 @writeWords(i32 %0, i32 %1, i32 1, i32* %4)
ret i32 %5
}
int toUpperCase(int c) { return ((c) >= 'a' && (c) <= 'z') ? c - 32 : c; }


x86 assembly (clang, -O0):
<toUpperCase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1129 <toUpperCase+0x29>
cmpl   $0x7a,-0x4(%rbp)
jg     1129 <toUpperCase+0x29>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <toUpperCase+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toUpperCase>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @toUpperCase(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ send_event;
};
typedef TYPE_1__ XCirculateRequestEvent;

/* Variables and functions */
int get_XCirculateRequestEvent_send_event(void *_p) {
  return (int)((XCirculateRequestEvent *)_p)->send_event;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XCirculateRequestEvent_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void my_task_wrong_task_arg(int foo, char *bar) {}


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

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

LLVM IR (-O0):
define void @my_task_wrong_task_arg(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 @my_task_wrong_task_arg(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func();
int main() {
  int i;
  for (i = 0; i < 10; ++i)
    func();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <func@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func()
%2 = tail call i32 (...) @func()
%3 = tail call i32 (...) @func()
%4 = tail call i32 (...) @func()
%5 = tail call i32 (...) @func()
%6 = tail call i32 (...) @func()
%7 = tail call i32 (...) @func()
%8 = tail call i32 (...) @func()
%9 = tail call i32 (...) @func()
%10 = tail call i32 (...) @func()
ret i32 0
}
int unpositive_int(const int val) {
  int s = (val + 1) / 2;
  if ((val % 2) == 0)
    s = -s;
  return s;
}


x86 assembly (clang, -O0):
<unpositive_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1134 <unpositive_int+0x34>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpositive_int>:
lea    0x1(%rdi),%eax
shr    $0x1f,%eax
lea    (%rdi,%rax,1),%ecx
add    $0x1,%ecx
sar    %ecx
mov    %ecx,%eax
neg    %eax
test   $0x1,%dil
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @unpositive_int(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = sdiv i32 %2, 2
%4 = and i32 %0, 1
%5 = icmp eq i32 %4, 0
%6 = sub nsw i32 0, %3
%7 = select i1 %5, i32 %6, i32 %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void exit_with(const char *r, int use_perror) {
  if (use_perror) {
    perror(r);
  } else {
    fprintf(stderr, "%s\n", r);
  }
  exit(1);
}


x86 assembly (clang, -O0):
<exit_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1157 <exit_with+0x27>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
jmp    1170 <exit_with+0x40>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe95(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<exit_with>:
push   %rax
mov    %rdi,%rdx
test   %esi,%esi
je     114a <exit_with+0x1a>
mov    %rdx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xea6(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @exit_with(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @perror(i8* %8)
br label %14
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %3
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %10, %7
%15 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @exit_with(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @perror(i8* %0)
br label %9
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %6, %4
%10 = tail call i32 @exit(i32 1)
unreachable
}