xunge/DecIR huggingface dataset:
long str$compare_multi_not(const struct dsc$descriptor_s *first_source_string,
                           const struct dsc$descriptor_s *second_source_string,
                           const long *flags_value,
                           const long *foreign_language) {
  assert(0);
  return 2392148;
}


x86 assembly (clang, -O0):
<str$compare_multi_not>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    $0x248054,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str$compare_multi_not>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x248054,%eax
pop    %rcx
ret

LLVM IR (-O0):
%"struct.dsc$descriptor_s" = type opaque
define i64 @"str$compare_multi_not"(%"struct.dsc$descriptor_s"* %0, %"struct.dsc$descriptor_s"* %1, i64* %2, i64* %3) {
%5 = alloca %"struct.dsc$descriptor_s"*
%6 = alloca %"struct.dsc$descriptor_s"*
%7 = alloca i64*
%8 = alloca i64*
store %"struct.dsc$descriptor_s"* %0, %"struct.dsc$descriptor_s"** %5
store %"struct.dsc$descriptor_s"* %1, %"struct.dsc$descriptor_s"** %6
store i64* %2, i64** %7
store i64* %3, i64** %8
%9 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 0)
ret i64 2392148
}

LLVM IR (-O2):
%"struct.dsc$descriptor_s" = type opaque
define i64 @"str$compare_multi_not"(%"struct.dsc$descriptor_s"* nocapture readnone %0, %"struct.dsc$descriptor_s"* nocapture readnone %1, i64* nocapture readnone %2, i64* nocapture readnone %3) {
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 0)
ret i64 2392148
}
char *bst_getHeight() {
  static char height = -1;
  return &height;
}


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

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

LLVM IR (-O0):
@bst_getHeight.height = internal global i8 -1
define i8* @bst_getHeight() {
ret i8* @bst_getHeight.height
}

LLVM IR (-O2):
@bst_getHeight.height = internal global i8 -1
define i8* @bst_getHeight() {
ret i8* @bst_getHeight.height
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strcmp(char *, char *);
void strcmp_2() {
  char *x = "123";
  char *y = "234";
  clang_analyzer_eval(strcmp(x, y) == -1);
}


x86 assembly (clang, -O0):
<strcmp_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_2>:
mov    $0x1,%edi
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
@.str.1 = [4 x i8] c"234\00"
define void @strcmp_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strcmp(i8* %3, i8* %4)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
define void @strcmp_2() {
%1 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}
void logout() {}


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

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

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

LLVM IR (-O2):
define void @logout() {
ret void
}
/* Variables and functions */
int syscall(int, int);
int uv__epoll_create(int size) { return syscall(213, size); }


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

x86 assembly (clang, -O2):
<uv__epoll_create>:
mov    %edi,%esi
mov    $0xd5,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @uv__epoll_create(i32 %0) {
%2 = tail call i32 @syscall(i32 213, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_generic();
int main(void) {
  ft_generic();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ft_generic()
ret i32 0
}
/* Variables and functions */
int check_result(double *, int, double, double);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ solve_euler(double, double *, int);
int main() {
  double result[100];
  double threshold = 0.01;
  double timestep = 0.01;
  solve_euler(timestep, result, 100);
  printf("%d\n", check_result(result, 100, threshold, timestep));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x340,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb6(%rip),%xmm0
movsd  %xmm0,-0x338(%rbp)
ff
movsd  0xea6(%rip),%xmm0
movsd  %xmm0,-0x340(%rbp)
ff
movsd  -0x340(%rbp),%xmm0
ff
lea    -0x330(%rbp),%rdi
mov    $0x64,%esi
call   1050 <solve_euler@plt>
lea    -0x330(%rbp),%rdi
movsd  -0x338(%rbp),%xmm0
ff
movsd  -0x340(%rbp),%xmm1
ff
mov    $0x64,%esi
call   1040 <check_result@plt>
mov    %eax,%esi
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x320,%rsp
movsd  0xec0(%rip),%xmm0
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <solve_euler@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
movsd  0xea0(%rip),%xmm0
movaps %xmm0,%xmm1
call   1040 <check_result@plt>
lea    0xe99(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x320,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x double]
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
store double 1.000000e-02, double* %3
store double 1.000000e-02, double* %4
%5 = load double, double* %4
%6 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 0
%7 = call i32 @solve_euler(double %5, double* %6, i32 100)
%8 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 0
%9 = load double, double* %3
%10 = load double, double* %4
%11 = call i32 @check_result(double* %8, i32 100, double %9, double %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [100 x double]
%2 = bitcast [100 x double]* %1 to i8*
%3 = getelementptr inbounds [100 x double], [100 x double]* %1, i64 0, i64 0
%4 = call i32 @solve_euler(double 1.000000e-02, double* %3, i32 100)
%5 = call i32 @check_result(double* %3, i32 100, double 1.000000e-02, double 1.000000e-02)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
int write_cr0_checking(unsigned long val) {
  asm volatile("movl $0, %%gs:4 \n\t"
               ".pushsection .data.ex \n\t"
               ".quad 1111f, "
               "1f"
               "\n\t"
               ".popsection \n\t"
               "1111:"
               "mov %0, %%cr0\n\t"
               "1:"
               :
               : "r"(val));
  return exception_vector();
}


x86 assembly (clang, -O0):
<write_cr0_checking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,%gs:0x4
mov    %rax,%cr0
mov    $0x0,%al
call   1030 <exception_vector@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_cr0_checking>:
movl   $0x0,%gs:0x4
mov    %rdi,%cr0
xor    %eax,%eax
jmp    1030 <exception_vector@plt>

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

LLVM IR (-O2):
define i32 @write_cr0_checking(i64 %0) {
tail call void asm sideeffect "movl $$0, %gs:4 \0A\09.pushsection .data.ex \0A\09.quad 1111f, 1f\0A\09.popsection \0A\091111:mov $0, %cr0\0A\091:", "r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
%2 = tail call i32 (...) @exception_vector()
ret i32 %2
}
/* Variables and functions */
float readFloat();
int /*<<< orphan*/ writeCommand(char *);
float acceleroY() {
  float value = 0;
  writeCommand("ACCY");
  value = readFloat();
  return value;
}


x86 assembly (clang, -O0):
<acceleroY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <writeCommand@plt>
mov    $0x0,%al
call   1040 <readFloat@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acceleroY>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <writeCommand@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <readFloat@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"ACCY\00"
define float @acceleroY() {
%1 = alloca float
store float 0.000000e+00, float* %1
%2 = call i32 @writeCommand(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = call float (...) @readFloat()
store float %3, float* %1
%4 = load float, float* %1
ret float %4
}

LLVM IR (-O2):
@.str = [5 x i8] c"ACCY\00"
define float @acceleroY() {
%1 = tail call i32 @writeCommand(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call float (...) @readFloat()
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ getpid(int /*<<< orphan*/ *);
pthread_t pthread_self(void) { return (getpid(NULL)); }


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

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

LLVM IR (-O0):
define i32 @pthread_self() {
%1 = call i32 @getpid(i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @pthread_self() {
%1 = tail call i32 @getpid(i32* null)
ret i32 %1
}
/* Variables and functions */
int f105(int *);
int f106(int *p) { return f105(p); }


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

x86 assembly (clang, -O2):
<f106>:
jmp    1030 <f105@plt>

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

LLVM IR (-O2):
define i32 @f106(i32* %0) {
%2 = tail call i32 @f105(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int);
void *dlopen(const char *file, int mode) {
  printf("NOT IMPLEMENTED: trying to open %s in mode %x\n", file, mode);
}


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

x86 assembly (clang, -O2):
<dlopen>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"NOT IMPLEMENTED: trying to open %s in mode %x\0A\00"
define i8* @dlopen(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [47 x i8] c"NOT IMPLEMENTED: trying to open %s in mode %x\0A\00"
define noalias i8* @dlopen(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret i8* undef
}
void test23() {
  int (*test24(int))(int), y = (*test24(2))(3), z = ((*test24(2))(3));
}


x86 assembly (clang, -O0):
<test23>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
call   1030 <test24@plt>
mov    $0x3,%edi
call   *%rax
mov    %eax,-0x4(%rbp)
mov    $0x2,%edi
call   1030 <test24@plt>
mov    $0x3,%edi
call   *%rax
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test23>:
push   %rax
mov    $0x2,%edi
call   1030 <test24@plt>
mov    $0x3,%edi
call   *%rax
mov    $0x2,%edi
call   1030 <test24@plt>
mov    $0x3,%edi
pop    %rcx
jmp    *%rax

LLVM IR (-O0):
define void @test23() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i32)* @test24(i32 2)
%4 = call i32 %3(i32 3)
store i32 %4, i32* %1
%5 = call i32 (i32)* @test24(i32 2)
%6 = call i32 %5(i32 3)
store i32 %6, i32* %2
ret void
}

LLVM IR (-O2):
define void @test23() {
%1 = tail call i32 (i32)* @test24(i32 2)
%2 = tail call i32 %1(i32 3)
%3 = tail call i32 (i32)* @test24(i32 2)
%4 = tail call i32 %3(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Report(char *);
int astGText(const char *text, float x, float y, const char *just, float upx,
             float upy) {
  Report("astGText");
  return 0;
}


x86 assembly (clang, -O0):
<astGText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  %xmm2,-0x1c(%rbp)
movss  %xmm3,-0x20(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <Report@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<astGText>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <Report@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"astGText\00"
define i32 @astGText(i8* %0, float %1, float %2, i8* %3, float %4, float %5) {
%7 = alloca i8*
%8 = alloca float
%9 = alloca float
%10 = alloca i8*
%11 = alloca float
%12 = alloca float
store i8* %0, i8** %7
store float %1, float* %8
store float %2, float* %9
store i8* %3, i8** %10
store float %4, float* %11
store float %5, float* %12
%13 = call i32 @Report(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"astGText\00"
define i32 @astGText(i8* nocapture readnone %0, float %1, float %2, i8* nocapture readnone %3, float %4, float %5) {
%7 = tail call i32 @Report(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void qdxRefresh() {}


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

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

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

LLVM IR (-O2):
define void @qdxRefresh() {
ret void
}
/* Variables and functions */
int strlen(char *);
const char *getGitVersion() {
  static char version[] = "$Id$";
  if (strlen(version) == 47) {
    version[45] = '\0';
    return &version[5];
  }
  return "UNKNOWN";
}


x86 assembly (clang, -O0):
<getGitVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0x2f09(%rip),%rdi
call   1030 <strlen@plt>
cmp    $0x2f,%eax
jne    1148 <getGitVersion+0x38>
movb   $0x0,0x2f21(%rip)
lea    0x2eed(%rip),%rax
add    $0x5,%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <getGitVersion+0x43>
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getGitVersion>:
push   %rax
lea    0x2f10(%rip),%rdi
call   1030 <strlen@plt>
cmp    $0x2f,%eax
jne    1132 <getGitVersion+0x22>
movb   $0x0,0x2f2c(%rip)
lea    0x2efd(%rip),%rax
pop    %rcx
ret
lea    0xec7(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@getGitVersion.version = internal global [5 x i8] c"$Id$\00"
@.str = [8 x i8] c"UNKNOWN\00"
define i8* @getGitVersion() {
%1 = alloca i8*
%2 = call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @getGitVersion.version, i64 0, i64 0))
%3 = icmp eq i32 %2, 47
br i1 %3, label %4, label %5
4: ; preds = %0
store i8 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @getGitVersion.version, i64 9, i64 0)
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @getGitVersion.version, i64 1, i64 0), i8** %1
br label %6
5: ; preds = %0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %1
br label %6
6: ; preds = %5, %4
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
@getGitVersion.version = internal global [5 x i8] c"$Id$\00"
@.str = [8 x i8] c"UNKNOWN\00"
define i8* @getGitVersion() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @getGitVersion.version, i64 0, i64 0))
%2 = icmp eq i32 %1, 47
br i1 %2, label %3, label %4
3: ; preds = %0
store i8 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @getGitVersion.version, i64 9, i64 0)
br label %4
4: ; preds = %0, %3
%5 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @getGitVersion.version, i64 1, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %0 ]
ret i8* %5
}
/* Variables and functions */
void populate_array(int *array, size_t arraySize, int (*getNextValue)(int)) {
  for (size_t i = 0; i < arraySize; i++)
    array[i] = getNextValue(i);
}


x86 assembly (clang, -O0):
<populate_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1154 <populate_array+0x54>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %ecx,%edi
call   *%rax
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <populate_array+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<populate_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1132 <populate_array+0x32>
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   *%r14
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1120 <populate_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @populate_array(i32* nocapture writeonly %0, i64 %1, i32 (i32)* nocapture %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %5, label %6
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i64 [ %11, %6 ], [ 0, %3 ]
%8 = trunc i64 %7 to i32
%9 = tail call i32 %2(i32 %8)
%10 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %9, i32* %10
%11 = add nuw i64 %7, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %5, label %6
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ usleep(int /*<<< orphan*/);
int32_t timeutil_usleep(int64_t useconds) { return usleep(useconds); }


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

x86 assembly (clang, -O2):
<timeutil_usleep>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define i32 @timeutil_usleep(i32 %0) {
%2 = tail call i32 @usleep(i32 %0)
ret i32 %2
}
/* Variables and functions */
void *database_run(void *id_ptr) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @database_run(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @database_run(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ read(int, char *, int);
void await(void) {
  char buffer[65534];
  while (1)
    read(1, buffer, 65534);
}


x86 assembly (clang, -O0):
<await>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10000,%rsp
lea    -0x10000(%rbp),%rsi
mov    $0x1,%edi
mov    $0xfffe,%edx
call   1030 <read@plt>
jmp    111b <await+0xb>

x86 assembly (clang, -O2):
<await>:
push   %rbx
sub    $0x10000,%rsp
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0xfffe,%edx
call   1030 <read@plt>
jmp    1120 <await+0x10>

LLVM IR (-O0):
define void @await() {
%1 = alloca [65534 x i8]
br label %2
2: ; preds = %0, %2
%3 = getelementptr inbounds [65534 x i8], [65534 x i8]* %1, i64 0, i64 0
%4 = call i32 @read(i32 1, i8* %3, i32 65534)
br label %2
}

LLVM IR (-O2):
define void @await() {
%1 = alloca [65534 x i8]
%2 = getelementptr inbounds [65534 x i8], [65534 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %3, %0
%4 = call i32 @read(i32 1, i8* %2, i32 65534)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ cmdline_start();
int /*<<< orphan*/ cmdline_stop();
void server_refresh() {
  cmdline_stop();
  cmdline_start();
  return;
}


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

x86 assembly (clang, -O2):
<server_refresh>:
push   %rax
xor    %eax,%eax
call   1030 <cmdline_stop@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <cmdline_start@plt>

LLVM IR (-O0):
define void @server_refresh() {
%1 = call i32 (...) @cmdline_stop()
%2 = call i32 (...) @cmdline_start()
ret void
}

LLVM IR (-O2):
define void @server_refresh() {
%1 = tail call i32 (...) @cmdline_stop()
%2 = tail call i32 (...) @cmdline_start()
ret void
}
unsigned int slabs_clsid(unsigned int size) {
  int res = 1;
  if (size == 0)
    return 0;
  size--;
  while (size >>= 1)
    res++;
  if (res < 3)
    res = 3;
  if (res > 20)
    res = 0;
  return res;
}


x86 assembly (clang, -O0):
<slabs_clsid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <slabs_clsid+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1175 <slabs_clsid+0x75>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     114d <slabs_clsid+0x4d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <slabs_clsid+0x2d>
cmpl   $0x3,-0xc(%rbp)
jge    115e <slabs_clsid+0x5e>
movl   $0x3,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jle    116f <slabs_clsid+0x6f>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slabs_clsid>:
test   %edi,%edi
je     113d <slabs_clsid+0x3d>
add    $0xffffffff,%edi
mov    $0x3,%eax
cmp    $0x2,%edi
jb     113c <slabs_clsid+0x3c>
xor    %ecx,%ecx
mov    %edi,%edx
cs nopw 0x0(%rax,%rax,1)
nop
shr    %edx
add    $0x1,%ecx
cmp    $0x3,%edi
mov    %edx,%edi
ja     1120 <slabs_clsid+0x20>
cmp    $0x3,%ecx
jb     113c <slabs_clsid+0x3c>
lea    0x1(%rcx),%edx
xor    %eax,%eax
cmp    $0x14,%ecx
cmovb  %edx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @slabs_clsid(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %17, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = icmp ult i32 %4, 2
br i1 %5, label %17, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %10, %6 ], [ 1, %3 ]
%8 = phi i32 [ %9, %6 ], [ %4, %3 ]
%9 = lshr i32 %8, 1
%10 = add nuw nsw i32 %7, 1
%11 = icmp ult i32 %8, 4
br i1 %11, label %12, label %6
12: ; preds = %6
%13 = icmp ugt i32 %7, 2
br i1 %13, label %14, label %17
14: ; preds = %12
%15 = icmp ugt i32 %7, 19
%16 = select i1 %15, i32 0, i32 %10
br label %17
17: ; preds = %14, %3, %12, %1
%18 = phi i32 [ 0, %1 ], [ 3, %12 ], [ 3, %3 ], [ %16, %14 ]
ret i32 %18
}
int hash_string(char *s) {
  unsigned char h = 0;
  for (; *s; s++)
    h ^= (unsigned char)(*s);
  return ((int)h);
}


x86 assembly (clang, -O0):
<hash_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113a <hash_string+0x3a>
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
movzbl -0x9(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <hash_string+0xc>
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_string>:
mov    (%rdi),%cl
test   %cl,%cl
je     1121 <hash_string+0x21>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
xor    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_string+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %9, %4 ], [ 0, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = zext i8 %5 to i32
%9 = xor i32 %6, %8
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %9, %4 ]
ret i32 %14
}
void link() {}


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

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

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

LLVM IR (-O2):
define void @link() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ G();
void I() { G(); }


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

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

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

LLVM IR (-O2):
define void @I() {
%1 = tail call i32 (...) @G()
ret void
}
void test() {
#pragma omp parallel
  {
#pragma omp cancellation point parallel
  }
}


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

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

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

LLVM IR (-O2):
define void @test() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
scalar_t__ waitpid(int /*<<< orphan*/, int /*<<< orphan*/ *,
                   int /*<<< orphan*/);
void sig_chld(int sig) {
  while (waitpid(0, NULL, WNOHANG) > 0) {
    ;
  }
  signal(SIGCHLD, sig_chld);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<sig_chld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edx
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <waitpid@plt>
cmp    $0x0,%rax
jle    115e <sig_chld+0x2e>
jmp    113b <sig_chld+0xb>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
mov    0x2e62(%rip),%rsi
call   1030 <signal@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<sig_chld>:
push   %rbx
mov    0x2eb0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
xor    %edi,%edi
xor    %esi,%esi
call   1040 <waitpid@plt>
test   %rax,%rax
jg     1140 <sig_chld+0x10>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    0x2e70(%rip),%rsi
call   1030 <signal@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@WNOHANG = global i32 0
@SIGCHLD = global i32 0
@EXIT_SUCCESS = global i32 0
define void @sig_chld(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i32 0, i32* null, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i32, i32* @SIGCHLD
%10 = call i32 @signal(i32 %9, void (i32)* @sig_chld)
%11 = load i32, i32* @EXIT_SUCCESS
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@SIGCHLD = global i32 0
@EXIT_SUCCESS = global i32 0
define void @sig_chld(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 0, i32* null, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = load i32, i32* @SIGCHLD
%8 = tail call i32 @signal(i32 %7, void (i32)* @sig_chld)
%9 = load i32, i32* @EXIT_SUCCESS
%10 = tail call i32 @exit(i32 %9)
unreachable
}
void remove_gyroscope_sensor(struct ssp_data *data) { return; }


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

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

LLVM IR (-O0):
%struct.ssp_data = type opaque
define void @remove_gyroscope_sensor(%struct.ssp_data* %0) {
%2 = alloca %struct.ssp_data*
store %struct.ssp_data* %0, %struct.ssp_data** %2
ret void
}

LLVM IR (-O2):
%struct.ssp_data = type opaque
define void @remove_gyroscope_sensor(%struct.ssp_data* nocapture %0) {
ret void
}
/* Variables and functions */
const bool is_number(char c) { return (c >= '0' && c <= '9'); }


x86 assembly (clang, -O0):
<is_number>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <is_number+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_number(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int sendto(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int);
int wfaTrafficSendTo(int sock, char *buf, int bufLen, struct sockaddr *to) {
  int bytesSent;
  bytesSent = sendto(sock, buf, bufLen, 0, to, sizeof(struct sockaddr));
  return bytesSent;
}


x86 assembly (clang, -O0):
<wfaTrafficSendTo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%r8
xor    %ecx,%ecx
mov    $0x4,%r9d
call   1030 <sendto@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wfaTrafficSendTo>:
mov    %rcx,%r8
xor    %ecx,%ecx
mov    $0x4,%r9d
jmp    1030 <sendto@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @wfaTrafficSendTo(i32 %0, i8* %1, i32 %2, %struct.sockaddr* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.sockaddr*
%9 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store %struct.sockaddr* %3, %struct.sockaddr** %8
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load %struct.sockaddr*, %struct.sockaddr** %8
%14 = call i32 @sendto(i32 %10, i8* %11, i32 %12, i32 0, %struct.sockaddr* %13, i32 4)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @wfaTrafficSendTo(i32 %0, i8* %1, i32 %2, %struct.sockaddr* %3) {
%5 = tail call i32 @sendto(i32 %0, i8* %1, i32 %2, i32 0, %struct.sockaddr* %3, i32 4)
ret i32 %5
}
int sys$setddir(void *newdiraddr, unsigned short int *lengthaddr,
                void *curdiraddr) {
  return ({
    unsigned long resultvar;
    register long int _a3 asm("rdx") = (long)(curdiraddr);
    register long int _a2 asm("rsi") = (long)(lengthaddr);
    register long int _a1 asm("rdi") = (long)(newdiraddr);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x82\n\t"
                 : "=a"(resultvar)
                 : "i"(31), "r"(_a1), "r"(_a2), "r"(_a3)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$setddir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0x1f,%rax
int    $0x82
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$setddir>:
mov    $0x1f,%rax
int    $0x82
ret

LLVM IR (-O0):
define i32 @"sys$setddir"(i8* %0, i16* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i16*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store i8* %0, i8** %4
store i16* %1, i16** %5
store i8* %2, i8** %6
%12 = load i8*, i8** %6
%13 = ptrtoint i8* %12 to i64
store i64 %13, i64* %8
%14 = load i16*, i16** %5
%15 = ptrtoint i16* %14 to i64
store i64 %15, i64* %9
%16 = load i8*, i8** %4
%17 = ptrtoint i8* %16 to i64
store i64 %17, i64* %10
%18 = load i64, i64* %10
%19 = load i64, i64* %9
%20 = load i64, i64* %8
%21 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 31, i64 %18, i64 %19, i64 %20)
store i64 %21, i64* %7
%22 = load i64, i64* %7
store i64 %22, i64* %11
%23 = load i64, i64* %11
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @"sys$setddir"(i8* %0, i16* %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = ptrtoint i16* %1 to i64
%6 = ptrtoint i8* %0 to i64
%7 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 31, i64 %6, i64 %5, i64 %4)
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
int Pop();
int /*<<< orphan*/ Push(int);
int CmdAndBitwise(void) {
  Push(Pop() & Pop());
  return 0;
}


x86 assembly (clang, -O0):
<CmdAndBitwise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Pop@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Pop@plt>
mov    -0x4(%rbp),%edi
and    %eax,%edi
call   1040 <Push@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdAndBitwise>:
push   %rbx
xor    %eax,%eax
call   1030 <Pop@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <Pop@plt>
and    %eax,%ebx
mov    %ebx,%edi
call   1040 <Push@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CmdAndBitwise() {
%1 = call i32 (...) @Pop()
%2 = call i32 (...) @Pop()
%3 = and i32 %1, %2
%4 = call i32 @Push(i32 %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @CmdAndBitwise() {
%1 = tail call i32 (...) @Pop()
%2 = tail call i32 (...) @Pop()
%3 = and i32 %2, %1
%4 = tail call i32 @Push(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void debut(void) {
  printf("\033[2J");
  printf("\033[%d;%dH", 6, 1);
}


x86 assembly (clang, -O0):
<debut>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<debut>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [9 x i8] c"\1B[%d;%dH\00"
define void @debut() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [9 x i8] c"\1B[%d;%dH\00"
define void @debut() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 1)
ret void
}
char *_dl_simple_ltoa(char *local, unsigned long i) {
  char *p = &local[22];
  *p-- = '\0';
  do {
    *p-- = '0' + i % 10;
    i /= 10;
  } while (i > 0);
  return p + 1;
}


x86 assembly (clang, -O0):
<_dl_simple_ltoa>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x16,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
add    $0x30,%rdx
mov    %dl,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
ja     112a <_dl_simple_ltoa+0x2a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dl_simple_ltoa>:
mov    %rdi,%rax
movb   $0x0,0x16(%rdi)
add    $0x16,%rax
movabs $0xcccccccccccccccd,%r8
cc cc cc
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,%rdi
mov    %rsi,%rax
mul    %r8
shr    $0x3,%rdx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%eax
mov    %esi,%ecx
sub    %eax,%ecx
or     $0x30,%cl
mov    %cl,-0x1(%rdi)
lea    -0x1(%rdi),%rax
cmp    $0x9,%rsi
mov    %rdx,%rsi
ja     1120 <_dl_simple_ltoa+0x20>
ret

LLVM IR (-O0):
define i8* @_dl_simple_ltoa(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 22
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = getelementptr inbounds i8, i8* %8, i32 -1
store i8* %9, i8** %5
store i8 0, i8* %8
br label %10
10: ; preds = %19, %2
%11 = load i64, i64* %4
%12 = urem i64 %11, 10
%13 = add i64 48, %12
%14 = trunc i64 %13 to i8
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i32 -1
store i8* %16, i8** %5
store i8 %14, i8* %15
%17 = load i64, i64* %4
%18 = udiv i64 %17, 10
store i64 %18, i64* %4
br label %19
19: ; preds = %10
%20 = load i64, i64* %4
%21 = icmp ugt i64 %20, 0
br i1 %21, label %10, label %22
22: ; preds = %19
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i64 1
ret i8* %24
}

LLVM IR (-O2):
define i8* @_dl_simple_ltoa(i8* writeonly %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 22
%4 = getelementptr inbounds i8, i8* %0, i64 21
store i8 0, i8* %3
br label %5
5: ; preds = %5, %2
%6 = phi i64 [ %1, %2 ], [ %12, %5 ]
%7 = phi i8* [ %4, %2 ], [ %11, %5 ]
%8 = urem i64 %6, 10
%9 = trunc i64 %8 to i8
%10 = or i8 %9, 48
%11 = getelementptr inbounds i8, i8* %7, i64 -1
store i8 %10, i8* %7
%12 = udiv i64 %6, 10
%13 = icmp ult i64 %6, 10
br i1 %13, label %14, label %5
14: ; preds = %5
ret i8* %7
}
int compare_arg(const void *a, const void *b, void *arg) {
  const int da = *((const int *)a);
  const int db = *((const int *)b);
  return (da < db) ? -1 : (da == db) ? 0 : 1;
}


x86 assembly (clang, -O0):
<compare_arg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    113b <compare_arg+0x3b>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1150 <compare_arg+0x50>
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @compare_arg(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
%6 = bitcast i8* %1 to i32*
%7 = load i32, i32* %6
%8 = icmp slt i32 %5, %7
%9 = icmp ne i32 %5, %7
%10 = zext i1 %9 to i32
%11 = select i1 %8, i32 -1, i32 %10
ret i32 %11
}
/* Type definitions */
struct Constraint {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct Constraint *);
void DestroyConstraint(struct Constraint *Constraint) { free(Constraint); }


x86 assembly (clang, -O0):
<DestroyConstraint>:
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):
<DestroyConstraint>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.Constraint = type { i32 }
define void @DestroyConstraint(%struct.Constraint* %0) {
%2 = alloca %struct.Constraint*
store %struct.Constraint* %0, %struct.Constraint** %2
%3 = load %struct.Constraint*, %struct.Constraint** %2
%4 = call i32 @free(%struct.Constraint* %3)
ret void
}

LLVM IR (-O2):
%struct.Constraint = type { i32 }
define void @DestroyConstraint(%struct.Constraint* nocapture %0) {
%2 = tail call i32 @free(%struct.Constraint* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_is_local() {
  printf("NOT IMPLEMENTED:"
         "pa_context_is_local"
         "\n");
}


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

x86 assembly (clang, -O2):
<pa_context_is_local>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"NOT IMPLEMENTED:pa_context_is_local\0A\00"
define i32 @pa_context_is_local() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [36 x i8] c"NOT IMPLEMENTED:pa_context_is_local\00"
define i32 @pa_context_is_local() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
const char *pfasta_version(void) { return "v15"; }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"v15\00"
define i8* @pfasta_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"v15\00"
define i8* @pfasta_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
void *malloc(unsigned int);
void *c_malloc(unsigned int size) {
  void *ptr = NULL;
  ptr = malloc(size);
  return ptr;
}


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

x86 assembly (clang, -O2):
<c_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @c_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}