xunge/DecIR huggingface dataset:
int main() {
  int temp[257] __attribute__((aligned(256))) = {0};
#pragma omp parallel private(temp) num_threads(2)
  {
    int *p = &temp[0];
    asm volatile("" : "+g"(p));
    if (((long unsigned int)p) & 255)
      __builtin_abort();
  }
#pragma omp parallel num_threads(2)
#pragma omp single
#pragma omp task firstprivate(temp)
  {
    int *p = &temp[0];
    asm volatile("" : "+g"(p));
    if (((long unsigned int)p) & 255)
      __builtin_abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
and    $0xffffffffffffff00,%rsp
sub    $0x600,%rsp
movl   $0x0,0x5ec(%rsp)
lea    0x100(%rsp),%rdi
xor    %esi,%esi
mov    $0x404,%edx
call   1040 <memset@plt>
lea    0x100(%rsp),%rax
mov    %rax,0xf8(%rsp)
mov    0xf8(%rsp),%rax
mov    %rax,0xf8(%rsp)
mov    0xf8(%rsp),%rax
and    $0xff,%rax
cmp    $0x0,%rax
je     118e <main+0x6e>
call   1030 <abort@plt>
lea    0x100(%rsp),%rax
mov    %rax,0xf0(%rsp)
mov    0xf0(%rsp),%rax
mov    %rax,0xf0(%rsp)
mov    0xf0(%rsp),%rax
and    $0xff,%rax
cmp    $0x0,%rax
je     11cb <main+0xab>
call   1030 <abort@plt>
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
and    $0xffffffffffffff00,%rsp
sub    $0x600,%rsp
lea    0x100(%rsp),%rbx
mov    $0x404,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %rbx,0xf8(%rsp)
mov    %rbx,%rax
mov    %rax,0xf8(%rsp)
test   %al,%al
jne    117e <main+0x5e>
mov    %rbx,0xf8(%rsp)
mov    %rbx,0xf8(%rsp)
test   %bl,%bl
jne    117e <main+0x5e>
xor    %eax,%eax
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [257 x i32]
%3 = alloca i32*
%4 = alloca i32*
store i32 0, i32* %1
%5 = bitcast [257 x i32]* %2 to i8*
%6 = getelementptr inbounds [257 x i32], [257 x i32]* %2, i64 0, i64 0
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = load i32*, i32** %3
%9 = ptrtoint i32* %8 to i64
%10 = and i64 %9, 255
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %0
unreachable
13: ; preds = %0
%14 = getelementptr inbounds [257 x i32], [257 x i32]* %2, i64 0, i64 0
store i32* %14, i32** %4
%15 = load i32*, i32** %4
%16 = load i32*, i32** %4
%17 = ptrtoint i32* %16 to i64
%18 = and i64 %17, 255
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %13
unreachable
21: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [257 x i32]
%2 = alloca i32*
%3 = alloca i32*
%4 = bitcast [257 x i32]* %1 to i8*
%5 = bitcast i32** %2 to i8*
%6 = getelementptr inbounds [257 x i32], [257 x i32]* %1, i64 0, i64 0
store i32* %6, i32** %2
%7 = load i32*, i32** %2
%8 = ptrtoint i32* %7 to i64
%9 = and i64 %8, 255
%10 = icmp eq i64 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %0
unreachable
12: ; preds = %0
%13 = bitcast i32** %3 to i8*
store i32* %6, i32** %3
%14 = load i32*, i32** %3
%15 = ptrtoint i32* %14 to i64
%16 = and i64 %15, 255
%17 = icmp eq i64 %16, 0
br i1 %17, label %19, label %18
18: ; preds = %12
unreachable
19: ; preds = %12
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ liba_func();
void libb_func() { liba_func(); }


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

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

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

LLVM IR (-O2):
define void @libb_func() {
%1 = tail call i32 (...) @liba_func()
ret void
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
clock_t times(struct tms *tp) {
  errno = EINVAL;
  return (clock_t)-1;
}


x86 assembly (clang, -O0):
<times>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<times>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.tms = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @times(%struct.tms* %0) {
%2 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %2
%3 = load i32, i32* @EINVAL
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.tms = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @times(%struct.tms* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int sqrt(int);
int distance(int x1, int y1, int x2, int y2) {
  int x, y;
  x = x1 - x2;
  y = y1 - y2;
  return sqrt((x * x) + (y * y));
}


x86 assembly (clang, -O0):
<distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
imul   -0x14(%rbp),%edi
mov    -0x18(%rbp),%eax
imul   -0x18(%rbp),%eax
add    %eax,%edi
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance>:
sub    %edx,%edi
sub    %ecx,%esi
imul   %edi,%edi
imul   %esi,%esi
add    %esi,%edi
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define i32 @distance(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = load i32, i32* %7
%13 = sub nsw i32 %11, %12
store i32 %13, i32* %9
%14 = load i32, i32* %6
%15 = load i32, i32* %8
%16 = sub nsw i32 %14, %15
store i32 %16, i32* %10
%17 = load i32, i32* %9
%18 = load i32, i32* %9
%19 = mul nsw i32 %17, %18
%20 = load i32, i32* %10
%21 = load i32, i32* %10
%22 = mul nsw i32 %20, %21
%23 = add nsw i32 %19, %22
%24 = call i32 @sqrt(i32 %23)
ret i32 %24
}

LLVM IR (-O2):
define i32 @distance(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %0, %2
%6 = sub nsw i32 %1, %3
%7 = mul nsw i32 %5, %5
%8 = mul nsw i32 %6, %6
%9 = add nuw nsw i32 %8, %7
%10 = tail call i32 @sqrt(i32 %9)
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
void copy_image(FILE *in, FILE *out) {
  char buf[0x1000];
  int n;
  while ((n = fread(buf, 1, 0x1000, in)) > 0)
    fwrite(buf, 1, n, out);
}


x86 assembly (clang, -O0):
<copy_image>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1010(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x1000,%edx
call   1030 <fread@plt>
mov    %eax,-0x1014(%rbp)
cmp    $0x0,%eax
jle    117c <copy_image+0x5c>
lea    -0x1010(%rbp),%rdi
mov    -0x1014(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fwrite@plt>
jmp    1133 <copy_image+0x13>
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_image>:
push   %r15
push   %r14
push   %rbx
sub    $0x1000,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x1000,%edx
mov    %r15,%rcx
call   1030 <fread@plt>
test   %eax,%eax
jle    117b <copy_image+0x5b>
mov    %rsp,%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
mov    %r14,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1000,%edx
mov    %r15,%rcx
call   1030 <fread@plt>
test   %eax,%eax
jg     1150 <copy_image+0x30>
add    $0x1000,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @copy_image(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [4096 x i8]
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
br label %7
7: ; preds = %12, %2
%8 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 0
%9 = load i32*, i32** %3
%10 = call i32 @fread(i8* %8, i32 1, i32 4096, i32* %9)
store i32 %10, i32* %6
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = getelementptr inbounds [4096 x i8], [4096 x i8]* %5, i64 0, i64 0
%14 = load i32, i32* %6
%15 = load i32*, i32** %4
%16 = call i32 @fwrite(i8* %13, i32 1, i32 %14, i32* %15)
br label %7
17: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @copy_image(i32* nocapture %0, i32* nocapture %1) {
%3 = alloca [4096 x i8]
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%5 = call i32 @fread(i8* %4, i32 1, i32 4096, i32* %0)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ %5, %2 ]
%9 = call i32 @fwrite(i8* %4, i32 1, i32 %8, i32* %1)
%10 = call i32 @fread(i8* %4, i32 1, i32 4096, i32* %0)
%11 = icmp sgt i32 %10, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %2
ret void
}
int toggle(int value, const char **values) {
  if (!values[++value])
    value = 0;
  return value;
}


x86 assembly (clang, -O0):
<toggle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    112d <toggle+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toggle>:
movslq %edi,%rcx
lea    0x1(%rdi),%edx
xor    %eax,%eax
cmpq   $0x0,0x8(%rsi,%rcx,8)
cmovne %edx,%eax
ret

LLVM IR (-O0):
define i32 @toggle(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8*, i8** %5, i64 %8
%10 = load i8*, i8** %9
%11 = icmp ne i8* %10, null
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 0, i32* %3
br label %13
13: ; preds = %12, %2
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @toggle(i32 %0, i8** nocapture %1) {
%3 = add nsw i32 %0, 1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8*, i8** %1, i64 %4
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
%8 = select i1 %7, i32 0, i32 %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int printGetNeighborDeprecation(int argc, char *argv[]) {
  printf("\nInfo: getra neighbor replaced with:\n"
         "      - getra nlist   (display neighbor list)\n"
         "      - getra nparams (display neighbor assessment params)\n\n");
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [144 x i8] c"\0AInfo: getra neighbor replaced with:\0A - getra nlist (display neighbor list)\0A - getra nparams (display neighbor assessment params)\0A\0A\00"
define i32 @printGetNeighborDeprecation(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [143 x i8] c"\0AInfo: getra neighbor replaced with:\0A - getra nlist (display neighbor list)\0A - getra nparams (display neighbor assessment params)\0A\00"
define i32 @printGetNeighborDeprecation(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([143 x i8], [143 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ getegid();
int /*<<< orphan*/ geteuid();
int /*<<< orphan*/ setresgid(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int /*<<< orphan*/ setresuid(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv, char **envp) {
  gid_t gid;
  uid_t uid;
  gid = getegid();
  uid = geteuid();
  setresgid(gid, gid, gid);
  setresuid(uid, uid, uid);
  system("/bin/bash");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1070 <getegid@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1060 <geteuid@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1040 <setresgid@plt>
mov    -0x20(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1030 <setresuid@plt>
lea    0xe66(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1070 <getegid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <geteuid@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %ebx,%esi
mov    %ebx,%edx
call   1040 <setresgid@plt>
mov    %ebp,%edi
mov    %ebp,%esi
mov    %ebp,%edx
call   1030 <setresuid@plt>
lea    0xe7e(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/bin/bash\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%9 = call i32 (...) @getegid()
store i32 %9, i32* %7
%10 = call i32 (...) @geteuid()
store i32 %10, i32* %8
%11 = load i32, i32* %7
%12 = load i32, i32* %7
%13 = load i32, i32* %7
%14 = call i32 @setresgid(i32 %11, i32 %12, i32 %13)
%15 = load i32, i32* %8
%16 = load i32, i32* %8
%17 = load i32, i32* %8
%18 = call i32 @setresuid(i32 %15, i32 %16, i32 %17)
%19 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"/bin/bash\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @getegid()
%5 = tail call i32 (...) @geteuid()
%6 = tail call i32 @setresgid(i32 %4, i32 %4, i32 %4)
%7 = tail call i32 @setresuid(i32 %5, i32 %5, i32 %5)
%8 = tail call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_src(char *);
void logascii_handler(void) { write_src("vid_writef(\"%%c\", POP());\n"); }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"vid_writef(\22%%c\22, POP());\0A\00"
define void @logascii_handler() {
%1 = call i32 @write_src(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"vid_writef(\22%%c\22, POP());\0A\00"
define void @logascii_handler() {
%1 = tail call i32 @write_src(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ fts_name;
};
typedef TYPE_1__ FTSENT;

/* Variables and functions */
int strcmp(int /*<<< orphan*/, int /*<<< orphan*/);
int rtems_shell_ls_revnamecmp(const FTSENT *a, const FTSENT *b) {
  return (strcmp(b->fts_name, a->fts_name));
}


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

x86 assembly (clang, -O2):
<rtems_shell_ls_revnamecmp>:
mov    (%rsi),%eax
mov    (%rdi),%esi
mov    %eax,%edi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32 }
define i32 @rtems_shell_ls_revnamecmp(%struct.TYPE_4__* %0, %struct.TYPE_4__* %1) {
%3 = alloca %struct.TYPE_4__*
%4 = alloca %struct.TYPE_4__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %3
store %struct.TYPE_4__* %1, %struct.TYPE_4__** %4
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @strcmp(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32 }
define i32 @rtems_shell_ls_revnamecmp(%struct.TYPE_4__* nocapture %0, %struct.TYPE_4__* nocapture %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @strcmp(i32 %4, i32 %6)
ret i32 %7
}
/* Variables and functions */
void otPlatDiagProcess(int argc, char *argv[], char *aOutput,
                       size_t aOutputMaxLen) {
  (void)argc;
}


x86 assembly (clang, -O0):
<otPlatDiagProcess>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @otPlatDiagProcess(i32 %0, i8** %1, i8* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca i64
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
ret void
}

LLVM IR (-O2):
define void @otPlatDiagProcess(i32 %0, i8** nocapture %1, i8* nocapture %2, i64 %3) {
ret void
}
/* Type definitions */
struct sockaddr_in6 {
  int /*<<< orphan*/ sin6_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};
struct sockaddr {
  scalar_t__ sa_family;
};

/* Variables and functions */
scalar_t__ AF_INET;
void *get_in_addr(struct sockaddr *sa) {
  return sa->sa_family == AF_INET
             ? (void *)&(((struct sockaddr_in *)sa)->sin_addr)
             : (void *)&(((struct sockaddr_in6 *)sa)->sin6_addr);
}


x86 assembly (clang, -O0):
<get_in_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2ed2(%rip),%rcx
cmp    (%rcx),%rax
jne    112c <get_in_addr+0x2c>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <get_in_addr+0x34>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr = type { i64 }
%struct.sockaddr_in = type { i32 }
%struct.sockaddr_in6 = type { i32 }
@AF_INET = global i64 0
define i8* @get_in_addr(%struct.sockaddr* %0) {
%2 = alloca %struct.sockaddr*
store %struct.sockaddr* %0, %struct.sockaddr** %2
%3 = load %struct.sockaddr*, %struct.sockaddr** %2
%4 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = load i64, i64* @AF_INET
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load %struct.sockaddr*, %struct.sockaddr** %2
%10 = bitcast %struct.sockaddr* %9 to %struct.sockaddr_in*
%11 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i32 0, i32 0
%12 = bitcast i32* %11 to i8*
br label %18
13: ; preds = %1
%14 = load %struct.sockaddr*, %struct.sockaddr** %2
%15 = bitcast %struct.sockaddr* %14 to %struct.sockaddr_in6*
%16 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %15, i32 0, i32 0
%17 = bitcast i32* %16 to i8*
br label %18
18: ; preds = %13, %8
%19 = phi i8* [ %12, %8 ], [ %17, %13 ]
ret i8* %19
}

LLVM IR (-O2):
%struct.sockaddr = type { i64 }
@AF_INET = global i64 0
define i8* @get_in_addr(%struct.sockaddr* readnone %0) {
%2 = bitcast %struct.sockaddr* %0 to i8*
ret i8* %2
}
int test_imm_82int8_reg(signed char val) {
  return ((val) & (0x82 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_82int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x82,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_82int8_reg(i8 signext %0) {
%2 = and i8 %0, -126
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ read_regs(unsigned long long *, unsigned long *);
int /*<<< orphan*/ write_regs(unsigned long long *, unsigned long *);
int main() {
  unsigned long long regs[16];
  unsigned long control_regs[6];
  read_regs(regs, control_regs);
  write_regs(regs, control_regs);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
call   1030 <read_regs@plt>
lea    -0x90(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
call   1040 <write_regs@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xb8,%rsp
lea    0x30(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <read_regs@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <write_regs@plt>
xor    %eax,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i64]
%3 = alloca [6 x i64]
store i32 0, i32* %1
%4 = getelementptr inbounds [16 x i64], [16 x i64]* %2, i64 0, i64 0
%5 = getelementptr inbounds [6 x i64], [6 x i64]* %3, i64 0, i64 0
%6 = call i32 @read_regs(i64* %4, i64* %5)
%7 = getelementptr inbounds [16 x i64], [16 x i64]* %2, i64 0, i64 0
%8 = getelementptr inbounds [6 x i64], [6 x i64]* %3, i64 0, i64 0
%9 = call i32 @write_regs(i64* %7, i64* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [16 x i64]
%2 = alloca [6 x i64]
%3 = bitcast [16 x i64]* %1 to i8*
%4 = bitcast [6 x i64]* %2 to i8*
%5 = getelementptr inbounds [16 x i64], [16 x i64]* %1, i64 0, i64 0
%6 = getelementptr inbounds [6 x i64], [6 x i64]* %2, i64 0, i64 0
%7 = call i32 @read_regs(i64* %5, i64* %6)
%8 = call i32 @write_regs(i64* %5, i64* %6)
ret i32 0
}
/* Variables and functions */
char *strchr(const char *s, int c) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @strchr(i8* nocapture readnone %0, i32 %1) {
ret i8* null
}
/* Type definitions */
typedef int uint64_t;
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
uint64_t timediff(struct timespec *tv1, struct timespec *tv2) {
  return ((((uint64_t)(tv2->tv_sec - tv1->tv_sec) * 1000000000) +
           (tv2->tv_nsec - tv1->tv_nsec)) /
          1000);
}


x86 assembly (clang, -O0):
<timediff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x8(%rbp),%rcx
sub    0x8(%rcx),%rax
imul   $0x3b9aca00,%eax,%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%ecx
mov    -0x8(%rbp),%rdx
sub    (%rdx),%ecx
add    %ecx,%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<timediff>:
mov    (%rsi),%eax
mov    0x8(%rsi),%ecx
sub    0x8(%rdi),%ecx
imul   $0x3b9aca00,%ecx,%ecx
sub    (%rdi),%eax
add    %ecx,%eax
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define i32 @timediff(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 1
%7 = load i64, i64* %6
%8 = load %struct.timespec*, %struct.timespec** %3
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 1
%10 = load i64, i64* %9
%11 = sub nsw i64 %7, %10
%12 = trunc i64 %11 to i32
%13 = mul nsw i32 %12, 1000000000
%14 = load %struct.timespec*, %struct.timespec** %4
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 0
%16 = load i32, i32* %15
%17 = load %struct.timespec*, %struct.timespec** %3
%18 = getelementptr inbounds %struct.timespec, %struct.timespec* %17, i32 0, i32 0
%19 = load i32, i32* %18
%20 = sub nsw i32 %16, %19
%21 = add nsw i32 %13, %20
%22 = sdiv i32 %21, 1000
ret i32 %22
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define i32 @timediff(%struct.timespec* nocapture %0, %struct.timespec* nocapture %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %8, 1000000000
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%13 = load i32, i32* %12
%14 = sub i32 %11, %13
%15 = add nsw i32 %14, %9
%16 = sdiv i32 %15, 1000
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void afficheint(int *tab, int tailletab) {
  int i;
  for (i = 0; i < tailletab; ++i) {
    printf("%d;", tab[i]);
  }
  printf("\n");
}


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

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

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

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

/* Variables and functions */
int BN_BLINDING_invert_ex(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx) {
  return BN_BLINDING_invert_ex(n, NULL, b, ctx);
}


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

x86 assembly (clang, -O2):
<BN_BLINDING_invert>:
mov    %rdx,%rcx
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <BN_BLINDING_invert_ex@plt>

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

LLVM IR (-O2):
define i32 @BN_BLINDING_invert(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @BN_BLINDING_invert_ex(i32* %0, i32* null, i32* %1, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void func(char *name) {
  char buf[100];
  strcpy(buf, name);
  printf("Welcome %s\n", buf);
}


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

x86 assembly (clang, -O2):
<func>:
push   %rbx
sub    $0x70,%rsp
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"Welcome %s\0A\00"
define void @func(i8* %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Type definitions */
struct wpa_ctrl {
  int dummy;
};

/* Variables and functions */
int wpa_ctrl_command(struct wpa_ctrl *, char *);
int wpa_cli_cmd_pmksa(struct wpa_ctrl *ctrl, int argc, char *argv[]) {
  return wpa_ctrl_command(ctrl, "PMKSA");
}


x86 assembly (clang, -O0):
<wpa_cli_cmd_pmksa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
call   1030 <wpa_ctrl_command@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_cli_cmd_pmksa>:
lea    0xee9(%rip),%rsi
jmp    1030 <wpa_ctrl_command@plt>

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

LLVM IR (-O2):
%struct.wpa_ctrl = type { i32 }
@.str = [6 x i8] c"PMKSA\00"
define i32 @wpa_cli_cmd_pmksa(%struct.wpa_ctrl* %0, i32 %1, i8** nocapture readnone %2) {
%4 = tail call i32 @wpa_ctrl_command(%struct.wpa_ctrl* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ kcm_is_eol(char const);
int /*<<< orphan*/ kcm_is_token_separator(char const);
const char *kcm_skip_non_spaces(const char *str) {
  while (!kcm_is_eol(*str) && !kcm_is_token_separator(*str)) {
    str++;
  }
  return str;
}


x86 assembly (clang, -O0):
<kcm_skip_non_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <kcm_is_eol@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    115f <kcm_skip_non_spaces+0x3f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <kcm_is_token_separator@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    116f <kcm_skip_non_spaces+0x4f>
jmp    1180 <kcm_skip_non_spaces+0x60>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <kcm_skip_non_spaces+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kcm_skip_non_spaces>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <kcm_is_eol@plt>
test   %eax,%eax
jne    114f <kcm_skip_non_spaces+0x2f>
movsbl (%rbx),%edi
call   1040 <kcm_is_token_separator@plt>
test   %eax,%eax
jne    114f <kcm_skip_non_spaces+0x2f>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1130 <kcm_skip_non_spaces+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @kcm_skip_non_spaces(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i32 @kcm_is_eol(i8 signext %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @kcm_is_token_separator(i8 signext %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br label %14
14: ; preds = %8, %3
%15 = phi i1 [ false, %3 ], [ %13, %8 ]
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %14
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @kcm_skip_non_spaces(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @kcm_is_eol(i8 signext %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %1, %10
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = tail call i32 @kcm_is_token_separator(i8 signext %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = tail call i32 @kcm_is_eol(i8 signext %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %5, label %15
15: ; preds = %5, %10, %1
%16 = phi i8* [ %0, %1 ], [ %11, %10 ], [ %6, %5 ]
ret i8* %16
}
int lspa_init() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @lspa_init() {
ret i32 1
}
int jac_chain_nm3_free(void *mem) {
  (void)mem;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @jac_chain_nm3_free(i8* nocapture readnone %0) {
ret i32 0
}
void Rtc_Init() {}


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

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

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

LLVM IR (-O2):
define void @Rtc_Init() {
ret void
}
void f(char *cp) {
#pragma acc parallel pcopy(cp [3:5])
  ;
}


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

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

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

LLVM IR (-O2):
define void @f(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ time(long *);
int sleep(unsigned secs) {
  long start;
  long check;
  long finish;
  time(&start);
  finish = start + (long)secs;
  for (;;) {
    time(&check);
    if (check > finish)
      break;
  }
  return (0);
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <time@plt>
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
lea    -0x18(%rbp),%rdi
call   1030 <time@plt>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jle    114e <sleep+0x3e>
jmp    1153 <sleep+0x43>
jmp    1132 <sleep+0x22>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
lea    0x10(%rsp),%rdi
call   1030 <time@plt>
mov    %ebx,%ebx
add    0x10(%rsp),%rbx
lea    0x8(%rsp),%r14
nop
mov    %r14,%rdi
call   1030 <time@plt>
cmp    %rbx,0x8(%rsp)
jle    1130 <sleep+0x20>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %2
%6 = call i32 @time(i64* %3)
%7 = load i64, i64* %3
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = add nsw i64 %7, %9
store i64 %10, i64* %5
br label %11
11: ; preds = %17, %1
%12 = call i32 @time(i64* %4)
%13 = load i64, i64* %4
%14 = load i64, i64* %5
%15 = icmp sgt i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %11
br label %18
17: ; preds = %11
br label %11
18: ; preds = %16
ret i32 0
}

LLVM IR (-O2):
define i32 @sleep(i32 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = call i32 @time(i64* %2)
%7 = load i64, i64* %2
%8 = zext i32 %0 to i64
%9 = add nsw i64 %7, %8
br label %10
10: ; preds = %10, %1
%11 = call i32 @time(i64* %3)
%12 = load i64, i64* %3
%13 = icmp sgt i64 %12, %9
br i1 %13, label %14, label %10
14: ; preds = %10
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RedefinicionTeclas();
void ConfigurarTeclado() { RedefinicionTeclas(); }


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

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

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

LLVM IR (-O2):
define void @ConfigurarTeclado() {
%1 = tail call i32 (...) @RedefinicionTeclas()
ret void
}
/* Variables and functions */
int S_IREAD;
int S_IWRITE;
int /*<<< orphan*/ close(int);
int creat(char *, int);
int /*<<< orphan*/ fdatasync(int);
int /*<<< orphan*/ fsync(int);
int /*<<< orphan*/ sync();
int main() {
  int fd;
  fd = creat("foobar", S_IREAD | S_IWRITE);
  sync();
  fsync(fd);
  fsync(-1);
  fdatasync(fd);
  fdatasync(-1);
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e72(%rip),%rax
mov    (%rax),%esi
mov    0x2e79(%rip),%rax
or     (%rax),%esi
lea    0xe88(%rip),%rdi
call   1070 <creat@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <sync@plt>
mov    -0x8(%rbp),%edi
call   1060 <fsync@plt>
mov    $0xffffffff,%edi
call   1060 <fsync@plt>
mov    -0x8(%rbp),%edi
call   1030 <fdatasync@plt>
mov    $0xffffffff,%edi
call   1030 <fdatasync@plt>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2e80(%rip),%rax
mov    0x2e89(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xe96(%rip),%rdi
call   1070 <creat@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <sync@plt>
mov    %ebx,%edi
call   1060 <fsync@plt>
mov    $0xffffffff,%edi
call   1060 <fsync@plt>
mov    %ebx,%edi
call   1030 <fdatasync@plt>
mov    $0xffffffff,%edi
call   1030 <fdatasync@plt>
mov    %ebx,%edi
call   1040 <close@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"foobar\00"
@S_IREAD = global i32 0
@S_IWRITE = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @S_IREAD
%4 = load i32, i32* @S_IWRITE
%5 = or i32 %3, %4
%6 = call i32 @creat(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5)
store i32 %6, i32* %2
%7 = call i32 (...) @sync()
%8 = load i32, i32* %2
%9 = call i32 @fsync(i32 %8)
%10 = call i32 @fsync(i32 -1)
%11 = load i32, i32* %2
%12 = call i32 @fdatasync(i32 %11)
%13 = call i32 @fdatasync(i32 -1)
%14 = load i32, i32* %2
%15 = call i32 @close(i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"foobar\00"
@S_IREAD = global i32 0
@S_IWRITE = global i32 0
define i32 @main() {
%1 = load i32, i32* @S_IREAD
%2 = load i32, i32* @S_IWRITE
%3 = or i32 %2, %1
%4 = tail call i32 @creat(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @sync()
%6 = tail call i32 @fsync(i32 %4)
%7 = tail call i32 @fsync(i32 -1)
%8 = tail call i32 @fdatasync(i32 %4)
%9 = tail call i32 @fdatasync(i32 -1)
%10 = tail call i32 @close(i32 %4)
ret i32 0
}
/* Variables and functions */
void **calloc_or_die(size_t, size_t);
void **malloc_or_die(size_t);
void *malloc_null(size_t n, size_t sz) {
  void **mem;
  size_t i;
  if (0 == NULL) {
    mem = calloc_or_die(n, sz);
  } else {
    mem = malloc_or_die(sz * n);
    for (i = 0; i < n; i++)
      mem[i] = NULL;
  }
  return mem;
}


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

x86 assembly (clang, -O2):
<malloc_null>:
jmp    1030 <calloc_or_die@plt>

LLVM IR (-O0):
define i8* @malloc_null(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8**
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = call i8** @calloc_or_die(i64 %7, i64 %8)
store i8** %9, i8*** %5
%10 = load i8**, i8*** %5
%11 = bitcast i8** %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @malloc_null(i64 %0, i64 %1) {
%3 = tail call i8** @calloc_or_die(i64 %0, i64 %1)
%4 = bitcast i8** %3 to i8*
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sem_t;

/* Variables and functions */
int /*<<< orphan*/ my_error_msg(char *, char *);
int sem_post(int /*<<< orphan*/ *);
void my_sem_post(sem_t *semi, char *errormsg) {
  if (sem_post(semi) == -1) {
    my_error_msg("sem_post", errormsg);
  }
}


x86 assembly (clang, -O0):
<my_sem_post>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <sem_post@plt>
cmp    $0xffffffff,%eax
jne    1152 <my_sem_post+0x32>
mov    -0x10(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <my_error_msg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_sem_post>:
push   %rbx
mov    %rsi,%rbx
call   1040 <sem_post@plt>
cmp    $0xffffffff,%eax
je     1130 <my_sem_post+0x10>
pop    %rbx
ret
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <my_error_msg@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"sem_post\00"
define void @my_sem_post(i32* %0, i8* %1) {
%3 = tail call i32 @sem_post(i32* %0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @my_error_msg(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr,
          "%s [-p port] [-l logfile] [-L mail_logfile]\n"
          "\t -p port    - specifies port to bind to\n"
          "\t -l logfile - logs PROXY transaction to specified file\n"
          "\t -L mail_logfile - logs SMTP transactions to specified file\n",
          progname);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [203 x i8] c"%s [-p port] [-l logfile] [-L mail_logfile]\0A\09 -p port - specifies port to bind to\0A\09 -l logfile - logs PROXY transaction to specified file\0A\09 -L mail_logfile - logs SMTP transactions to specified file\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([203 x i8], [203 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [203 x i8] c"%s [-p port] [-l logfile] [-L mail_logfile]\0A\09 -p port - specifies port to bind to\0A\09 -l logfile - logs PROXY transaction to specified file\0A\09 -L mail_logfile - logs SMTP transactions to specified file\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([203 x i8], [203 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}