xunge/DecIR huggingface dataset:
int XGetIconName() {}


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

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

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

LLVM IR (-O2):
define i32 @XGetIconName() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int chdir(char *);
int fork();
int setsid();
int daemonize() {
  int pid = fork();
  if (pid == -1)
    return -1;
  if (pid != 0)
    _exit(0);
  if (setsid() == -1)
    return -1;
  return chdir("/");
}


x86 assembly (clang, -O0):
<daemonize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <fork@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1168 <daemonize+0x28>
movl   $0xffffffff,-0x4(%rbp)
jmp    11a4 <daemonize+0x64>
cmpl   $0x0,-0x8(%rbp)
je     1179 <daemonize+0x39>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    $0x0,%al
call   1050 <setsid@plt>
cmp    $0xffffffff,%eax
jne    1195 <daemonize+0x55>
movl   $0xffffffff,-0x4(%rbp)
jmp    11a4 <daemonize+0x64>
lea    0xe64(%rip),%rdi
call   1040 <chdir@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<daemonize>:
push   %rax
xor    %eax,%eax
call   1060 <fork@plt>
cmp    $0xffffffff,%eax
je     116f <daemonize+0x2f>
test   %eax,%eax
jne    1171 <daemonize+0x31>
xor    %eax,%eax
call   1050 <setsid@plt>
cmp    $0xffffffff,%eax
je     116a <daemonize+0x2a>
lea    0xe9c(%rip),%rdi
pop    %rax
jmp    1040 <chdir@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i32 @daemonize() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @fork()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %18
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @_exit(i32 0)
unreachable
12: ; preds = %7
%13 = call i32 (...) @setsid()
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 -1, i32* %1
br label %18
16: ; preds = %12
%17 = call i32 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %17, i32* %1
br label %18
18: ; preds = %16, %15, %6
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i32 @daemonize() {
%1 = tail call i32 (...) @fork()
switch i32 %1, label %2 [
i32 -1, label %9
i32 0, label %4
]
2: ; preds = %0
%3 = tail call i32 @_exit(i32 0)
unreachable
4: ; preds = %0
%5 = tail call i32 (...) @setsid()
%6 = icmp eq i32 %5, -1
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %4, %0, %7
%10 = phi i32 [ %8, %7 ], [ %1, %0 ], [ -1, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_greeting() { printf("hi ...\n"); }


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"hi ...\00"
define void @show_greeting() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int pow(int, int);
int pega_pedaco(int ir, int a, int b) {
  int pedaco = 0;
  pedaco = ((pow(2, (a - b + 1))) - 1);
  pedaco = pedaco & ir >> b;
  return pedaco;
}


x86 assembly (clang, -O0):
<pega_pedaco>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
sub    -0xc(%rbp),%esi
add    $0x1,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x4(%rbp),%edx
mov    -0xc(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pega_pedaco>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %edi,%ebp
sub    %edx,%esi
add    $0x1,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
add    $0xffffffff,%eax
mov    %ebx,%ecx
sar    %cl,%ebp
and    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pega_pedaco(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = sub nsw i32 %8, %9
%11 = add nsw i32 %10, 1
%12 = call i32 @pow(i32 2, i32 %11)
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = load i32, i32* %4
%16 = load i32, i32* %6
%17 = ashr i32 %15, %16
%18 = and i32 %14, %17
store i32 %18, i32* %7
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @pega_pedaco(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %1, 1
%5 = sub i32 %4, %2
%6 = tail call i32 @pow(i32 2, i32 %5)
%7 = add nsw i32 %6, -1
%8 = ashr i32 %0, %2
%9 = and i32 %7, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int);
void main() { foo(1, 2); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <foo@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = call i32 @foo(i32 1, i32 2)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @foo(i32 1, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PrintUsage() {
  printf("usage: tga242arr -t tga -a arr -p pal [ -i ident ]\n");
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"usage: tga242arr -t tga -a arr -p pal [ -i ident ]\0A\00"
define void @PrintUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [51 x i8] c"usage: tga242arr -t tga -a arr -p pal [ -i ident ]\00"
define void @PrintUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
ret void
}
double casimir_F_scaled_to_SI(double F, double ScriptL) {
  return 3.161526510740123e-26 / ScriptL * F;
}


x86 assembly (clang, -O0):
<casimir_F_scaled_to_SI>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeea(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<casimir_F_scaled_to_SI>:
movsd  0xef8(%rip),%xmm2
divsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @casimir_F_scaled_to_SI(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fdiv double 0x3AA391A38365D6E6, %5
%7 = load double, double* %3
%8 = fmul double %6, %7
ret double %8
}

LLVM IR (-O2):
define double @casimir_F_scaled_to_SI(double %0, double %1) {
%3 = fdiv double 0x3AA391A38365D6E6, %1
%4 = fmul double %3, %0
ret double %4
}
int sum(int data) {
  int sums = 0;
  while (data) {
    sums = sums + (data % 10);
    data = data / 10;
  }
  while (sums > 9) {
    return sum(sums);
  }
  return sums;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1158 <sum+0x48>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
add    %edx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1122 <sum+0x12>
jmp    115d <sum+0x4d>
cmpl   $0x9,-0xc(%rbp)
jle    1177 <sum+0x67>
mov    -0xc(%rbp),%edi
call   1030 <sum@plt>
mov    %eax,-0x4(%rbp)
jmp    117d <sum+0x6d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
xor    %eax,%eax
test   %edi,%edi
je     1142 <sum+0x42>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,1),%edx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%esi
sub    %edx,%esi
add    %esi,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <sum+0x10>
mov    %eax,%edi
cmp    $0x9,%eax
jg     1100 <sum>
ret

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

LLVM IR (-O2):
define i32 @sum(i32 %0) {
br label %2
2: ; preds = %13, %1
%3 = phi i32 [ %0, %1 ], [ %9, %13 ]
%4 = icmp eq i32 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %9, %5 ], [ 0, %2 ]
%7 = phi i32 [ %10, %5 ], [ %3, %2 ]
%8 = srem i32 %7, 10
%9 = add nsw i32 %6, %8
%10 = sdiv i32 %7, 10
%11 = add i32 %7, 9
%12 = icmp ult i32 %11, 19
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = icmp sgt i32 %9, 9
br i1 %14, label %2, label %15
15: ; preds = %2, %13
%16 = phi i32 [ %9, %13 ], [ 0, %2 ]
ret i32 %16
}
main() {
  int a[3] = {1, 2, 3};
  int i = 2;
  printf("\n %d %d\n", a[i], i[a]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x4(%rbp)
movl   $0x2,-0x10(%rbp)
movslq -0x10(%rbp),%rax
mov    -0xc(%rbp,%rax,4),%esi
movslq -0x10(%rbp),%rax
mov    -0xc(%rbp,%rax,4),%edx
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"\0A %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 3, i32 3)
ret i32 0
}
void foo425(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo425(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ adj_xy(short *, short *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  short x = 1, y = 1;
  adj_xy(&x, &y);
  if (x != 1)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x1,-0x6(%rbp)
movw   $0x1,-0x8(%rbp)
lea    -0x6(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <adj_xy@plt>
movswl -0x6(%rbp),%eax
cmp    $0x1,%eax
je     116c <main+0x3c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x1,0x4(%rsp)
movw   $0x1,0x6(%rsp)
lea    0x4(%rsp),%rdi
lea    0x6(%rsp),%rsi
call   1040 <adj_xy@plt>
cmpw   $0x1,0x4(%rsp)
jne    115d <main+0x2d>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i16
store i32 0, i32* %1
store i16 1, i16* %2
store i16 1, i16* %3
%4 = call i32 @adj_xy(i16* %2, i16* %3)
%5 = load i16, i16* %2
%6 = sext i16 %5 to i32
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i16
%2 = alloca i16
%3 = bitcast i16* %1 to i8*
store i16 1, i16* %1
%4 = bitcast i16* %2 to i8*
store i16 1, i16* %2
%5 = call i32 @adj_xy(i16* %1, i16* %2)
%6 = load i16, i16* %1
%7 = icmp eq i16 %6, 1
br i1 %7, label %10, label %8
8: ; preds = %0
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
%11 = call i32 @exit(i32 0)
unreachable
}
int myMax(int a, int b, int c) {
  if (a > b && a > c)
    return a;
  return b > c ? b : c;
}


x86 assembly (clang, -O0):
<myMax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1130 <myMax+0x30>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1130 <myMax+0x30>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <myMax+0x53>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1147 <myMax+0x47>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114d <myMax+0x4d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myMax>:
cmp    %edx,%esi
mov    %edx,%ecx
cmovg  %esi,%ecx
cmp    %edx,%edi
mov    %ecx,%eax
cmovg  %edi,%eax
cmp    %esi,%edi
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @myMax(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = and i1 %4, %5
%7 = icmp sgt i32 %1, %2
%8 = select i1 %7, i32 %1, i32 %2
%9 = select i1 %6, i32 %0, i32 %8
ret i32 %9
}
float atan2f(float x, float y) { return 0.0; }


x86 assembly (clang, -O0):
<atan2f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan2f>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @atan2f(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @atan2f(float %0, float %1) {
ret float 0.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int, int);
void print_assembly_instruction_line(FILE *fp, int op, int l, int m) {
  fprintf(fp, "%d %d %d", op, l, m);
}


x86 assembly (clang, -O0):
<print_assembly_instruction_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_assembly_instruction_line>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
lea    0xee2(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
define void @print_assembly_instruction_line(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3)
ret void
}
int b() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @b() {
ret i32 0
}
int is_in_bound(int *arr, int size, int *ptr) {
  for (int i = 0; i < size; i++) {
    if (&arr[i] == ptr) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_in_bound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115a <is_in_bound+0x5a>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
cmp    -0x20(%rbp),%rax
jne    1147 <is_in_bound+0x47>
movl   $0x1,-0x4(%rbp)
jmp    1161 <is_in_bound+0x61>
jmp    114c <is_in_bound+0x4c>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1116 <is_in_bound+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_in_bound>:
movslq %esi,%r8
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,%rsi
cmp    %r8,%rax
jge    1128 <is_in_bound+0x28>
lea    0x1(%rsi),%rax
lea    0x4(%rdi),%rcx
cmp    %rdx,%rdi
mov    %rcx,%rdi
jne    1110 <is_in_bound+0x10>
xor    %eax,%eax
cmp    %r8,%rsi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @is_in_bound(i32* readnone %0, i32 %1, i32* readnone %2) {
%4 = sext i32 %1 to i64
br label %5
5: ; preds = %5, %3
%6 = phi i64 [ %12, %5 ], [ 0, %3 ]
%7 = icmp slt i64 %6, %4
%8 = xor i1 %7, true
%9 = getelementptr inbounds i32, i32* %0, i64 %6
%10 = icmp eq i32* %9, %2
%11 = select i1 %8, i1 true, i1 %10
%12 = add nuw i64 %6, 1
br i1 %11, label %13, label %5
13: ; preds = %5
%14 = zext i1 %7 to i32
ret i32 %14
}
void XtProcessEvent() {}


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

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

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

LLVM IR (-O2):
define void @XtProcessEvent() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void successp(char *mesg) { printf("\e[1;32m[s] %s\e[0m\n", mesg); }


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

x86 assembly (clang, -O2):
<successp>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"\1B[1;32m[s] %s\1B[0m\0A\00"
define void @successp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"\1B[1;32m[s] %s\1B[0m\0A\00"
define void @successp(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
char *hide_expose(char *buff) {
  int i;
  char *p;
  for (p = buff, i = 0; *p; p++, i++)
    *p = *p + 16 - (i %= 10);
  return buff;
}


x86 assembly (clang, -O0):
<hide_expose>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1166 <hide_expose+0x66>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
add    $0x10,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x1c(%rbp),%eax
mov    %edx,-0xc(%rbp)
sub    %edx,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <hide_expose+0x17>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hide_expose>:
mov    %rdi,%rax
mov    (%rdi),%dl
test   %dl,%dl
je     114d <hide_expose+0x4d>
lea    0x1(%rax),%rcx
xor    %esi,%esi
nop
movslq %esi,%r8
imul   $0x66666667,%r8,%rdi
mov    %rdi,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdi
add    %esi,%edi
add    %edi,%edi
lea    (%rdi,%rdi,4),%esi
mov    %r8d,%edi
sub    %esi,%edi
sub    %dil,%dl
add    $0x10,%dl
mov    %dl,-0x1(%rcx)
neg    %esi
add    %r8d,%esi
add    $0x1,%esi
movzbl (%rcx),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <hide_expose+0x10>
ret

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

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


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

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

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

LLVM IR (-O2):
define void @ARGBToUV444Row_SSSE3() {
ret void
}
/* Variables and functions */
scalar_t__ KIONIX_ACCEL_read_bytes(int, char *, int);
int /*<<< orphan*/ KIONIX_ACCEL_write_byte(int, char);
int KIONIX_ACCEL_position_mask_up(void) {
  char ctrl_reg2 = 0;
  int status = 0;
  if (KIONIX_ACCEL_read_bytes(0x1C, &ctrl_reg2, 1) == 0) {
    ctrl_reg2 |= 0x04;
    KIONIX_ACCEL_write_byte(0x1C, ctrl_reg2);
  } else
    status = 1;
  return status;
}


x86 assembly (clang, -O0):
<KIONIX_ACCEL_position_mask_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1c,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
cmp    $0x0,%rax
jne    116d <KIONIX_ACCEL_position_mask_up+0x4d>
movsbl -0x1(%rbp),%eax
or     $0x4,%eax
mov    %al,-0x1(%rbp)
mov    $0x1c,%edi
movsbl -0x1(%rbp),%esi
call   1040 <KIONIX_ACCEL_write_byte@plt>
jmp    1174 <KIONIX_ACCEL_position_mask_up+0x54>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KIONIX_ACCEL_position_mask_up>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%ebx
mov    $0x1c,%edi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
test   %rax,%rax
jne    1161 <KIONIX_ACCEL_position_mask_up+0x41>
movsbl 0xf(%rsp),%esi
or     $0x4,%esi
mov    %sil,0xf(%rsp)
mov    $0x1c,%edi
call   1040 <KIONIX_ACCEL_write_byte@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @KIONIX_ACCEL_position_mask_up() {
%1 = alloca i8
%2 = alloca i32
store i8 0, i8* %1
store i32 0, i32* %2
%3 = call i64 @KIONIX_ACCEL_read_bytes(i32 28, i8* %1, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = or i32 %7, 4
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = load i8, i8* %1
%11 = call i32 @KIONIX_ACCEL_write_byte(i32 28, i8 signext %10)
br label %13
12: ; preds = %0
store i32 1, i32* %2
br label %13
13: ; preds = %12, %5
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @KIONIX_ACCEL_position_mask_up() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i64 @KIONIX_ACCEL_read_bytes(i32 28, i8* %1, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i8, i8* %1
%6 = or i8 %5, 4
store i8 %6, i8* %1
%7 = call i32 @KIONIX_ACCEL_write_byte(i32 28, i8 signext %6)
br label %8
8: ; preds = %0, %4
%9 = phi i32 [ 0, %4 ], [ 1, %0 ]
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ pixmap_format;
};
typedef TYPE_1__ XEDataObject;

/* Variables and functions */
void *get_XEDataObject_pixmap_format(void *_p) {
  return (void *)((XEDataObject *)_p)->pixmap_format;
}


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

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

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

LLVM IR (-O2):
define i8* @get_XEDataObject_pixmap_format(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XClientMessageEvent;

/* Variables and functions */
void *get_XClientMessageEvent_display(void *_p) {
  return (void *)((XClientMessageEvent *)_p)->display;
}


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

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

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

LLVM IR (-O2):
define i8* @get_XClientMessageEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
int CHAR_MAX;
int _Locale_p_sign_posn(struct _Locale_monetary *lmon
                        __attribute__((__unused__))) {
  return CHAR_MAX;
}


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

x86 assembly (clang, -O2):
<_Locale_p_sign_posn>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_p_sign_posn(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
%3 = load i32, i32* @CHAR_MAX
ret i32 %3
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_p_sign_posn(%struct._Locale_monetary* nocapture readnone %0) {
%2 = load i32, i32* @CHAR_MAX
ret i32 %2
}
void XFlushGC() {}


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

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

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

LLVM IR (-O2):
define void @XFlushGC() {
ret void
}
double dotProduct3D(const double *vA, const double *vB) {
  return vA[0] * vB[0] + vA[1] * vB[1] + vA[2] * vB[2];
}


x86 assembly (clang, -O0):
<dotProduct3D>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dotProduct3D>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @dotProduct3D(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_menu(void) {
  printf(
      "\n==================================================================\n "
      "Program options: "
      "\n==================================================================\n "
      "1) Print matches where number of goals scored is 7 or more. \n 2) Print "
      "the round with the highest goal score. \n 3) Print teams with more away "
      "wins than home wins. \n 4) Print the team with the lowest spectator "
      "count in home games. \n 5) Find matches played on certain weekdays and "
      "time. \n 6) Print points table. \n\n 0) Exit program. \n");
}


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

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

LLVM IR (-O0):
@.str = [487 x i8] c"\0A==================================================================\0A Program options: \0A==================================================================\0A 1) Print matches where number of goals scored is 7 or more. \0A 2) Print the round with the highest goal score. \0A 3) Print teams with more away wins than home wins. \0A 4) Print the team with the lowest spectator count in home games. \0A 5) Find matches played on certain weekdays and time. \0A 6) Print points table. \0A\0A 0) Exit program. \0A\00"
define void @print_menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([487 x i8], [487 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [486 x i8] c"\0A==================================================================\0A Program options: \0A==================================================================\0A 1) Print matches where number of goals scored is 7 or more. \0A 2) Print the round with the highest goal score. \0A 3) Print teams with more away wins than home wins. \0A 4) Print the team with the lowest spectator count in home games. \0A 5) Find matches played on certain weekdays and time. \0A 6) Print points table. \0A\0A 0) Exit program. \00"
define void @print_menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([486 x i8], [486 x i8]* @str, i64 0, i64 0))
ret void
}
int Digital(int num) {
  int sum = 0;
  while (num > 0) {
    sum += num % 10;
    num /= 10;
  }
  return sum;
}


x86 assembly (clang, -O0):
<Digital>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    113c <Digital+0x3c>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <Digital+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Digital>:
xor    %eax,%eax
test   %edi,%edi
jle    112d <Digital+0x2d>
mov    $0xcccccccd,%r8d
nopl   0x0(%rax)
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%ecx
sub    %esi,%ecx
add    %ecx,%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <Digital+0x10>
ret

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

LLVM IR (-O2):
define i32 @Digital(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = urem i32 %5, 10
%7 = add nuw nsw i32 %4, %6
%8 = udiv i32 %5, 10
%9 = icmp ult i32 %5, 10
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Type definitions */
struct volshow_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int volshow_cmdline_parser_required(struct volshow_args_info *args_info,
                                    const char *prog_name) {
  (void)(args_info);
  (void)(prog_name);
  return EXIT_SUCCESS;
}


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

x86 assembly (clang, -O2):
<volshow_cmdline_parser_required>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.volshow_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @volshow_cmdline_parser_required(%struct.volshow_args_info* %0, i8* %1) {
%3 = alloca %struct.volshow_args_info*
%4 = alloca i8*
store %struct.volshow_args_info* %0, %struct.volshow_args_info** %3
store i8* %1, i8** %4
%5 = load %struct.volshow_args_info*, %struct.volshow_args_info** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
%struct.volshow_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @volshow_cmdline_parser_required(%struct.volshow_args_info* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
__attribute__((unused)) void tela_resumo(void) {}


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

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

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

LLVM IR (-O2):
define void @tela_resumo() {
ret void
}
void ComparatorConfigure(unsigned long ulBase, unsigned long ulComp,
                         unsigned long ulConfig) {
  ;
  ;
  (*((volatile unsigned long *)(ulBase + (ulComp * 0x20) + 0x00000024))) =
      ulConfig;
}


x86 assembly (clang, -O0):
<ComparatorConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
shl    $0x5,%rdx
add    %rdx,%rax
mov    %rcx,0x24(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComparatorConfigure>:
shl    $0x5,%rsi
mov    %rdx,0x24(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @ComparatorConfigure(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = mul i64 %9, 32
%11 = add i64 %8, %10
%12 = add i64 %11, 36
%13 = inttoptr i64 %12 to i64*
store volatile i64 %7, i64* %13
ret void
}

LLVM IR (-O2):
define void @ComparatorConfigure(i64 %0, i64 %1, i64 %2) {
%4 = shl i64 %1, 5
%5 = add i64 %0, 36
%6 = add i64 %5, %4
%7 = inttoptr i64 %6 to i64*
store volatile i64 %2, i64* %7
ret void
}
double rint(double num) { return (double)(int)(num + 0.5); }


x86 assembly (clang, -O0):
<rint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rint>:
addsd  0xef8(%rip),%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @rint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e-01
%5 = fptosi double %4 to i32
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @rint(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = fptosi double %2 to i32
%4 = sitofp i32 %3 to double
ret double %4
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int connect(int, struct sockaddr const *, int);
unsigned int phrawConnect(int m_hSocket, struct sockaddr_in *psockaddr_in,
                          int nsockaddr_inLen) {
  int nConResult;
  if (psockaddr_in == 0)
    return 0;
  nConResult = connect(m_hSocket, (const struct sockaddr *)psockaddr_in,
                       nsockaddr_inLen);
  if (nConResult < 0) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<phrawConnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1139 <phrawConnect+0x29>
movl   $0x0,-0x4(%rbp)
jmp    1168 <phrawConnect+0x58>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <connect@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1161 <phrawConnect+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1168 <phrawConnect+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phrawConnect>:
test   %rsi,%rsi
je     1125 <phrawConnect+0x15>
push   %rax
call   1030 <connect@plt>
not    %eax
shr    $0x1f,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @phrawConnect(i32 %0, %struct.sockaddr_in* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.sockaddr_in*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store %struct.sockaddr_in* %1, %struct.sockaddr_in** %6
store i32 %2, i32* %7
%9 = load %struct.sockaddr_in*, %struct.sockaddr_in** %6
%10 = icmp eq %struct.sockaddr_in* %9, null
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 0, i32* %4
br label %22
12: ; preds = %3
%13 = load i32, i32* %5
%14 = load %struct.sockaddr_in*, %struct.sockaddr_in** %6
%15 = bitcast %struct.sockaddr_in* %14 to %struct.sockaddr*
%16 = load i32, i32* %7
%17 = call i32 @connect(i32 %13, %struct.sockaddr* %15, i32 %16)
store i32 %17, i32* %8
%18 = load i32, i32* %8
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %12
store i32 0, i32* %4
br label %22
21: ; preds = %12
store i32 1, i32* %4
br label %22
22: ; preds = %21, %20, %11
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @phrawConnect(i32 %0, %struct.sockaddr_in* %1, i32 %2) {
%4 = icmp eq %struct.sockaddr_in* %1, null
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = bitcast %struct.sockaddr_in* %1 to %struct.sockaddr*
%7 = tail call i32 @connect(i32 %0, %struct.sockaddr* %6, i32 %2)
%8 = xor i32 %7, -1
%9 = lshr i32 %8, 31
br label %10
10: ; preds = %5, %3
%11 = phi i32 [ 0, %3 ], [ %9, %5 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ keccak_squeezeblocks(unsigned char *, unsigned long long,
                                        int /*<<< orphan*/ *, int);
void shake256_squeezeblocks(unsigned char *output, unsigned long long nblocks,
                            uint64_t *s) {
  keccak_squeezeblocks(output, nblocks, s, 136);
}


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

x86 assembly (clang, -O2):
<shake256_squeezeblocks>:
mov    $0x88,%ecx
jmp    1030 <keccak_squeezeblocks@plt>

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

LLVM IR (-O2):
define void @shake256_squeezeblocks(i8* %0, i64 %1, i32* %2) {
%4 = tail call i32 @keccak_squeezeblocks(i8* %0, i64 %1, i32* %2, i32 136)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void help(void) {
  fprintf(stdout, "pythagore -c hypotenuse lenght1 lenght2\n"
                  "pythagore -h lenght1 length2\n"
                  "pythagore -s hypotenuse lenght\n");
}


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

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

LLVM IR (-O0):
@stdout = global i32 0
@.str = [101 x i8] c"pythagore -c hypotenuse lenght1 lenght2\0Apythagore -h lenght1 length2\0Apythagore -s hypotenuse lenght\0A\00"
define void @help() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [101 x i8] c"pythagore -c hypotenuse lenght1 lenght2\0Apythagore -h lenght1 length2\0Apythagore -s hypotenuse lenght\0A\00"
define void @help() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct xvimage {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EffaceLiensLibres2d(struct xvimage *);
int /*<<< orphan*/ SatureAlphacarre2d(struct xvimage *);
void Connex8Obj2d(struct xvimage *k) {
  SatureAlphacarre2d(k);
  EffaceLiensLibres2d(k);
}


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

x86 assembly (clang, -O2):
<Connex8Obj2d>:
push   %rbx
mov    %rdi,%rbx
call   1030 <SatureAlphacarre2d@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <EffaceLiensLibres2d@plt>

LLVM IR (-O0):
%struct.xvimage = type { i32 }
define void @Connex8Obj2d(%struct.xvimage* %0) {
%2 = alloca %struct.xvimage*
store %struct.xvimage* %0, %struct.xvimage** %2
%3 = load %struct.xvimage*, %struct.xvimage** %2
%4 = call i32 @SatureAlphacarre2d(%struct.xvimage* %3)
%5 = load %struct.xvimage*, %struct.xvimage** %2
%6 = call i32 @EffaceLiensLibres2d(%struct.xvimage* %5)
ret void
}

LLVM IR (-O2):
%struct.xvimage = type { i32 }
define void @Connex8Obj2d(%struct.xvimage* %0) {
%2 = tail call i32 @SatureAlphacarre2d(%struct.xvimage* %0)
%3 = tail call i32 @EffaceLiensLibres2d(%struct.xvimage* %0)
ret void
}
void __imlib_dynamic_filters_deinit() {}


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

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

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

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