xunge/DecIR huggingface dataset:
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
void assign_text(char **dest, const char *src) {
  if (src == NULL)
    *dest = NULL;
  else {
    *dest = malloc(strlen(src) + 1);
    strcpy(*dest, src);
  }
}


x86 assembly (clang, -O0):
<assign_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <assign_text+0x2b>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
jmp    118a <assign_text+0x5a>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assign_text>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rsi,%rsi
je     1165 <assign_text+0x35>
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,(%r14)
mov    %rax,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>
movq   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @assign_text(i8** nocapture writeonly %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %5
4: ; preds = %2
store i8* null, i8** %0
br label %10
5: ; preds = %2
%6 = tail call i64 @strlen(i8* %1)
%7 = add nsw i64 %6, 1
%8 = tail call i8* @malloc(i64 %7)
store i8* %8, i8** %0
%9 = tail call i32 @strcpy(i8* %8, i8* %1)
br label %10
10: ; preds = %5, %4
ret void
}
/* Variables and functions */
unsigned long readTCR();
int /*<<< orphan*/ writeTCR(unsigned long);
void IACK(unsigned long ipl) {
  unsigned long tcr;
  char dummy;
  tcr = readTCR();
  writeTCR(ipl);
  dummy = *((char *)0xbfffffc1);
  writeTCR(tcr);
}


x86 assembly (clang, -O0):
<IACK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <readTCR@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <writeTCR@plt>
mov    $0xbfffffc1,%eax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <writeTCR@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IACK>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <readTCR@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <writeTCR@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <writeTCR@plt>

LLVM IR (-O0):
define void @IACK(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %2
%5 = call i64 (...) @readTCR()
store i64 %5, i64* %3
%6 = load i64, i64* %2
%7 = call i32 @writeTCR(i64 %6)
%8 = load i8, i8* inttoptr (i64 3221225409 to i8*)
store i8 %8, i8* %4
%9 = load i64, i64* %3
%10 = call i32 @writeTCR(i64 %9)
ret void
}

LLVM IR (-O2):
define void @IACK(i64 %0) {
%2 = tail call i64 (...) @readTCR()
%3 = tail call i32 @writeTCR(i64 %0)
%4 = tail call i32 @writeTCR(i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int k = 2;
  int a = 1;
  k = k++ + k++;
  printf("k = %d\n", k);
  if (a-- && a)
    printf("a = %d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1184 <main+0x74>
cmpl   $0x0,-0xc(%rbp)
je     1184 <main+0x74>
mov    -0xc(%rbp),%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"k = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
__attribute__((always_)) void paravirt_free_ldt(struct desc_struct *ldt,
                                                unsigned entries) {}


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

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

LLVM IR (-O0):
%struct.desc_struct = type opaque
define void @paravirt_free_ldt(%struct.desc_struct* %0, i32 %1) {
%3 = alloca %struct.desc_struct*
%4 = alloca i32
store %struct.desc_struct* %0, %struct.desc_struct** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.desc_struct = type opaque
define void @paravirt_free_ldt(%struct.desc_struct* nocapture %0, i32 %1) {
ret void
}
void Quaternion_Scalar(float *r, float *q, float scalar) {
  r[0] = q[0] * scalar;
  r[1] = q[1] * scalar;
  r[2] = q[2] * scalar;
  r[3] = q[3] * scalar;
}


x86 assembly (clang, -O0):
<Quaternion_Scalar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
mulss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Quaternion_Scalar>:
movss  (%rsi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rsi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
movss  0x8(%rsi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x8(%rdi)
mulss  0xc(%rsi),%xmm0
movss  %xmm0,0xc(%rdi)
ret

LLVM IR (-O0):
define void @Quaternion_Scalar(float* %0, float* %1, float %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store float %2, float* %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float, float* %6
%11 = fmul float %9, %10
%12 = load float*, float** %4
%13 = getelementptr inbounds float, float* %12, i64 0
store float %11, float* %13
%14 = load float*, float** %5
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float, float* %6
%18 = fmul float %16, %17
%19 = load float*, float** %4
%20 = getelementptr inbounds float, float* %19, i64 1
store float %18, float* %20
%21 = load float*, float** %5
%22 = getelementptr inbounds float, float* %21, i64 2
%23 = load float, float* %22
%24 = load float, float* %6
%25 = fmul float %23, %24
%26 = load float*, float** %4
%27 = getelementptr inbounds float, float* %26, i64 2
store float %25, float* %27
%28 = load float*, float** %5
%29 = getelementptr inbounds float, float* %28, i64 3
%30 = load float, float* %29
%31 = load float, float* %6
%32 = fmul float %30, %31
%33 = load float*, float** %4
%34 = getelementptr inbounds float, float* %33, i64 3
store float %32, float* %34
ret void
}

LLVM IR (-O2):
define void @Quaternion_Scalar(float* nocapture writeonly %0, float* nocapture %1, float %2) {
%4 = load float, float* %1
%5 = fmul float %4, %2
store float %5, float* %0
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = fmul float %7, %2
%9 = getelementptr inbounds float, float* %0, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %1, i64 2
%11 = load float, float* %10
%12 = fmul float %11, %2
%13 = getelementptr inbounds float, float* %0, i64 2
store float %12, float* %13
%14 = getelementptr inbounds float, float* %1, i64 3
%15 = load float, float* %14
%16 = fmul float %15, %2
%17 = getelementptr inbounds float, float* %0, i64 3
store float %16, float* %17
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strlen(char const *);
int set_tun_device(const char *name) {
  if (!strlen(name)) {
    fprintf(stderr, "tunnel device name expected");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<set_tun_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jne    115f <set_tun_device+0x3f>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xeb2(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1166 <set_tun_device+0x46>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_tun_device>:
push   %rax
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
je     1133 <set_tun_device+0x13>
pop    %rcx
ret
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"tunnel device name expected\00"
define i32 @set_tun_device(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strlen(i8* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %11
10: ; preds = %1
store i32 1, i32* %2
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"tunnel device name expected\00"
define i32 @set_tun_device(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ 0, %4 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int f_p(int (*func)(int *a1, int *a2), int *ar1, int *ar2) {
  int rez = 0;
  printf("\n-----------\n");
  printf("in f_p:\n");
  rez = func(ar1, ar2);
  printf("rez = %d;\n", rez);
  return rez;
}


x86 assembly (clang, -O0):
<f_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   *%rax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_p>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   *%r15
mov    %eax,%ebx
lea    0xea8(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [14 x i8] c"\0A-----------\0A\00"
@.str.1 = [9 x i8] c"in f_p:\0A\00"
@.str.2 = [11 x i8] c"rez = %d;\0A\00"
define i32 @f_p(i32 (i32*, i32*)* %0, i32* %1, i32* %2) {
%4 = alloca i32 (i32*, i32*)*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i32 (i32*, i32*)* %0, i32 (i32*, i32*)** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
store i32 0, i32* %7
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32 (i32*, i32*)*, i32 (i32*, i32*)** %4
%11 = load i32*, i32** %5
%12 = load i32*, i32** %6
%13 = call i32 %10(i32* %11, i32* %12)
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
@.str.2 = [11 x i8] c"rez = %d;\0A\00"
@str = [13 x i8] c"\0A-----------\00"
@str.3 = [8 x i8] c"in f_p:\00"
define i32 @f_p(i32 (i32*, i32*)* nocapture %0, i32* %1, i32* %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.3, i64 0, i64 0))
%6 = tail call i32 %0(i32* %1, i32* %2)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 %6
}
/* Variables and functions */
int f(int);
main() { return f(2); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x2,%edi
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 2)
ret i32 %1
}
int func(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<func>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @func(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @func(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
void ptrace_sandbox_permit_open(struct pt_sandbox *p_sandbox, int writeable) {
  (void)p_sandbox;
  (void)writeable;
}


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

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

LLVM IR (-O0):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_open(%struct.pt_sandbox* %0, i32 %1) {
%3 = alloca %struct.pt_sandbox*
%4 = alloca i32
store %struct.pt_sandbox* %0, %struct.pt_sandbox** %3
store i32 %1, i32* %4
%5 = load %struct.pt_sandbox*, %struct.pt_sandbox** %3
%6 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_open(%struct.pt_sandbox* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ieee754_lgamma_r(double, int *, double *);
void __ieee754_gamma_r(double x, int *signgamp, double *result) {
  __ieee754_lgamma_r(x, signgamp, result);
}


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

x86 assembly (clang, -O2):
<__ieee754_gamma_r>:
jmp    1030 <__ieee754_lgamma_r@plt>

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

LLVM IR (-O2):
define void @__ieee754_gamma_r(double %0, i32* %1, double* %2) {
%4 = tail call i32 @__ieee754_lgamma_r(double %0, i32* %1, double* %2)
ret void
}
/* Variables and functions */
int tikernelunzip2(int, char **, char **);
int tikernelunzip(int argc, char *argv[], char *arge[]) {
  return tikernelunzip2(argc, argv, arge);
}


x86 assembly (clang, -O0):
<tikernelunzip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <tikernelunzip2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tikernelunzip>:
jmp    1030 <tikernelunzip2@plt>

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

LLVM IR (-O2):
define i32 @tikernelunzip(i32 %0, i8** %1, i8** %2) {
%4 = tail call i32 @tikernelunzip2(i32 %0, i8** %1, i8** %2)
ret i32 %4
}
void pyi_parent_to_background() {}


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

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

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

LLVM IR (-O2):
define void @pyi_parent_to_background() {
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ system(char *);
scalar_t__ time(int /*<<< orphan*/ *);
main() {
  int tid;
  time_t t1, t2;
#pragma omp parallel private(tid, t1, t2)
  {
    tid = 0;
    if (tid < 1 / 2)
      system("sleep 3");
    t1 = time(NULL);
#pragma omp barrier
    t2 = time(NULL) - t1;
    printf("Tiempo= %d seg.\n", (int)t2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    115c <main+0x2c>
lea    0xea9(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,%esi
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   1040 <time@plt>
sub    %ebx,%eax
lea    0xec5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"sleep 3\00"
@.str.1 = [17 x i8] c"Tiempo= %d seg.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
store i32 0, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
%10 = call i64 @time(i32* null)
store i64 %10, i64* %3
%11 = call i64 @time(i32* null)
%12 = load i64, i64* %3
%13 = sub nsw i64 %11, %12
store i64 %13, i64* %4
%14 = load i64, i64* %4
%15 = trunc i64 %14 to i32
%16 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"Tiempo= %d seg.\0A\00"
define i32 @main() {
%1 = tail call i64 @time(i32* null)
%2 = tail call i64 @time(i32* null)
%3 = sub nsw i64 %2, %1
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int write(int, char *, int);
void __attribute__((optimize("0"))) instruction_count_start(void) {
  int size;
  size = write(197, "start", sizeof("start"));
  if (size != sizeof("start"))
    exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<instruction_count_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc5,%edi
lea    0xecc(%rip),%rsi
mov    $0x6,%edx
call   1030 <write@plt>
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
cmp    $0x6,%rax
je     115d <instruction_count_start+0x3d>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<instruction_count_start>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0xc5,%edi
mov    $0x6,%edx
call   1030 <write@plt>
cmp    $0x6,%eax
jne    113e <instruction_count_start+0x1e>
pop    %rax
ret
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"start\00"
@EXIT_FAILURE = global i32 0
define void @instruction_count_start() {
%1 = alloca i32
%2 = call i32 @write(i32 197, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 6)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = icmp ne i64 %4, 6
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"start\00"
@EXIT_FAILURE = global i32 0
define void @instruction_count_start() {
%1 = tail call i32 @write(i32 197, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 6)
%2 = icmp eq i32 %1, 6
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
6: ; preds = %0
ret void
}
void RTUtf16ToUpper(void) {}


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

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

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

LLVM IR (-O2):
define void @RTUtf16ToUpper() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ window;
};
struct TYPE_4__ {
  TYPE_1__ xbutton;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xbutton_window(void *_p) {
  return (unsigned long)((XEvent *)_p)->xbutton.window;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XEvent_xbutton_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
addglb(sname, id, typ, value) char *sname, id, typ;
int value;
{ printf("%s %c %c %d\n", sname, id, typ, value); }


x86 assembly (clang, -O0):
<addglb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edx,%eax
mov    %sil,%dl
mov    %rdi,-0x10(%rbp)
mov    %dl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
movsbl -0x11(%rbp),%edx
movsbl -0x12(%rbp),%ecx
mov    -0x18(%rbp),%r8d
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addglb>:
mov    %ecx,%r8d
mov    %rdi,%r9
movsbl %sil,%eax
movsbl %dl,%ecx
lea    0xedc(%rip),%rdi
mov    %r9,%rsi
mov    %eax,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%s %c %c %d\0A\00"
define i32 @addglb(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i8
%9 = alloca i32
%10 = trunc i32 %1 to i8
%11 = trunc i32 %2 to i8
store i8* %0, i8** %6
store i8 %10, i8* %7
store i8 %11, i8* %8
store i32 %3, i32* %9
%12 = load i8*, i8** %6
%13 = load i8, i8* %7
%14 = sext i8 %13 to i32
%15 = load i8, i8* %8
%16 = sext i8 %15 to i32
%17 = load i32, i32* %9
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %12, i32 %14, i32 %16, i32 %17)
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s %c %c %d\0A\00"
define i32 @addglb(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %1, 24
%6 = ashr exact i32 %5, 24
%7 = shl i32 %2, 24
%8 = ashr exact i32 %7, 24
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %6, i32 %8, i32 %3)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ tracet(int, char *);
extern void strinitcom(void) { tracet(3, "strinitcom:\n"); }


x86 assembly (clang, -O0):
<strinitcom>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
lea    0xee0(%rip),%rsi
call   1030 <tracet@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strinitcom>:
lea    0xee9(%rip),%rsi
mov    $0x3,%edi
jmp    1030 <tracet@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"strinitcom:\0A\00"
define void @strinitcom() {
%1 = tail call i32 @tracet(i32 3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
void RTFsTypeName(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFsTypeName() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long subwindow;
};
struct TYPE_4__ {
  TYPE_1__ xmotion;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xmotion_subwindow(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xmotion.subwindow = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xmotion_subwindow(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
struct resman {
  int dummy;
};

/* Variables and functions */
int find_resource(struct resman *, char const *);
int resman_find(struct resman *rman, const char *fname) {
  return find_resource(rman, fname);
}


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

x86 assembly (clang, -O2):
<resman_find>:
jmp    1030 <find_resource@plt>

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

LLVM IR (-O2):
%struct.resman = type { i32 }
define i32 @resman_find(%struct.resman* %0, i8* %1) {
%3 = tail call i32 @find_resource(%struct.resman* %0, i8* %1)
ret i32 %3
}
extern void deleteFromSet(unsigned int *set, int value) {
  *set = *set ^ (1 << value);
}


x86 assembly (clang, -O0):
<deleteFromSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x10(%rbp),%ecx
xor    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<deleteFromSet>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @deleteFromSet(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = shl nuw i32 1, %1
%5 = xor i32 %3, %4
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ds_set_boolean(int /*<<< orphan*/, int, int);
void snmp_set_save_descriptions(int save) { ds_set_boolean(0, 1, save); }


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

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

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

LLVM IR (-O2):
define void @snmp_set_save_descriptions(i32 %0) {
%2 = tail call i32 @ds_set_boolean(i32 0, i32 1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
const char *next_token(const char *text) {
  assert(text);
  while (*text) {
    if (*text == '{' || *text == '}' || *text == '|' || !*text)
      break;
    text++;
  }
  return text;
}


x86 assembly (clang, -O0):
<next_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1185 <next_token+0x75>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7b,%eax
je     116f <next_token+0x5f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7d,%eax
je     116f <next_token+0x5f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7c,%eax
je     116f <next_token+0x5f>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1174 <next_token+0x64>
jmp    1185 <next_token+0x75>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1125 <next_token+0x15>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_token>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
nopl   0x0(%rax)
movzbl (%rbx),%eax
lea    -0x7b(%rax),%ecx
cmp    $0x3,%cl
jb     1135 <next_token+0x25>
test   %al,%al
je     1135 <next_token+0x25>
add    $0x1,%rbx
jmp    1120 <next_token+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @next_token(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
br label %5
5: ; preds = %29, %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %32
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 123
br i1 %13, label %28, label %14
14: ; preds = %9
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 125
br i1 %18, label %28, label %19
19: ; preds = %14
%20 = load i8*, i8** %2
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 124
br i1 %23, label %28, label %24
24: ; preds = %19
%25 = load i8*, i8** %2
%26 = load i8, i8* %25
%27 = icmp ne i8 %26, 0
br i1 %27, label %29, label %28
28: ; preds = %24, %19, %14, %9
br label %32
29: ; preds = %24
%30 = load i8*, i8** %2
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %2
br label %5
32: ; preds = %28, %5
%33 = load i8*, i8** %2
ret i8* %33
}

LLVM IR (-O2):
define i8* @next_token(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %0, %1 ], [ %7, %6 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %8
i8 123, label %8
i8 125, label %8
i8 124, label %8
]
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
8: ; preds = %3, %3, %3, %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ rot13(char *);
scalar_t__ scanf(char *, char *);
void decryption(char dec[1000]) {
  while (scanf("%1000s", dec)) {
    rot13(dec);
  }
}


x86 assembly (clang, -O0):
<decryption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x0,%rax
je     1154 <decryption+0x34>
mov    -0x8(%rbp),%rdi
call   1030 <rot13@plt>
jmp    112c <decryption+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decryption>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
je     1168 <decryption+0x48>
lea    0xebe(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <rot13@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
jne    1150 <decryption+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%1000s\00"
define void @decryption(i8* %0) {
%2 = tail call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1, %4
%5 = tail call i32 @rot13(i8* %0)
%6 = tail call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ readlink(char *, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
ssize_t read_filename(int fd, char *buf, int bufsize) {
  char fdpath[1024] = {0};
  sprintf(fdpath, "/proc/self/fd/%d", fd);
  memset(buf, 0, bufsize);
  return readlink(fdpath, buf, bufsize);
}


x86 assembly (clang, -O0):
<read_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
lea    -0x420(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xe97(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
xor    %esi,%esi
call   1040 <memset@plt>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <readlink@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_filename>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %edi,%r14d
mov    %rsp,%r15
mov    $0x400,%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    0xea2(%rip),%rsi
mov    %r15,%rdi
mov    %r14d,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1040 <memset@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <readlink@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"/proc/self/fd/%d\00"
define i32 @read_filename(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [1024 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = bitcast [1024 x i8]* %7 to i8*
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%10 = load i32, i32* %4
%11 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @memset(i8* %12, i32 0, i32 %13)
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%16 = load i8*, i8** %5
%17 = load i32, i32* %6
%18 = call i32 @readlink(i8* %15, i8* %16, i32 %17)
ret i32 %18
}

LLVM IR (-O2):
@.str = [17 x i8] c"/proc/self/fd/%d\00"
define i32 @read_filename(i32 %0, i8* %1, i32 %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = tail call i32 @memset(i8* %1, i32 0, i32 %2)
%8 = call i32 @readlink(i8* %5, i8* %1, i32 %2)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ BroadcastOgm();
void Batman_Broadcast() { BroadcastOgm(); }


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

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

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

LLVM IR (-O2):
define void @Batman_Broadcast() {
%1 = tail call i32 (...) @BroadcastOgm()
ret void
}
/* Variables and functions */
size_t strlen(const char *restrict str) {
  const char *s0 = str;
  while (*s0++)
    ;
  return (size_t)(s0 - str);
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     112d <strlen+0x2d>
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* noalias %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %4 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
void foo516() {}


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

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

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

LLVM IR (-O2):
define void @foo516() {
ret void
}
/* Variables and functions */
scalar_t__ is_prime(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 0; i < 20; i++) {
    if (is_prime(i))
      printf("%d is a prime\n", i);
    else
      printf("%d is not a prime\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    1188 <main+0x68>
mov    -0x8(%rbp),%edi
call   1040 <is_prime@plt>
cmp    $0x0,%rax
je     1166 <main+0x46>
mov    -0x8(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    1175 <main+0x55>
mov    -0x8(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    117a <main+0x5a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %ebx,%ebx
lea    0xee1(%rip),%r14
lea    0xecb(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1040 <is_prime@plt>
test   %rax,%rax
mov    %r15,%rdi
cmove  %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x14,%ebx
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"%d is a prime\0A\00"
@.str.1 = [19 x i8] c"%d is not a prime\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %7, %1 ]
%3 = tail call i64 @is_prime(i32 %2)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @printf(i8* %5, i32 %2)
%7 = add nuw nsw i32 %2, 1
%8 = icmp eq i32 %7, 20
br i1 %8, label %9, label %1
9: ; preds = %1
ret i32 0
}
/* Type definitions */
struct mtp2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mtp2_setstate(struct mtp2 *, int /*<<< orphan*/);
void t1_expiry(void *data) {
  struct mtp2 *link = data;
  mtp2_setstate(link, 0);
  return;
}


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

x86 assembly (clang, -O2):
<t1_expiry>:
xor    %esi,%esi
jmp    1030 <mtp2_setstate@plt>

LLVM IR (-O0):
%struct.mtp2 = type { i32 }
define void @t1_expiry(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.mtp2*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.mtp2*
store %struct.mtp2* %5, %struct.mtp2** %3
%6 = load %struct.mtp2*, %struct.mtp2** %3
%7 = call i32 @mtp2_setstate(%struct.mtp2* %6, i32 0)
ret void
}

LLVM IR (-O2):
%struct.mtp2 = type { i32 }
define void @t1_expiry(i8* %0) {
%2 = bitcast i8* %0 to %struct.mtp2*
%3 = tail call i32 @mtp2_setstate(%struct.mtp2* %2, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, int, char const *);
int /*<<< orphan*/ stderr;
void fatal_error(const char *expression, const char *file, int line,
                 const char *function) {
  fprintf(stderr,
          "Fatal assertion failure in function %s at %s:%d\nFailed test: %s\n",
          function, file, line, expression);
  exit(2);
}


x86 assembly (clang, -O0):
<fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    -0x8(%rbp),%r9
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal_error>:
push   %rax
mov    %edx,%r8d
mov    %rsi,%rax
mov    %rdi,%r9
mov    0x2eaf(%rip),%rdx
mov    (%rdx),%edi
lea    0xec6(%rip),%rsi
mov    %rcx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [65 x i8] c"Fatal assertion failure in function %s at %s:%d\0AFailed test: %s\0A\00"
define void @fatal_error(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %8
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %5
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i32 %12, i8* %13)
%15 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [65 x i8] c"Fatal assertion failure in function %s at %s:%d\0AFailed test: %s\0A\00"
define void @fatal_error(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %1, i32 %2, i8* %0)
%7 = tail call i32 @exit(i32 2)
unreachable
}