xunge/DecIR huggingface dataset:
void make_pipe() {}


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

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

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

LLVM IR (-O2):
define void @make_pipe() {
ret void
}
/* Variables and functions */
int is_end_of_tag(char);
int is_end_of_name(char ch) { return is_end_of_tag(ch); }


x86 assembly (clang, -O0):
<is_end_of_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_end_of_tag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_end_of_name>:
jmp    1030 <is_end_of_tag@plt>

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

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

/* Variables and functions */
int pthread_barrier_destroy(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_barrier_init(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/ *, int);
int /*<<< orphan*/ pthread_barrier_wait(int /*<<< orphan*/ *);
int main(void) {
  pthread_barrier_t barrier;
  pthread_barrier_init(&barrier, NULL, 1);
  pthread_barrier_wait(&barrier);
  return pthread_barrier_destroy(&barrier);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   1030 <pthread_barrier_init@plt>
lea    -0x8(%rbp),%rdi
call   1040 <pthread_barrier_wait@plt>
lea    -0x8(%rbp),%rdi
call   1050 <pthread_barrier_destroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <pthread_barrier_init@plt>
mov    %rbx,%rdi
call   1040 <pthread_barrier_wait@plt>
mov    %rbx,%rdi
call   1050 <pthread_barrier_destroy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @pthread_barrier_init(i32* %2, i32* null, i32 1)
%4 = call i32 @pthread_barrier_wait(i32* %2)
%5 = call i32 @pthread_barrier_destroy(i32* %2)
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @pthread_barrier_init(i32* %1, i32* null, i32 1)
%4 = call i32 @pthread_barrier_wait(i32* %1)
%5 = call i32 @pthread_barrier_destroy(i32* %1)
ret i32 %5
}
/* Variables and functions */
double rand();
double rnd(double width) {
  static double result;
  result = rand();
  while (width < result) {
    result = result / 2.0;
  }
  result = result - width * 0.75;
  return result;
}


x86 assembly (clang, -O0):
<rnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movsd  %xmm0,0x2f04(%rip)
movsd  -0x8(%rbp),%xmm1
movsd  0x2ef7(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1164 <rnd+0x54>
movsd  0x2ee5(%rip),%xmm0
movsd  0xeb5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x2ed1(%rip)
jmp    112c <rnd+0x1c>
movsd  0x2ec4(%rip),%xmm1
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe70(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2e90(%rip)
movsd  0x2e88(%rip),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
movsd  (%rsp),%xmm2
ucomisd %xmm2,%xmm0
jbe    113a <rnd+0x2a>
movsd  0xed0(%rip),%xmm1
mulsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
ja     1130 <rnd+0x20>
mulsd  0xec6(%rip),%xmm2
addsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@rnd.result = internal global double 0.000000e+00
define double @rnd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @rand()
store double %3, double* @rnd.result
br label %4
4: ; preds = %8, %1
%5 = load double, double* %2
%6 = load double, double* @rnd.result
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load double, double* @rnd.result
%10 = fdiv double %9, 2.000000e+00
store double %10, double* @rnd.result
br label %4
11: ; preds = %4
%12 = load double, double* @rnd.result
%13 = load double, double* %2
%14 = fneg double %13
%15 = call double @llvm.fmuladd.f64(double %14, double 7.500000e-01, double %12)
store double %15, double* @rnd.result
%16 = load double, double* @rnd.result
ret double %16
}

LLVM IR (-O2):
define double @rnd(double %0) {
%2 = tail call double (...) @rand()
%3 = fcmp ogt double %2, %0
br i1 %3, label %4, label %8
4: ; preds = %1, %4
%5 = phi double [ %6, %4 ], [ %2, %1 ]
%6 = fmul double %5, 5.000000e-01
%7 = fcmp ogt double %6, %0
br i1 %7, label %4, label %8
8: ; preds = %4, %1
%9 = phi double [ %2, %1 ], [ %6, %4 ]
%10 = fneg double %0
%11 = tail call double @llvm.fmuladd.f64(double %10, double 7.500000e-01, double %9)
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *xmalloc(size_t size) {
  void *p = malloc(size);
  if (p == NULL) {
    perror("");
    exit(EXIT_FAILURE);
  }
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116e <xmalloc+0x3e>
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@EXIT_FAILURE = global i32 0
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@EXIT_FAILURE = global i32 0
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ HTML_Begin();
int /*<<< orphan*/ HTML_Cont(double, double);
int /*<<< orphan*/ HTML_Fill();
int /*<<< orphan*/ HTML_Move(double, double);
void HTML_Box(double x1, double y1, double x2, double y2) {
  HTML_Begin();
  HTML_Move(x1, y1);
  HTML_Cont(x1, y2);
  HTML_Cont(x2, y2);
  HTML_Cont(x2, y1);
  HTML_Fill();
}


x86 assembly (clang, -O0):
<HTML_Box>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    $0x0,%al
call   1030 <HTML_Begin@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <HTML_Move@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1060 <HTML_Cont@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1060 <HTML_Cont@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1060 <HTML_Cont@plt>
mov    $0x0,%al
call   1050 <HTML_Fill@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HTML_Box>:
sub    $0x28,%rsp
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <HTML_Begin@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
call   1040 <HTML_Move@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1060 <HTML_Cont@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1060 <HTML_Cont@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
call   1060 <HTML_Cont@plt>
xor    %eax,%eax
add    $0x28,%rsp
jmp    1050 <HTML_Fill@plt>

LLVM IR (-O0):
define void @HTML_Box(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = call i32 (...) @HTML_Begin()
%10 = load double, double* %5
%11 = load double, double* %6
%12 = call i32 @HTML_Move(double %10, double %11)
%13 = load double, double* %5
%14 = load double, double* %8
%15 = call i32 @HTML_Cont(double %13, double %14)
%16 = load double, double* %7
%17 = load double, double* %8
%18 = call i32 @HTML_Cont(double %16, double %17)
%19 = load double, double* %7
%20 = load double, double* %6
%21 = call i32 @HTML_Cont(double %19, double %20)
%22 = call i32 (...) @HTML_Fill()
ret void
}

LLVM IR (-O2):
define void @HTML_Box(double %0, double %1, double %2, double %3) {
%5 = tail call i32 (...) @HTML_Begin()
%6 = tail call i32 @HTML_Move(double %0, double %1)
%7 = tail call i32 @HTML_Cont(double %0, double %3)
%8 = tail call i32 @HTML_Cont(double %2, double %3)
%9 = tail call i32 @HTML_Cont(double %2, double %1)
%10 = tail call i32 (...) @HTML_Fill()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int solve(int, int);
int main() {
  int n;
  scanf("%d", &n);
  int p;
  scanf("%d", &p);
  int result = solve(n, p);
  printf("%d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <solve@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1030 <solve@plt>
lea    0xe99(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = bitcast i32* %2 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @solve(i32 %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _CcsFree_(void *, char const *, int);
void _CcFree_(void *ptr, const char *fname, int line) {
  _CcsFree_(ptr, fname, line);
}


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

x86 assembly (clang, -O2):
<_CcFree_>:
jmp    1030 <_CcsFree_@plt>

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

LLVM IR (-O2):
define void @_CcFree_(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_CcsFree_(i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int RTLD_LOCAL;
int RTLD_NOW;
void *dlopen(char const *, int);
void *vogl_load_object(const char *sofile) {
  return dlopen(sofile, RTLD_NOW | RTLD_LOCAL);
}


x86 assembly (clang, -O0):
<vogl_load_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ea0(%rip),%rax
or     (%rax),%esi
call   1030 <dlopen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vogl_load_object>:
mov    0x2ed1(%rip),%rax
mov    0x2eb2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
jmp    1030 <dlopen@plt>

LLVM IR (-O0):
@RTLD_NOW = global i32 0
@RTLD_LOCAL = global i32 0
define i8* @vogl_load_object(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @RTLD_NOW
%5 = load i32, i32* @RTLD_LOCAL
%6 = or i32 %4, %5
%7 = call i8* @dlopen(i8* %3, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
@RTLD_NOW = global i32 0
@RTLD_LOCAL = global i32 0
define i8* @vogl_load_object(i8* %0) {
%2 = load i32, i32* @RTLD_NOW
%3 = load i32, i32* @RTLD_LOCAL
%4 = or i32 %3, %2
%5 = tail call i8* @dlopen(i8* %0, i32 %4)
ret i8* %5
}
/* Type definitions */
struct ptrheap {
  int dummy;
};

/* Variables and functions */
struct ptrheap *ptrheap_create(int (*)(void *, void const *, void const *),
                               void (*)(void *, void *, size_t), void *,
                               int /*<<< orphan*/, int /*<<< orphan*/ *);
struct ptrheap *ptrheap_init(int (*compar)(void *, const void *, const void *),
                             void (*setreccookie)(void *, void *, size_t),
                             void *cookie) {
  return (ptrheap_create(compar, setreccookie, cookie, 0, NULL));
}


x86 assembly (clang, -O0):
<ptrheap_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <ptrheap_create@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrheap_init>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <ptrheap_create@plt>

LLVM IR (-O0):
%struct.ptrheap = type { i32 }
define %struct.ptrheap* @ptrheap_init(i32 (i8*, i8*, i8*)* %0, void (i8*, i8*, i64)* %1, i8* %2) {
%4 = alloca i32 (i8*, i8*, i8*)*
%5 = alloca void (i8*, i8*, i64)*
%6 = alloca i8*
store i32 (i8*, i8*, i8*)* %0, i32 (i8*, i8*, i8*)** %4
store void (i8*, i8*, i64)* %1, void (i8*, i8*, i64)** %5
store i8* %2, i8** %6
%7 = load i32 (i8*, i8*, i8*)*, i32 (i8*, i8*, i8*)** %4
%8 = load void (i8*, i8*, i64)*, void (i8*, i8*, i64)** %5
%9 = load i8*, i8** %6
%10 = call %struct.ptrheap* @ptrheap_create(i32 (i8*, i8*, i8*)* %7, void (i8*, i8*, i64)* %8, i8* %9, i32 0, i32* null)
ret %struct.ptrheap* %10
}

LLVM IR (-O2):
%struct.ptrheap = type { i32 }
define %struct.ptrheap* @ptrheap_init(i32 (i8*, i8*, i8*)* %0, void (i8*, i8*, i64)* %1, i8* %2) {
%4 = tail call %struct.ptrheap* @ptrheap_create(i32 (i8*, i8*, i8*)* %0, void (i8*, i8*, i64)* %1, i8* %2, i32 0, i32* null)
ret %struct.ptrheap* %4
}
/* Variables and functions */
int /*<<< orphan*/ FS460_image_request_freeze(int, int, int /*<<< orphan*/);
void freeze_test_read(void) {
  static int mode = 0;
  switch (mode++) {
  default:
    mode = 1;
  case 0:
    FS460_image_request_freeze(0x0002, 0x0002, 0);
    break;
  case 1:
    FS460_image_request_freeze(0, 0x0002, 0);
    break;
  }
}


x86 assembly (clang, -O0):
<freeze_test_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2f0e(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f00(%rip)
test   %eax,%eax
je     1154 <freeze_test_read+0x44>
jmp    1139 <freeze_test_read+0x29>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
je     1167 <freeze_test_read+0x57>
jmp    114a <freeze_test_read+0x3a>
movl   $0x1,0x2ed8(%rip)
mov    $0x2,%esi
xor    %edx,%edx
mov    %esi,%edi
call   1030 <FS460_image_request_freeze@plt>
jmp    1175 <freeze_test_read+0x65>
xor    %edx,%edx
mov    $0x2,%esi
mov    %edx,%edi
call   1030 <FS460_image_request_freeze@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeze_test_read>:
mov    0x2f16(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f0d(%rip)
mov    $0x2,%edi
test   %eax,%eax
je     113b <freeze_test_read+0x2b>
cmp    $0x1,%eax
jne    1131 <freeze_test_read+0x21>
xor    %edi,%edi
jmp    113b <freeze_test_read+0x2b>
movl   $0x1,0x2ef1(%rip)
mov    $0x2,%esi
xor    %edx,%edx
jmp    1030 <FS460_image_request_freeze@plt>

LLVM IR (-O0):
@freeze_test_read.mode = internal global i32 0
define void @freeze_test_read() {
%1 = load i32, i32* @freeze_test_read.mode
%2 = add nsw i32 %1, 1
store i32 %2, i32* @freeze_test_read.mode
switch i32 %1, label %3 [
i32 0, label %4
i32 1, label %6
]
3: ; preds = %0
store i32 1, i32* @freeze_test_read.mode
br label %4
4: ; preds = %0, %3
%5 = call i32 @FS460_image_request_freeze(i32 2, i32 2, i32 0)
br label %8
6: ; preds = %0
%7 = call i32 @FS460_image_request_freeze(i32 0, i32 2, i32 0)
br label %8
8: ; preds = %6, %4
ret void
}

LLVM IR (-O2):
@freeze_test_read.mode = internal unnamed_addr global i32 0
define void @freeze_test_read() {
%1 = load i32, i32* @freeze_test_read.mode
%2 = add nsw i32 %1, 1
store i32 %2, i32* @freeze_test_read.mode
switch i32 %1, label %3 [
i32 0, label %5
i32 1, label %4
]
3: ; preds = %0
store i32 1, i32* @freeze_test_read.mode
br label %5
4: ; preds = %0
br label %5
5: ; preds = %3, %0, %4
%6 = phi i32 [ 0, %4 ], [ 2, %0 ], [ 2, %3 ]
%7 = tail call i32 @FS460_image_request_freeze(i32 %6, i32 2, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void read_text(char *text) { printf("reading: %s\n", text); }


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

x86 assembly (clang, -O2):
<read_text>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"reading: %s\0A\00"
define void @read_text(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ timeout_func();
void sigalrm(int sig) {
  (void)sig;
  timeout_func();
}


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

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

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

LLVM IR (-O2):
define void @sigalrm(i32 %0) {
%2 = tail call i32 (...) @timeout_func()
ret void
}
/* Type definitions */
typedef int putchar;

/* Variables and functions */
int y(int i) { return (putchar)(i); }


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

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

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

LLVM IR (-O2):
define i32 @y(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void callUtil() { printf("Hello World utility ...\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Hello World utility ...\0A\00"
define void @callUtil() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Hello World utility ...\00"
define void @callUtil() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
int execute_sysfs() { return 0; }


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

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

LLVM IR (-O0):
define i32 @execute_sysfs() {
ret i32 0
}

LLVM IR (-O2):
define i32 @execute_sysfs() {
ret i32 0
}
void av_get_known_color_name() {}


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

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

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

LLVM IR (-O2):
define void @av_get_known_color_name() {
ret void
}
/* Type definitions */
struct msghdr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ diminuto_ipcl_packet_receive_generic(int, struct msghdr *,
                                                        int /*<<< orphan*/);
ssize_t diminuto_ipcl_packet_receive(int fd, struct msghdr *message) {
  return diminuto_ipcl_packet_receive_generic(fd, message, 0);
}


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

x86 assembly (clang, -O2):
<diminuto_ipcl_packet_receive>:
xor    %edx,%edx
jmp    1030 <diminuto_ipcl_packet_receive_generic@plt>

LLVM IR (-O0):
%struct.msghdr = type { i32 }
define i32 @diminuto_ipcl_packet_receive(i32 %0, %struct.msghdr* %1) {
%3 = alloca i32
%4 = alloca %struct.msghdr*
store i32 %0, i32* %3
store %struct.msghdr* %1, %struct.msghdr** %4
%5 = load i32, i32* %3
%6 = load %struct.msghdr*, %struct.msghdr** %4
%7 = call i32 @diminuto_ipcl_packet_receive_generic(i32 %5, %struct.msghdr* %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.msghdr = type { i32 }
define i32 @diminuto_ipcl_packet_receive(i32 %0, %struct.msghdr* %1) {
%3 = tail call i32 @diminuto_ipcl_packet_receive_generic(i32 %0, %struct.msghdr* %1, i32 0)
ret i32 %3
}
int CharacterIsDigit(char ch) { return ((ch >= '0') && (ch <= '9')); }


x86 assembly (clang, -O0):
<CharacterIsDigit>:
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 <CharacterIsDigit+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):
<CharacterIsDigit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @CharacterIsDigit(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 @CharacterIsDigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ foo(char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *ptr = 0;
  foo(ptr);
  printf("%s\n", ptr);
  free(ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <foo@plt>
mov    -0x10(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <foo@plt>
lea    0xec1(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
xor    %edi,%edi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i32 @foo(i8* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* null)
%3 = tail call i32 @free(i8* null)
ret i32 0
}
/* Variables and functions */
int OPER_I_16();
int m68ki_get_ccr();
int /*<<< orphan*/ m68ki_set_ccr(int);
void m68k_op_eori_16_toc(void) { m68ki_set_ccr(m68ki_get_ccr() ^ OPER_I_16()); }


x86 assembly (clang, -O0):
<m68k_op_eori_16_toc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <m68ki_get_ccr@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <OPER_I_16@plt>
mov    -0x4(%rbp),%edi
xor    %eax,%edi
call   1030 <m68ki_set_ccr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_eori_16_toc>:
push   %rbx
xor    %eax,%eax
call   1050 <m68ki_get_ccr@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <OPER_I_16@plt>
xor    %eax,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <m68ki_set_ccr@plt>

LLVM IR (-O0):
define void @m68k_op_eori_16_toc() {
%1 = call i32 (...) @m68ki_get_ccr()
%2 = call i32 (...) @OPER_I_16()
%3 = xor i32 %1, %2
%4 = call i32 @m68ki_set_ccr(i32 %3)
ret void
}

LLVM IR (-O2):
define void @m68k_op_eori_16_toc() {
%1 = tail call i32 (...) @m68ki_get_ccr()
%2 = tail call i32 (...) @OPER_I_16()
%3 = xor i32 %2, %1
%4 = tail call i32 @m68ki_set_ccr(i32 %3)
ret void
}
int simple4(void) {
  int array[10] = {
      [1] = 4,
      [6] = 7,
  };
  return array[6];
}


x86 assembly (clang, -O0):
<simple4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x4,-0x2c(%rbp)
movl   $0x7,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @simple4() {
ret i32 7
}
z309hello() {}


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

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

LLVM IR (-O0):
define i32 @z309hello() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @z309hello() {
ret i32 undef
}
void ff_hevc_put_hevc_bi_epel_h16_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h16_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error_print();
void ruby_error_print(void) { error_print(); }


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

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

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

LLVM IR (-O2):
define void @ruby_error_print() {
%1 = tail call i32 (...) @error_print()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void p() {
  printf("\n-------------------------------------------------------------------"
         "------------\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [82 x i8] c"\0A-------------------------------------------------------------------------------\0A\00"
define void @p() {
%1 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [81 x i8] c"\0A-------------------------------------------------------------------------------\00"
define void @p() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float tanf(float);
float HMM_TanF(float Radians) {
  float Result = tanf(Radians);
  return (Result);
}


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

x86 assembly (clang, -O2):
<HMM_TanF>:
jmp    1030 <tanf@plt>

LLVM IR (-O0):
define float @HMM_TanF(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float @tanf(float %4)
store float %5, float* %3
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @HMM_TanF(float %0) {
%2 = tail call float @tanf(float %0)
ret float %2
}
void rop3_222_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ T;
  stk1 = S | stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_222_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)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%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_222_0_1>:
mov    (%rdi),%al
mov    %esi,%ecx
not    %cl
and    %dl,%cl
and    %al,%cl
xor    %dl,%al
or     %sil,%al
not    %dl
and    %al,%dl
or     %sil,%cl
or     %dl,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_222_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** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or 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 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %6
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = and i32 %28, %31
%33 = or i32 %26, %32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = load i8, i8* %5
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = load i8*, i8** %4
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = and i32 %39, %42
%44 = or i32 %33, %43
%45 = trunc i32 %44 to i8
%46 = load i8*, i8** %4
store i8 %45, i8* %46
ret void
}

LLVM IR (-O2):
define void @rop3_222_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %2, -1
%8 = and i8 %6, %7
%9 = xor i8 %1, -1
%10 = and i8 %9, %2
%11 = and i8 %10, %4
%12 = or i8 %11, %1
%13 = or i8 %12, %8
store i8 %13, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __v16qi;
typedef scalar_t__ __m128i;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_pmaxub128(int /*<<< orphan*/,
                                            int /*<<< orphan*/);
__m128i __attribute__((__always___, __nodebug__))
_mm_max_epu8(__m128i a, __m128i b) {
  return (__m128i)__builtin_ia32_pmaxub128((__v16qi)a, (__v16qi)b);
}


x86 assembly (clang, -O0):
<_mm_max_epu8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
call   1030 <__builtin_ia32_pmaxub128@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_max_epu8>:
push   %rax
call   1030 <__builtin_ia32_pmaxub128@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @_mm_max_epu8(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = call i32 @__builtin_ia32_pmaxub128(i32 %6, i32 %8)
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
define i64 @_mm_max_epu8(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = tail call i32 @__builtin_ia32_pmaxub128(i32 %3, i32 %4)
%6 = sext i32 %5 to i64
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
int /*<<< orphan*/ stderr;
void mem_error(unsigned int sig, void *data, void *gdata) {
  size_t *size = data;
  fprintf(stderr, "Memory allocation error!\n", sig);
  fprintf(stderr, "Failed to allocate %u bytes\n", *size);
}


x86 assembly (clang, -O0):
<mem_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%eax
mov    %eax,%edx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_error>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%eax
mov    %edi,%edx
lea    0xed6(%rip),%rsi
mov    %eax,%edi
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    (%rbx),%rdx
lea    0xedc(%rip),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Memory allocation error!\0A\00"
@.str.1 = [29 x i8] c"Failed to allocate %u bytes\0A\00"
define void @mem_error(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to i64*
store i64* %9, i64** %7
%10 = load i32, i32* @stderr
%11 = load i32, i32* %4
%12 = zext i32 %11 to i64
%13 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %12)
%14 = load i32, i32* @stderr
%15 = load i64*, i64** %7
%16 = load i64, i64* %15
%17 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i64 %16)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Memory allocation error!\0A\00"
@.str.1 = [29 x i8] c"Failed to allocate %u bytes\0A\00"
define void @mem_error(i32 %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %1 to i64*
%5 = load i32, i32* @stderr
%6 = zext i32 %0 to i64
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = load i32, i32* @stderr
%9 = load i64, i64* %4
%10 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i64 %9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ XGetGeometry(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                int /*<<< orphan*/ *, int *, int *,
                                unsigned int *, unsigned int *, unsigned int *,
                                unsigned int *);
int getWindowWidth(Display *d, Window *w) {
  int old_x;
  int old_y;
  unsigned int old_width;
  unsigned int old_height;
  unsigned int old_border_width;
  unsigned int old_depth;
  Window *root_window = NULL;
  XGetGeometry(d, *w, root_window, &old_x, &old_y, &old_width, &old_height,
               &old_border_width, &old_depth);
  return old_width;
}


x86 assembly (clang, -O0):
<getWindowWidth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x30(%rbp),%rdx
lea    -0x14(%rbp),%rcx
lea    -0x18(%rbp),%r8
lea    -0x1c(%rbp),%r9
lea    -0x20(%rbp),%r11
lea    -0x24(%rbp),%r10
lea    -0x28(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <XGetGeometry@plt>
mov    -0x1c(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getWindowWidth>:
sub    $0x18,%rsp
mov    (%rsi),%esi
sub    $0x8,%rsp
lea    0xc(%rsp),%rax
lea    0x10(%rsp),%r10
lea    0x14(%rsp),%r11
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x8(%rsp),%r9
xor    %edx,%edx
push   %rax
push   %r10
push   %r11
call   1030 <XGetGeometry@plt>
add    $0x20,%rsp
mov    (%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @getWindowWidth(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32* null, i32** %11
%12 = load i32*, i32** %3
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = load i32*, i32** %11
%16 = call i32 @XGetGeometry(i32* %12, i32 %14, i32* %15, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10)
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @getWindowWidth(i32* %0, i32* nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = bitcast i32* %3 to i8*
%10 = bitcast i32* %4 to i8*
%11 = bitcast i32* %5 to i8*
%12 = bitcast i32* %6 to i8*
%13 = bitcast i32* %7 to i8*
%14 = bitcast i32* %8 to i8*
%15 = load i32, i32* %1
%16 = call i32 @XGetGeometry(i32* %0, i32 %15, i32* null, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%17 = load i32, i32* %5
ret i32 %17
}
void __DELETE_java_lang_Boolean(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_lang_Boolean(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
struct SN_env *SN_create_env(int, int, int /*<<< orphan*/);
extern struct SN_env *danish_UTF_8_create_env(void) {
  return SN_create_env(1, 2, 0);
}


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

x86 assembly (clang, -O2):
<danish_UTF_8_create_env>:
mov    $0x1,%edi
mov    $0x2,%esi
xor    %edx,%edx
jmp    1030 <SN_create_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define %struct.SN_env* @danish_UTF_8_create_env() {
%1 = call %struct.SN_env* @SN_create_env(i32 1, i32 2, i32 0)
ret %struct.SN_env* %1
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define %struct.SN_env* @danish_UTF_8_create_env() {
%1 = tail call %struct.SN_env* @SN_create_env(i32 1, i32 2, i32 0)
ret %struct.SN_env* %1
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: "
        "ps"
        " [-g group][-p pid][-u username]\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"Usage: ps [-g group][-p pid][-u username]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [43 x i8] c"Usage: ps [-g group][-p pid][-u username]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Type definitions */
struct cc_usb {
  int dummy;
};

/* Variables and functions */
int cc_usb_getchar_timeout(struct cc_usb *, int);
int cc_usb_getchar(struct cc_usb *cc) {
  return cc_usb_getchar_timeout(cc, 5000);
}


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

x86 assembly (clang, -O2):
<cc_usb_getchar>:
mov    $0x1388,%esi
jmp    1030 <cc_usb_getchar_timeout@plt>

LLVM IR (-O0):
%struct.cc_usb = type { i32 }
define i32 @cc_usb_getchar(%struct.cc_usb* %0) {
%2 = alloca %struct.cc_usb*
store %struct.cc_usb* %0, %struct.cc_usb** %2
%3 = load %struct.cc_usb*, %struct.cc_usb** %2
%4 = call i32 @cc_usb_getchar_timeout(%struct.cc_usb* %3, i32 5000)
ret i32 %4
}

LLVM IR (-O2):
%struct.cc_usb = type { i32 }
define i32 @cc_usb_getchar(%struct.cc_usb* %0) {
%2 = tail call i32 @cc_usb_getchar_timeout(%struct.cc_usb* %0, i32 5000)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void autotest_mytest() { printf("this is my test\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"this is my test\0A\00"
define void @autotest_mytest() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"this is my test\00"
define void @autotest_mytest() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
void rgb_reset(void) {}


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

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

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

LLVM IR (-O2):
define void @rgb_reset() {
ret void
}
void event_set(struct event *x, int y, short z, void (*f)(int, short, void *),
               void *p) {
  (void)x;
  (void)y;
  (void)z;
  (void)f;
  (void)p;
}


x86 assembly (clang, -O0):
<event_set>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.event = type opaque
define void @event_set(%struct.event* %0, i32 %1, i16 signext %2, void (i32, i16, i8*)* %3, i8* %4) {
%6 = alloca %struct.event*
%7 = alloca i32
%8 = alloca i16
%9 = alloca void (i32, i16, i8*)*
%10 = alloca i8*
store %struct.event* %0, %struct.event** %6
store i32 %1, i32* %7
store i16 %2, i16* %8
store void (i32, i16, i8*)* %3, void (i32, i16, i8*)** %9
store i8* %4, i8** %10
%11 = load %struct.event*, %struct.event** %6
%12 = load i32, i32* %7
%13 = load i16, i16* %8
%14 = load void (i32, i16, i8*)*, void (i32, i16, i8*)** %9
%15 = load i8*, i8** %10
ret void
}

LLVM IR (-O2):
%struct.event = type opaque
define void @event_set(%struct.event* nocapture %0, i32 %1, i16 signext %2, void (i32, i16, i8*)* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
long get_double_grid_index(long const *, long const *);
long rgd_get_double_grid_index(const long address_double[3],
                               const long mesh[3]) {
  return get_double_grid_index(address_double, mesh);
}


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

x86 assembly (clang, -O2):
<rgd_get_double_grid_index>:
jmp    1030 <get_double_grid_index@plt>

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

LLVM IR (-O2):
define i64 @rgd_get_double_grid_index(i64* %0, i64* %1) {
%3 = tail call i64 @get_double_grid_index(i64* %0, i64* %1)
ret i64 %3
}
int f() {
  unsigned long x, y = 1;
  x = ((y * 8192) - 216) / 16;
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movq   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0xd,%rax
sub    $0xd8,%rax
shr    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i64
%2 = alloca i64
store i64 1, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 8192
%5 = sub i64 %4, 216
%6 = udiv i64 %5, 16
store i64 %6, i64* %1
%7 = load i64, i64* %1
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @f() {
ret i32 498
}