xunge/DecIR huggingface dataset:
/* Variables and functions */
double floorf(double n) {
  n = (int)(n * 10) / 10;
  return n;
}


x86 assembly (clang, -O0):
<floorf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floorf>:
mulsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%eax
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @floorf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.000000e+01
%5 = fptosi double %4 to i32
%6 = sdiv i32 %5, 10
%7 = sitofp i32 %6 to double
store double %7, double* %2
%8 = load double, double* %2
ret double %8
}

LLVM IR (-O2):
define double @floorf(double %0) {
%2 = fmul double %0, 1.000000e+01
%3 = fptosi double %2 to i32
%4 = sdiv i32 %3, 10
%5 = sitofp i32 %4 to double
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xde() {
  Assert_real((isxdigit(222) == 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_isxdigit.c",
              1115, ("isxdigit should be 0 for 0xde"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xde>:
push   %rax
mov    $0xde,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x45b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xde\00"
define void @t_isxdigit_0xde() {
%1 = call i64 @isxdigit(i32 222)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1115, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xde\00"
define void @t_isxdigit_0xde() {
%1 = tail call i64 @isxdigit(i32 222)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1115, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PIN_SET(int /*<<< orphan*/);
void start_trigger() { PIN_SET(0); }


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

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

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

LLVM IR (-O2):
define void @start_trigger() {
%1 = tail call i32 @PIN_SET(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DrawRadarCircle();
int /*<<< orphan*/ RadarMissiles();
int /*<<< orphan*/ RadarPlanets();
int /*<<< orphan*/ RadarTargets();
int /*<<< orphan*/ RadarWaypoint();
Radar() {
  DrawRadarCircle();
  RadarPlanets();
  RadarTargets();
  RadarMissiles();
  RadarWaypoint();
}


x86 assembly (clang, -O0):
<Radar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1070 <DrawRadarCircle@plt>
mov    $0x0,%al
call   1050 <RadarPlanets@plt>
mov    $0x0,%al
call   1060 <RadarTargets@plt>
mov    $0x0,%al
call   1030 <RadarMissiles@plt>
mov    $0x0,%al
call   1040 <RadarWaypoint@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Radar>:
push   %rax
xor    %eax,%eax
call   1070 <DrawRadarCircle@plt>
xor    %eax,%eax
call   1050 <RadarPlanets@plt>
xor    %eax,%eax
call   1060 <RadarTargets@plt>
xor    %eax,%eax
call   1030 <RadarMissiles@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <RadarWaypoint@plt>

LLVM IR (-O0):
define i32 @Radar() {
%1 = alloca i32
%2 = call i32 (...) @DrawRadarCircle()
%3 = call i32 (...) @RadarPlanets()
%4 = call i32 (...) @RadarTargets()
%5 = call i32 (...) @RadarMissiles()
%6 = call i32 (...) @RadarWaypoint()
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @Radar() {
%1 = tail call i32 (...) @DrawRadarCircle()
%2 = tail call i32 (...) @RadarPlanets()
%3 = tail call i32 (...) @RadarTargets()
%4 = tail call i32 (...) @RadarMissiles()
%5 = tail call i32 (...) @RadarWaypoint()
ret i32 undef
}
int __attribute__((no, noclone)) h(int a) {
  return 2 * (a * (0x7fffffff / 2 + 1));
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1e,%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
mov    %edi,%eax
shl    $0x1f,%eax
ret

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = shl i32 %0, 31
ret i32 %2
}
void *h(void) { return 0; }


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

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

LLVM IR (-O0):
define i8* @h() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @h() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
scalar_t__ svc_max_pollfd;
int /*<<< orphan*/ *svc_pollfd;
void svc_exit(void) {
  free(svc_pollfd);
  svc_pollfd = NULL;
  svc_max_pollfd = 0;
}


x86 assembly (clang, -O0):
<svc_exit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    0x2eae(%rip),%rax
movq   $0x0,(%rax)
mov    0x2ea8(%rip),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<svc_exit>:
push   %rbx
mov    0x2ec0(%rip),%rbx
mov    (%rbx),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
mov    0x2eb2(%rip),%rax
movq   $0x0,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
@svc_pollfd = global i32* null
@svc_max_pollfd = global i64 0
define void @svc_exit() {
%1 = load i32*, i32** @svc_pollfd
%2 = call i32 @free(i32* %1)
store i32* null, i32** @svc_pollfd
store i64 0, i64* @svc_max_pollfd
ret void
}

LLVM IR (-O2):
@svc_pollfd = global i32* null
@svc_max_pollfd = global i64 0
define void @svc_exit() {
%1 = load i32*, i32** @svc_pollfd
%2 = tail call i32 @free(i32* %1)
store i32* null, i32** @svc_pollfd
store i64 0, i64* @svc_max_pollfd
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Getstring_Stdin(char *);
int /*<<< orphan*/ printf(char *, char *);
void askOption(char *question, char *c) {
  printf("%s", question);
  Getstring_Stdin(c);
  return;
}


x86 assembly (clang, -O0):
<askOption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <Getstring_Stdin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<askOption>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <Getstring_Stdin@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @askOption(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @Getstring_Stdin(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @askOption(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @Getstring_Stdin(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void show_number(int number) { printf("Our number is: %d\n", number); }


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

x86 assembly (clang, -O2):
<show_number>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Our number is: %d\0A\00"
define void @show_number(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Our number is: %d\0A\00"
define void @show_number(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
int run_test(char *name, int (*test)()) {
  int result = test();
  printf("%-30s\t%s\n", name, result == 0 ? "PASS" : "FAIL");
  return result;
}


x86 assembly (clang, -O0):
<run_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   *-0x10(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%ecx
lea    0xed9(%rip),%rdx
lea    0xecd(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rdx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_test>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   *%rsi
mov    %eax,%ebp
test   %eax,%eax
lea    0xee5(%rip),%rax
lea    0xee3(%rip),%rdx
cmove  %rax,%rdx
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%-30s\09%s\0A\00"
@.str.1 = [5 x i8] c"PASS\00"
@.str.2 = [5 x i8] c"FAIL\00"
define i32 @run_test(i8* %0, i32 (...)* nocapture %1) {
%3 = tail call i32 (...) %1()
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %5)
ret i32 %3
}
/* Type definitions */
struct hda_codec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ alc88x_simple_mic_automute(struct hda_codec *);
int /*<<< orphan*/ alc_hp_automute(struct hda_codec *);
void alc861vd_lenovo_init_hook(struct hda_codec *codec) {
  alc_hp_automute(codec);
  alc88x_simple_mic_automute(codec);
}


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

x86 assembly (clang, -O2):
<alc861vd_lenovo_init_hook>:
push   %rbx
mov    %rdi,%rbx
call   1030 <alc_hp_automute@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <alc88x_simple_mic_automute@plt>

LLVM IR (-O0):
%struct.hda_codec = type { i32 }
define void @alc861vd_lenovo_init_hook(%struct.hda_codec* %0) {
%2 = alloca %struct.hda_codec*
store %struct.hda_codec* %0, %struct.hda_codec** %2
%3 = load %struct.hda_codec*, %struct.hda_codec** %2
%4 = call i32 @alc_hp_automute(%struct.hda_codec* %3)
%5 = load %struct.hda_codec*, %struct.hda_codec** %2
%6 = call i32 @alc88x_simple_mic_automute(%struct.hda_codec* %5)
ret void
}

LLVM IR (-O2):
%struct.hda_codec = type { i32 }
define void @alc861vd_lenovo_init_hook(%struct.hda_codec* %0) {
%2 = tail call i32 @alc_hp_automute(%struct.hda_codec* %0)
%3 = tail call i32 @alc88x_simple_mic_automute(%struct.hda_codec* %0)
ret void
}
unsigned char mem_blk_get_uint8_null(const void *ext, unsigned long addr) {
  return (0);
}


x86 assembly (clang, -O0):
<mem_blk_get_uint8_null>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @mem_blk_get_uint8_null(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret i8 0
}

LLVM IR (-O2):
define zeroext i8 @mem_blk_get_uint8_null(i8* nocapture readnone %0, i64 %1) {
ret i8 0
}
/* Variables and functions */
int isValid(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *a = "[[(())]]]";
  printf("valid %d\n", isValid(a));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <isValid@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <isValid@plt>
lea    0xed6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"[[(())]]]\00"
@.str.1 = [10 x i8] c"valid %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @isValid(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"[[(())]]]\00"
@.str.1 = [10 x i8] c"valid %d\0A\00"
define i32 @main() {
%1 = tail call i32 @isValid(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef size_t uint16_t;

/* Variables and functions */
uint16_t firstSpace(char *str, uint16_t start) {
  uint16_t i;
  for (i = start; str[i] != '\0'; i++) {
    if (str[i] == ' ') {
      return i;
    }
  }
  return start;
}


x86 assembly (clang, -O0):
<firstSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1161 <firstSpace+0x61>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    114b <firstSpace+0x4b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1169 <firstSpace+0x69>
jmp    1150 <firstSpace+0x50>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1114 <firstSpace+0x14>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<firstSpace>:
mov    %rsi,%rax
mov    %rsi,%rcx
cs nopw 0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%edx
test   %dl,%dl
je     1126 <firstSpace+0x26>
cmp    $0x20,%dl
je     1123 <firstSpace+0x23>
add    $0x1,%rcx
jmp    1110 <firstSpace+0x10>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @firstSpace(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %1, %2 ], [ %8, %7 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
switch i8 %6, label %7 [
i8 0, label %10
i8 32, label %9
]
7: ; preds = %3
%8 = add i64 %4, 1
br label %3
9: ; preds = %3
br label %10
10: ; preds = %3, %9
%11 = phi i64 [ %4, %9 ], [ %1, %3 ]
ret i64 %11
}
void rop3_149_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk1 = *D ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_149_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_149_0_1>:
mov    %edx,%eax
and    %sil,%al
mov    (%rdi),%r8b
xor    %r8b,%al
not    %al
mov    %edx,%ecx
not    %cl
or     %sil,%cl
and    %al,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_149_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = and i32 %27, %29
%31 = load i8, i8* %7
%32 = zext i8 %31 to i32
%33 = load i8, i8* %6
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = or i32 %30, %36
%38 = load i8, i8* %6
%39 = zext i8 %38 to i32
%40 = load i8, i8* %5
%41 = zext i8 %40 to i32
%42 = xor i32 %41, -1
%43 = and i32 %39, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = and i32 %43, %46
%48 = or i32 %37, %47
%49 = trunc i32 %48 to i8
%50 = load i8*, i8** %4
store i8 %49, i8* %50
ret void
}

LLVM IR (-O2):
define void @rop3_149_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = and i8 %2, %1
%5 = load i8, i8* %0
%6 = xor i8 %4, %5
%7 = xor i8 %6, -1
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %9, %7
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %5
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i = 5;
  int j = 6;
  int *p = &i;
  int *q = &j;
  printf("\n*p = %d, *q = %d\n", *p, *q);
  int *t = p;
  p = q;
  q = t;
  printf("\n*p = %d, *q = %d\n", *p, *q);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x6,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\0A*p = %d, *q = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32 0, i32* %1
store i32 5, i32* %2
store i32 6, i32* %3
store i32* %2, i32** %4
store i32* %3, i32** %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10)
%12 = load i32*, i32** %4
store i32* %12, i32** %6
%13 = load i32*, i32** %5
store i32* %13, i32** %4
%14 = load i32*, i32** %6
store i32* %14, i32** %5
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = load i32*, i32** %5
%18 = load i32, i32* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"\0A*p = %d, *q = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 5, i32 6)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 6, i32 5)
ret i32 0
}
/* Variables and functions */
int REG_EXTENDED;
void regex_flag_basic_short(char c __attribute__((unused)), void *data) {
  int *cflags = data;
  *cflags &= ~REG_EXTENDED;
}


x86 assembly (clang, -O0):
<regex_flag_basic_short>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x18(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<regex_flag_basic_short>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
not    %eax
and    %eax,(%rsi)
ret

LLVM IR (-O0):
@REG_EXTENDED = global i32 0
define void @regex_flag_basic_short(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i32*
store i8 %0, i8* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* @REG_EXTENDED
%9 = xor i32 %8, -1
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = and i32 %11, %9
store i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
@REG_EXTENDED = global i32 0
define void @regex_flag_basic_short(i8 signext %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* @REG_EXTENDED
%5 = xor i32 %4, -1
%6 = load i32, i32* %3
%7 = and i32 %6, %5
store i32 %7, i32* %3
ret void
}
double add_precise(double x, double y) { return (x + y); }


x86 assembly (clang, -O0):
<add_precise>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_precise>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @add_precise(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @add_precise(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ init_options();
size_t parse_options(int argc, char *argv[]) {
  init_options();
  return 1;
}


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

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

LLVM IR (-O0):
define i64 @parse_options(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @init_options()
ret i64 1
}

LLVM IR (-O2):
define i64 @parse_options(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_options()
ret i64 1
}
/* Variables and functions */
int /*<<< orphan*/ usleep(float);
void s3d_fsleep(float seconds) { usleep(seconds * 1e6); }


x86 assembly (clang, -O0):
<s3d_fsleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s3d_fsleep>:
mulss  0xee8(%rip),%xmm0
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @s3d_fsleep(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double %4, 1.000000e+06
%6 = fptrunc double %5 to float
%7 = call i32 @usleep(float %6)
ret void
}

LLVM IR (-O2):
define void @s3d_fsleep(float %0) {
%2 = fmul float %0, 1.000000e+06
%3 = tail call i32 @usleep(float %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printInt(int *number) { printf("%d ", *number); }


x86 assembly (clang, -O0):
<printInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printInt>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printInt(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
char *private_strerror(int errnum) {
  extern char *sys_errlist[];
  extern int sys_nerr;
  if (errnum > 0 && errnum <= sys_nerr)
    return sys_errlist[errnum];
  return "Unknown system error";
}


x86 assembly (clang, -O0):
<private_strerror>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    113b <private_strerror+0x3b>
mov    -0xc(%rbp),%eax
mov    0x2ecd(%rip),%rcx
cmp    (%rcx),%eax
jg     113b <private_strerror+0x3b>
movslq -0xc(%rbp),%rcx
mov    0x2eca(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <private_strerror+0x46>
lea    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<private_strerror>:
lea    0xef9(%rip),%rax
test   %edi,%edi
jle    1123 <private_strerror+0x23>
mov    0x2ed6(%rip),%rcx
cmp    %edi,(%rcx)
jl     1123 <private_strerror+0x23>
mov    %edi,%eax
mov    0x2ed9(%rip),%rcx
mov    (%rcx,%rax,8),%rax
ret

LLVM IR (-O0):
@sys_nerr = external global i32
@sys_errlist = external global [0 x i8*]
@.str = [21 x i8] c"Unknown system error\00"
define i8* @private_strerror(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i32, i32* %3
%8 = load i32, i32* @sys_nerr
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [0 x i8*], [0 x i8*]* @sys_errlist, i64 0, i64 %12
%14 = load i8*, i8** %13
store i8* %14, i8** %2
br label %16
15: ; preds = %6, %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8** %2
br label %16
16: ; preds = %15, %10
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@sys_nerr = external global i32
@sys_errlist = external global [0 x i8*]
@.str = [21 x i8] c"Unknown system error\00"
define i8* @private_strerror(i32 %0) {
%2 = icmp slt i32 %0, 1
%3 = load i32, i32* @sys_nerr
%4 = icmp slt i32 %3, %0
%5 = select i1 %2, i1 true, i1 %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = zext i32 %0 to i64
%8 = getelementptr inbounds [0 x i8*], [0 x i8*]* @sys_errlist, i64 0, i64 %7
%9 = load i8*, i8** %8
br label %10
10: ; preds = %1, %6
%11 = phi i8* [ %9, %6 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ par(short);
int /*<<< orphan*/ pdr(short);
void prtreg(short areg) {
  register short reg;
  reg = areg;
  if (reg > 7) {
    par(reg - 8);
  } else {
    pdr(reg);
  }
}


x86 assembly (clang, -O0):
<prtreg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%ax
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0x7,%eax
jle    1158 <prtreg+0x38>
movswl -0x4(%rbp),%eax
sub    $0x8,%eax
movswl %ax,%edi
call   1040 <par@plt>
jmp    1161 <prtreg+0x41>
movswl -0x4(%rbp),%edi
call   1030 <pdr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prtreg>:
cmp    $0x8,%di
jl     1131 <prtreg+0x11>
add    $0xfffffff8,%edi
movswl %di,%edi
jmp    1040 <par@plt>
movswl %di,%edi
jmp    1030 <pdr@plt>

LLVM IR (-O0):
define void @prtreg(i16 signext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
store i16 %4, i16* %3
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = icmp sgt i32 %6, 7
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i16, i16* %3
%10 = sext i16 %9 to i32
%11 = sub nsw i32 %10, 8
%12 = trunc i32 %11 to i16
%13 = call i32 @par(i16 signext %12)
br label %17
14: ; preds = %1
%15 = load i16, i16* %3
%16 = call i32 @pdr(i16 signext %15)
br label %17
17: ; preds = %14, %8
ret void
}

LLVM IR (-O2):
define void @prtreg(i16 signext %0) {
%2 = icmp sgt i16 %0, 7
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = add nsw i16 %0, -8
%5 = tail call i32 @par(i16 signext %4)
br label %8
6: ; preds = %1
%7 = tail call i32 @pdr(i16 signext %0)
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glClear(unsigned int);
void Clear(unsigned int m) { glClear(m); }


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

x86 assembly (clang, -O2):
<Clear>:
jmp    1030 <glClear@plt>

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

LLVM IR (-O2):
define void @Clear(i32 %0) {
%2 = tail call i32 @glClear(i32 %0)
ret void
}
double calcSpeed(float distance, float time) { return distance / time; }


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

x86 assembly (clang, -O2):
<calcSpeed>:
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @calcSpeed(float %0, float %1) {
%3 = fdiv float %0, %1
%4 = fpext float %3 to double
ret double %4
}
/* Type definitions */
struct vec4 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec4_assign(float *, float *);
__attribute__((always_)) struct vec4 *psvec4_assign(struct vec4 *result,
                                                    struct vec4 *a) {
  vec4_assign((float *)result, (float *)a);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec4_assign>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec4_assign@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec4 = type { i32 }
define %struct.vec4* @psvec4_assign(%struct.vec4* %0, %struct.vec4* %1) {
%3 = alloca %struct.vec4*
%4 = alloca %struct.vec4*
store %struct.vec4* %0, %struct.vec4** %3
store %struct.vec4* %1, %struct.vec4** %4
%5 = load %struct.vec4*, %struct.vec4** %3
%6 = bitcast %struct.vec4* %5 to float*
%7 = load %struct.vec4*, %struct.vec4** %4
%8 = bitcast %struct.vec4* %7 to float*
%9 = call i32 @vec4_assign(float* %6, float* %8)
%10 = load %struct.vec4*, %struct.vec4** %3
ret %struct.vec4* %10
}

LLVM IR (-O2):
%struct.vec4 = type { i32 }
define %struct.vec4* @psvec4_assign(%struct.vec4* returned %0, %struct.vec4* %1) {
%3 = bitcast %struct.vec4* %0 to float*
%4 = bitcast %struct.vec4* %1 to float*
%5 = tail call i32 @vec4_assign(float* %3, float* %4)
ret %struct.vec4* %0
}
/* Variables and functions */
char *appaserver_parameter_file_get_appaserver_mount_point();
int /*<<< orphan*/ set_path(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void add_utility_to_path(void) {
  char *appaserver_mount_point;
  char utility_path[128];
  appaserver_mount_point =
      appaserver_parameter_file_get_appaserver_mount_point();
  sprintf(utility_path, "%s/utility", appaserver_mount_point);
  set_path(utility_path);
}


x86 assembly (clang, -O0):
<add_utility_to_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    $0x0,%al
call   1030 <appaserver_parameter_file_get_appaserver_mount_point@plt>
mov    %rax,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xea8(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1050 <set_path@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_utility_to_path>:
push   %rbx
sub    $0x80,%rsp
xor    %eax,%eax
call   1030 <appaserver_parameter_file_get_appaserver_mount_point@plt>
lea    0xeba(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rdx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1050 <set_path@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%s/utility\00"
define void @add_utility_to_path() {
%1 = alloca i8*
%2 = alloca [128 x i8]
%3 = call i8* (...) @appaserver_parameter_file_get_appaserver_mount_point()
store i8* %3, i8** %1
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = load i8*, i8** %1
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%8 = call i32 @set_path(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s/utility\00"
define void @add_utility_to_path() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = tail call i8* (...) @appaserver_parameter_file_get_appaserver_mount_point()
%4 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @set_path(i8* %2)
ret void
}
unsigned bit_y(const unsigned cfgbit) { return (cfgbit & ((1 << 8) - 1)); }


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

x86 assembly (clang, -O2):
<bit_y>:
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @bit_y(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
double Omegaf(double Omega0, double Lambda0, double z) {
  double answer, zplus12, zplus13;
  zplus12 = ((1.0 + z) * (1.0 + z));
  zplus13 = zplus12 * (1.0 + z);
  answer = Omega0 * zplus13 /
           (Omega0 * zplus13 + (1. - Omega0 - Lambda0) * zplus12 + Lambda0);
  return (answer);
}


x86 assembly (clang, -O0):
<Omegaf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xee5(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xed8(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xebd(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm3
movsd  0xe93(%rip),%xmm2
subsd  -0x8(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
mulsd  -0x28(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Omegaf>:
movsd  0xef8(%rip),%xmm3
addsd  %xmm3,%xmm2
movapd %xmm2,%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm4,%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm0,%xmm3
subsd  %xmm1,%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
divsd  %xmm3,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @Omegaf(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%10 = load double, double* %6
%11 = fadd double 1.000000e+00, %10
%12 = load double, double* %6
%13 = fadd double 1.000000e+00, %12
%14 = fmul double %11, %13
store double %14, double* %8
%15 = load double, double* %8
%16 = load double, double* %6
%17 = fadd double 1.000000e+00, %16
%18 = fmul double %15, %17
store double %18, double* %9
%19 = load double, double* %4
%20 = load double, double* %9
%21 = fmul double %19, %20
%22 = load double, double* %4
%23 = load double, double* %9
%24 = load double, double* %4
%25 = fsub double 1.000000e+00, %24
%26 = load double, double* %5
%27 = fsub double %25, %26
%28 = load double, double* %8
%29 = fmul double %27, %28
%30 = call double @llvm.fmuladd.f64(double %22, double %23, double %29)
%31 = load double, double* %5
%32 = fadd double %30, %31
%33 = fdiv double %21, %32
store double %33, double* %7
%34 = load double, double* %7
ret double %34
}

LLVM IR (-O2):
define double @Omegaf(double %0, double %1, double %2) {
%4 = fadd double %2, 1.000000e+00
%5 = fmul double %4, %4
%6 = fmul double %4, %5
%7 = fmul double %6, %0
%8 = fsub double 1.000000e+00, %0
%9 = fsub double %8, %1
%10 = fmul double %9, %5
%11 = tail call double @llvm.fmuladd.f64(double %0, double %6, double %10)
%12 = fadd double %11, %1
%13 = fdiv double %7, %12
ret double %13
}
/* Type definitions */
struct block {
  int dummy;
};

/* Variables and functions */
struct block *gen_uncond(int /*<<< orphan*/);
struct block *gen_false() {
  return gen_uncond(0);
}


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

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

LLVM IR (-O0):
%struct.block = type { i32 }
define %struct.block* @gen_false() {
%1 = call %struct.block* @gen_uncond(i32 0)
ret %struct.block* %1
}

LLVM IR (-O2):
%struct.block = type { i32 }
define %struct.block* @gen_false() {
%1 = tail call %struct.block* @gen_uncond(i32 0)
ret %struct.block* %1
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, scalar_t__);
scalar_t__ strlen(char const *);
char *trace_malloc(scalar_t__, char *);
char *trace_strdup(const char *source, char *where) {
  char *ptr = trace_malloc(strlen(source) + 1, where);
  memcpy(ptr, source, strlen(source) + 1);
  return ptr;
}


x86 assembly (clang, -O0):
<trace_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
call   1050 <trace_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trace_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%rdi
mov    %r14,%rsi
call   1050 <trace_malloc@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <memcpy@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @trace_strdup(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = add nsw i64 %7, 1
%9 = load i8*, i8** %4
%10 = call i8* @trace_malloc(i64 %8, i8* %9)
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = load i8*, i8** %3
%13 = load i8*, i8** %3
%14 = call i64 @strlen(i8* %13)
%15 = add nsw i64 %14, 1
%16 = call i32 @memcpy(i8* %11, i8* %12, i64 %15)
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @trace_strdup(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add nsw i64 %3, 1
%5 = tail call i8* @trace_malloc(i64 %4, i8* %1)
%6 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%7 = add nsw i64 %6, 1
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %7)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void justquit(int signo) { exit(0); }


x86 assembly (clang, -O0):
<justquit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<justquit>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @justquit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @justquit(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
extern int flogError(FILE *file, const char *format, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @flogError(i32* nocapture readnone %0, i8* nocapture readnone %1, ...) {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t __IUSAT(uint32_t value, uint32_t sat) {
  uint32_t result;
  if (value & 0x80000000) {
    result = 0;
  } else if ((((0xFFFFFFFF >> sat) << sat) & value) != 0) {
    result = 0xFFFFFFFF >> (32 - sat);
  } else {
    result = value;
  }
  return (result);
}


x86 assembly (clang, -O0):
<__IUSAT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     1127 <__IUSAT+0x27>
movl   $0x0,-0xc(%rbp)
jmp    1164 <__IUSAT+0x64>
mov    -0x8(%rbp),%ecx
mov    $0xffffffff,%eax
shr    %cl,%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
and    -0x4(%rbp),%eax
cmp    $0x0,%eax
je     1159 <__IUSAT+0x59>
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
mov    $0xffffffff,%eax
shr    %cl,%eax
mov    %eax,-0xc(%rbp)
jmp    115f <__IUSAT+0x5f>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1164 <__IUSAT+0x64>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__IUSAT>:
test   %edi,%edi
js     111a <__IUSAT+0x1a>
mov    %esi,%ecx
mov    %edi,%eax
mov    %edi,%edx
shr    %cl,%edx
test   %edx,%edx
je     1119 <__IUSAT+0x19>
neg    %cl
mov    $0xffffffff,%eax
shr    %cl,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @__IUSAT(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = and i32 %6, -2147483648
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %5
br label %25
10: ; preds = %2
%11 = load i32, i32* %4
%12 = lshr i32 -1, %11
%13 = load i32, i32* %4
%14 = shl i32 %12, %13
%15 = load i32, i32* %3
%16 = and i32 %14, %15
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %10
%19 = load i32, i32* %4
%20 = sub nsw i32 32, %19
%21 = lshr i32 -1, %20
store i32 %21, i32* %5
br label %24
22: ; preds = %10
%23 = load i32, i32* %3
store i32 %23, i32* %5
br label %24
24: ; preds = %22, %18
br label %25
25: ; preds = %24, %9
%26 = load i32, i32* %5
ret i32 %26
}

LLVM IR (-O2):
define i32 @__IUSAT(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, -1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = shl nsw i32 -1, %1
%6 = and i32 %5, %0
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = sub nsw i32 32, %1
%10 = lshr i32 -1, %9
br label %11
11: ; preds = %4, %2, %8
%12 = phi i32 [ %10, %8 ], [ 0, %2 ], [ %0, %4 ]
ret i32 %12
}