xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t bnep_event_channel_opened_get_status(const uint8_t *event) {
  return event[2];
}


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

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

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

LLVM IR (-O2):
define i32 @bnep_event_channel_opened_get_status(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ kotlinclib_print_double(double);
int /*<<< orphan*/ kotlinclib_println();
void kotlinclib_println_double(double message) {
  kotlinclib_print_double(message);
  kotlinclib_println();
}


x86 assembly (clang, -O0):
<kotlinclib_println_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <kotlinclib_print_double@plt>
mov    $0x0,%al
call   1030 <kotlinclib_println@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @kotlinclib_println_double(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @kotlinclib_print_double(double %3)
%5 = call i32 (...) @kotlinclib_println()
ret void
}

LLVM IR (-O2):
define void @kotlinclib_println_double(double %0) {
%2 = tail call i32 @kotlinclib_print_double(double %0)
%3 = tail call i32 (...) @kotlinclib_println()
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *vktrace_malloc(size_t size) {
  void *pMemory;
  if (size == 0)
    return NULL;
  pMemory = malloc(size);
  return pMemory;
}


x86 assembly (clang, -O0):
<vktrace_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <vktrace_malloc+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1149 <vktrace_malloc+0x39>
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vktrace_malloc>:
test   %rdi,%rdi
je     111a <vktrace_malloc+0xa>
jmp    1030 <malloc@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @vktrace_malloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %12
8: ; preds = %1
%9 = load i64, i64* %3
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
store i8* %11, i8** %2
br label %12
12: ; preds = %8, %7
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define noalias i8* @vktrace_malloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Variables and functions */
int mystrlen(char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char string[] = "you did man ";
  int realsize = 0;
  printf("%s\n", string);
  realsize = mystrlen(string);
  printf("%d\n", realsize);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xd(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xeca(%rip),%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x14(%rbp)
lea    -0xd(%rbp),%rsi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xd(%rbp),%rdi
call   1040 <mystrlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x206e616d206469,%rax
mov    %rax,0x5(%rsp)
movabs $0x2064696420756f79,%rax
69 64 20
mov    %rax,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1050 <mystrlen@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.string = [13 x i8] c"you did man \00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = alloca i32
%3 = bitcast [13 x i8]* %1 to i8*
store i32 0, i32* %2
%4 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%7 = call i32 @mystrlen(i8* %6)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.string = [13 x i8] c"you did man \00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @puts(i8* %2)
%4 = call i32 @mystrlen(i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[], char *envp[]) {
  printf("ashish");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"ashish\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("|'o'|\n"
       "\\^_^/\n"
       "(\"o\")\n"
       "[-\%-]\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"|'o'|\0A\\^_^/\0A(\22o\22)\0A[-%-]\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"|'o'|\0A\\^_^/\0A(\22o\22)\0A[-%-]\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ displayStatInfo(struct stat *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int stat(char *, struct stat *);
int main(void) {
  struct stat sb;
  if (stat("./linux.mp4", &sb) == -1) {
    perror("stat");
    exit(1);
  }
  displayStatInfo(&sb);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
jne    117e <main+0x3e>
lea    0xe9d(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
lea    -0x8(%rbp),%rdi
call   1030 <displayStatInfo@plt>
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
jne    116b <main+0x2b>
lea    0xeb0(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    %rsp,%rdi
call   1030 <displayStatInfo@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [12 x i8] c"./linux.mp4\00"
@.str.1 = [5 x i8] c"stat\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.stat
store i32 0, i32* %1
%3 = call i32 @stat(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.stat* %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = call i32 @displayStatInfo(%struct.stat* %2)
%10 = load i32, i32* @EXIT_SUCCESS
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [12 x i8] c"./linux.mp4\00"
@.str.1 = [5 x i8] c"stat\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca %struct.stat
%2 = bitcast %struct.stat* %1 to i8*
%3 = call i32 @stat(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = call i32 @displayStatInfo(%struct.stat* %1)
%10 = load i32, i32* @EXIT_SUCCESS
%11 = call i32 @exit(i32 %10)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xd2() {
  Assert_real((isodigit(210) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              1055, ("isodigit should be 0 for 0xd2"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xd2\00"
define void @t_isodigit_0xd2() {
%1 = tail call i64 @isodigit(i32 210)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1055, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef unsigned int uint8_t;
typedef unsigned int uint16_t;

/* Variables and functions */
uint16_t get16bit(const uint8_t **ptr) {
  uint16_t t16;
  t16 = (*ptr)[1] + 256U * (*ptr)[0];
  (*ptr) += 2;
  return t16;
}


x86 assembly (clang, -O0):
<get16bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x4(%rax),%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    (%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get16bit>:
mov    (%rdi),%rcx
mov    (%rcx),%eax
shl    $0x8,%eax
add    0x4(%rcx),%eax
add    $0x8,%rcx
mov    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i32 @get16bit(i32** %0) {
%2 = alloca i32**
%3 = alloca i32
store i32** %0, i32*** %2
%4 = load i32**, i32*** %2
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 1
%7 = load i32, i32* %6
%8 = load i32**, i32*** %2
%9 = load i32*, i32** %8
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
%12 = mul i32 256, %11
%13 = add i32 %7, %12
store i32 %13, i32* %3
%14 = load i32**, i32*** %2
%15 = load i32*, i32** %14
%16 = getelementptr inbounds i32, i32* %15, i64 2
store i32* %16, i32** %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @get16bit(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = getelementptr inbounds i32, i32* %2, i64 1
%4 = load i32, i32* %3
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = add i32 %6, %4
%8 = getelementptr inbounds i32, i32* %2, i64 2
store i32* %8, i32** %0
ret i32 %7
}
void what_date() {}


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

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

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

LLVM IR (-O2):
define void @what_date() {
ret void
}
int __aeabi_unwind_cpp_pr1(void) {
  do {
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<__aeabi_unwind_cpp_pr1>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <__aeabi_unwind_cpp_pr1+0x9>
jmp    110e <__aeabi_unwind_cpp_pr1+0xe>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @__aeabi_unwind_cpp_pr1() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret i32 0
}

LLVM IR (-O2):
define i32 @__aeabi_unwind_cpp_pr1() {
ret i32 0
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void uDMAIntClear(uint32_t ui32ChanMask) {
  (*((volatile unsigned long *)(0x400FF504))) = ui32ChanMask;
}


x86 assembly (clang, -O0):
<uDMAIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400ff504,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAIntClear>:
mov    %rdi,0x400ff504
40
ret

LLVM IR (-O0):
define void @uDMAIntClear(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074787588 to i64*)
ret void
}

LLVM IR (-O2):
define void @uDMAIntClear(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074787588 to i64*)
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ ESRCH;
int /*<<< orphan*/ errno;
int kill(int, int);
int killpg(pid_t pgrp, int sig) {
  if (pgrp <= 0) {
    errno = ESRCH;
    return -1;
  }
  if (pgrp == 1) {
    errno = ESRCH;
    return -1;
  }
  return kill(-pgrp, sig);
}


x86 assembly (clang, -O0):
<killpg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1146 <killpg+0x36>
mov    0x2ea1(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea8(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <killpg+0x6e>
cmpl   $0x1,-0x8(%rbp)
jne    116e <killpg+0x5e>
mov    0x2e79(%rip),%rax
mov    (%rax),%ecx
mov    0x2e80(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <killpg+0x6e>
xor    %edi,%edi
sub    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <kill@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<killpg>:
test   %edi,%edi
jle    1119 <killpg+0x9>
cmp    $0x1,%edi
jne    1131 <killpg+0x21>
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    0x2eb7(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret
neg    %edi
jmp    1030 <kill@plt>

LLVM IR (-O0):
@ESRCH = global i32 0
@errno = global i32 0
define i32 @killpg(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* @ESRCH
store i32 %9, i32* @errno
store i32 -1, i32* %3
br label %20
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* @ESRCH
store i32 %14, i32* @errno
store i32 -1, i32* %3
br label %20
15: ; preds = %10
%16 = load i32, i32* %4
%17 = sub nsw i32 0, %16
%18 = load i32, i32* %5
%19 = call i32 @kill(i32 %17, i32 %18)
store i32 %19, i32* %3
br label %20
20: ; preds = %15, %13, %8
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@ESRCH = global i32 0
@errno = global i32 0
define i32 @killpg(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = load i32, i32* @ESRCH
store i32 %5, i32* @errno
br label %13
6: ; preds = %2
%7 = icmp eq i32 %0, 1
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = load i32, i32* @ESRCH
store i32 %9, i32* @errno
br label %13
10: ; preds = %6
%11 = sub nsw i32 0, %0
%12 = tail call i32 @kill(i32 %11, i32 %1)
br label %13
13: ; preds = %10, %8, %4
%14 = phi i32 [ -1, %4 ], [ -1, %8 ], [ %12, %10 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int closedir(int /*<<< orphan*/ *);
int octave_closedir_wrapper(void *dir) { return closedir((DIR *)dir); }


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

x86 assembly (clang, -O2):
<octave_closedir_wrapper>:
jmp    1030 <closedir@plt>

LLVM IR (-O0):
define i32 @octave_closedir_wrapper(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @closedir(i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @octave_closedir_wrapper(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @closedir(i32* %2)
ret i32 %3
}
void finalizeRun() {}


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

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

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

LLVM IR (-O2):
define void @finalizeRun() {
ret void
}
double f4_cb_send_pre_int_double(double (*cb)(int, double)) {
  double r = 66.0;
  return cb(8, r) + 1.0;
}


x86 assembly (clang, -O0):
<f4_cb_send_pre_int_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x10(%rbp),%xmm0
mov    $0x8,%edi
call   *%rax
movsd  0xecf(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_cb_send_pre_int_double>:
push   %rax
mov    %rdi,%rax
movsd  0xef4(%rip),%xmm0
mov    $0x8,%edi
call   *%rax
addsd  0xeed(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f4_cb_send_pre_int_double(double (i32, double)* %0) {
%2 = alloca double (i32, double)*
%3 = alloca double
store double (i32, double)* %0, double (i32, double)** %2
store double 6.600000e+01, double* %3
%4 = load double (i32, double)*, double (i32, double)** %2
%5 = load double, double* %3
%6 = call double %4(i32 8, double %5)
%7 = fadd double %6, 1.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f4_cb_send_pre_int_double(double (i32, double)* nocapture %0) {
%2 = tail call double %0(i32 8, double 6.600000e+01)
%3 = fadd double %2, 1.000000e+00
ret double %3
}
void private_func(void *context) { (void)context; }


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

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

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

LLVM IR (-O2):
define void @private_func(i8* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ get_extension(char *);
char *get_extension_nc(char *filename) {
  return (char *)get_extension(filename);
}


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

x86 assembly (clang, -O2):
<get_extension_nc>:
jmp    1030 <get_extension@plt>

LLVM IR (-O0):
define i8* @get_extension_nc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @get_extension(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @get_extension_nc(i8* %0) {
%2 = tail call i64 @get_extension(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int threeSumClosest(int *, int, int);
int main() {
  int arr[3] = {0, 1, 2};
  printf("%d\n", threeSumClosest(arr, 3, 3));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x3,%esi
mov    $0x3,%edx
call   1030 <threeSumClosest@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.arr = [3 x i32] [i32 0, i32 1, i32 2]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = call i32 @threeSumClosest(i32* %3, i32 3, i32 3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *realloc(void *, size_t);
void *zrealloc(void *ptr, size_t sz) {
  void *_ptr = ptr;
  if ((ptr = realloc(_ptr, sz)) == NULL) {
    free(ptr);
    return NULL;
  }
  return ptr;
}


x86 assembly (clang, -O0):
<zrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1169 <zrealloc+0x49>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    1171 <zrealloc+0x51>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zrealloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <zrealloc+0x15>
xor    %edi,%edi
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @zrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @free(i8* null)
br label %7
7: ; preds = %2, %5
ret i8* %3
}
void dec_zcache_pers_zpages(unsigned zpages) {}


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

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

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

LLVM IR (-O2):
define void @dec_zcache_pers_zpages(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pw__data(int);
void pw_foot() { pw__data(-1); }


x86 assembly (clang, -O0):
<pw_foot>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
call   1030 <pw__data@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pw_foot>:
mov    $0xffffffff,%edi
jmp    1030 <pw__data@plt>

LLVM IR (-O0):
define void @pw_foot() {
%1 = call i32 @pw__data(i32 -1)
ret void
}

LLVM IR (-O2):
define void @pw_foot() {
%1 = tail call i32 @pw__data(i32 -1)
ret void
}
float evaluar(float coeficiente1, float coeficiente2, float coeficiente3,
              float coeficiente4) {
  return coeficiente1 * coeficiente4 * coeficiente4 +
         coeficiente2 * coeficiente4 + coeficiente3;
}


x86 assembly (clang, -O0):
<evaluar>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
addss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<evaluar>:
mulss  %xmm3,%xmm0
mulss  %xmm3,%xmm1
mulss  %xmm3,%xmm0
addss  %xmm1,%xmm0
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @evaluar(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %8
%11 = fmul float %9, %10
%12 = load float, float* %8
%13 = load float, float* %6
%14 = load float, float* %8
%15 = fmul float %13, %14
%16 = call float @llvm.fmuladd.f32(float %11, float %12, float %15)
%17 = load float, float* %7
%18 = fadd float %16, %17
ret float %18
}

LLVM IR (-O2):
define float @evaluar(float %0, float %1, float %2, float %3) {
%5 = fmul float %0, %3
%6 = fmul float %1, %3
%7 = tail call float @llvm.fmuladd.f32(float %5, float %3, float %6)
%8 = fadd float %7, %2
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", 8 >> 2);
  printf("%d\n", 10 | 1);
  printf("%d\n", 9 << 4);
  printf("%d\n", 69 & 1);
  printf("%d\n", (11 >> 2) & 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x90,%esi
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xe96(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 11)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 144)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
void system_delete(void *base_address) { return; }


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

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

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

LLVM IR (-O2):
define void @system_delete(i8* nocapture %0) {
ret void
}
__attribute__((always_)) void patch_NCAS_2_1_0_631_extra(void) {}


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

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

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

LLVM IR (-O2):
define void @patch_NCAS_2_1_0_631_extra() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glWindowPos4f(short, short, int /*<<< orphan*/, int);
void glWindowPos2s(short x, short y) { glWindowPos4f(x, y, 0, 1); }


x86 assembly (clang, -O0):
<glWindowPos2s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
xor    %edx,%edx
mov    $0x1,%ecx
movswl %ax,%edi
movswl -0x4(%rbp),%esi
call   1030 <glWindowPos4f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glWindowPos2s>:
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1030 <glWindowPos4f@plt>

LLVM IR (-O0):
define void @glWindowPos2s(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = load i16, i16* %4
%7 = call i32 @glWindowPos4f(i16 signext %5, i16 signext %6, i32 0, i32 1)
ret void
}

LLVM IR (-O2):
define void @glWindowPos2s(i16 signext %0, i16 signext %1) {
%3 = tail call i32 @glWindowPos4f(i16 signext %0, i16 signext %1, i32 0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_renameat;
int syscall(int /*<<< orphan*/, int, char const *, int, char const *);
__attribute__((always_)) int _syscall_renameat(int olddirfd,
                                               const char *oldpath,
                                               int newdirfd,
                                               const char *newpath) {
  return syscall(__NR_renameat, olddirfd, oldpath, newdirfd, newpath);
}


x86 assembly (clang, -O0):
<_syscall_renameat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_renameat>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@__NR_renameat = global i32 0
define i32 @_syscall_renameat(i32 %0, i8* %1, i32 %2, i8* %3) {
%5 = load i32, i32* @__NR_renameat
%6 = tail call i32 @syscall(i32 %5, i32 %0, i8* %1, i32 %2, i8* %3)
ret i32 %6
}
/* Variables and functions */
size_t guess_char_width(char c) {
  if ((c & 0xe0) == 0xc0)
    return 2;
  else if ((c & 0xf0) == 0xe0)
    return 3;
  else if ((c & 0xf8) == 0xf0)
    return 4;
  return 1;
}


x86 assembly (clang, -O0):
<guess_char_width>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
and    $0xe0,%eax
cmp    $0xc0,%eax
jne    112b <guess_char_width+0x2b>
movq   $0x2,-0x8(%rbp)
jmp    117f <guess_char_width+0x7f>
movsbl -0x9(%rbp),%eax
and    $0xf0,%eax
cmp    $0xe0,%eax
jne    114c <guess_char_width+0x4c>
movq   $0x3,-0x8(%rbp)
jmp    117f <guess_char_width+0x7f>
movsbl -0x9(%rbp),%eax
and    $0xf8,%eax
cmp    $0xf0,%eax
jne    116d <guess_char_width+0x6d>
movq   $0x4,-0x8(%rbp)
jmp    117f <guess_char_width+0x7f>
jmp    1172 <guess_char_width+0x72>
jmp    1177 <guess_char_width+0x77>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<guess_char_width>:
mov    %edi,%ecx
and    $0xe0,%ecx
mov    $0x2,%eax
cmp    $0xc0,%ecx
je     1141 <guess_char_width+0x41>
movzbl %dil,%ecx
mov    %ecx,%edx
and    $0xfffffff0,%edx
mov    $0x3,%eax
cmp    $0xe0,%edx
je     1141 <guess_char_width+0x41>
and    $0xfffffff8,%ecx
xor    %eax,%eax
cmp    $0xf0,%ecx
sete   %al
lea    (%rax,%rax,2),%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @guess_char_width(i8 signext %0) {
%2 = alloca i64
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 224
%7 = icmp eq i32 %6, 192
br i1 %7, label %8, label %9
8: ; preds = %1
store i64 2, i64* %2
br label %24
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = and i32 %11, 240
%13 = icmp eq i32 %12, 224
br i1 %13, label %14, label %15
14: ; preds = %9
store i64 3, i64* %2
br label %24
15: ; preds = %9
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = and i32 %17, 248
%19 = icmp eq i32 %18, 240
br i1 %19, label %20, label %21
20: ; preds = %15
store i64 4, i64* %2
br label %24
21: ; preds = %15
br label %22
22: ; preds = %21
br label %23
23: ; preds = %22
store i64 1, i64* %2
br label %24
24: ; preds = %23, %20, %14, %8
%25 = load i64, i64* %2
ret i64 %25
}

LLVM IR (-O2):
define i64 @guess_char_width(i8 signext %0) {
%2 = zext i8 %0 to i32
%3 = and i32 %2, 224
%4 = icmp eq i32 %3, 192
br i1 %4, label %12, label %5
5: ; preds = %1
%6 = and i32 %2, 240
%7 = icmp eq i32 %6, 224
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = and i32 %2, 248
%10 = icmp eq i32 %9, 240
%11 = select i1 %10, i64 4, i64 1
br label %12
12: ; preds = %8, %5, %1
%13 = phi i64 [ 2, %1 ], [ 3, %5 ], [ %11, %8 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void print_support_header(void) {
  printf("%s\t%-60s\t%s\n", "Supported:", "Feature:", "Feature Type:");
}


x86 assembly (clang, -O0):
<print_support_header>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
lea    0xeef(%rip),%rdx
lea    0xef1(%rip),%rcx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_support_header>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
lea    0xef3(%rip),%rdx
lea    0xef5(%rip),%rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%s\09%-60s\09%s\0A\00"
@.str.1 = [11 x i8] c"Supported:\00"
@.str.2 = [9 x i8] c"Feature:\00"
@.str.3 = [14 x i8] c"Feature Type:\00"
define void @print_support_header() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s\09%-60s\09%s\0A\00"
@.str.1 = [11 x i8] c"Supported:\00"
@.str.2 = [9 x i8] c"Feature:\00"
@.str.3 = [14 x i8] c"Feature Type:\00"
define void @print_support_header() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct clause_list {
  int dummy;
};
struct Clause {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_insert(struct genlist *, struct Clause *, int);
void clause_list_insert(struct clause_list *tthis, struct Clause *pfoo,
                        int idx) {
  genlist_insert((struct genlist *)tthis, pfoo, idx);
}


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

x86 assembly (clang, -O2):
<clause_list_insert>:
jmp    1030 <genlist_insert@plt>

LLVM IR (-O0):
%struct.clause_list = type { i32 }
%struct.Clause = type { i32 }
%struct.genlist = type { i32 }
define void @clause_list_insert(%struct.clause_list* %0, %struct.Clause* %1, i32 %2) {
%4 = alloca %struct.clause_list*
%5 = alloca %struct.Clause*
%6 = alloca i32
store %struct.clause_list* %0, %struct.clause_list** %4
store %struct.Clause* %1, %struct.Clause** %5
store i32 %2, i32* %6
%7 = load %struct.clause_list*, %struct.clause_list** %4
%8 = bitcast %struct.clause_list* %7 to %struct.genlist*
%9 = load %struct.Clause*, %struct.Clause** %5
%10 = load i32, i32* %6
%11 = call i32 @genlist_insert(%struct.genlist* %8, %struct.Clause* %9, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.clause_list = type { i32 }
%struct.Clause = type { i32 }
%struct.genlist = type { i32 }
define void @clause_list_insert(%struct.clause_list* %0, %struct.Clause* %1, i32 %2) {
%4 = bitcast %struct.clause_list* %0 to %struct.genlist*
%5 = tail call i32 @genlist_insert(%struct.genlist* %4, %struct.Clause* %1, i32 %2)
ret void
}
int TempCmp(const int *_One, const int *_Two) { return *_One - *_Two; }


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

x86 assembly (clang, -O2):
<TempCmp>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @TempCmp(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @TempCmp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sub nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ f1(int);
int /*<<< orphan*/ f2();
int /*<<< orphan*/ f3();
int main() {
  f1(2);
  f2();
  f3();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1050 <f1@plt>
xor    %eax,%eax
call   1030 <f2@plt>
xor    %eax,%eax
call   1040 <f3@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f1(i32 2)
%2 = tail call i32 (...) @f2()
%3 = tail call i32 (...) @f3()
ret i32 0
}
void test(void) {
label:
  asm("  nop");
label2:
  asm("  nop");
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <test+0x9>
nop
nop
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @test() {
tail call void asm sideeffect " nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect " nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aclamp(scalar_t__);
scalar_t__ chval(int);
int /*<<< orphan*/ isupper(int);
int valch(int /*<<< orphan*/, int /*<<< orphan*/);
int rot(int c, int r) { return valch(aclamp(chval(c) + r), isupper(c)); }


x86 assembly (clang, -O0):
<rot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <chval@plt>
mov    %rax,%rdi
movslq -0x8(%rbp),%rax
add    %rax,%rdi
call   1060 <aclamp@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <isupper@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <valch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <chval@plt>
movslq %ebx,%rdi
add    %rax,%rdi
call   1060 <aclamp@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1050 <isupper@plt>
mov    %ebx,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <valch@plt>

LLVM IR (-O0):
define i32 @rot(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 = call i64 @chval(i32 %5)
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = add nsw i64 %6, %8
%10 = call i32 @aclamp(i64 %9)
%11 = load i32, i32* %3
%12 = call i32 @isupper(i32 %11)
%13 = call i32 @valch(i32 %10, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @rot(i32 %0, i32 %1) {
%3 = tail call i64 @chval(i32 %0)
%4 = sext i32 %1 to i64
%5 = add nsw i64 %3, %4
%6 = tail call i32 @aclamp(i64 %5)
%7 = tail call i32 @isupper(i32 %0)
%8 = tail call i32 @valch(i32 %6, i32 %7)
ret i32 %8
}
int do_xor(int a, int b) {
  int result = 0;
  result = a ^ b;
  return result;
}


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

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

LLVM IR (-O0):
define i32 @do_xor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = xor i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @do_xor(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int fuzz_one_input(int /*<<< orphan*/ *, size_t);
size_t fuzz_read(int /*<<< orphan*/ **);
bool read_and_execute(void) {
  size_t size;
  uint8_t *data;
  bool ret;
  size = fuzz_read(&data);
  if ((NULL == data) || (0 == size)) {
    return false;
  }
  ret = fuzz_one_input(data, size);
  free(data);
  return ret;
}


x86 assembly (clang, -O0):
<read_and_execute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
call   1030 <fuzz_read@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
je     115d <read_and_execute+0x2d>
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1169 <read_and_execute+0x39>
movl   $0x0,-0x4(%rbp)
jmp    1188 <read_and_execute+0x58>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fuzz_one_input@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_and_execute>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
call   1030 <fuzz_read@plt>
mov    0x8(%rsp),%rdi
xor    %ebx,%ebx
test   %rdi,%rdi
je     1164 <read_and_execute+0x34>
test   %rax,%rax
je     1164 <read_and_execute+0x34>
mov    %rax,%rsi
call   1050 <fuzz_one_input@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%rdi
call   1040 <free@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @read_and_execute() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32*
%4 = alloca i32
%5 = call i64 @fuzz_read(i32** %3)
store i64 %5, i64* %2
%6 = load i32*, i32** %3
%7 = icmp eq i32* null, %6
br i1 %7, label %11, label %8
8: ; preds = %0
%9 = load i64, i64* %2
%10 = icmp eq i64 0, %9
br i1 %10, label %11, label %12
11: ; preds = %8, %0
store i32 0, i32* %1
br label %19
12: ; preds = %8
%13 = load i32*, i32** %3
%14 = load i64, i64* %2
%15 = call i32 @fuzz_one_input(i32* %13, i64 %14)
store i32 %15, i32* %4
%16 = load i32*, i32** %3
%17 = call i32 @free(i32* %16)
%18 = load i32, i32* %4
store i32 %18, i32* %1
br label %19
19: ; preds = %12, %11
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
define i32 @read_and_execute() {
%1 = alloca i32*
%2 = bitcast i32** %1 to i8*
%3 = call i64 @fuzz_read(i32** %1)
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
%6 = icmp eq i64 %3, 0
%7 = select i1 %5, i1 true, i1 %6
br i1 %7, label %12, label %8
8: ; preds = %0
%9 = call i32 @fuzz_one_input(i32* %4, i64 %3)
%10 = load i32*, i32** %1
%11 = call i32 @free(i32* %10)
br label %12
12: ; preds = %0, %8
%13 = phi i32 [ %9, %8 ], [ 0, %0 ]
ret i32 %13
}