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

/* Variables and functions */
int /*<<< orphan*/ interpret(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *stdout;
int main() {
  FILE *input = stdin;
  FILE *output = stdout;
  interpret(input, output);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    0x2ea4(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <interpret@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%rdi
mov    0x2eb6(%rip),%rax
mov    (%rax),%rsi
call   1030 <interpret@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdin = global i32* null
@stdout = global i32* null
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
store i32 0, i32* %1
%4 = load i32*, i32** @stdin
store i32* %4, i32** %2
%5 = load i32*, i32** @stdout
store i32* %5, i32** %3
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = call i32 @interpret(i32* %6, i32* %7)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32* null
@stdout = global i32* null
define i32 @main() {
%1 = load i32*, i32** @stdin
%2 = load i32*, i32** @stdout
%3 = tail call i32 @interpret(i32* %1, i32* %2)
ret i32 0
}
/* Type definitions */
struct utsname {
  int /*<<< orphan*/ nodename;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
char *strdup(int /*<<< orphan*/);
int uname(struct utsname *);
char *get_Hostname() {
  struct utsname uts;
  if (uname(&uts) == -1) {
    perror("uname");
    exit(1);
  }
  return strdup(uts.nodename);
}


x86 assembly (clang, -O0):
<get_Hostname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1030 <uname@plt>
cmp    $0xffffffff,%eax
jne    1170 <get_Hostname+0x30>
lea    0xe9f(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%edi
call   1060 <strdup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_Hostname>:
push   %rax
mov    %rsp,%rdi
call   1030 <uname@plt>
cmp    $0xffffffff,%eax
je     1157 <get_Hostname+0x17>
mov    (%rsp),%edi
pop    %rax
jmp    1060 <strdup@plt>
lea    0xea2(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.utsname = type { i32 }
@.str = [6 x i8] c"uname\00"
define i8* @get_Hostname() {
%1 = alloca %struct.utsname
%2 = call i32 @uname(%struct.utsname* %1)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
7: ; preds = %0
%8 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i8* @strdup(i32 %9)
ret i8* %10
}

LLVM IR (-O2):
%struct.utsname = type { i32 }
@.str = [6 x i8] c"uname\00"
define i8* @get_Hostname() {
%1 = alloca %struct.utsname
%2 = bitcast %struct.utsname* %1 to i8*
%3 = call i32 @uname(%struct.utsname* %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 0
%10 = load i32, i32* %9
%11 = tail call i8* @strdup(i32 %10)
ret i8* %11
}
float cps_hl(float a) { return (a <= 0.4781) ? a : 1.001 - 0.25 / a; }


x86 assembly (clang, -O0):
<cps_hl>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1137 <cps_hl+0x37>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    115d <cps_hl+0x5d>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec8(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0xeb4(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cps_hl>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    112a <cps_hl+0x2a>
movsd  0xeee(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xeea(%rip),%xmm1
movapd %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @cps_hl(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp ole double %4, 4.781000e-01
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %2
%8 = fpext float %7 to double
br label %14
9: ; preds = %1
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = fdiv double 2.500000e-01, %11
%13 = fsub double 1.001000e+00, %12
br label %14
14: ; preds = %9, %6
%15 = phi double [ %8, %6 ], [ %13, %9 ]
%16 = fptrunc double %15 to float
ret float %16
}

LLVM IR (-O2):
define float @cps_hl(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ugt double %2, 4.781000e-01
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = fdiv double 2.500000e-01, %2
%6 = fsub double 1.001000e+00, %5
br label %7
7: ; preds = %1, %4
%8 = phi double [ %6, %4 ], [ %2, %1 ]
%9 = fptrunc double %8 to float
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
main() {
  int d = 8;
  int *x = &d;
  int *y = x;
  printf("%d %d %d\n", *x, *y, d);
  *y = 12;
  printf("%d %d %d\n", *x, *y, d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x8,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x4(%rbp),%ecx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
movl   $0xc,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x4(%rbp),%ecx
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 8, i32 8, i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 12, i32 12, i32 12)
ret i32 0
}
void foo101() {}


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

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

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

LLVM IR (-O2):
define void @foo101() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  fprintf(stderr, "pcapout for this platform not built\n");
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"pcapout for this platform not built\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"pcapout for this platform not built\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
int batadv_v_mesh_init(struct batadv_priv *bat_priv) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.batadv_priv = type opaque
define i32 @batadv_v_mesh_init(%struct.batadv_priv* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void test_non_identifiers() {
  int i, x;
#pragma omp parallel
#pragma omp single;
  foo();
#pragma omp parallel
#pragma omp single linear(x);
  foo();
#pragma omp parallel
#pragma omp single private(x);
  foo();
#pragma omp parallel
#pragma omp single, private(x);
  foo();
}


x86 assembly (clang, -O0):
<test_non_identifiers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_non_identifiers>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @test_non_identifiers() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @foo()
%4 = call i32 (...) @foo()
%5 = call i32 (...) @foo()
%6 = call i32 (...) @foo()
ret void
}

LLVM IR (-O2):
define void @test_non_identifiers() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @foo()
%3 = tail call i32 (...) @foo()
%4 = tail call i32 (...) @foo()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ inb(scalar_t__);
int /*<<< orphan*/ outb(int /*<<< orphan*/, scalar_t__);
uint8_t readb_idx_reg(uint16_t port, uint8_t index) {
  outb(index, port - 1);
  return inb(port);
}


x86 assembly (clang, -O0):
<readb_idx_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
sub    $0x1,%rsi
call   1030 <outb@plt>
mov    -0x8(%rbp),%rdi
call   1040 <inb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readb_idx_reg>:
push   %rbx
mov    %esi,%eax
mov    %rdi,%rbx
lea    -0x1(%rdi),%rsi
mov    %eax,%edi
call   1030 <outb@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <inb@plt>

LLVM IR (-O0):
define i32 @readb_idx_reg(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i64, i64* %3
%7 = sub nsw i64 %6, 1
%8 = call i32 @outb(i32 %5, i64 %7)
%9 = load i64, i64* %3
%10 = call i32 @inb(i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @readb_idx_reg(i64 %0, i32 %1) {
%3 = add nsw i64 %0, -1
%4 = tail call i32 @outb(i32 %1, i64 %3)
%5 = tail call i32 @inb(i64 %0)
ret i32 %5
}
/* Variables and functions */
char tolower(char);
char *nvstrtolower(char *s) {
  char *start = s;
  if (s == NULL)
    return NULL;
  while (*s) {
    *s = tolower(*s);
    s++;
  }
  return start;
}


x86 assembly (clang, -O0):
<nvstrtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113c <nvstrtolower+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    117b <nvstrtolower+0x6b>
jmp    1141 <nvstrtolower+0x31>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1173 <nvstrtolower+0x63>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1141 <nvstrtolower+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvstrtolower>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rdi,%rdi
je     1146 <nvstrtolower+0x36>
mov    (%r14),%al
test   %al,%al
je     1146 <nvstrtolower+0x36>
lea    0x1(%r14),%rbx
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <nvstrtolower+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @nvstrtolower(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* null, i8** %2
br label %23
9: ; preds = %1
br label %10
10: ; preds = %14, %9
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
br i1 %13, label %14, label %21
14: ; preds = %10
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = call signext i8 @tolower(i8 signext %16)
%18 = load i8*, i8** %3
store i8 %17, i8* %18
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
br label %10
21: ; preds = %10
%22 = load i8*, i8** %4
store i8* %22, i8** %2
br label %23
23: ; preds = %21, %8
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
define i8* @nvstrtolower(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %11, %6 ], [ %4, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = tail call signext i8 @tolower(i8 signext %7)
store i8 %9, i8* %8
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret i8* %0
}
int mini_rand(int g) { return (g * 9 + 171) % 256; }


x86 assembly (clang, -O0):
<mini_rand>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x9,-0x4(%rbp),%eax
add    $0xab,%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mini_rand>:
lea    (%rdi,%rdi,8),%eax
add    $0xab,%eax
lea    (%rdi,%rdi,8),%ecx
add    $0x1aa,%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffff00,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @mini_rand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 9
%5 = add nsw i32 %4, 171
%6 = srem i32 %5, 256
ret i32 %6
}

LLVM IR (-O2):
define i32 @mini_rand(i32 %0) {
%2 = mul nsw i32 %0, 9
%3 = add nsw i32 %2, 171
%4 = srem i32 %3, 256
ret i32 %4
}
/* Type definitions */
struct array {
  int dummy;
};

/* Variables and functions */
int array_size(struct array const *);
int stack_size(const struct array *st) { return array_size(st); }


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

x86 assembly (clang, -O2):
<stack_size>:
jmp    1030 <array_size@plt>

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

LLVM IR (-O2):
%struct.array = type { i32 }
define i32 @stack_size(%struct.array* %0) {
%2 = tail call i32 @array_size(%struct.array* %0)
ret i32 %2
}
g() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @g() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *start(void *arg) {
  exit(0);
  return arg;
}


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<start>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i8* @start(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define noalias i8* @start(i8* nocapture readnone %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *const, char const *const);
FILE *open_file(const char *const file_name, const char *const mode) {
  FILE *stream;
  stream = fopen(file_name, mode);
  return stream;
}


x86 assembly (clang, -O0):
<open_file>:
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 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_file>:
jmp    1030 <fopen@plt>

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

LLVM IR (-O2):
define noalias i32* @open_file(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
ret i32* %3
}
/* Variables and functions */
char *strrchr(const char *p, int ch) {
  char *save;
  for (save = NULL;; ++p) {
    if (*p == (char)ch)
      save = (char *)p;
    if (!*p)
      return (save);
  }
}


x86 assembly (clang, -O0):
<strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0xc(%rbp),%ecx
movsbl %cl,%ecx
cmp    %ecx,%eax
jne    1130 <strrchr+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1143 <strrchr+0x43>
mov    -0x18(%rbp),%rax
pop    %rbp
ret
jmp    1148 <strrchr+0x48>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <strrchr+0x13>

x86 assembly (clang, -O2):
<strrchr>:
movsbl %sil,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movsbl (%rdi),%edx
cmp    %edx,%ecx
cmove  %rdi,%rax
add    $0x1,%rdi
test   %edx,%edx
jne    1110 <strrchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
br label %5
5: ; preds = %5, %2
%6 = phi i8* [ %0, %2 ], [ %13, %5 ]
%7 = phi i8* [ null, %2 ], [ %11, %5 ]
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %4, %9
%11 = select i1 %10, i8* %6, i8* %7
%12 = icmp eq i8 %8, 0
%13 = getelementptr inbounds i8, i8* %6, i64 1
br i1 %12, label %14, label %5
14: ; preds = %5
ret i8* %11
}
void rop3_44_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D | S;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_44_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_44_0_0>:
mov    (%rdi),%al
or     %sil,%al
and    %dl,%al
xor    %sil,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_44_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = load i8*, i8** %4
store i8 %29, i8* %30
ret void
}

LLVM IR (-O2):
define void @rop3_44_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %1
%6 = and i8 %5, %2
%7 = xor i8 %6, %1
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int print_version(void) {
  printf("gzsize(1) - version %s\n", "0.1.4");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"gzsize(1) - version %s\0A\00"
@.str.1 = [6 x i8] c"0.1.4\00"
define i32 @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"gzsize(1) - version %s\0A\00"
@.str.1 = [6 x i8] c"0.1.4\00"
define i32 @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct TCP_STREAM {
  int dummy;
};
struct TCPRECORD {
  int dummy;
};
struct NetFrame {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ stream_bittorrent_toserver(struct TCPRECORD *,
                                              struct TCP_STREAM *,
                                              struct NetFrame *,
                                              unsigned char const *,
                                              unsigned int);
void stream_bittorrent_fromserver(struct TCPRECORD *sess,
                                  struct TCP_STREAM *stream,
                                  struct NetFrame *frame,
                                  const unsigned char *px, unsigned length) {
  stream_bittorrent_toserver(sess, stream, frame, px, length);
}


x86 assembly (clang, -O0):
<stream_bittorrent_fromserver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <stream_bittorrent_toserver@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stream_bittorrent_fromserver>:
jmp    1030 <stream_bittorrent_toserver@plt>

LLVM IR (-O0):
%struct.TCPRECORD = type { i32 }
%struct.TCP_STREAM = type { i32 }
%struct.NetFrame = type { i32 }
define void @stream_bittorrent_fromserver(%struct.TCPRECORD* %0, %struct.TCP_STREAM* %1, %struct.NetFrame* %2, i8* %3, i32 %4) {
%6 = alloca %struct.TCPRECORD*
%7 = alloca %struct.TCP_STREAM*
%8 = alloca %struct.NetFrame*
%9 = alloca i8*
%10 = alloca i32
store %struct.TCPRECORD* %0, %struct.TCPRECORD** %6
store %struct.TCP_STREAM* %1, %struct.TCP_STREAM** %7
store %struct.NetFrame* %2, %struct.NetFrame** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load %struct.TCPRECORD*, %struct.TCPRECORD** %6
%12 = load %struct.TCP_STREAM*, %struct.TCP_STREAM** %7
%13 = load %struct.NetFrame*, %struct.NetFrame** %8
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i32 @stream_bittorrent_toserver(%struct.TCPRECORD* %11, %struct.TCP_STREAM* %12, %struct.NetFrame* %13, i8* %14, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.TCPRECORD = type { i32 }
%struct.TCP_STREAM = type { i32 }
%struct.NetFrame = type { i32 }
define void @stream_bittorrent_fromserver(%struct.TCPRECORD* %0, %struct.TCP_STREAM* %1, %struct.NetFrame* %2, i8* %3, i32 %4) {
%6 = tail call i32 @stream_bittorrent_toserver(%struct.TCPRECORD* %0, %struct.TCP_STREAM* %1, %struct.NetFrame* %2, i8* %3, i32 %4)
ret void
}
float Q_powf(float x, int y) {
  for (y--; y > 0; y--)
    x *= x;
  return x;
}


x86 assembly (clang, -O0):
<Q_powf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    113c <Q_powf+0x3c>
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <Q_powf+0x15>
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_powf>:
cmp    $0x2,%edi
jl     111c <Q_powf+0x1c>
add    $0x1,%edi
nopl   0x0(%rax,%rax,1)
mulss  %xmm0,%xmm0
add    $0xffffffff,%edi
cmp    $0x2,%edi
ja     1110 <Q_powf+0x10>
ret

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

LLVM IR (-O2):
define float @Q_powf(float %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi float [ %8, %4 ], [ %0, %2 ]
%7 = add nsw i32 %5, -1
%8 = fmul float %6, %6
%9 = icmp ugt i32 %5, 2
br i1 %9, label %4, label %10
10: ; preds = %4, %2
%11 = phi float [ %0, %2 ], [ %8, %4 ]
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ sleep(int);
void *PrintHello(void *threadid) {
  long tid;
  tid = (long)threadid;
  printf("Hello World! It's me, thread #%ld!\n", tid);
  sleep(1);
  printf("Thread #%ld exiting.\n", tid);
}


x86 assembly (clang, -O0):
<PrintHello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    -0x18(%rbp),%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintHello>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xee0(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Hello World! It's me, thread #%ld!\0A\00"
@.str.1 = [22 x i8] c"Thread #%ld exiting.\0A\00"
define i8* @PrintHello(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = call i32 @sleep(i32 1)
%10 = load i64, i64* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i64 %10)
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [36 x i8] c"Hello World! It's me, thread #%ld!\0A\00"
@.str.1 = [22 x i8] c"Thread #%ld exiting.\0A\00"
define noalias i8* @PrintHello(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i64 %2)
%4 = tail call i32 @sleep(i32 1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i64 %2)
ret i8* undef
}
int my_strcmp(const char *p1, const char *p2) {
  unsigned char *pc1 = (unsigned char *)p1;
  unsigned char *pc2 = (unsigned char *)p2;
  unsigned char c1, c2;
  do {
    c1 = *pc1++;
    c2 = *pc2++;
  } while (c1 == c2 && c1 != '\0');
  return (c1 - c2);
}


x86 assembly (clang, -O0):
<my_strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    %al,-0x21(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%al
mov    %al,-0x22(%rbp)
movzbl -0x21(%rbp),%ecx
movzbl -0x22(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x23(%rbp)
jne    1166 <my_strcmp+0x66>
movzbl -0x21(%rbp),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x23(%rbp)
mov    -0x23(%rbp),%al
test   $0x1,%al
jne    111c <my_strcmp+0x1c>
movzbl -0x21(%rbp),%eax
movzbl -0x22(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rcx,1),%eax
movzbl (%rsi,%rcx,1),%edx
test   %eax,%eax
je     1124 <my_strcmp+0x24>
add    $0x1,%rcx
cmp    %dl,%al
je     1110 <my_strcmp+0x10>
movzbl %dl,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @my_strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%9 = load i8*, i8** %3
store i8* %9, i8** %5
%10 = load i8*, i8** %4
store i8* %10, i8** %6
br label %11
11: ; preds = %28, %2
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %5
%14 = load i8, i8* %12
store i8 %14, i8* %7
%15 = load i8*, i8** %6
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %6
%17 = load i8, i8* %15
store i8 %17, i8* %8
br label %18
18: ; preds = %11
%19 = load i8, i8* %7
%20 = zext i8 %19 to i32
%21 = load i8, i8* %8
%22 = zext i8 %21 to i32
%23 = icmp eq i32 %20, %22
br i1 %23, label %24, label %28
24: ; preds = %18
%25 = load i8, i8* %7
%26 = zext i8 %25 to i32
%27 = icmp ne i32 %26, 0
br label %28
28: ; preds = %24, %18
%29 = phi i1 [ false, %18 ], [ %27, %24 ]
br i1 %29, label %11, label %30
30: ; preds = %28
%31 = load i8, i8* %7
%32 = zext i8 %31 to i32
%33 = load i8, i8* %8
%34 = zext i8 %33 to i32
%35 = sub nsw i32 %32, %34
ret i32 %35
}

LLVM IR (-O2):
define i32 @my_strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %8, %3 ]
%5 = phi i8* [ %0, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = load i8, i8* %4
%10 = icmp eq i8 %7, %9
%11 = icmp ne i8 %7, 0
%12 = and i1 %11, %10
br i1 %12, label %3, label %13
13: ; preds = %3
%14 = zext i8 %7 to i32
%15 = zext i8 %9 to i32
%16 = sub nsw i32 %14, %15
ret i32 %16
}
void ff_hevc_put_hevc_qpel_v8_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_v8_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int a = 10;
  int *ap;
  ap = &a;
  printf("%p\n", ap);
  printf("%d\n", *ap);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int clock_t;

/* Variables and functions */
__attribute__((weak)) clock_t _times(struct tms *buf) {
  do {
    (void)(buf);
  } while (0);
  return -1;
}


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

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

LLVM IR (-O0):
%struct.tms = type { i32 }
define weak i32 @_times(%struct.tms* %0) {
%2 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %2
br label %3
3: ; preds = %1
%4 = load %struct.tms*, %struct.tms** %2
br label %5
5: ; preds = %3
ret i32 -1
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define weak i32 @_times(%struct.tms* %0) {
ret i32 -1
}
int main() {
  int err = 0;
  err = __yarr__x64_sys_setpgid_test();
  if (err) {
    {
      printf("%s: "
             "Errors __yarr__x64_sys_setpgid_test()"
             "\n",
             __func__);
    };
  }
  return err;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__yarr__x64_sys_setpgid_test@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115f <main+0x3f>
lea    0xeaf(%rip),%rdi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__yarr__x64_sys_setpgid_test@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1143 <main+0x23>
lea    0xecb(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [43 x i8] c"%s: Errors __yarr__x64_sys_setpgid_test()\0A\00"
@__func__.main = [5 x i8] c"main\00"
define i32 @main() {
%1 = tail call i32 (...) @__yarr__x64_sys_setpgid_test()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 %1
}
void p1(char *b) { __builtin_memset(b, 0, 400); }


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

x86 assembly (clang, -O2):
<p1>:
mov    $0x190,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @p1(i8* nocapture writeonly %0) {
tail call void @llvm.memset.p0i8.i64(i8* align 1 dereferenceable(400) %0, i8 0, i64 400, i1 false)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: paste [-s] [-d delimiters] file ...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"usage: paste [-s] [-d delimiters] file ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"usage: paste [-s] [-d delimiters] file ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ passingAddressOfConstants(int const *, int *);
int main() {
  const int limit = 100;
  int result = 5;
  passingAddressOfConstants(&limit, &result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <passingAddressOfConstants@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x64,0x4(%rsp)
movl   $0x5,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <passingAddressOfConstants@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 100, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 5, i32* %2
%5 = call i32 @passingAddressOfConstants(i32* %1, i32* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int kgetpgidx(int /*<<< orphan*/);
int __getgpid(pid_t pid) { return kgetpgidx(pid); }


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

x86 assembly (clang, -O2):
<__getgpid>:
jmp    1030 <kgetpgidx@plt>

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

LLVM IR (-O2):
define i32 @__getgpid(i32 %0) {
%2 = tail call i32 @kgetpgidx(i32 %0)
ret i32 %2
}
int do_252() { return 252; }


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

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

LLVM IR (-O0):
define i32 @do_252() {
ret i32 252
}

LLVM IR (-O2):
define i32 @do_252() {
ret i32 252
}
unsigned xrop3_254_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T | S;
  stk1 = D | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_254_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_254_0_0>:
or     %esi,%edi
shl    $0x8,%edi
lea    0xff(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @xrop3_254_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
ret i32 %28
}

LLVM IR (-O2):
define i32 @xrop3_254_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = or i32 %5, 255
ret i32 %6
}
int s3c_set_halt(struct usb_ep *_ep, int value) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.usb_ep = type opaque
define i32 @s3c_set_halt(%struct.usb_ep* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Type definitions */
struct IRCAllUsers {
  int dummy;
};

/* Variables and functions */
int SendMsgToUser(struct IRCAllUsers *, char const *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
int SendConnectMsg(struct IRCAllUsers *allusers, const char *host,
                   const char *nick) {
  char buf[512 + 1];
  sprintf(buf, ":%s 001 %s :Welcome to the IRC\r\n", host, nick);
  return SendMsgToUser(allusers, nick, buf);
}


x86 assembly (clang, -O0):
<SendConnectMsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x220(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xeb3(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x220(%rbp),%rdx
call   1030 <SendMsgToUser@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SendConnectMsg>:
push   %r15
push   %r14
push   %rbx
sub    $0x210,%rsp
mov    %rdx,%rbx
mov    %rsi,%rdx
mov    %rdi,%r14
lea    0xec4(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rcx
call   1040 <sprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1030 <SendMsgToUser@plt>
add    $0x210,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.IRCAllUsers = type { i32 }
@.str = [33 x i8] c":%s 001 %s :Welcome to the IRC\0D\0A\00"
define i32 @SendConnectMsg(%struct.IRCAllUsers* %0, i8* %1, i8* %2) {
%4 = alloca %struct.IRCAllUsers*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [513 x i8]
store %struct.IRCAllUsers* %0, %struct.IRCAllUsers** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [513 x i8], [513 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
%12 = load %struct.IRCAllUsers*, %struct.IRCAllUsers** %4
%13 = load i8*, i8** %6
%14 = getelementptr inbounds [513 x i8], [513 x i8]* %7, i64 0, i64 0
%15 = call i32 @SendMsgToUser(%struct.IRCAllUsers* %12, i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.IRCAllUsers = type { i32 }
@.str = [33 x i8] c":%s 001 %s :Welcome to the IRC\0D\0A\00"
define i32 @SendConnectMsg(%struct.IRCAllUsers* %0, i8* %1, i8* %2) {
%4 = alloca [513 x i8]
%5 = getelementptr inbounds [513 x i8], [513 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
%7 = call i32 @SendMsgToUser(%struct.IRCAllUsers* %0, i8* %2, i8* %5)
ret i32 %7
}
/* Variables and functions */
long double acosh(double);
long double acoshl(long double x) { return acosh((double)x); }


x86 assembly (clang, -O0):
<acoshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <acosh@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acoshl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <acosh@plt>

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

LLVM IR (-O2):
define x86_fp80 @acoshl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @acosh(double %2)
ret x86_fp80 %3
}