xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fatal_error(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void *zmalloc(int size) {
  void *z = (void *)malloc(size);
  if (z == 0)
    fatal_error("Out of memory at request for %d bytes.\n");
  memset((void *)z, 0, size);
  return (z);
}


x86 assembly (clang, -O0):
<zmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115e <zmalloc+0x2e>
lea    0xea7(%rip),%rdi
call   1040 <fatal_error@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zmalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114e <zmalloc+0x1e>
lea    0xeb7(%rip),%rdi
call   1040 <fatal_error@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Out of memory at request for %d bytes.\0A\00"
define i8* @zmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @fatal_error(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
%13 = load i32, i32* %2
%14 = call i32 @memset(i8* %12, i32 0, i32 %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [40 x i8] c"Out of memory at request for %d bytes.\0A\00"
define i8* @zmalloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = inttoptr i64 %2 to i8*
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @fatal_error(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = tail call i32 @memset(i8* %3, i32 0, i32 %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
int main(void) {
  int a, b;
  a = 10;
  b = 20;
  swap(&a, &b);
  printf("a = %d\t b = %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xa,0x4(%rsp)
movl   $0x14,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"a = %d\09 b = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
store i32 10, i32* %1
store i32 20, i32* %2
%5 = call i32 @swap(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void const *, int);
uint64_t trunnel_get_uint64(const void *p) {
  uint64_t x;
  memcpy(&x, p, 8);
  return x;
}


x86 assembly (clang, -O0):
<trunnel_get_uint64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trunnel_get_uint64>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @trunnel_get_uint64(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 8)
%5 = load i32, i32* %2
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int main() {
  FILE *arquivo;
  arquivo = fopen("saida.txt", "w");
  fprintf(arquivo, "Olá mundo!\nWhen you feel my heat Look into my eyes It's "
                   "where my demons hide");
  fclose(arquivo);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeab(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xecb(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xebe(%rip),%rdi
mov    $0x4d,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"saida.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [78 x i8] c"Ol\C3\A1 mundo!\0AWhen you feel my heat Look into my eyes It's where my demons hide\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32*, i32** %2
%7 = call i32 @fclose(i32* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"saida.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [78 x i8] c"Ol\C3\A1 mundo!\0AWhen you feel my heat Look into my eyes It's where my demons hide\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0), i64 77, i64 1, i32* %1)
%3 = tail call i32 @fclose(i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CompileOffset(int, int);
void DoEnum(void) { CompileOffset(1, 50); }


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

x86 assembly (clang, -O2):
<DoEnum>:
mov    $0x1,%edi
mov    $0x32,%esi
jmp    1030 <CompileOffset@plt>

LLVM IR (-O0):
define void @DoEnum() {
%1 = call i32 @CompileOffset(i32 1, i32 50)
ret void
}

LLVM IR (-O2):
define void @DoEnum() {
%1 = tail call i32 @CompileOffset(i32 1, i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printarr(int SIZE, int a[SIZE]) {
  int i;
  for (i = 0; i < SIZE; i++)
    printf("%5d", a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printarr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1159 <printarr+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <printarr+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printarr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1157 <printarr+0x37>
mov    %rsi,%r15
mov    %edi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printarr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%5d\00"
define void @printarr(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %1, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
void foo513() {}


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

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

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

LLVM IR (-O2):
define void @foo513() {
ret void
}
int main() {
  int **p;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int putc(int, int);
int fputs(char *s, int dev) {
  int r = 0, c;
  while ((c = (*s++))) {
    r = putc(dev, c);
  }
  return r;
}


x86 assembly (clang, -O0):
<fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1157 <fputs+0x47>
mov    -0xc(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <putc@plt>
mov    %eax,-0x10(%rbp)
jmp    1126 <fputs+0x16>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputs>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%cl
test   %cl,%cl
je     1147 <fputs+0x37>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %cl,%esi
mov    %ebp,%edi
call   1030 <putc@plt>
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1130 <fputs+0x20>
jmp    1149 <fputs+0x39>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fputs(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = sext i8 %6 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = tail call i32 @putc(i32 %1, i32 %8)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i32 [ 0, %2 ], [ %10, %5 ]
ret i32 %14
}
double todouble(long double ld) { return (ld); }


x86 assembly (clang, -O0):
<todouble>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<todouble>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @todouble(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
ret double %4
}

LLVM IR (-O2):
define double @todouble(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void FileOpenError(FILE *fp, char *name) {
  if (fp == NULL) {
    printf("file open error(%s).\n", name);
    exit(0);
  }
}


x86 assembly (clang, -O0):
<FileOpenError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1152 <FileOpenError+0x32>
mov    -0x10(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileOpenError>:
test   %rdi,%rdi
je     1126 <FileOpenError+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"file open error(%s).\0A\00"
define void @FileOpenError(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"file open error(%s).\0A\00"
define void @FileOpenError(i32* readnone %0, i8* %1) {
%3 = icmp eq i32* %0, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  assert((3 && 2) == 2);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
int f4(int x, int y) {
  if (x >= 30000)
    __builtin_unreachable();
  if (x <= -30000)
    __builtin_unreachable();
  if (y >= 0x7fffffff / 30000)
    __builtin_unreachable();
  if (y <= -0x7fffffff / 30000)
    __builtin_unreachable();
  return x * y / y;
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x7530,-0x4(%rbp)
jl     1117 <f4+0x17>
cmpl   $0xffff8ad0,-0x4(%rbp)
jg     1124 <f4+0x24>
cmpl   $0x1179e,-0x8(%rbp)
jl     1131 <f4+0x31>
cmpl   $0xfffee862,-0x8(%rbp)
jg     113e <f4+0x3e>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 30000
br i1 %6, label %7, label %8
7: ; preds = %2
unreachable
8: ; preds = %2
%9 = load i32, i32* %3
%10 = icmp sle i32 %9, -30000
br i1 %10, label %11, label %12
11: ; preds = %8
unreachable
12: ; preds = %8
%13 = load i32, i32* %4
%14 = icmp sge i32 %13, 71582
br i1 %14, label %15, label %16
15: ; preds = %12
unreachable
16: ; preds = %12
%17 = load i32, i32* %4
%18 = icmp sle i32 %17, -71582
br i1 %18, label %19, label %20
19: ; preds = %16
unreachable
20: ; preds = %16
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = mul nsw i32 %21, %22
%24 = load i32, i32* %4
%25 = sdiv i32 %23, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @f4(i32 returned %0, i32 %1) {
%3 = icmp slt i32 %0, 30000
tail call void @llvm.assume(i1 %3)
%4 = icmp sgt i32 %0, -30000
tail call void @llvm.assume(i1 %4)
%5 = icmp slt i32 %1, 71582
tail call void @llvm.assume(i1 %5)
%6 = icmp sgt i32 %1, -71582
tail call void @llvm.assume(i1 %6)
ret i32 %0
}
int get_number_of_texture_formats() { return 51; }


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

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

LLVM IR (-O0):
define i32 @get_number_of_texture_formats() {
ret i32 51
}

LLVM IR (-O2):
define i32 @get_number_of_texture_formats() {
ret i32 51
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int msgctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void rmmsg(int *pmsqid) {
  if (msgctl(*pmsqid, IPC_RMID, 0) == -1) {
    perror("msgctl()");
    *pmsqid = -1;
  }
}


x86 assembly (clang, -O0):
<rmmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <msgctl@plt>
cmp    $0xffffffff,%eax
jne    1161 <rmmsg+0x41>
lea    0xeae(%rip),%rdi
call   1040 <perror@plt>
mov    -0x8(%rbp),%rax
movl   $0xffffffff,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmmsg>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <msgctl@plt>
cmp    $0xffffffff,%eax
je     113d <rmmsg+0x1d>
pop    %rbx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
@IPC_RMID = global i32 0
@.str = [9 x i8] c"msgctl()\00"
define void @rmmsg(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = load i32, i32* @IPC_RMID
%4 = tail call i32 @msgctl(i32 %2, i32 %3, i32 0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %0
br label %8
8: ; preds = %6, %1
ret void
}
FUNCTION_DEFINE(debug) { PG_RETURN_BOOL(DebugLevel() > 0); }


x86 assembly (clang, -O0):
<FUNCTION_DEFINE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <DebugLevel@plt>
cmp    $0x0,%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <PG_RETURN_BOOL@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FUNCTION_DEFINE>:
push   %rax
xor    %eax,%eax
call   1030 <DebugLevel@plt>
xor    %edi,%edi
test   %eax,%eax
setg   %dil
xor    %eax,%eax
pop    %rcx
jmp    1040 <PG_RETURN_BOOL@plt>

LLVM IR (-O0):
define i32 @FUNCTION_DEFINE(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (...) @DebugLevel()
%5 = icmp sgt i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 (i32, ...) bitcast (i32 (...)* @PG_RETURN_BOOL to i32 (i32, ...)*)(i32 %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @FUNCTION_DEFINE(i32 %0) {
%2 = tail call i32 (...) @DebugLevel()
%3 = icmp sgt i32 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @PG_RETURN_BOOL to i32 (i32, ...)*)(i32 %4)
ret i32 undef
}
unsigned short sprdwl_rx_rsp_process(struct sprdwl_priv *priv,
                                     unsigned char *msg) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.sprdwl_priv = type opaque
define zeroext i16 @sprdwl_rx_rsp_process(%struct.sprdwl_priv* %0, i8* %1) {
%3 = alloca %struct.sprdwl_priv*
%4 = alloca i8*
store %struct.sprdwl_priv* %0, %struct.sprdwl_priv** %3
store i8* %1, i8** %4
ret i16 0
}

LLVM IR (-O2):
%struct.sprdwl_priv = type opaque
define zeroext i16 @sprdwl_rx_rsp_process(%struct.sprdwl_priv* nocapture readnone %0, i8* nocapture readnone %1) {
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
char *uwsgi_malloc(int);
char *uwsgi_strncopy(char *s, int len) {
  char *buf;
  buf = uwsgi_malloc(len + 1);
  buf[len] = 0;
  memcpy(buf, s, len);
  return buf;
}


x86 assembly (clang, -O0):
<uwsgi_strncopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <uwsgi_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_strncopy>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
call   1040 <uwsgi_malloc@plt>
mov    %rax,%rbx
movslq %r15d,%rdx
movb   $0x0,(%rax,%rdx,1)
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @uwsgi_strncopy(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i8* @uwsgi_malloc(i32 %3)
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i8, i8* %4, i64 %5
store i8 0, i8* %6
%7 = tail call i32 @memcpy(i8* %4, i8* %0, i32 %1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void AnsiTerm_clr_screen(void) {
  printf("\x1B[2J");
  printf("\x1B[0m");
}


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

x86 assembly (clang, -O2):
<AnsiTerm_clr_screen>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
define void @AnsiTerm_clr_screen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char fonction() { return 5; }


x86 assembly (clang, -O0):
<fonction>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fonction>:
mov    $0x5,%al
ret

LLVM IR (-O0):
define signext i8 @fonction() {
ret i8 5
}

LLVM IR (-O2):
define signext i8 @fonction() {
ret i8 5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int n;
  int sum;
  int i;
  assume(n >= 0 && sum == 0 && i == 0);
  while (i < n) {
    sum = sum + i;
    i++;
  }
  assert(sum >= 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jl     1157 <main+0x37>
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x11(%rbp)
jne    1157 <main+0x37>
cmpl   $0x0,-0x10(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1187 <main+0x67>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1164 <main+0x44>
cmpl   $0x0,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 0
br label %13
13: ; preds = %10, %7, %0
%14 = phi i1 [ false, %7 ], [ false, %0 ], [ %12, %10 ]
%15 = zext i1 %14 to i32
%16 = call i32 @assume(i32 %15)
br label %17
17: ; preds = %21, %13
%18 = load i32, i32* %4
%19 = load i32, i32* %2
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %27
21: ; preds = %17
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = add nsw i32 %22, %23
store i32 %24, i32* %3
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %17
27: ; preds = %17
%28 = load i32, i32* %3
%29 = icmp sge i32 %28, 0
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
%2 = tail call i32 @assert(i32 1)
ret i32 0
}
void av_frame_get_channel_layout() {}


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

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

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

LLVM IR (-O2):
define void @av_frame_get_channel_layout() {
ret void
}
int ipc_enabled(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ipc_enabled() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(size_t);
int /*<<< orphan*/ *wmemcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                            size_t);
wchar_t *wmemdup(const wchar_t *segment, size_t size) {
  wchar_t *r = malloc(size * sizeof(wchar_t));
  return r == NULL ? NULL : wmemcpy(r, segment, size);
}


x86 assembly (clang, -O0):
<wmemdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <wmemdup+0x37>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    116c <wmemdup+0x4c>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <wmemcpy@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wmemdup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x0(,%rsi,4),%rdi
call   1040 <malloc@plt>
test   %rax,%rax
je     1151 <wmemdup+0x31>
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <wmemcpy@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @wmemdup(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32*
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = mul i64 %6, 4
%8 = call i32* @malloc(i64 %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %12
11: ; preds = %2
br label %17
12: ; preds = %2
%13 = load i32*, i32** %5
%14 = load i32*, i32** %3
%15 = load i64, i64* %4
%16 = call i32* @wmemcpy(i32* %13, i32* %14, i64 %15)
br label %17
17: ; preds = %12, %11
%18 = phi i32* [ null, %11 ], [ %16, %12 ]
ret i32* %18
}

LLVM IR (-O2):
define i32* @wmemdup(i32* %0, i64 %1) {
%3 = shl i64 %1, 2
%4 = tail call i32* @malloc(i64 %3)
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32* @wmemcpy(i32* %4, i32* %0, i64 %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32* [ %7, %6 ], [ null, %2 ]
ret i32* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ jhash_3words(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/);
__u32 jhash_2words(__u32 a, __u32 b, __u32 initval) {
  return jhash_3words(a, b, 0, initval);
}


x86 assembly (clang, -O0):
<jhash_2words>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%ecx
xor    %edx,%edx
call   1030 <jhash_3words@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jhash_2words>:
mov    %edx,%ecx
xor    %edx,%edx
jmp    1030 <jhash_3words@plt>

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

LLVM IR (-O2):
define i32 @jhash_2words(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @jhash_3words(i32 %0, i32 %1, i32 0, i32 %2)
ret i32 %4
}
void test_37_1(short *mem) { __atomic_nand_fetch(mem, 1, 4); }


x86 assembly (clang, -O0):
<test_37_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    (%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x28(%rbp)
and    %esi,%edx
mov    %edx,-0x24(%rbp)
not    %edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    1162 <test_37_1+0x62>
jmp    1125 <test_37_1+0x25>
mov    -0x10(%rbp),%cx
mov    -0x1a(%rbp),%ax
and    %cx,%ax
xor    $0xffff,%ax
mov    %ax,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_37_1>:
movzwl (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
not    %ecx
or     $0xfffe,%ecx
lock cmpxchg %cx,(%rdi)
jne    1110 <test_37_1+0x10>
ret

LLVM IR (-O0):
define void @test_37_1(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
store i16 1, i16* %3
%6 = load i16, i16* %3
%7 = atomicrmw nand i16* %5, i16 %6 acq_rel
%8 = and i16 %7, %6
%9 = xor i16 %8, -1
store i16 %9, i16* %4
%10 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @test_37_1(i16* nocapture %0) {
%2 = atomicrmw nand i16* %0, i16 1 acq_rel
ret void
}
long double s2ld(s)
int s;
{ return s; }


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

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

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

LLVM IR (-O2):
define x86_fp80 @s2ld(i32 %0) {
%2 = sitofp i32 %0 to x86_fp80
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ memory_tracker_dump();
int /*<<< orphan*/ memory_tracker_lock_mutex();
int /*<<< orphan*/ memory_tracker_unlock_mutex();
void vpx_memory_tracker_dump() {
  if (!memory_tracker_lock_mutex()) {
    memory_tracker_dump();
    memory_tracker_unlock_mutex();
  }
}


x86 assembly (clang, -O0):
<vpx_memory_tracker_dump>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <memory_tracker_lock_mutex@plt>
cmp    $0x0,%eax
jne    1152 <vpx_memory_tracker_dump+0x22>
mov    $0x0,%al
call   1040 <memory_tracker_dump@plt>
mov    $0x0,%al
call   1030 <memory_tracker_unlock_mutex@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vpx_memory_tracker_dump>:
push   %rax
xor    %eax,%eax
call   1050 <memory_tracker_lock_mutex@plt>
test   %eax,%eax
je     113e <vpx_memory_tracker_dump+0xe>
pop    %rax
ret
xor    %eax,%eax
call   1040 <memory_tracker_dump@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <memory_tracker_unlock_mutex@plt>

LLVM IR (-O0):
define void @vpx_memory_tracker_dump() {
%1 = call i32 (...) @memory_tracker_lock_mutex()
%2 = icmp ne i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i32 (...) @memory_tracker_dump()
%5 = call i32 (...) @memory_tracker_unlock_mutex()
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @vpx_memory_tracker_dump() {
%1 = tail call i32 (...) @memory_tracker_lock_mutex()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 (...) @memory_tracker_dump()
%5 = tail call i32 (...) @memory_tracker_unlock_mutex()
br label %6
6: ; preds = %3, %0
ret void
}
int muspcm_exit(void) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @muspcm_exit() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
void http_write_content_type(char *buffer, const char *content_type) {
  strcat(buffer, "Content-Type: ");
  strcat(buffer, content_type);
  strcat(buffer, "\r\n");
}


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

x86 assembly (clang, -O2):
<http_write_content_type>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rsi
call   1030 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcat@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Content-Type: \00"
@.str.1 = [3 x i8] c"\0D\0A\00"
define void @http_write_content_type(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @strcat(i8* %7, i8* %8)
%10 = load i8*, i8** %3
%11 = call i32 @strcat(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Content-Type: \00"
@.str.1 = [3 x i8] c"\0D\0A\00"
define void @http_write_content_type(i8* %0, i8* %1) {
%3 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @strcat(i8* %0, i8* %1)
%5 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int indw(unsigned short port) {
  unsigned int b = 0;
  __asm__ __volatile__("in %%dx, %%eax" : "=a"(b) : "d"(port));
  return b;
}


x86 assembly (clang, -O0):
<indw>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indw>:
mov    %edi,%edx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i32 @indw(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
store i32 0, i32* %3
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "in %dx, %eax", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @indw(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "in %dx, %eax", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ s;
};
struct TYPE_4__ {
  TYPE_1__ data;
};
typedef TYPE_2__ XClientMessageEvent;

/* Variables and functions */
void *get_XClientMessageEvent_data_s(void *_p) {
  return (void *)(((XClientMessageEvent *)_p)->data.s);
}


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

x86 assembly (clang, -O2):
<get_XClientMessageEvent_data_s>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @get_XClientMessageEvent_data_s(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
int fint_cmp(const int a, const int b) { return a - b; }


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

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

LLVM IR (-O0):
define i32 @fint_cmp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @fint_cmp(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
void arch_write_notes(struct file *file) {}


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

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

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

LLVM IR (-O2):
%struct.file = type opaque
define void @arch_write_notes(%struct.file* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *s) {
  fprintf(stderr, "%s <n>\n", s);
  fprintf(stderr, "Typical values of n: 10000, 3000000, 4100000\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed4(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s <n>\0A\00"
@.str.1 = [46 x i8] c"Typical values of n: 10000, 3000000, 4100000\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s <n>\0A\00"
@.str.1 = [46 x i8] c"Typical values of n: 10000, 3000000, 4100000\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int auditwarnlog(char **);
int audit_warn_getacdir(char *filename) {
  char *args[3];
  args[0] = "getacdir";
  args[1] = filename;
  args[2] = NULL;
  return (auditwarnlog(args));
}


x86 assembly (clang, -O0):
<audit_warn_getacdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <auditwarnlog@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audit_warn_getacdir>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rax
mov    %rax,(%rsp)
mov    %rdi,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    %rsp,%rdi
call   1030 <auditwarnlog@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"getacdir\00"
define i32 @audit_warn_getacdir(i8* %0) {
%2 = alloca [3 x i8*]
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 1
store i8* %0, i8** %5
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 2
store i8* null, i8** %6
%7 = call i32 @auditwarnlog(i8** %4)
ret i32 %7
}
/* Variables and functions */
double exp(double);
double fabs(double);
double log(double n) {
  double antilog, x, old;
  x = 10.0;
  old = 0.0;
  while (fabs(old - x) > 0.000001) {
    old = x;
    antilog = exp(x);
    x -= (antilog - n) / antilog;
  }
  return x;
}


x86 assembly (clang, -O0):
<log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movaps 0xecd(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1194 <log+0x84>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1132 <log+0x22>
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log>:
sub    $0x28,%rsp
movsd  %xmm0,(%rsp)
movsd  0xedf(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x8(%rsp)
movapd %xmm0,0x10(%rsp)
call   1030 <exp@plt>
movapd %xmm0,%xmm1
subsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
subsd  %xmm1,%xmm0
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
andpd  0xea6(%rip),%xmm1
ucomisd 0xe96(%rip),%xmm1
ja     1130 <log+0x20>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @log(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
store double 1.000000e+01, double* %4
store double 0.000000e+00, double* %5
br label %6
6: ; preds = %12, %1
%7 = load double, double* %5
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = call double @llvm.fabs.f64(double %9)
%11 = fcmp ogt double %10, 0x3EB0C6F7A0B5ED8D
br i1 %11, label %12, label %23
12: ; preds = %6
%13 = load double, double* %4
store double %13, double* %5
%14 = load double, double* %4
%15 = call double @exp(double %14)
store double %15, double* %3
%16 = load double, double* %3
%17 = load double, double* %2
%18 = fsub double %16, %17
%19 = load double, double* %3
%20 = fdiv double %18, %19
%21 = load double, double* %4
%22 = fsub double %21, %20
store double %22, double* %4
br label %6
23: ; preds = %6
%24 = load double, double* %4
ret double %24
}

LLVM IR (-O2):
define double @log(double %0) {
br label %2
2: ; preds = %1, %2
%3 = phi double [ 1.000000e+01, %1 ], [ %7, %2 ]
%4 = tail call double @exp(double %3)
%5 = fsub double %4, %0
%6 = fdiv double %5, %4
%7 = fsub double %3, %6
%8 = fsub double %3, %7
%9 = tail call double @llvm.fabs.f64(double %8)
%10 = fcmp ogt double %9, 0x3EB0C6F7A0B5ED8D
br i1 %10, label %2, label %11
11: ; preds = %2
ret double %7
}
void anc_hs_stop_charge(void) { return; }


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

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

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

LLVM IR (-O2):
define void @anc_hs_stop_charge() {
ret void
}