xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Usage(void) {
  fprintf(
      stderr,
      "Usage: 'eitsecfilter file.sec +onid tsid sid +onid tsid sid [...]\n");
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [67 x i8] c"Usage: 'eitsecfilter file.sec +onid tsid sid +onid tsid sid [...]\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [67 x i8] c"Usage: 'eitsecfilter file.sec +onid tsid sid +onid tsid sid [...]\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
ret void
}
void errtrace(name, level) char *name;
int level;
{
  while (level-- > 0)
    putbyte(' ');
  putstrn(name);
}


x86 assembly (clang, -O0):
<errtrace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    1154 <errtrace+0x34>
mov    $0x20,%edi
mov    $0x0,%al
call   1040 <putbyte@plt>
jmp    112f <errtrace+0xf>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <putstrn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errtrace>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %esi,%esi
jle    1144 <errtrace+0x24>
mov    %esi,%ebp
add    $0x1,%ebp
nop
mov    $0x20,%edi
xor    %eax,%eax
call   1040 <putbyte@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <errtrace+0x10>
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putstrn@plt>

LLVM IR (-O0):
define void @errtrace(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %4
%7 = add nsw i32 %6, -1
store i32 %7, i32* %4
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 (i32, ...) bitcast (i32 (...)* @putbyte to i32 (i32, ...)*)(i32 32)
br label %5
11: ; preds = %5
%12 = load i8*, i8** %3
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @putstrn to i32 (i8*, ...)*)(i8* %12)
ret void
}

LLVM IR (-O2):
define void @errtrace(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @putbyte to i32 (i32, ...)*)(i32 32)
%8 = icmp ugt i32 %5, 1
br i1 %8, label %4, label %9
9: ; preds = %4, %2
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @putstrn to i32 (i8*, ...)*)(i8* %0)
ret void
}
/* Variables and functions */
int bs_get_info(int, char *, char **);
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
int bs_stats_tube(int fd, const char *tube, char **yaml) {
  char command[512] = {0};
  snprintf(command, 512, "stats-tube %s\r\n", tube);
  return bs_get_info(fd, command, yaml);
}


x86 assembly (clang, -O0):
<bs_stats_tube>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x220(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
lea    -0x220(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x200,%esi
lea    0xe90(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0x220(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <bs_get_info@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bs_stats_tube>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%r15d
mov    %rsp,%rbp
mov    $0x200,%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
lea    0xea1(%rip),%rdx
mov    %rbp,%rdi
mov    $0x200,%esi
mov    %rbx,%rcx
call   1040 <snprintf@plt>
mov    %r15d,%edi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1030 <bs_get_info@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"stats-tube %s\0D\0A\00"
define i32 @bs_stats_tube(i32 %0, i8* %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca [512 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%8 = bitcast [512 x i8]* %7 to i8*
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %5
%11 = call i32 @snprintf(i8* %9, i32 512, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* %4
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%14 = load i8**, i8*** %6
%15 = call i32 @bs_get_info(i32 %12, i8* %13, i8** %14)
ret i32 %15
}

LLVM IR (-O2):
@.str = [16 x i8] c"stats-tube %s\0D\0A\00"
define i32 @bs_stats_tube(i32 %0, i8* %1, i8** %2) {
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 512, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = call i32 @bs_get_info(i32 %0, i8* %5, i8** %2)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ enum_t;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ xdr_int(int /*<<< orphan*/ *, int *);
int /*<<< orphan*/ xdr_long(int /*<<< orphan*/ *, long *);
int /*<<< orphan*/ xdr_short(int /*<<< orphan*/ *, short *);
bool_t xdr_enum(XDR *xdrs, enum_t *ep) {
  if (sizeof(enum_t) == sizeof(long)) {
    return (xdr_long(xdrs, (long *)ep));
  } else if (sizeof(enum_t) == sizeof(int)) {
    return (xdr_int(xdrs, (int *)ep));
  } else if (sizeof(enum_t) == sizeof(short)) {
    return (xdr_short(xdrs, (short *)ep));
  } else {
    return (FALSE);
  }
}


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

x86 assembly (clang, -O2):
<xdr_enum>:
jmp    1030 <xdr_int@plt>

LLVM IR (-O0):
@FALSE = global i32 0
define i32 @xdr_enum(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 = call i32 @xdr_int(i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
@FALSE = global i32 0
define i32 @xdr_enum(i32* %0, i32* %1) {
%3 = tail call i32 @xdr_int(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ map_over_jobs(int (*)(int *, int, int, int));
int print_job(int *job, int format, int state, int job_index) {
  map_over_jobs(print_job);
}


x86 assembly (clang, -O0):
<print_job>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    0x2ebc(%rip),%rdi
call   1030 <map_over_jobs@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_job>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <map_over_jobs@plt>

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

LLVM IR (-O2):
define i32 @print_job(i32* nocapture readnone %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @map_over_jobs(i32 (i32*, i32, i32, i32)* @print_job)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ iopl(int);
int /*<<< orphan*/ outb(int, int);
void Stop(void) {
  static int flag = 0;
  if (flag == 0) {
    flag = 1;
    iopl(3);
  }
  outb(0xfc, 0x61);
  return;
}


x86 assembly (clang, -O0):
<Stop>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f09(%rip)
jne    1145 <Stop+0x25>
movl   $0x1,0x2ef9(%rip)
mov    $0x3,%edi
call   1030 <iopl@plt>
mov    $0xfc,%edi
mov    $0x61,%esi
call   1040 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Stop>:
push   %rax
cmpb   $0x0,0x2f0c(%rip)
jne    113b <Stop+0x1b>
movb   $0x1,0x2f03(%rip)
mov    $0x3,%edi
call   1030 <iopl@plt>
mov    $0xfc,%edi
mov    $0x61,%esi
pop    %rax
jmp    1040 <outb@plt>

LLVM IR (-O0):
@Stop.flag = internal global i32 0
define void @Stop() {
%1 = load i32, i32* @Stop.flag
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
store i32 1, i32* @Stop.flag
%4 = call i32 @iopl(i32 3)
br label %5
5: ; preds = %3, %0
%6 = call i32 @outb(i32 252, i32 97)
ret void
}

LLVM IR (-O2):
@Stop.flag = internal unnamed_addr global i1 false
define void @Stop() {
%1 = load i1, i1* @Stop.flag
br i1 %1, label %4, label %2
2: ; preds = %0
store i1 true, i1* @Stop.flag
%3 = tail call i32 @iopl(i32 3)
br label %4
4: ; preds = %2, %0
%5 = tail call i32 @outb(i32 252, i32 97)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_filename_c(char const *, int *, char *);
scalar_t__ malloc(int);
int strlen(char const *);
char *get_filename(const char *label) {
  int label_len = strlen(label);
  char *tmp = (char *)malloc(255 + 1);
  get_filename_c(label, &label_len, tmp);
  return tmp;
}


x86 assembly (clang, -O0):
<get_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    $0x100,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    -0xc(%rbp),%rsi
call   1040 <get_filename_c@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_filename>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %eax,0x4(%rsp)
mov    $0x100,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0x4(%rsp),%rsi
mov    %r14,%rdi
mov    %rax,%rdx
call   1040 <get_filename_c@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @get_filename(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = call i64 @malloc(i32 256)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %4
%9 = load i8*, i8** %2
%10 = load i8*, i8** %4
%11 = call i32 @get_filename_c(i8* %9, i32* %3, i8* %10)
%12 = load i8*, i8** %4
ret i8* %12
}

LLVM IR (-O2):
define i8* @get_filename(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @strlen(i8* %0)
store i32 %4, i32* %2
%5 = tail call i64 @malloc(i32 256)
%6 = inttoptr i64 %5 to i8*
%7 = call i32 @get_filename_c(i8* %0, i32* %2, i8* %6)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int ascii;
  printf("Give me your ASCII code value (decimal only):");
  scanf("%d", &ascii);
  printf("Your code value %d is '%c' in ASCII.\n", ascii, ascii);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
lea    0xee6(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"Give me your ASCII code value (decimal only):\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [38 x i8] c"Your code value %d is '%c' in ASCII.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [46 x i8] c"Give me your ASCII code value (decimal only):\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [38 x i8] c"Your code value %d is '%c' in ASCII.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %5)
ret i32 0
}
int xpsocket_init() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @xpsocket_init() {
ret i32 1
}
/* Variables and functions */
void *MAP_FAILED;
int /*<<< orphan*/ MAP_SHARED;
int PROT_READ;
int PROT_WRITE;
void *mmap(int /*<<< orphan*/ *, size_t, int, int /*<<< orphan*/, int,
           int /*<<< orphan*/);
void *pmem_map(int fd, size_t len) {
  void *base;
  if ((base = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) ==
      MAP_FAILED)
    return NULL;
  return base;
}


x86 assembly (clang, -O0):
<pmem_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    0x2ece(%rip),%rax
mov    (%rax),%edx
mov    0x2e9d(%rip),%rax
or     (%rax),%edx
mov    0x2eac(%rip),%rax
mov    (%rax),%ecx
mov    -0xc(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
xor    %r9d,%r9d
call   1030 <mmap@plt>
mov    %rax,-0x20(%rbp)
mov    0x2e6f(%rip),%rcx
cmp    (%rcx),%rax
jne    116f <pmem_map+0x5f>
movq   $0x0,-0x8(%rbp)
jmp    1177 <pmem_map+0x67>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmem_map>:
push   %rbx
mov    %edi,%r8d
mov    0x2edd(%rip),%rax
mov    0x2eae(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x2ebb(%rip),%rax
mov    (%rax),%ecx
xor    %ebx,%ebx
xor    %edi,%edi
xor    %r9d,%r9d
call   1030 <mmap@plt>
mov    0x2e86(%rip),%rcx
cmp    (%rcx),%rax
cmove  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
define i8* @pmem_map(i32 %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
%6 = alloca i8*
store i32 %0, i32* %4
store i64 %1, i64* %5
%7 = load i64, i64* %5
%8 = load i32, i32* @PROT_READ
%9 = load i32, i32* @PROT_WRITE
%10 = or i32 %8, %9
%11 = load i32, i32* @MAP_SHARED
%12 = load i32, i32* %4
%13 = call i8* @mmap(i32* null, i64 %7, i32 %10, i32 %11, i32 %12, i32 0)
store i8* %13, i8** %6
%14 = load i8*, i8** @MAP_FAILED
%15 = icmp eq i8* %13, %14
br i1 %15, label %16, label %17
16: ; preds = %2
store i8* null, i8** %3
br label %19
17: ; preds = %2
%18 = load i8*, i8** %6
store i8* %18, i8** %3
br label %19
19: ; preds = %17, %16
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
define i8* @pmem_map(i32 %0, i64 %1) {
%3 = load i32, i32* @PROT_READ
%4 = load i32, i32* @PROT_WRITE
%5 = or i32 %4, %3
%6 = load i32, i32* @MAP_SHARED
%7 = tail call i8* @mmap(i32* null, i64 %1, i32 %5, i32 %6, i32 %0, i32 0)
%8 = load i8*, i8** @MAP_FAILED
%9 = icmp eq i8* %7, %8
%10 = select i1 %9, i8* null, i8* %7
ret i8* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int16_t;

/* Variables and functions */
int isakmp_validate_notification(u_int16_t type) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @isakmp_validate_notification(i32 %0) {
ret i32 -1
}
int diag_l3_base_stop(struct diag_l3_conn *d_l3_conn __attribute__((unused))) {
  return (0);
}


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

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

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

LLVM IR (-O2):
%struct.diag_l3_conn = type opaque
define i32 @diag_l3_base_stop(%struct.diag_l3_conn* nocapture readnone %0) {
ret i32 0
}
int test_imm_5Euint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x5E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Euint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x5e,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Euint64_lowword_reg>:
test   $0x5e,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Euint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 94
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_5Euint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 94
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_kvx_barrier();
int /*<<< orphan*/ __builtin_kvx_fence();
int /*<<< orphan*/ __builtin_kvx_iinval();
void sync_caches_for_execution(void) {
  __builtin_kvx_fence();
  __builtin_kvx_iinval();
  __builtin_kvx_barrier();
}


x86 assembly (clang, -O0):
<sync_caches_for_execution>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <__builtin_kvx_fence@plt>
mov    $0x0,%al
call   1030 <__builtin_kvx_iinval@plt>
mov    $0x0,%al
call   1050 <__builtin_kvx_barrier@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_caches_for_execution>:
push   %rax
xor    %eax,%eax
call   1040 <__builtin_kvx_fence@plt>
xor    %eax,%eax
call   1030 <__builtin_kvx_iinval@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <__builtin_kvx_barrier@plt>

LLVM IR (-O0):
define void @sync_caches_for_execution() {
%1 = call i32 (...) @__builtin_kvx_fence()
%2 = call i32 (...) @__builtin_kvx_iinval()
%3 = call i32 (...) @__builtin_kvx_barrier()
ret void
}

LLVM IR (-O2):
define void @sync_caches_for_execution() {
%1 = tail call i32 (...) @__builtin_kvx_fence()
%2 = tail call i32 (...) @__builtin_kvx_iinval()
%3 = tail call i32 (...) @__builtin_kvx_barrier()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int main(int argc, char **argv) {
L1:
  foo();
#pragma omp target data
  {
    foo();
    goto L1;
  }
  goto L2;
#pragma omp target data
L2:
  foo();
#pragma omp target data(i)
  { foo(); }
#pragma omp target unknown
  { foo(); }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %6, %2
%7 = call i32 (...) @foo()
%8 = call i32 (...) @foo()
br label %6
9: ; No predecessors!
%10 = call i32 (...) @foo()
%11 = call i32 (...) @foo()
%12 = call i32 (...) @foo()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 (...) @foo()
%5 = tail call i32 (...) @foo()
br label %3
}
/* Variables and functions */
scalar_t__ clock_gettime;
int main(int argc, char **argv) {
  void *p;
  (void)argc;
  (void)argv;
  p = (void *)(clock_gettime);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@clock_gettime = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* @clock_gettime
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %6
ret i32 0
}

LLVM IR (-O2):
@clock_gettime = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int get_maxlen(base, num, length) const char *const base[];
int num;
int (*length)(const char *const *, int);
{
  int i, len, max;
  max = (*length)(base, 0);
  for (i = 0; i < num; i++) {
    if ((len = (*length)(base, i)) > max)
      max = len;
  }
  return (max);
}


x86 assembly (clang, -O0):
<get_maxlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   *%rax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <get_maxlen+0x67>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   *%rax
mov    %eax,-0x20(%rbp)
cmp    -0x24(%rbp),%eax
jle    1154 <get_maxlen+0x54>
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1159 <get_maxlen+0x59>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1129 <get_maxlen+0x29>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_maxlen>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %esi,%r15d
mov    %rdi,%r12
xor    %ebx,%ebx
xor    %esi,%esi
call   *%rdx
mov    %eax,%ebp
test   %r15d,%r15d
jle    1135 <get_maxlen+0x35>
xchg   %ax,%ax
mov    %r12,%rdi
mov    %ebx,%esi
call   *%r14
cmp    %ebp,%eax
cmovg  %eax,%ebp
add    $0x1,%ebx
cmp    %ebx,%r15d
jne    1120 <get_maxlen+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @get_maxlen(i8** %0, i32 %1, i32 (i8**, i32)* nocapture %2) {
%4 = tail call i32 %2(i8** %0, i32 0)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %14
6: ; preds = %3, %6
%7 = phi i32 [ %11, %6 ], [ %4, %3 ]
%8 = phi i32 [ %12, %6 ], [ 0, %3 ]
%9 = tail call i32 %2(i8** %0, i32 %8)
%10 = icmp sgt i32 %9, %7
%11 = select i1 %10, i32 %9, i32 %7
%12 = add nuw nsw i32 %8, 1
%13 = icmp eq i32 %12, %1
br i1 %13, label %14, label %6
14: ; preds = %6, %3
%15 = phi i32 [ %4, %3 ], [ %11, %6 ]
ret i32 %15
}
/* Variables and functions */
int atoi(char const *);
int stringToInt(char *string) { return atoi((const char *)string); }


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

x86 assembly (clang, -O2):
<stringToInt>:
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @stringToInt(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
ret i32 %2
}
/* Type definitions */
struct hash_table {
  int dummy;
};

/* Variables and functions */
scalar_t__ hash_table_must_rehash(struct hash_table *);
int /*<<< orphan*/ hash_table_rehash(struct hash_table *);
void hash_table_check_overflow(struct hash_table *ht) {
  if (hash_table_must_rehash(ht))
    hash_table_rehash(ht);
}


x86 assembly (clang, -O0):
<hash_table_check_overflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hash_table_must_rehash@plt>
cmp    $0x0,%rax
je     1148 <hash_table_check_overflow+0x28>
mov    -0x8(%rbp),%rdi
call   1040 <hash_table_rehash@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_table_check_overflow>:
push   %rbx
mov    %rdi,%rbx
call   1030 <hash_table_must_rehash@plt>
test   %rax,%rax
je     1137 <hash_table_check_overflow+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <hash_table_rehash@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.hash_table = type { i32 }
define void @hash_table_check_overflow(%struct.hash_table* %0) {
%2 = alloca %struct.hash_table*
store %struct.hash_table* %0, %struct.hash_table** %2
%3 = load %struct.hash_table*, %struct.hash_table** %2
%4 = call i64 @hash_table_must_rehash(%struct.hash_table* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load %struct.hash_table*, %struct.hash_table** %2
%8 = call i32 @hash_table_rehash(%struct.hash_table* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.hash_table = type { i32 }
define void @hash_table_check_overflow(%struct.hash_table* %0) {
%2 = tail call i64 @hash_table_must_rehash(%struct.hash_table* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @hash_table_rehash(%struct.hash_table* %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void version_display(void) {
  printf("lifstat %s - written by Frank S. Fejes III\n", "20100318");
}


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

x86 assembly (clang, -O2):
<version_display>:
lea    0xee9(%rip),%rdi
lea    0xf0e(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"lifstat %s - written by Frank S. Fejes III\0A\00"
@.str.1 = [9 x i8] c"20100318\00"
define void @version_display() {
%1 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"lifstat %s - written by Frank S. Fejes III\0A\00"
@.str.1 = [9 x i8] c"20100318\00"
define void @version_display() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ i;

/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  typedef short td_val;
  td_val i;
  if (sizeof(i) != 2)
    abort();
  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 i16
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ EINTR;
int /*<<< orphan*/ err(int, char *);
scalar_t__ errno;
int wait(int /*<<< orphan*/ *);
void wait_for_child(void) {
  int ret;
  do {
    ret = wait(NULL);
  } while (ret == -1 && errno == EINTR);
  if (ret == -1)
    err(1, "wait");
}


x86 assembly (clang, -O0):
<wait_for_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <wait@plt>
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xffffffff,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jne    115d <wait_for_child+0x3d>
mov    0x2e96(%rip),%rax
mov    (%rax),%rax
mov    0x2e84(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1128 <wait_for_child+0x8>
cmpl   $0xffffffff,-0x4(%rbp)
jne    1183 <wait_for_child+0x63>
mov    $0x1,%edi
lea    0xe82(%rip),%rsi
call   1030 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_child>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%r14
mov    0x2ea6(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edi,%edi
call   1040 <wait@plt>
cmp    $0xffffffff,%eax
jne    1154 <wait_for_child+0x34>
mov    (%rbx),%rcx
cmp    %rcx,(%r14)
je     1140 <wait_for_child+0x20>
cmp    $0xffffffff,%eax
je     1161 <wait_for_child+0x41>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe98(%rip),%rsi
mov    $0x1,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <err@plt>

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
@.str = [5 x i8] c"wait\00"
define void @wait_for_child() {
%1 = alloca i32
br label %2
2: ; preds = %11, %0
%3 = call i32 @wait(i32* null)
store i32 %3, i32* %1
br label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i64, i64* @errno
%9 = load i64, i64* @EINTR
%10 = icmp eq i64 %8, %9
br label %11
11: ; preds = %7, %4
%12 = phi i1 [ false, %4 ], [ %10, %7 ]
br i1 %12, label %2, label %13
13: ; preds = %11
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @err(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %13
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
@.str = [5 x i8] c"wait\00"
define void @wait_for_child() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @wait(i32* null)
%3 = icmp eq i32 %2, -1
%4 = load i64, i64* @errno
%5 = load i64, i64* @EINTR
%6 = icmp eq i64 %4, %5
%7 = select i1 %3, i1 %6, i1 false
br i1 %7, label %1, label %8
8: ; preds = %1
br i1 %3, label %9, label %11
9: ; preds = %8
%10 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DMIC0_DriverIRQHandler();
__attribute__((weak)) void DMIC0_IRQHandler(void) { DMIC0_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @DMIC0_IRQHandler() {
%1 = call i32 (...) @DMIC0_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @DMIC0_IRQHandler() {
%1 = tail call i32 (...) @DMIC0_DriverIRQHandler()
ret void
}
void hal_wdt_init(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_icon_source_get_direction_wildcarded() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abs(scalar_t__);
char *strdup(char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int /*<<< orphan*/);
char *strLeft(char *str, int n) {
  char *tmp;
  tmp = strdup(str);
  strncpy(tmp + n, "", abs(strlen(tmp) - n));
  return tmp;
}


x86 assembly (clang, -O0):
<strLeft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
movslq -0xc(%rbp),%rax
sub    %rax,%rdi
call   1040 <abs@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
lea    0xe70(%rip),%rsi
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strLeft>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
call   1060 <strdup@plt>
mov    %rax,%rbx
movslq %ebp,%rbp
lea    (%rax,%rbp,1),%r14
mov    %rax,%rdi
call   1050 <strlen@plt>
sub    %rbp,%rax
mov    %rax,%rdi
call   1040 <abs@plt>
lea    0xe91(%rip),%rsi
mov    %r14,%rdi
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @strLeft(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 i8*, i8** %3
%7 = call i8* @strdup(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8*, i8** %5
%13 = call i64 @strlen(i8* %12)
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = sub nsw i64 %13, %15
%17 = call i32 @abs(i64 %16)
%18 = call i32 @strncpy(i8* %11, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @strLeft(i8* nocapture %0, i32 %1) {
%3 = tail call i8* @strdup(i8* %0)
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %3, i64 %4
%6 = tail call i64 @strlen(i8* dereferenceable(1) %3)
%7 = sub nsw i64 %6, %4
%8 = tail call i32 @abs(i64 %7)
%9 = tail call i32 @strncpy(i8* %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i8* %3
}
/* Variables and functions */
double cosf(float);
float hanning(int k, int N) {
  float p = ((float)(k)) / ((float)(N));
  return 0.5 - 0.5 * cosf(2.f * 3.14159265358979323846f * p);
}


x86 assembly (clang, -O0):
<hanning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xed7(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
call   1030 <cosf@plt>
movsd  0xeb5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb1(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hanning>:
push   %rax
cvtsi2ss %edi,%xmm0
cvtsi2ss %esi,%xmm1
divss  %xmm1,%xmm0
mulss  0xedb(%rip),%xmm0
call   1030 <cosf@plt>
mulsd  0xed6(%rip),%xmm0
addsd  0xed6(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @hanning(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to float
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to float
%10 = fdiv float %7, %9
store float %10, float* %5
%11 = load float, float* %5
%12 = fmul float 0x401921FB60000000, %11
%13 = call double @cosf(float %12)
%14 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %13, double 5.000000e-01)
%15 = fptrunc double %14 to float
ret float %15
}

LLVM IR (-O2):
define float @hanning(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
%4 = sitofp i32 %1 to float
%5 = fdiv float %3, %4
%6 = fmul float %5, 0x401921FB60000000
%7 = tail call double @cosf(float %6)
%8 = tail call double @llvm.fmuladd.f64(double %7, double -5.000000e-01, double 5.000000e-01)
%9 = fptrunc double %8 to float
ret float %9
}
/* Type definitions */
struct _6502 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _6502 *);
void cpu_6502_free(struct _6502 *cpu) { free(cpu); }


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

x86 assembly (clang, -O2):
<cpu_6502_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct._6502 = type { i32 }
define void @cpu_6502_free(%struct._6502* nocapture %0) {
%2 = tail call i32 @free(%struct._6502* %0)
ret void
}
int ft_ctoi(unsigned char c) { return ((int)c); }


x86 assembly (clang, -O0):
<ft_ctoi>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ft_ctoi(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @ft_ctoi(i8 zeroext %0) {
%2 = zext i8 %0 to i32
ret i32 %2
}
int get_cindex(int i, int nx) {
  int j;
  j = (i - 1) % nx;
  if (j < 0)
    j += nx;
  return j;
}


x86 assembly (clang, -O0):
<get_cindex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    112a <get_cindex+0x2a>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cindex>:
lea    -0x1(%rdi),%eax
cltd
idiv   %esi
mov    %edx,%eax
sar    $0x1f,%eax
and    %esi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @get_cindex(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 = sub nsw i32 %6, 1
%8 = load i32, i32* %4
%9 = srem i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = add nsw i32 %14, %13
store i32 %15, i32* %5
br label %16
16: ; preds = %12, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
define i32 @get_cindex(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = srem i32 %3, %1
%5 = icmp slt i32 %4, 0
%6 = select i1 %5, i32 %1, i32 0
%7 = add nsw i32 %6, %4
ret i32 %7
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dvarm(int, double, int, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dvarm(N, 4.5, 1, x, stride);
  printf("sample variance: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%ecx
movsd  0xe93(%rip),%xmm0
mov    $0x1,%esi
call   1030 <stdlib_strided_dvarm@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
movsd  0xea5(%rip),%xmm0
mov    %rsp,%rdx
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2,%ecx
call   1030 <stdlib_strided_dvarm@plt>
lea    0xed7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [22 x i8] c"sample variance: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dvarm(i32 %6, double 4.500000e+00, i32 1, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [22 x i8] c"sample variance: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dvarm(i32 4, double 4.500000e+00, i32 1, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
void EC_KEY_get0_public_key(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_KEY_get0_public_key() {
ret void
}
void byte_swap_UINT32(unsigned char n[]) {
  unsigned char ch;
  ch = n[0];
  n[0] = n[3];
  n[3] = ch;
  ch = n[1];
  n[1] = n[2];
  n[2] = ch;
}


x86 assembly (clang, -O0):
<byte_swap_UINT32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte_swap_UINT32>:
mov    (%rdi),%al
mov    0x3(%rdi),%cl
mov    %cl,(%rdi)
mov    %al,0x3(%rdi)
rolw   $0x8,0x1(%rdi)
ret

LLVM IR (-O0):
define void @byte_swap_UINT32(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 3
%9 = load i8, i8* %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8, i8* %3
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 3
store i8 %12, i8* %14
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
store i8 %17, i8* %3
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 2
%20 = load i8, i8* %19
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 1
store i8 %20, i8* %22
%23 = load i8, i8* %3
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i64 2
store i8 %23, i8* %25
ret void
}

LLVM IR (-O2):
define void @byte_swap_UINT32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 3
%4 = load i8, i8* %3
store i8 %4, i8* %0
store i8 %2, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
store i8 %8, i8* %5
store i8 %6, i8* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void handleAlarm(int signal) {
  printf("\nToo late!\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<handleAlarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handleAlarm>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\0AToo late!\0A\00"
@EXIT_FAILURE = global i32 0
define void @handleAlarm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_FAILURE
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [11 x i8] c"\0AToo late!\00"
define void @handleAlarm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}