xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char *);
int /*<<< orphan*/ strncmp(char const *, char *, int);
int is_option(const char *option_name, char *option) {
  if (!strcmp(option_name, option) || !strncmp(option_name + 1, option, 2))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1165 <is_option+0x45>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1171 <is_option+0x51>
movl   $0x1,-0x4(%rbp)
jmp    1178 <is_option+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_option>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strcmp@plt>
test   %eax,%eax
je     1152 <is_option+0x32>
add    $0x1,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
jmp    1157 <is_option+0x37>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @is_option(i8* %0, i8* %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i32 @strncmp(i8* %6, i8* %1, i32 2)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %2
%11 = phi i32 [ 1, %2 ], [ %9, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ f1();
void __attribute__((fastcall)) f3(void) { f1(); }


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

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

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

LLVM IR (-O2):
define void @f3() {
%1 = tail call i32 (...) @f1()
ret void
}
void make_range() {}


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

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

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

LLVM IR (-O2):
define void @make_range() {
ret void
}
int id(int i) {
  asm("" : "+Xr"(i));
  return i;
}


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

x86 assembly (clang, -O2):
<id>:
mov    %edi,%eax
mov    %edi,-0x4(%rsp)
mov    %eax,-0x4(%rsp)
ret

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

LLVM IR (-O2):
define i32 @id(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}
int qsort_cmp_VEC_ID(const void *x, const void *y) {
  if (*((int *)x) < *((int *)y))
    return (-1);
  else
    return (*((int *)x) > *((int *)y));
}


x86 assembly (clang, -O0):
<qsort_cmp_VEC_ID>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <qsort_cmp_VEC_ID+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <qsort_cmp_VEC_ID+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_cmp_VEC_ID>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @qsort_cmp_VEC_ID(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = icmp slt i32 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %23
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to i32*
%17 = load i32, i32* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to i32*
%20 = load i32, i32* %19
%21 = icmp sgt i32 %17, %20
%22 = zext i1 %21 to i32
store i32 %22, i32* %3
br label %23
23: ; preds = %14, %13
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @qsort_cmp_VEC_ID(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int l_regrd(int ad) { return ad; }


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

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

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

LLVM IR (-O2):
define i32 @l_regrd(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ message_write(char *, int);
int main() {
  char msg[2 + 2 + 5];
  message_write(msg, 2 + 2 + 5);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xf(%rsp),%rdi
mov    $0x9,%esi
call   1030 <message_write@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%4 = call i32 @message_write(i8* %3, i32 9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [9 x i8]
%2 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%3 = call i32 @message_write(i8* %2, i32 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void comm_tx(char c) { write(1, &c, 1); }


x86 assembly (clang, -O0):
<comm_tx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comm_tx>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @comm_tx(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @comm_tx(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void time___TimeT_update___impl(time_t recv) { time(&recv); }


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

x86 assembly (clang, -O2):
<time___TimeT_update___impl>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <time@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @time___TimeT_update___impl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @time(i32* %2)
ret void
}
char *getGoogleApi() { return "https://maps.googleapis.com/maps/api/js?"; }


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"https://maps.googleapis.com/maps/api/js?\00"
define i8* @getGoogleApi() {
ret i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [41 x i8] c"https://maps.googleapis.com/maps/api/js?\00"
define i8* @getGoogleApi() {
ret i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ omp_get_thread_num();
int main(int argc, char *argv[]) {
  int people = 0;
#pragma omp parallel
  {
#pragma omp master
    {
      if (omp_get_thread_num() != 0)
        abort();
      people++;
    }
#pragma omp barrier
  }
  if (people != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1040 <omp_get_thread_num@plt>
cmp    $0x0,%rax
je     1155 <main+0x35>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
je     116f <main+0x4f>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
test   %rax,%rax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i64 (...) @omp_get_thread_num()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %2
%12 = load i32, i32* %6
%13 = add nsw i32 %12, 1
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @omp_get_thread_num()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i32 0
}
void av_usleep() {}


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

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

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

LLVM IR (-O2):
define void @av_usleep() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xbc() {
  Assert_real((isupper(188) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              945, ("isupper should be 0 for 0xbc"));
}


x86 assembly (clang, -O0):
<t_isupper_0xbc>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbc,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3b1,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0xbc>:
push   %rax
mov    $0xbc,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3b1,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xbc\00"
define void @t_isupper_0xbc() {
%1 = call i64 @isupper(i32 188)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 945, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xbc\00"
define void @t_isupper_0xbc() {
%1 = tail call i64 @isupper(i32 188)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 945, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  printf("Ganhador 1: %.2f\n", 780000.0 * 0.46);
  printf("Ganhador 2: %.2f\n", 780000.0 * 0.32);
  printf("Ganhador 3: %.2f\n", 780000.0 - 780000.0 * 0.46 - 780000.0 * 0.32);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xef2(%rip),%rdi
movsd  0xee2(%rip),%xmm0
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
movsd  0xec6(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
movsd  0xeaa(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"Ganhador 1: %.2f\0A\00"
@.str.1 = [18 x i8] c"Ganhador 2: %.2f\0A\00"
@.str.2 = [18 x i8] c"Ganhador 3: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double 3.588000e+05)
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double 2.496000e+05)
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double 1.716000e+05)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Ganhador 1: %.2f\0A\00"
@.str.1 = [18 x i8] c"Ganhador 2: %.2f\0A\00"
@.str.2 = [18 x i8] c"Ganhador 3: %.2f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double 3.588000e+05)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double 2.496000e+05)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double 1.716000e+05)
ret i32 0
}
/* Variables and functions */
scalar_t__ i386_get_cpuid(unsigned int *, unsigned int *);
unsigned int __attribute__((no)) i386_cpuid_ecx(void) {
  unsigned int ecx, edx;
  if (i386_get_cpuid(&ecx, &edx))
    return ecx;
  else
    return 0;
}


x86 assembly (clang, -O0):
<i386_cpuid_ecx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <i386_get_cpuid@plt>
cmp    $0x0,%rax
je     113a <i386_cpuid_ecx+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <i386_cpuid_ecx+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i386_cpuid_ecx>:
push   %rax
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
call   1030 <i386_get_cpuid@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     112b <i386_cpuid_ecx+0x1b>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @i386_cpuid_ecx() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i64 @i386_get_cpuid(i32* %2, i32* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* %2
store i32 %7, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @i386_cpuid_ecx() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i64 @i386_get_cpuid(i32* %1, i32* %2)
%6 = icmp eq i64 %5, 0
%7 = load i32, i32* %1
%8 = select i1 %6, i32 0, i32 %7
ret i32 %8
}
/* Variables and functions */
int nextMode_0(int);
int positiveEdge_0(int, int);
int node_curMode(int btnMode_at_last, int btnMode, int curMode_at_last,
                 int *output) {
  int _tmp002;
  int _tmp001;
  _tmp002 = positiveEdge_0(btnMode_at_last, btnMode);
  if (_tmp002 == 1) {
    _tmp001 = nextMode_0(curMode_at_last);
  } else if (_tmp002 == 0) {
    _tmp001 = curMode_at_last;
  }
  *output = _tmp001;
  return 1;
}


x86 assembly (clang, -O0):
<node_curMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <positiveEdge_0@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    115d <node_curMode+0x3d>
mov    -0xc(%rbp),%edi
call   1040 <nextMode_0@plt>
mov    %eax,-0x20(%rbp)
jmp    1172 <node_curMode+0x52>
cmpl   $0x0,-0x1c(%rbp)
jne    116d <node_curMode+0x4d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1172 <node_curMode+0x52>
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<node_curMode>:
push   %rbp
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %edx,%ebp
call   1030 <positiveEdge_0@plt>
cmp    $0x1,%eax
jne    113b <node_curMode+0x1b>
mov    %ebp,%edi
call   1040 <nextMode_0@plt>
mov    %eax,%ebp
mov    %ebp,(%rbx)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @node_curMode(i32 %0, i32 %1, i32 %2, i32* nocapture writeonly %3) {
%5 = tail call i32 @positiveEdge_0(i32 %0, i32 %1)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @nextMode_0(i32 %2)
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ %8, %7 ], [ %2, %4 ]
store i32 %10, i32* %3
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void my_free(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @my_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ coio_yield();
int /*<<< orphan*/ printf(char *);
void _t1(void *arg) {
  printf("Hello 1 from _t1\n");
  coio_yield();
  printf("Hello 2 from _t1\n");
}


x86 assembly (clang, -O0):
<_t1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <coio_yield@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_t1>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <coio_yield@plt>
lea    0xed6(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Hello 1 from _t1\0A\00"
@.str.1 = [18 x i8] c"Hello 2 from _t1\0A\00"
define void @_t1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @coio_yield()
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"Hello 1 from _t1\00"
@str.2 = [17 x i8] c"Hello 2 from _t1\00"
define void @_t1(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @coio_yield()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int quaddobl_collapse_diagonal(int k, int d) {
  int a[2], *b, fail;
  double *c;
  a[0] = k;
  a[1] = d;
  fail = _ada_use_c2phc4c(312, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<quaddobl_collapse_diagonal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x138,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quaddobl_collapse_diagonal>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%rsi
mov    $0x138,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @quaddobl_collapse_diagonal(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i32]
%6 = alloca i32*
%7 = alloca i32
%8 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %9, i32* %10
%11 = load i32, i32* %4
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %11, i32* %12
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%14 = load i32*, i32** %6
%15 = load double*, double** %8
%16 = call i32 @_ada_use_c2phc4c(i32 312, i32* %13, i32* %14, double* %15, i32 0)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @quaddobl_collapse_diagonal(i32 %0, i32 %1) {
%3 = alloca [2 x i32]
%4 = bitcast [2 x i32]* %3 to i8*
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 %0, i32* %5
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 %1, i32* %6
%7 = call i32 @_ada_use_c2phc4c(i32 312, i32* %5, i32* undef, double* undef, i32 0)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ errx(int, char *);
int ungetc(int, int /*<<< orphan*/ *);
void ungetc_checked(int ch, FILE *fp) {
  ch = ungetc(ch, fp);
  if (ch == EOF)
    errx(1, "ungetc failed");
}


x86 assembly (clang, -O0):
<ungetc_checked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <ungetc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ea0(%rip),%rcx
cmp    (%rcx),%eax
jne    1161 <ungetc_checked+0x41>
mov    $0x1,%edi
lea    0xea4(%rip),%rsi
call   1030 <errx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungetc_checked>:
push   %rax
call   1040 <ungetc@plt>
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%eax
jne    1143 <ungetc_checked+0x23>
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
pop    %rax
jmp    1030 <errx@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [14 x i8] c"ungetc failed\00"
define void @ungetc_checked(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @ungetc(i32 %0, i32* %1)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
void testReductionToConstant(int a) {
  if ((a * 0) != 0)
    ((void)*(char *)0);
  if ((a & 0) != 0)
    ((void)*(char *)0);
  if ((a | (~0)) != (~0))
    ((void)*(char *)0);
}


x86 assembly (clang, -O0):
<testReductionToConstant>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x0,-0x4(%rbp),%eax
cmp    $0x0,%eax
je     1114 <testReductionToConstant+0x14>
mov    -0x4(%rbp),%eax
and    $0x0,%eax
cmp    $0x0,%eax
je     1123 <testReductionToConstant+0x23>
mov    -0x4(%rbp),%eax
or     $0xffffffff,%eax
cmp    $0xffffffff,%eax
je     1132 <testReductionToConstant+0x32>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testReductionToConstant(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 0
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i8, i8* null
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* %2
%10 = and i32 %9, 0
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = load i8, i8* null
br label %14
14: ; preds = %12, %8
%15 = load i32, i32* %2
%16 = or i32 %15, -1
%17 = icmp ne i32 %16, -1
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = load i8, i8* null
br label %20
20: ; preds = %18, %14
ret void
}

LLVM IR (-O2):
define void @testReductionToConstant(i32 %0) {
ret void
}
/* Variables and functions */
int compress2(unsigned char *, unsigned long *, unsigned char const *,
              unsigned long, int);
int compress(unsigned char *dest, unsigned long *destLen,
             const unsigned char *source, unsigned long sourceLen) {
  return compress2(dest, destLen, source, sourceLen, (-1));
}


x86 assembly (clang, -O0):
<compress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xffffffff,%r8d
call   1030 <compress2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compress>:
mov    $0xffffffff,%r8d
jmp    1030 <compress2@plt>

LLVM IR (-O0):
define i32 @compress(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64* %1, i64** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64*, i64** %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 @compress2(i8* %9, i64* %10, i8* %11, i64 %12, i32 -1)
ret i32 %13
}

LLVM IR (-O2):
define i32 @compress(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = tail call i32 @compress2(i8* %0, i64* %1, i8* %2, i64 %3, i32 -1)
ret i32 %5
}
float to_celsius(int farenheit) {
  return (5.0f / 9.0f) * ((float)farenheit - 32.0f);
}


x86 assembly (clang, -O0):
<to_celsius>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm1
movss  0xef0(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xee0(%rip),%xmm0
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_celsius>:
cvtsi2ss %edi,%xmm0
addss  0xef4(%rip),%xmm0
mulss  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define float @to_celsius(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to float
%5 = fsub float %4, 3.200000e+01
%6 = fmul float 0x3FE1C71C80000000, %5
ret float %6
}

LLVM IR (-O2):
define float @to_celsius(i32 %0) {
%2 = sitofp i32 %0 to float
%3 = fadd float %2, -3.200000e+01
%4 = fmul float %3, 0x3FE1C71C80000000
ret float %4
}
/* Type definitions */
struct response {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ resp_header_get(struct response const *, char const *,
                                   char const **, char const **);
char *strdupdelim(char const *, char const *);
char *resp_header_strdup(const struct response *resp, const char *name) {
  const char *b, *e;
  if (!resp_header_get(resp, name, &b, &e))
    return NULL;
  return strdupdelim(b, e);
}


x86 assembly (clang, -O0):
<resp_header_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1030 <resp_header_get@plt>
cmp    $0x0,%eax
jne    115b <resp_header_strdup+0x3b>
movq   $0x0,-0x8(%rbp)
jmp    116c <resp_header_strdup+0x4c>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <strdupdelim@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resp_header_strdup>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1030 <resp_header_get@plt>
test   %eax,%eax
je     114b <resp_header_strdup+0x2b>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1040 <strdupdelim@plt>
add    $0x18,%rsp
ret
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.response = type { i32 }
define i8* @resp_header_strdup(%struct.response* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca %struct.response*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store %struct.response* %0, %struct.response** %4
store i8* %1, i8** %5
%8 = load %struct.response*, %struct.response** %4
%9 = load i8*, i8** %5
%10 = call i32 @resp_header_get(%struct.response* %8, i8* %9, i8** %6, i8** %7)
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %2
store i8* null, i8** %3
br label %17
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = call i8* @strdupdelim(i8* %14, i8* %15)
store i8* %16, i8** %3
br label %17
17: ; preds = %13, %12
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
%struct.response = type { i32 }
define i8* @resp_header_strdup(%struct.response* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = bitcast i8** %3 to i8*
%6 = bitcast i8** %4 to i8*
%7 = call i32 @resp_header_get(%struct.response* %0, i8* %1, i8** %3, i8** %4)
%8 = icmp eq i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i8* @strdupdelim(i8* %10, i8* %11)
br label %13
13: ; preds = %2, %9
%14 = phi i8* [ %12, %9 ], [ null, %2 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int maxMinTest() {
  if ((1 > 2 ? 1 : 2 == 2) && (2 < 1 ? 2 : 1 == 1)) {
    return 1 == 1;
  } else {
    printf("Min/Max failed\n");
    return 1 == 0;
  }
}


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

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

LLVM IR (-O0):
define i32 @maxMinTest() {
ret i32 1
}

LLVM IR (-O2):
define i32 @maxMinTest() {
ret i32 1
}
/* Variables and functions */
scalar_t__ strtol(char const *, char **, int);
int atoi(const char *nptr) { return (int)strtol(nptr, (char **)NULL, 10); }


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

x86 assembly (clang, -O2):
<atoi>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtol(i8* %3, i8** null, i32 10)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i8** null, i32 10)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t mc_fan_calc_rpm(uint8_t in) { return ((in * 5) * 4); }


x86 assembly (clang, -O0):
<mc_fan_calc_rpm>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x5,-0x4(%rbp),%eax
shl    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_fan_calc_rpm>:
shl    $0x2,%edi
lea    (%rdi,%rdi,4),%eax
ret

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

LLVM IR (-O2):
define i32 @mc_fan_calc_rpm(i32 %0) {
%2 = mul i32 %0, 20
ret i32 %2
}
int GLUE_POP_FPSTACK_TO_PTR(unsigned char *buf, void *destptr) {
  if (buf) {
    *buf++ = 0x48;
    *buf++ = 0xB8;
    *(void **)buf = destptr;
    buf += 8;
    *buf++ = 0xDD;
    *buf++ = 0x18;
  }
  return 2 + 8 + 2;
}


x86 assembly (clang, -O0):
<GLUE_POP_FPSTACK_TO_PTR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1176 <GLUE_POP_FPSTACK_TO_PTR+0x76>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x48,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0xb8,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0xdd,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x18,(%rax)
mov    $0xc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_POP_FPSTACK_TO_PTR>:
test   %rdi,%rdi
je     1114 <GLUE_POP_FPSTACK_TO_PTR+0x14>
movw   $0xb848,(%rdi)
mov    %rsi,0x2(%rdi)
movw   $0x18dd,0xa(%rdi)
mov    $0xc,%eax
ret

LLVM IR (-O0):
define i32 @GLUE_POP_FPSTACK_TO_PTR(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %21
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
store i8 72, i8* %8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
store i8 -72, i8* %10
%12 = load i8*, i8** %4
%13 = load i8*, i8** %3
%14 = bitcast i8* %13 to i8**
store i8* %12, i8** %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 8
store i8* %16, i8** %3
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %3
store i8 -35, i8* %17
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
store i8 24, i8* %19
br label %21
21: ; preds = %7, %2
ret i32 12
}

LLVM IR (-O2):
define i32 @GLUE_POP_FPSTACK_TO_PTR(i8* writeonly %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 72, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 2
store i8 -72, i8* %5
%7 = bitcast i8* %6 to i8**
store i8* %1, i8** %7
%8 = getelementptr inbounds i8, i8* %0, i64 10
%9 = getelementptr inbounds i8, i8* %0, i64 11
store i8 -35, i8* %8
store i8 24, i8* %9
br label %10
10: ; preds = %4, %2
ret i32 12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ fccomm_pid_read(int, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void Test_Commands2(void) {
  char message[11 + 1] = {'\0'};
  fccomm_pid_read(0xF3, (uint8_t *)message, 11 - 3);
  fprintf(stderr, "\"%s\"\n", message);
}


x86 assembly (clang, -O0):
<Test_Commands2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1030 <memset@plt>
lea    -0xc(%rbp),%rsi
mov    $0xf3,%edi
mov    $0x8,%edx
call   1040 <fccomm_pid_read@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    -0xc(%rbp),%rdx
lea    0xe91(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Test_Commands2>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
mov    %rsp,%rbx
mov    $0xf3,%edi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1030 <fccomm_pid_read@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xea6(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"\22%s\22\0A\00"
define void @Test_Commands2() {
%1 = alloca [12 x i8]
%2 = bitcast [12 x i8]* %1 to i8*
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%4 = bitcast i8* %3 to i32*
%5 = call i32 @fccomm_pid_read(i32 243, i32* %4, i32 8)
%6 = load i32, i32* @stderr
%7 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"\22%s\22\0A\00"
define void @Test_Commands2() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = bitcast [12 x i8]* %1 to i32*
%4 = call i32 @fccomm_pid_read(i32 243, i32* %3, i32 8)
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ back_to_prom();
void dec_machine_halt(void) { back_to_prom(); }


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

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

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

LLVM IR (-O2):
define void @dec_machine_halt() {
%1 = tail call i32 (...) @back_to_prom()
ret void
}
void DivideByZero() {
  volatile float zero = 0.0f;
  volatile float result __attribute__((unused)) = 123.0f / zero;
}


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

x86 assembly (clang, -O2):
<DivideByZero>:
movl   $0x0,-0x8(%rsp)
movss  0xef0(%rip),%xmm0
divss  -0x8(%rsp),%xmm0
movss  %xmm0,-0x4(%rsp)
ret

LLVM IR (-O0):
define void @DivideByZero() {
%1 = alloca float
%2 = alloca float
store volatile float 0.000000e+00, float* %1
%3 = load volatile float, float* %1
%4 = fdiv float 1.230000e+02, %3
store volatile float %4, float* %2
ret void
}

LLVM IR (-O2):
define void @DivideByZero() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
store volatile float 0.000000e+00, float* %1
%4 = bitcast float* %2 to i8*
%5 = load volatile float, float* %1
%6 = fdiv float 1.230000e+02, %5
store volatile float %6, float* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int main() {
  char *c = (char *)malloc(sizeof(char));
  free(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 1)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 1)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @free(i8* %2)
ret i32 0
}
int greaterEqual(int lhs, int rhs) { return lhs >= rhs; }


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

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

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

LLVM IR (-O2):
define i32 @greaterEqual(i32 %0, i32 %1) {
%3 = icmp sge i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int standard_sample_to_new_slices(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(45, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<standard_sample_to_new_slices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2d,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<standard_sample_to_new_slices>:
mov    $0x2d,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @standard_sample_to_new_slices() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 45, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void mailimf_dot_atom_text_free(char *dot_atom) { free(dot_atom); }


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

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

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

LLVM IR (-O2):
define void @mailimf_dot_atom_text_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned geom_imax2f(const float v[2]) { return (v[0] > v[1]) ? 0 : 1; }


x86 assembly (clang, -O0):
<geom_imax2f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    $0x1,%eax
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
cmova  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_imax2f>:
movss  (%rdi),%xmm0
xor    %eax,%eax
ucomiss 0x4(%rdi),%xmm0
setbe  %al
ret

LLVM IR (-O0):
define i32 @geom_imax2f(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 1
%8 = load float, float* %7
%9 = fcmp ogt float %5, %8
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 0, i32 1
ret i32 %11
}

LLVM IR (-O2):
define i32 @geom_imax2f(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fcmp ule float %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
extern int SizeofPtr() { return sizeof(void *); }


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

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

LLVM IR (-O0):
define i32 @SizeofPtr() {
ret i32 8
}

LLVM IR (-O2):
define i32 @SizeofPtr() {
ret i32 8
}
char *RCSid() {
  return RCSid("$Id: doc2ipf.c,v 1.21.4.1 2012/03/03 16:20:59 mikulik Exp $");
}


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

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

LLVM IR (-O0):
@.str = [60 x i8] c"$Id: doc2ipf.c,v 1.21.4.1 2012/03/03 16:20:59 mikulik Exp $\00"
define i8* @RCSid() {
%1 = call i8* (i8*, ...) bitcast (i8* ()* @RCSid to i8* (i8*, ...)*)(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @RCSid() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ time2gpst(int /*<<< orphan*/, int *);
int /*<<< orphan*/ timeget();
int /*<<< orphan*/ utc2gpst(int /*<<< orphan*/);
extern int adjgpsweek(int week) {
  int w;
  (void)time2gpst(utc2gpst(timeget()), &w);
  if (w < 1560)
    w = 1560;
  return week + (w - week + 512) / 1024 * 1024;
}


x86 assembly (clang, -O0):
<adjgpsweek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <timeget@plt>
mov    %eax,%edi
call   1030 <utc2gpst@plt>
mov    %eax,%edi
lea    -0x8(%rbp),%rsi
call   1050 <time2gpst@plt>
cmpl   $0x618,-0x8(%rbp)
jge    1168 <adjgpsweek+0x38>
movl   $0x618,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x200,%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
shl    $0xa,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjgpsweek>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <timeget@plt>
mov    %eax,%edi
call   1030 <utc2gpst@plt>
lea    0xc(%rsp),%rsi
mov    %eax,%edi
call   1050 <time2gpst@plt>
mov    0xc(%rsp),%ecx
cmp    $0x619,%ecx
mov    $0x618,%eax
cmovge %ecx,%eax
sub    %ebx,%eax
lea    0x200(%rax),%ecx
add    $0x5ff,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
and    $0xfffffc00,%eax
add    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @adjgpsweek(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @timeget()
%5 = call i32 @utc2gpst(i32 %4)
%6 = call i32 @time2gpst(i32 %5, i32* %3)
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 1560
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1560, i32* %3
br label %10
10: ; preds = %9, %1
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = sub nsw i32 %12, %13
%15 = add nsw i32 %14, 512
%16 = sdiv i32 %15, 1024
%17 = mul nsw i32 %16, 1024
%18 = add nsw i32 %11, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @adjgpsweek(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 (...) @timeget()
%5 = tail call i32 @utc2gpst(i32 %4)
%6 = call i32 @time2gpst(i32 %5, i32* %2)
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 1560
%9 = select i1 %8, i32 %7, i32 1560
%10 = sub i32 512, %0
%11 = add i32 %10, %9
%12 = sdiv i32 %11, 1024
%13 = shl nsw i32 %12, 10
%14 = add nsw i32 %13, %0
ret i32 %14
}