xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ ceilf(float const);
void ceil_w_s(const float *source, int32_t *dest) {
  *dest = (int32_t)ceilf(*source);
}


x86 assembly (clang, -O0):
<ceil_w_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <ceilf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil_w_s>:
push   %rbx
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <ceilf@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ceil_w_s(float* nocapture %0, i64* nocapture writeonly %1) {
%3 = load float, float* %0
%4 = tail call i64 @ceilf(float %3)
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
int CheckINCHIKey102b(char const *);
int cdecl_CheckINCHIKey102b(const char *szINCHIKey) {
  return CheckINCHIKey102b(szINCHIKey);
}


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

x86 assembly (clang, -O2):
<cdecl_CheckINCHIKey102b>:
jmp    1030 <CheckINCHIKey102b@plt>

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

LLVM IR (-O2):
define i32 @cdecl_CheckINCHIKey102b(i8* %0) {
%2 = tail call i32 @CheckINCHIKey102b(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void xt(int num) {
  FILE *f;
  f = fopen("irina.log", "at");
  while (num--) {
    fputs("\t", f);
  }
  fclose(f);
}


x86 assembly (clang, -O0):
<xt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     117b <xt+0x4b>
mov    -0x10(%rbp),%rsi
lea    0xe9c(%rip),%rdi
call   1040 <fputs@plt>
jmp    1152 <xt+0x22>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xt>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xec3(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%r14
test   %ebx,%ebx
je     1162 <xt+0x32>
mov    $0x9,%edi
mov    %r14,%rsi
call   1040 <fputc@plt>
add    $0xffffffff,%ebx
jne    1150 <xt+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"irina.log\00"
@.str.1 = [3 x i8] c"at\00"
@.str.2 = [2 x i8] c"\09\00"
define void @xt(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* %2
%7 = add nsw i32 %6, -1
store i32 %7, i32* %2
%8 = icmp ne i32 %6, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32*, i32** %3
%11 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32* %10)
br label %5
12: ; preds = %5
%13 = load i32*, i32** %3
%14 = call i32 @fclose(i32* %13)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"irina.log\00"
@.str.1 = [3 x i8] c"at\00"
define void @xt(i32 %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %6, %4 ], [ %0, %1 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @fputc(i32 9, i32* %2)
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
%10 = tail call i32 @fclose(i32* %2)
ret void
}
void SensorSetBrightness_GC306(unsigned char val) {
  switch (val) {
  case 1:
    break;
  case 2:
    break;
  case 3:
    break;
  case 4:
    break;
  case 5:
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<SensorSetBrightness_GC306>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x4,%eax
ja     114d <SensorSetBrightness_GC306+0x4d>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    1152 <SensorSetBrightness_GC306+0x52>
jmp    1152 <SensorSetBrightness_GC306+0x52>
jmp    1152 <SensorSetBrightness_GC306+0x52>
jmp    1152 <SensorSetBrightness_GC306+0x52>
jmp    1152 <SensorSetBrightness_GC306+0x52>
jmp    1152 <SensorSetBrightness_GC306+0x52>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @SensorSetBrightness_GC306(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
switch i32 %4, label %10 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
i32 5, label %9
]
5: ; preds = %1
br label %11
6: ; preds = %1
br label %11
7: ; preds = %1
br label %11
8: ; preds = %1
br label %11
9: ; preds = %1
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %9, %8, %7, %6, %5
ret void
}

LLVM IR (-O2):
define void @SensorSetBrightness_GC306(i8 zeroext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ runTestingMode();
int main(void) {
  runTestingMode();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @runTestingMode()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_RADIO_FIFOP_PIN() { clear_io_bit(-1, 3); }


x86 assembly (clang, -O0):
<TOSH_CLR_RADIO_FIFOP_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
mov    $0x3,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_CLR_RADIO_FIFOP_PIN>:
mov    $0xffffffff,%edi
mov    $0x3,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_RADIO_FIFOP_PIN() {
%1 = call i32 @clear_io_bit(i32 -1, i32 3)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_RADIO_FIFOP_PIN() {
%1 = tail call i32 @clear_io_bit(i32 -1, i32 3)
ret void
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *s) {
  char *r;
  if (s == 0 || *s == 0)
    return 0;
  r = (char *)malloc(strlen(s) + 1);
  strcpy(r, s);
  return r;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1157 <strdup+0x27>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1164 <strdup+0x34>
movq   $0x0,-0x8(%rbp)
jmp    1192 <strdup+0x62>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1162 <strdup+0x32>
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     1162 <strdup+0x32>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    1165 <strdup+0x35>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = tail call i64 @strlen(i8* %0)
%8 = add nsw i64 %7, 1
%9 = tail call i64 @malloc(i64 %8)
%10 = inttoptr i64 %9 to i8*
%11 = tail call i32 @strcpy(i8* %10, i8* %0)
br label %12
12: ; preds = %1, %3, %6
%13 = phi i8* [ %10, %6 ], [ null, %3 ], [ null, %1 ]
ret i8* %13
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(char);
void func() {
  int ch;
  int flag = 0;
  while ((ch = getchar()) != EOF) {
    if (ch == ' ') {
      flag = 1;
    }
    if (flag == 0) {
      putchar(ch);
    } else {
      putchar('\n');
      flag = 0;
    }
  }
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1189 <func+0x69>
cmpl   $0x20,-0x4(%rbp)
jne    1159 <func+0x39>
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1173 <func+0x53>
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1184 <func+0x64>
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x0,-0x8(%rbp)
jmp    112f <func+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb7(%rip),%rbx
cmp    (%rbx),%eax
je     1159 <func+0x39>
mov    $0xa,%ebp
nopw   0x0(%rax,%rax,1)
cmp    $0x20,%eax
cmove  %ebp,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <func+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @func() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %20, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %1
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %21
7: ; preds = %3
%8 = load i32, i32* %1
%9 = icmp eq i32 %8, 32
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 1, i32* %2
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i32, i32* %1
%16 = trunc i32 %15 to i8
%17 = call i32 @putchar(i8 signext %16)
br label %20
18: ; preds = %11
%19 = call i32 @putchar(i8 signext 10)
store i32 0, i32* %2
br label %20
20: ; preds = %18, %14
br label %3
21: ; preds = %3
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @func() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = icmp eq i32 %5, 32
%7 = trunc i32 %5 to i8
%8 = select i1 %6, i8 10, i8 %7
%9 = tail call i32 @putchar(i8 signext %8)
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
ret void
}
char *trim_zeros(char *p) {
  while (*p == '0')
    p--;
  if (*p != '.')
    ++p;
  return p;
}


x86 assembly (clang, -O0):
<trim_zeros>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1129 <trim_zeros+0x29>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <trim_zeros+0x8>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     1145 <trim_zeros+0x45>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim_zeros>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
cmp    $0x30,%cl
jne    111e <trim_zeros+0x1e>
add    $0xffffffffffffffff,%rax
jmp    1110 <trim_zeros+0x10>
cmp    $0x2e,%cl
je     1127 <trim_zeros+0x27>
add    $0x1,%rax
ret

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

LLVM IR (-O2):
define i8* @trim_zeros(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 48, label %5
i8 46, label %9
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 -1
br label %2
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %3, i64 1
br label %9
9: ; preds = %2, %7
%10 = phi i8* [ %8, %7 ], [ %3, %2 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ benchmark();
int /*<<< orphan*/ initialise_board();
int /*<<< orphan*/ start_trigger();
int /*<<< orphan*/ stop_trigger();
int main(void) {
  int i;
  initialise_board();
  start_trigger();
  for (i = 0; i < (4096 >> 5); i++)
    benchmark();
  stop_trigger();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <initialise_board@plt>
mov    $0x0,%al
call   1030 <start_trigger@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1186 <main+0x46>
mov    $0x0,%al
call   1050 <benchmark@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1164 <main+0x24>
mov    $0x0,%al
call   1040 <stop_trigger@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <initialise_board@plt>
xor    %eax,%eax
call   1030 <start_trigger@plt>
mov    $0x80,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1050 <benchmark@plt>
add    $0xffffffff,%ebx
jne    1160 <main+0x20>
xor    %eax,%eax
call   1040 <stop_trigger@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initialise_board()
%2 = tail call i32 (...) @start_trigger()
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %6, %3 ]
%5 = tail call i32 (...) @benchmark()
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 128
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = tail call i32 (...) @stop_trigger()
ret i32 0
}
int getReadLock(void *mem) {
  int *p = mem;
  return p[(2)];
}


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

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

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

LLVM IR (-O2):
define i32 @getReadLock(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ P_ArchiveLuabanksAndConsistency();
int /*<<< orphan*/ P_ArchiveMisc();
int /*<<< orphan*/ P_ArchivePlayer();
void P_SaveGame(void) {
  P_ArchiveMisc();
  P_ArchivePlayer();
  P_ArchiveLuabanksAndConsistency();
}


x86 assembly (clang, -O0):
<P_SaveGame>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <P_ArchiveMisc@plt>
mov    $0x0,%al
call   1040 <P_ArchivePlayer@plt>
mov    $0x0,%al
call   1050 <P_ArchiveLuabanksAndConsistency@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<P_SaveGame>:
push   %rax
xor    %eax,%eax
call   1030 <P_ArchiveMisc@plt>
xor    %eax,%eax
call   1040 <P_ArchivePlayer@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <P_ArchiveLuabanksAndConsistency@plt>

LLVM IR (-O0):
define void @P_SaveGame() {
%1 = call i32 (...) @P_ArchiveMisc()
%2 = call i32 (...) @P_ArchivePlayer()
%3 = call i32 (...) @P_ArchiveLuabanksAndConsistency()
ret void
}

LLVM IR (-O2):
define void @P_SaveGame() {
%1 = tail call i32 (...) @P_ArchiveMisc()
%2 = tail call i32 (...) @P_ArchivePlayer()
%3 = tail call i32 (...) @P_ArchiveLuabanksAndConsistency()
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char, char);
void cambiarTurno(char *turno) {
  if (strcmp(*turno, 'o')) {
    *turno = 'x';
  } else {
    *turno = 'o';
  }
}


x86 assembly (clang, -O0):
<cambiarTurno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
movsbl %al,%edi
mov    $0x6f,%esi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1145 <cambiarTurno+0x35>
mov    -0x8(%rbp),%rax
movb   $0x78,(%rax)
jmp    114c <cambiarTurno+0x3c>
mov    -0x8(%rbp),%rax
movb   $0x6f,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cambiarTurno>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
mov    $0x6f,%esi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    (%rcx,%rcx,8),%eax
add    $0x6f,%eax
mov    %al,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @cambiarTurno(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = call i64 @strcmp(i8 signext %4, i8 signext 111)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8*, i8** %2
store i8 120, i8* %8
br label %11
9: ; preds = %1
%10 = load i8*, i8** %2
store i8 111, i8* %10
br label %11
11: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
define void @cambiarTurno(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @strcmp(i8 signext %2, i8 signext 111)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8 111, i8 120
store i8 %5, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *pop_error_handling(int);
int report_error(int, char const *, char *);
bool pop_client_error(int scon, const char *client_name) {
  char *error_message = pop_error_handling(true);
  bool write_ok = report_error(scon, client_name, error_message);
  free(error_message);
  return write_ok;
}


x86 assembly (clang, -O0):
<pop_client_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1050 <pop_error_handling@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <report_error@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop_client_error>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
mov    $0x1,%edi
call   1050 <pop_error_handling@plt>
mov    %rax,%rbx
mov    %ebp,%edi
mov    %r14,%rsi
mov    %rax,%rdx
call   1040 <report_error@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pop_client_error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = call i8* @pop_error_handling(i32 1)
store i8* %7, i8** %5
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i32 @report_error(i32 %8, i8* %9, i8* %10)
store i32 %11, i32* %6
%12 = load i8*, i8** %5
%13 = call i32 @free(i8* %12)
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
define i32 @pop_client_error(i32 %0, i8* %1) {
%3 = tail call i8* @pop_error_handling(i32 1)
%4 = tail call i32 @report_error(i32 %0, i8* %1, i8* %3)
%5 = tail call i32 @free(i8* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ HplMcs51GeneralIOC__P10__makeOutput();
void ReverseGPIOP__0__In__makeOutput(void) {
  HplMcs51GeneralIOC__P10__makeOutput();
}


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

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

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

LLVM IR (-O2):
define void @ReverseGPIOP__0__In__makeOutput() {
%1 = tail call i32 (...) @HplMcs51GeneralIOC__P10__makeOutput()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_49(int /*<<< orphan*/);
int gen_49(void) {
  handle_49(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_49>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_49@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_49() {
%1 = call i32 @handle_49(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_49() {
%1 = tail call i32 @handle_49(i32 0)
ret i32 0
}
/* Type definitions */
struct UserThreadCollection {
  int dummy;
};
struct UserThread {
  int dummy;
};

/* Variables and functions */
int Collection_containsByStruct(struct UserThreadCollection *,
                                struct UserThread *);
int /*<<< orphan*/ dest_UserThread(struct UserThread *);
struct UserThread *new_MockUserThread(char *, int /*<<< orphan*/);
unsigned int Collection_contains(struct UserThreadCollection *this,
                                 char *name) {
  struct UserThread *temp = new_MockUserThread(name, 0);
  int rv = Collection_containsByStruct(this, temp);
  dest_UserThread(temp);
  return rv;
}


x86 assembly (clang, -O0):
<Collection_contains>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <new_MockUserThread@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <Collection_containsByStruct@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <dest_UserThread@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Collection_contains>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    %rsi,%rdi
xor    %esi,%esi
call   1040 <new_MockUserThread@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <Collection_containsByStruct@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <dest_UserThread@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.UserThreadCollection = type { i32 }
%struct.UserThread = type { i32 }
define i32 @Collection_contains(%struct.UserThreadCollection* %0, i8* %1) {
%3 = alloca %struct.UserThreadCollection*
%4 = alloca i8*
%5 = alloca %struct.UserThread*
%6 = alloca i32
store %struct.UserThreadCollection* %0, %struct.UserThreadCollection** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call %struct.UserThread* @new_MockUserThread(i8* %7, i32 0)
store %struct.UserThread* %8, %struct.UserThread** %5
%9 = load %struct.UserThreadCollection*, %struct.UserThreadCollection** %3
%10 = load %struct.UserThread*, %struct.UserThread** %5
%11 = call i32 @Collection_containsByStruct(%struct.UserThreadCollection* %9, %struct.UserThread* %10)
store i32 %11, i32* %6
%12 = load %struct.UserThread*, %struct.UserThread** %5
%13 = call i32 @dest_UserThread(%struct.UserThread* %12)
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
%struct.UserThreadCollection = type { i32 }
%struct.UserThread = type { i32 }
define i32 @Collection_contains(%struct.UserThreadCollection* %0, i8* %1) {
%3 = tail call %struct.UserThread* @new_MockUserThread(i8* %1, i32 0)
%4 = tail call i32 @Collection_containsByStruct(%struct.UserThreadCollection* %0, %struct.UserThread* %3)
%5 = tail call i32 @dest_UserThread(%struct.UserThread* %3)
ret i32 %4
}
int do_040() { return 40; }


x86 assembly (clang, -O0):
<do_040>:
push   %rbp
mov    %rsp,%rbp
mov    $0x28,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @do_040() {
ret i32 40
}

LLVM IR (-O2):
define i32 @do_040() {
ret i32 40
}
void tegra_edp_notify_gpu_load(unsigned int load) {}


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

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

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

LLVM IR (-O2):
define void @tegra_edp_notify_gpu_load(i32 %0) {
ret void
}
int test_imm_C0uint8_reg(unsigned char val) {
  return ((val) & (0xC0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C0uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xc0,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C0uint8_reg>:
cmp    $0x40,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C0uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 192
%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_C0uint8_reg(i8 zeroext %0) {
%2 = icmp ult i8 %0, 64
%3 = select i1 %2, i32 -40, i32 -20
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int aes_ccms_board_dec(uint8_t *a, uint8_t len_a, uint8_t *m, uint8_t *len_m,
                       uint8_t saddr[8], uint8_t asn[5], uint8_t *key) {
  return -1;
}


x86 assembly (clang, -O0):
<aes_ccms_board_dec>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @aes_ccms_board_dec(i32* %0, i32 %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
store i32* %0, i32** %8
store i32 %1, i32* %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store i32* %4, i32** %12
store i32* %5, i32** %13
store i32* %6, i32** %14
ret i32 -1
}

LLVM IR (-O2):
define i32 @aes_ccms_board_dec(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i32* nocapture readnone %4, i32* nocapture readnone %5, i32* nocapture readnone %6) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char const);
void example_print_hex(const unsigned char *buf, size_t len) {
  unsigned i;
  for (i = 0; i < len; i++)
    printf("%02x ", buf[i]);
}


x86 assembly (clang, -O0):
<example_print_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jae    1159 <example_print_hex+0x49>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
lea    0xebe(%rip),%rdi
movzbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <example_print_hex+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<example_print_hex>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1145 <example_print_hex+0x35>
mov    %rsi,%r12
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
movzbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    %r12,%rbx
jb     1130 <example_print_hex+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%02x \00"
define void @example_print_hex(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = zext i32 %7 to i64
%9 = load i64, i64* %4
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %6
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 zeroext %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%02x \00"
define void @example_print_hex(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 zeroext %7)
%9 = add nuw nsw i64 %5, 1
%10 = and i64 %9, 4294967295
%11 = icmp ult i64 %10, %1
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret void
}
void job_manager_start(void) {}


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

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

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

LLVM IR (-O2):
define void @job_manager_start() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_cmd(int /*<<< orphan*/, int);
void SelectShiftIR() {
  send_cmd(0, 1);
  send_cmd(0, 1);
  send_cmd(0, 0);
  send_cmd(0, 0);
}


x86 assembly (clang, -O0):
<SelectShiftIR>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <send_cmd@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <send_cmd@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <send_cmd@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <send_cmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SelectShiftIR>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <send_cmd@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <send_cmd@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <send_cmd@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <send_cmd@plt>

LLVM IR (-O0):
define void @SelectShiftIR() {
%1 = call i32 @send_cmd(i32 0, i32 1)
%2 = call i32 @send_cmd(i32 0, i32 1)
%3 = call i32 @send_cmd(i32 0, i32 0)
%4 = call i32 @send_cmd(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @SelectShiftIR() {
%1 = tail call i32 @send_cmd(i32 0, i32 1)
%2 = tail call i32 @send_cmd(i32 0, i32 1)
%3 = tail call i32 @send_cmd(i32 0, i32 0)
%4 = tail call i32 @send_cmd(i32 0, i32 0)
ret void
}
char getSignflag(char flags[]) { return flags[8 - 8]; }


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

x86 assembly (clang, -O2):
<getSignflag>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @getSignflag(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @getSignflag(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ wigxjpf_fill_factors(int /*<<< orphan*/);
void wig_table_free() { wigxjpf_fill_factors(0); }


x86 assembly (clang, -O0):
<wig_table_free>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <wigxjpf_fill_factors@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wig_table_free>:
xor    %edi,%edi
jmp    1030 <wigxjpf_fill_factors@plt>

LLVM IR (-O0):
define void @wig_table_free() {
%1 = call i32 @wigxjpf_fill_factors(i32 0)
ret void
}

LLVM IR (-O2):
define void @wig_table_free() {
%1 = tail call i32 @wigxjpf_fill_factors(i32 0)
ret void
}
void swap(int array[], int a, int b) {
  int temp;
  temp = array[a];
  array[a] = array[b];
  array[b] = 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,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ pm_error(char *, char *);
int /*<<< orphan*/ printf(char *);
int main() {
  pm_error("Cucu %s", "Bau");
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xebb(%rip),%rsi
call   1050 <pm_error@plt>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec9(%rip),%rsi
call   1050 <pm_error@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Cucu %s\00"
@.str.1 = [4 x i8] c"Bau\00"
@.str.2 = [9 x i8] c"Success\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @pm_error(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"Cucu %s\00"
@.str.1 = [4 x i8] c"Bau\00"
@str = [8 x i8] c"Success\00"
define i32 @main() {
%1 = tail call i32 @pm_error(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
char *sha204h_get_library_version(void) {
  static char *version = "\x2\x0\x0";
  return version;
}


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

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

LLVM IR (-O0):
@sha204h_get_library_version.version = internal global i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0)
@.str = [4 x i8] c"\02\00\00\00"
define i8* @sha204h_get_library_version() {
%1 = load i8*, i8** @sha204h_get_library_version.version
ret i8* %1
}

LLVM IR (-O2):
@.str = [4 x i8] c"\02\00\00\00"
define i8* @sha204h_get_library_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
fun1(void) { return 2; }


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun1() {
ret i32 2
}

LLVM IR (-O2):
define i32 @fun1() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *const);
int /*<<< orphan*/ stdout;
void opt_print_usage(int argc, const char *const argv[]) {
  fprintf(stdout, "usage: %s [OPTIONS] [CMD [ARG1, ...]]\n",
          (argc > 0) ? argv[0] : "");
}


x86 assembly (clang, -O0):
<opt_print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1145 <opt_print_usage+0x35>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    1155 <opt_print_usage+0x45>
lea    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    1155 <opt_print_usage+0x45>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rdx
lea    0xe9d(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_print_usage>:
mov    %edi,%eax
mov    0x2ec7(%rip),%rcx
mov    (%rcx),%edi
test   %eax,%eax
jle    112e <opt_print_usage+0x1e>
mov    (%rsi),%rdx
lea    0xed7(%rip),%rsi
jmp    1030 <fprintf@plt>
lea    0xef1(%rip),%rdx
lea    0xec4(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [39 x i8] c"usage: %s [OPTIONS] [CMD [ARG1, ...]]\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @opt_print_usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stdout
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
br label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %8
%14 = phi i8* [ %11, %8 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %12 ]
%15 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %14)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [39 x i8] c"usage: %s [OPTIONS] [CMD [ARG1, ...]]\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @opt_print_usage(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stdout
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = load i8*, i8** %1
br label %7
7: ; preds = %2, %5
%8 = phi i8* [ %6, %5 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %2 ]
%9 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int, int);
void fill_buffer(char *buf, int len) { memset(buf, 0xAA, len); }


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

x86 assembly (clang, -O2):
<fill_buffer>:
mov    %esi,%edx
mov    $0xaa,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @fill_buffer(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 170, i32 %1)
ret void
}
/* Variables and functions */
double log(double);
double log10(double x) { return (log(x) / 2.30258509299404568402); }


x86 assembly (clang, -O0):
<log10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movsd  0xed1(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10>:
push   %rax
call   1030 <log@plt>
divsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @log10(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log(double %3)
%5 = fdiv double %4, 0x40026BB1BBB55516
ret double %5
}

LLVM IR (-O2):
define double @log10(double %0) {
%2 = tail call double @log(double %0)
%3 = fdiv double %2, 0x40026BB1BBB55516
ret double %3
}
void f(int ***ppp) { return; }


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

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

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

LLVM IR (-O2):
define void @f(i32*** nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
long mpz_get_si(int /*<<< orphan*/);
long gmpint2int(mpz_t *op) { return mpz_get_si(*op); }


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

x86 assembly (clang, -O2):
<gmpint2int>:
mov    (%rdi),%edi
jmp    1030 <mpz_get_si@plt>

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

LLVM IR (-O2):
define i64 @gmpint2int(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i64 @mpz_get_si(i32 %2)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i = 0;
  while (i < 255) {
    i++;
    printf("\n%d = %c", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jge    1153 <main+0x43>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"\0A%d = %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 255
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"\0A%d = %c\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
%3 = add nuw nsw i32 %2, 1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %3)
%5 = icmp eq i32 %3, 255
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
double dot_prod(const double *v1, const double *v2) {
  return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
}


x86 assembly (clang, -O0):
<dot_prod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot_prod>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dot_prod(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 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %24, double %18)
ret double %25
}

LLVM IR (-O2):
define double @dot_prod(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}