xunge/DecIR huggingface dataset:
/* Variables and functions */
int Sub1(int, int);
int GetLcm(int sz[], int len) {
  int i = 0;
  int re = 1;
  for (i = 0; i < len; ++i) {
    re = Sub1(sz[i], re);
  }
  return re;
}


x86 assembly (clang, -O0):
<GetLcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1164 <GetLcm+0x54>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x14(%rbp),%esi
call   1030 <Sub1@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <GetLcm+0x24>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetLcm>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1146 <GetLcm+0x36>
mov    %rdi,%r14
mov    %esi,%r15d
mov    $0x1,%eax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edi
mov    %eax,%esi
call   1030 <Sub1@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <GetLcm+0x20>
jmp    114b <GetLcm+0x3b>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @GetLcm(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = phi i32 [ 1, %4 ], [ %11, %6 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %7
%10 = load i32, i32* %9
%11 = tail call i32 @Sub1(i32 %10, i32 %8)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = phi i32 [ 1, %2 ], [ %11, %6 ]
ret i32 %15
}
/* Variables and functions */
float add2(float, float);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
float main() {
  float n;
  float result;
  scanf("%d", &n);
  result = add2(n, n * n);
  printf("Sum = %ld\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
call   1050 <add2@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
call   1050 <add2@plt>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"Sum = %ld\0A\00"
define float @main() {
%1 = alloca float
%2 = alloca float
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = load float, float* %1
%6 = load float, float* %1
%7 = fmul float %5, %6
%8 = call float @add2(float %4, float %7)
store float %8, float* %2
%9 = load float, float* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), float %9)
ret float 0.000000e+00
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"Sum = %ld\0A\00"
define float @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fmul float %4, %4
%6 = call float @add2(float %4, float %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), float %6)
ret float 0.000000e+00
}
int f(int n, int x, int stride) {
  int a, x1, x2, x3;
  a = x * stride;
  if (n > 64) {
    x1 = x + 1;
    a += x1 * stride;
    x2 = x1 + 1;
    a += x2 * stride;
  } else {
    x3 = x + 1;
    a += x3 * stride;
  }
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x40,-0x4(%rbp)
jle    1152 <f+0x52>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1168 <f+0x68>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %esi,%eax
mov    %edx,%ecx
imul   %esi,%ecx
cmp    $0x41,%edi
jl     111a <f+0x1a>
lea    (%rax,%rax,1),%esi
add    $0x3,%esi
imul   %edx,%esi
mov    %ecx,%eax
add    %esi,%eax
ret
add    $0x1,%eax
imul   %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %7
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 64
br i1 %15, label %16, label %31
16: ; preds = %3
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %8
%19 = load i32, i32* %8
%20 = load i32, i32* %6
%21 = mul nsw i32 %19, %20
%22 = load i32, i32* %7
%23 = add nsw i32 %22, %21
store i32 %23, i32* %7
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 1
store i32 %25, i32* %9
%26 = load i32, i32* %9
%27 = load i32, i32* %6
%28 = mul nsw i32 %26, %27
%29 = load i32, i32* %7
%30 = add nsw i32 %29, %28
store i32 %30, i32* %7
br label %39
31: ; preds = %3
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %10
%34 = load i32, i32* %10
%35 = load i32, i32* %6
%36 = mul nsw i32 %34, %35
%37 = load i32, i32* %7
%38 = add nsw i32 %37, %36
store i32 %38, i32* %7
br label %39
39: ; preds = %31, %16
%40 = load i32, i32* %7
ret i32 %40
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %1
%5 = icmp sgt i32 %0, 64
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = shl i32 %1, 1
%8 = add i32 %7, 3
%9 = mul i32 %8, %2
br label %13
10: ; preds = %3
%11 = add nsw i32 %1, 1
%12 = mul nsw i32 %11, %2
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %12, %10 ], [ %4, %6 ]
%15 = phi i32 [ %4, %10 ], [ %9, %6 ]
%16 = add i32 %15, %14
ret i32 %16
}
int sync_oem3(unsigned char *buff, unsigned char data) {
  buff[0] = buff[1];
  buff[1] = buff[2];
  buff[2] = data;
  return buff[0] == 0xAA && buff[1] == 0x44 && buff[2] == 0x11;
}


x86 assembly (clang, -O0):
<sync_oem3>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xaa,%ecx
mov    %al,-0xa(%rbp)
jne    1172 <sync_oem3+0x72>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x44,%ecx
mov    %al,-0xa(%rbp)
jne    1172 <sync_oem3+0x72>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
cmp    $0x11,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_oem3>:
mov    0x1(%rdi),%al
mov    0x2(%rdi),%cl
mov    %al,(%rdi)
mov    %cl,0x1(%rdi)
mov    %sil,0x2(%rdi)
xor    $0xaa,%al
xor    $0x44,%cl
or     %al,%cl
xor    $0x11,%sil
xor    %eax,%eax
or     %cl,%sil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @sync_oem3(i8* nocapture %0, i8 zeroext %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
store i8 %4, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
store i8 %6, i8* %3
store i8 %1, i8* %5
%7 = icmp eq i8 %4, -86
%8 = icmp eq i8 %6, 68
%9 = select i1 %7, i1 %8, i1 false
%10 = icmp eq i8 %1, 17
%11 = and i1 %10, %9
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ pbc_die(char *);
void *default_pbc_malloc(size_t size) {
  void *res = malloc(size);
  if (!res)
    pbc_die("malloc() error");
  return res;
}


x86 assembly (clang, -O0):
<default_pbc_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <default_pbc_malloc+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <pbc_die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_pbc_malloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <default_pbc_malloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <pbc_die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"malloc() error\00"
define i8* @default_pbc_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @pbc_die(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [15 x i8] c"malloc() error\00"
define noalias i8* @default_pbc_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @pbc_die(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void foo387() {}


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

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

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

LLVM IR (-O2):
define void @foo387() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void apg_bmp_free(unsigned char *pixels_ptr) {
  if (!pixels_ptr) {
    return;
  }
  free(pixels_ptr);
}


x86 assembly (clang, -O0):
<apg_bmp_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <apg_bmp_free+0x1c>
jmp    1135 <apg_bmp_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apg_bmp_free>:
test   %rdi,%rdi
je     111a <apg_bmp_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @apg_bmp_free(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 %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @apg_bmp_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
#pragma critTer : 4 :../ test / resources / switch.c:
  char x = 'a';
#pragma critTer : 5 :../ test / resources / switch.c:
#pragma critTer : 6 :../ test / resources / switch.c:
  switch (x) {
#pragma critTer : 7 :../ test / resources / switch.c:
  case 'a':
#pragma critTer : 8 :../ test / resources / switch.c:
    printf("a");
#pragma critTer : 9 :../ test / resources / switch.c:
  case 'b':
#pragma critTer : 10 :../ test / resources / switch.c:
    printf("b");
#pragma critTer : 11 :../ test / resources / switch.c:
    break;
#pragma critTer : 12 :../ test / resources / switch.c:
  }
#pragma critTer : 13 :../ test / resources / switch.c:
#pragma critTer : 14 :../ test / resources / switch.c:
  return 0;
#pragma critTer : 15 :../ test / resources / switch.c:
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x61,%eax
je     1149 <main+0x39>
jmp    1138 <main+0x28>
mov    -0xc(%rbp),%eax
sub    $0x62,%eax
je     1155 <main+0x45>
jmp    1161 <main+0x51>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x61,%edi
call   1030 <putchar@plt>
mov    $0x62,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 97, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %9 [
i32 97, label %5
i32 98, label %7
]
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %0, %5
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %0, %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 97)
%2 = tail call i32 @putchar(i32 98)
ret i32 0
}
/* Variables and functions */
unsigned long long GF_longmulX(unsigned long long);
int /*<<< orphan*/ printf(char *, unsigned long long);
int main() {
  unsigned long long a = 0xabdd8801ff0baaf0;
  unsigned long long ax = GF_longmulX(a);
  printf("%016llx\n", ax);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movabs $0xabdd8801ff0baaf0,%rax
88 dd ab
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <GF_longmulX@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0xabdd8801ff0baaf0,%rdi
88 dd ab
call   1030 <GF_longmulX@plt>
lea    0xec9(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%016llx\0A\00"
define i32 @main() {
%1 = tail call i64 @GF_longmulX(i64 -6062539981215520016)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char);
int main() {
  char first = 100;
  char second = 150;
  char result = first + second;
  printf("%d + %d = %d", first, second, result);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x64,-0x1(%rbp)
movb   $0x96,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
add    %ecx,%eax
mov    %al,-0x3(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x2(%rbp),%al
lea    0xec6(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x3(%rbp),%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"%d + %d = %d\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
store i8 100, i8* %1
store i8 -106, i8* %2
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = add nsw i32 %5, %7
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i8, i8* %1
%11 = load i8, i8* %2
%12 = load i8, i8* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext %10, i8 signext %11, i8 signext %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%d + %d = %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext 100, i8 signext -106, i8 signext -6)
ret i32 0
}
/* Variables and functions */
int unlink(char const *);
int _unlink(const char *filename) { return unlink(filename); }


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

x86 assembly (clang, -O2):
<_unlink>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @_unlink(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
void _exit(int status) {
  while (true)
    ;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <_exit+0x7>

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

LLVM IR (-O0):
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
br label %3
}

LLVM IR (-O2):
define void @_exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
/* Type definitions */
struct st_queue {
  int dummy;
};

/* Variables and functions */
int queue_trim(struct st_queue *qu) {
  if (NULL == qu) {
    return -1;
  }
}


x86 assembly (clang, -O0):
<queue_trim>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    111b <queue_trim+0x1b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.st_queue = type { i32 }
define i32 @queue_trim(%struct.st_queue* %0) {
%2 = alloca i32
%3 = alloca %struct.st_queue*
store %struct.st_queue* %0, %struct.st_queue** %3
%4 = load %struct.st_queue*, %struct.st_queue** %3
%5 = icmp eq %struct.st_queue* null, %4
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
%struct.st_queue = type { i32 }
define i32 @queue_trim(%struct.st_queue* readnone %0) {
ret i32 -1
}
int isEOL(char c) { return 0x0D == c || 0x0A == c; }


x86 assembly (clang, -O0):
<isEOL>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0xd,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1131 <isEOL+0x31>
movsbl -0x1(%rbp),%ecx
mov    $0xa,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEOL>:
cmp    $0xd,%dil
sete   %al
cmp    $0xa,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isEOL(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 13, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 10, %8
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isEOL(i8 signext %0) {
%2 = icmp eq i8 %0, 13
%3 = icmp eq i8 %0, 10
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int test_imm_24uint32_mem(unsigned int *val) {
  return ((*val) & (0x24 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_24uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 36
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void X509_EXTENSION_set_critical(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_EXTENSION_set_critical() {
ret void
}
/* Variables and functions */
float floor(float);
float intdiv(float a, float b) { return floor(a / b); }


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

x86 assembly (clang, -O2):
<intdiv>:
divss  %xmm1,%xmm0
jmp    1030 <floorf@plt>

LLVM IR (-O0):
define float @intdiv(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fdiv float %5, %6
%8 = call float @floor(float %7)
ret float %8
}

LLVM IR (-O2):
define float @intdiv(float %0, float %1) {
%3 = fdiv float %0, %1
%4 = tail call float @llvm.floor.f32(float %3)
ret float %4
}
/* Type definitions */
typedef int uint8_t;
typedef int int32_t;

/* Variables and functions */
int32_t sll(int32_t reg1, uint8_t desloc) { return (reg1 << desloc); }


x86 assembly (clang, -O0):
<sll>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sll>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @sll(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 = shl i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @sll(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
ret i32 %3
}
int main(void) { return *(volatile int *)0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x0,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load volatile i32, i32* null
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = load volatile i32, i32* null
ret i32 %1
}
/* Variables and functions */
int bbm_read(void *, unsigned short, unsigned char *);
signed int bbm_com_read(void *handle, unsigned short addr,
                        unsigned char *data) {
  signed int res;
  res = bbm_read(handle, addr, data);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%ax
mov    -0x18(%rbp),%rdx
movzwl %ax,%esi
call   1030 <bbm_read@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_read>:
jmp    1030 <bbm_read@plt>

LLVM IR (-O0):
define i32 @bbm_com_read(i8* %0, i16 zeroext %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i16, i16* %5
%10 = load i8*, i8** %6
%11 = call i32 @bbm_read(i8* %8, i16 zeroext %9, i8* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @bbm_com_read(i8* %0, i16 zeroext %1, i8* %2) {
%4 = tail call i32 @bbm_read(i8* %0, i16 zeroext %1, i8* %2)
ret i32 %4
}
unsigned long nul_byte_index_l64(unsigned long long mask) {
  mask = (mask - 1) & ~mask;
  mask >>= 7;
  return mask * 0x0001020304050608ull >> 56;
}


x86 assembly (clang, -O0):
<nul_byte_index_l64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
mov    -0x8(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x7,%rax
mov    %rax,-0x8(%rbp)
movabs $0x1020304050608,%rax
imul   -0x8(%rbp),%rax
shr    $0x38,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nul_byte_index_l64>:
lea    -0x1(%rdi),%rcx
not    %rdi
and    %rdi,%rcx
shr    $0x7,%rcx
movabs $0x1020304050608,%rax
imul   %rcx,%rax
shr    $0x38,%rax
ret

LLVM IR (-O0):
define i64 @nul_byte_index_l64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub i64 %3, 1
%5 = load i64, i64* %2
%6 = xor i64 %5, -1
%7 = and i64 %4, %6
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = lshr i64 %8, 7
store i64 %9, i64* %2
%10 = load i64, i64* %2
%11 = mul i64 %10, 283686952306184
%12 = lshr i64 %11, 56
ret i64 %12
}

LLVM IR (-O2):
define i64 @nul_byte_index_l64(i64 %0) {
%2 = add i64 %0, -1
%3 = xor i64 %0, -1
%4 = and i64 %2, %3
%5 = lshr i64 %4, 7
%6 = mul i64 %5, 283686952306184
%7 = lshr i64 %6, 56
ret i64 %7
}
void foo() {
  int i;
  if (!i & 10)
    return;
  !i & -10;
  !i & !10;
  !i & 100;
  !i & -100;
  !i & !100;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
and    $0xa,%eax
cmp    $0x0,%eax
je     1123 <foo+0x23>
jmp    1123 <foo+0x23>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
%5 = zext i1 %4 to i32
%6 = and i32 %5, 10
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
br label %35
9: ; preds = %0
%10 = load i32, i32* %1
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
%14 = and i32 %13, -10
%15 = load i32, i32* %1
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
%19 = and i32 %18, 0
%20 = load i32, i32* %1
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
%24 = and i32 %23, 100
%25 = load i32, i32* %1
%26 = icmp ne i32 %25, 0
%27 = xor i1 %26, true
%28 = zext i1 %27 to i32
%29 = and i32 %28, -100
%30 = load i32, i32* %1
%31 = icmp ne i32 %30, 0
%32 = xor i1 %31, true
%33 = zext i1 %32 to i32
%34 = and i32 %33, 0
br label %35
35: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
void f1() {
  volatile int x, y;
  x = 1;
  y = (x = 1);
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
movl   $0x1,-0x8(%rsp)
movl   $0x1,-0x8(%rsp)
movl   $0x1,-0x4(%rsp)
ret

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

LLVM IR (-O2):
define void @f1() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
store volatile i32 1, i32* %1
store volatile i32 1, i32* %1
store volatile i32 1, i32* %2
ret void
}
/* Variables and functions */
char *malloc(int);
int main() {
  char *p;
  int i;
  p = malloc(1024 * 1024 * 1024 * sizeof(char));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x40000000,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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

/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int *, int);
void swapper(int *a, int *b) {
  int temp = *a;
  memcpy(a, b, sizeof(temp));
  memcpy(b, &temp, sizeof(temp));
}


x86 assembly (clang, -O0):
<swapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapper>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    (%rdi),%eax
mov    %eax,0xc(%rsp)
mov    $0x4,%edx
call   1030 <memcpy@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @swapper(i32* %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* %0
store i32 %5, i32* %3
%6 = tail call i32 @memcpy(i32* %0, i32* %1, i32 4)
%7 = call i32 @memcpy(i32* %1, i32* %3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ finish();
GS_finish() { finish(); }


x86 assembly (clang, -O0):
<GS_finish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <finish@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @GS_finish() {
%1 = alloca i32
%2 = call i32 (...) @finish()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @GS_finish() {
%1 = tail call i32 (...) @finish()
ret i32 undef
}
int isprime(int n) {
  int i = 2;
  while (i * i <= n) {
    if (n % i == 0) {
      return 0;
    }
    ++i;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isprime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1148 <isprime+0x48>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    113a <isprime+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    114f <isprime+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <isprime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprime>:
mov    $0x1,%ecx
cmp    $0x4,%edi
jl     1125 <isprime+0x25>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1128 <isprime+0x28>
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jle    1110 <isprime+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @isprime(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %11, label %6
3: ; preds = %6
%4 = mul nsw i32 %10, %10
%5 = icmp sgt i32 %4, %0
br i1 %5, label %11, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %10, %3 ], [ 2, %1 ]
%8 = srem i32 %0, %7
%9 = icmp eq i32 %8, 0
%10 = add nuw nsw i32 %7, 1
br i1 %9, label %11, label %3
11: ; preds = %6, %3, %1
%12 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %6 ]
ret i32 %12
}
/* Type definitions */
struct tm {
  scalar_t__ tm_min;
};

/* Variables and functions */
struct tm *time_get_localtime(int /*<<< orphan*/);
int /*<<< orphan*/ time_get_timestamp();
unsigned long time_get_minute(void) {
  const struct tm *const date = time_get_localtime(time_get_timestamp());
  return (unsigned long)date->tm_min;
}


x86 assembly (clang, -O0):
<time_get_minute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <time_get_timestamp@plt>
mov    %eax,%edi
call   1040 <time_get_localtime@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_get_minute>:
push   %rax
xor    %eax,%eax
call   1030 <time_get_timestamp@plt>
mov    %eax,%edi
call   1040 <time_get_localtime@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i64 }
define i64 @time_get_minute() {
%1 = alloca %struct.tm*
%2 = call i32 (...) @time_get_timestamp()
%3 = call %struct.tm* @time_get_localtime(i32 %2)
store %struct.tm* %3, %struct.tm** %1
%4 = load %struct.tm*, %struct.tm** %1
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
%struct.tm = type { i64 }
define i64 @time_get_minute() {
%1 = tail call i32 (...) @time_get_timestamp()
%2 = tail call %struct.tm* @time_get_localtime(i32 %1)
%3 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
%4 = load i64, i64* %3
ret i64 %4
}
float microsecondsToCm(long microseconds) { return microseconds / 29 / 2; }


x86 assembly (clang, -O0):
<microsecondsToCm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x1d,%ecx
cqto
idiv   %rcx
mov    $0x2,%ecx
cqto
idiv   %rcx
cvtsi2ss %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<microsecondsToCm>:
mov    %rdi,%rax
movabs $0x469ee58469ee5847,%rcx
e5 9e 46
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x4,%rdx
add    %rax,%rdx
cvtsi2ss %rdx,%xmm0
ret

LLVM IR (-O0):
define float @microsecondsToCm(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sdiv i64 %3, 29
%5 = sdiv i64 %4, 2
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @microsecondsToCm(i64 %0) {
%2 = sdiv i64 %0, 58
%3 = sitofp i64 %2 to float
ret float %3
}
/* Variables and functions */
char const *utf8str_char_back_safe(char const *, int /*<<< orphan*/ *);
const char *utf8str_char_back(const char *str) {
  return utf8str_char_back_safe(str, NULL);
}


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

x86 assembly (clang, -O2):
<utf8str_char_back>:
xor    %esi,%esi
jmp    1030 <utf8str_char_back_safe@plt>

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

LLVM IR (-O2):
define i8* @utf8str_char_back(i8* %0) {
%2 = tail call i8* @utf8str_char_back_safe(i8* %0, i32* null)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void end() { abort(); }


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

x86 assembly (clang, -O2):
<end>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @end() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @end() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, char *, size_t);
ssize_t flistxattr(int filedes, char *list, size_t size) {
  return syscall(234, filedes, list, size);
}


x86 assembly (clang, -O0):
<flistxattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0xea,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flistxattr>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0xea,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @flistxattr(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @syscall(i32 234, i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
const char *csv_skip_whitespace(const char *z) {
  while (isspace((unsigned char)z[0]))
    z++;
  return z;
}


x86 assembly (clang, -O0):
<csv_skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <csv_skip_whitespace+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <csv_skip_whitespace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csv_skip_whitespace>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <csv_skip_whitespace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @csv_skip_whitespace(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 zeroext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
scalar_t__ realloc(char *, int);
void reallocRadar6337483_3() {
  char *buf = malloc(100);
  char *tmp;
  tmp = (char *)realloc(buf, 0x1000000);
  if (!tmp) {
    free(buf);
    return;
  }
  buf = tmp;
  free(buf);
}


x86 assembly (clang, -O0):
<reallocRadar6337483_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1000000,%esi
call   1050 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1171 <reallocRadar6337483_3+0x41>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
jmp    1182 <reallocRadar6337483_3+0x52>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallocRadar6337483_3>:
push   %rbx
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x1000000,%esi
call   1050 <realloc@plt>
test   %rax,%rax
je     1159 <reallocRadar6337483_3+0x29>
mov    %rax,%rdi
pop    %rbx
jmp    1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @reallocRadar6337483_3() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @malloc(i32 100)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i64 @realloc(i8* %4, i32 16777216)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, null
br i1 %8, label %12, label %9
9: ; preds = %0
%10 = load i8*, i8** %1
%11 = call i32 @free(i8* %10)
br label %16
12: ; preds = %0
%13 = load i8*, i8** %2
store i8* %13, i8** %1
%14 = load i8*, i8** %1
%15 = call i32 @free(i8* %14)
br label %16
16: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
define void @reallocRadar6337483_3() {
%1 = tail call dereferenceable_or_null(100) i8* @malloc(i32 100)
%2 = tail call i64 @realloc(i8* %1, i32 16777216)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @free(i8* %1)
br label %9
6: ; preds = %0
%7 = inttoptr i64 %2 to i8*
%8 = tail call i32 @free(i8* %7)
br label %9
9: ; preds = %6, %4
ret void
}
/* Variables and functions */
int sh_list_compare_lexic(void const *, void const *);
int sh_queue_compare_lexic(const void *q, const void *q2) {
  return sh_list_compare_lexic(q, q2);
}


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

x86 assembly (clang, -O2):
<sh_queue_compare_lexic>:
jmp    1030 <sh_list_compare_lexic@plt>

LLVM IR (-O0):
define i32 @sh_queue_compare_lexic(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 @sh_list_compare_lexic(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @sh_queue_compare_lexic(i8* %0, i8* %1) {
%3 = tail call i32 @sh_list_compare_lexic(i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
struct uftrace_data {
  int dummy;
};
struct opts {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __close_data_file(struct opts *, struct uftrace_data *, int);
void close_data_file(struct opts *opts, struct uftrace_data *handle) {
  __close_data_file(opts, handle, true);
}


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

x86 assembly (clang, -O2):
<close_data_file>:
mov    $0x1,%edx
jmp    1030 <__close_data_file@plt>

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

LLVM IR (-O2):
%struct.opts = type { i32 }
%struct.uftrace_data = type { i32 }
define void @close_data_file(%struct.opts* %0, %struct.uftrace_data* %1) {
%3 = tail call i32 @__close_data_file(%struct.opts* %0, %struct.uftrace_data* %1, i32 1)
ret void
}
/* Variables and functions */
int differentWord(void *, void *);
int rbTreeCmpWord(void *a, void *b) { return differentWord(a, b); }


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

x86 assembly (clang, -O2):
<rbTreeCmpWord>:
jmp    1030 <differentWord@plt>

LLVM IR (-O0):
define i32 @rbTreeCmpWord(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 @differentWord(i8* %5, i8* %6)
ret i32 %7
}

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