xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void __ht_it_destroy(void *it) { free(it); }


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

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

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

LLVM IR (-O2):
define void @__ht_it_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FLEXCOMM8_DriverIRQHandler();
__attribute__((weak)) void FLEXCOMM8_IRQHandler(void) {
  FLEXCOMM8_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @FLEXCOMM8_IRQHandler() {
%1 = tail call i32 (...) @FLEXCOMM8_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo() { printf("foo\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"foo\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
bool ncurses_has_mouse(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @ncurses_has_mouse() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void prool_commands(void) {
  printf(
      "CGX is modified by Prool\nProol's additional commands:\nPROOL - prool's "
      "commands info\nWRITE SE - write group names to file cgx.out (first "
      "column of PRNT SE)\nWRITE LIST - write PRINT SE output to file cgx.out "
      "(one value in one line)\nWRITEONE [path]- SEND ALL ABQ;SEND ALL ABQ NAM "
      "-> file [path]allinone.msh\nWRITEINONE - ... \nWRITE4SHELL - ... \nECHO "
      "- test kommand\nSENDPRES group pressure filename - ...\nSENDPRES4SHELL "
      "group pressure filename - ...\nSENDASTER path - send all aster -> "
      "path\nSENDANS path - send all ans -> path\nSENDNAS path - send all nas "
      "-> path\nSENDSTL path - send all stl -> path\nSENDBB - send size of "
      "bound box to file box.txt\n\n");
}


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

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

LLVM IR (-O0):
@.str = [643 x i8] c"CGX is modified by Prool\0AProol's additional commands:\0APROOL - prool's commands info\0AWRITE SE - write group names to file cgx.out (first column of PRNT SE)\0AWRITE LIST - write PRINT SE output to file cgx.out (one value in one line)\0AWRITEONE [path]- SEND ALL ABQ;SEND ALL ABQ NAM -> file [path]allinone.msh\0AWRITEINONE - ... \0AWRITE4SHELL - ... \0AECHO - test kommand\0ASENDPRES group pressure filename - ...\0ASENDPRES4SHELL group pressure filename - ...\0ASENDASTER path - send all aster -> path\0ASENDANS path - send all ans -> path\0ASENDNAS path - send all nas -> path\0ASENDSTL path - send all stl -> path\0ASENDBB - send size of bound box to file box.txt\0A\0A\00"
define void @prool_commands() {
%1 = call i32 @printf(i8* getelementptr inbounds ([643 x i8], [643 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [642 x i8] c"CGX is modified by Prool\0AProol's additional commands:\0APROOL - prool's commands info\0AWRITE SE - write group names to file cgx.out (first column of PRNT SE)\0AWRITE LIST - write PRINT SE output to file cgx.out (one value in one line)\0AWRITEONE [path]- SEND ALL ABQ;SEND ALL ABQ NAM -> file [path]allinone.msh\0AWRITEINONE - ... \0AWRITE4SHELL - ... \0AECHO - test kommand\0ASENDPRES group pressure filename - ...\0ASENDPRES4SHELL group pressure filename - ...\0ASENDASTER path - send all aster -> path\0ASENDANS path - send all ans -> path\0ASENDNAS path - send all nas -> path\0ASENDSTL path - send all stl -> path\0ASENDBB - send size of bound box to file box.txt\0A\00"
define void @prool_commands() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([642 x i8], [642 x i8]* @str, i64 0, i64 0))
ret void
}
void free_excludes(char ***excludes, char **buffer) {
  if (*excludes)
    free(*excludes);
  if (*buffer)
    free(*buffer);
}


x86 assembly (clang, -O0):
<free_excludes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     113a <free_excludes+0x2a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1154 <free_excludes+0x44>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_excludes>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1121 <free_excludes+0x11>
call   1030 <free@plt>
mov    (%rbx),%rdi
test   %rdi,%rdi
je     112f <free_excludes+0x1f>
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @free_excludes(i8*** %0, i8** %1) {
%3 = alloca i8***
%4 = alloca i8**
store i8*** %0, i8**** %3
store i8** %1, i8*** %4
%5 = load i8***, i8**** %3
%6 = load i8**, i8*** %5
%7 = icmp ne i8** %6, null
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8***, i8**** %3
%10 = load i8**, i8*** %9
%11 = bitcast i8** %10 to i8*
br label %12
12: ; preds = %8, %2
%13 = load i8**, i8*** %4
%14 = load i8*, i8** %13
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i8**, i8*** %4
%18 = load i8*, i8** %17
br label %19
19: ; preds = %16, %12
ret void
}

LLVM IR (-O2):
define void @free_excludes(i8*** nocapture %0, i8** nocapture %1) {
%3 = load i8**, i8*** %0
%4 = icmp eq i8** %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = bitcast i8** %3 to i8*
tail call void @free(i8* %6)
br label %7
7: ; preds = %5, %2
%8 = load i8*, i8** %1
%9 = icmp eq i8* %8, null
br i1 %9, label %11, label %10
10: ; preds = %7
tail call void @free(i8* %8)
br label %11
11: ; preds = %10, %7
ret void
}
void ft_strclr(char *src) {
  if (src) {
    while (*src) {
      *src = 0;
      src++;
    }
  }
}


x86 assembly (clang, -O0):
<ft_strclr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1142 <ft_strclr+0x42>
jmp    1118 <ft_strclr+0x18>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113d <ft_strclr+0x3d>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1118 <ft_strclr+0x18>
jmp    1142 <ft_strclr+0x42>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strclr>:
test   %rdi,%rdi
je     111d <ft_strclr+0x1d>
cmpb   $0x0,(%rdi)
je     111d <ft_strclr+0x1d>
add    $0x1,%rdi
xchg   %ax,%ax
movb   $0x0,-0x1(%rdi)
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <ft_strclr+0x10>
ret

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

LLVM IR (-O2):
define void @ft_strclr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %8, %6 ], [ %0, %3 ]
store i8 0, i8* %7
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %3, %1
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
scalar_t__ jrand48(unsigned short *);
long nrand48(unsigned short xsubi[3]) {
  return (long)((uint32_t)jrand48(xsubi) >> 1);
}


x86 assembly (clang, -O0):
<nrand48>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <jrand48@plt>
sar    $0x1,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrand48>:
push   %rax
call   1030 <jrand48@plt>
sar    %eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @nrand48(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = call i64 @jrand48(i16* %3)
%5 = trunc i64 %4 to i32
%6 = ashr i32 %5, 1
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @nrand48(i16* %0) {
%2 = tail call i64 @jrand48(i16* %0)
%3 = trunc i64 %2 to i32
%4 = ashr i32 %3, 1
%5 = sext i32 %4 to i64
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void q(int n) { printf("in q %d\n", n); }


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

x86 assembly (clang, -O2):
<q>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"in q %d\0A\00"
define void @q(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"in q %d\0A\00"
define void @q(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void SteamAPI_ISteamGameServer_SetMaxPlayerCount(void *self, int cPlayersMax) {
  xlogf("%s(self = %p, cPlayersMax = %d)\n", __func__, self, cPlayersMax);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamGameServer_SetMaxPlayerCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xed3(%rip),%rdi
lea    0xeed(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamGameServer_SetMaxPlayerCount>:
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xee4(%rip),%rdi
lea    0xefe(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"%s(self = %p, cPlayersMax = %d)\0A\00"
@__func__.SteamAPI_ISteamGameServer_SetMaxPlayerCount = [44 x i8] c"SteamAPI_ISteamGameServer_SetMaxPlayerCount\00"
define void @SteamAPI_ISteamGameServer_SetMaxPlayerCount(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__func__.SteamAPI_ISteamGameServer_SetMaxPlayerCount, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"%s(self = %p, cPlayersMax = %d)\0A\00"
@__func__.SteamAPI_ISteamGameServer_SetMaxPlayerCount = [44 x i8] c"SteamAPI_ISteamGameServer_SetMaxPlayerCount\00"
define void @SteamAPI_ISteamGameServer_SetMaxPlayerCount(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__func__.SteamAPI_ISteamGameServer_SetMaxPlayerCount, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int ssize_t;

/* Variables and functions */
int vsnprintf(char *, size_t, char const *, int /*<<< orphan*/);
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) {
  int i = vsnprintf(buf, size, fmt, args);
  ssize_t ssize = size;
  return (i >= ssize) ? (ssize - 1) : i;
}


x86 assembly (clang, -O0):
<vscnprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <vsnprintf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jl     115f <vscnprintf+0x4f>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1165 <vscnprintf+0x55>
mov    -0x20(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vscnprintf>:
push   %rbx
mov    %rsi,%rbx
call   1030 <vsnprintf@plt>
lea    -0x1(%rbx),%ecx
cmp    %ebx,%eax
cmovge %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @vscnprintf(i8* nocapture %0, i64 %1, i8* nocapture %2, i32 %3) {
%5 = tail call i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3)
%6 = trunc i64 %1 to i32
%7 = icmp slt i32 %5, %6
%8 = add nsw i32 %6, -1
%9 = select i1 %7, i32 %5, i32 %8
ret i32 %9
}
/* Variables and functions */
float asinhf(float);
float __ocl_asinh_float(float src) { return asinhf(src); }


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

x86 assembly (clang, -O2):
<__ocl_asinh_float>:
jmp    1030 <asinhf@plt>

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

LLVM IR (-O2):
define float @__ocl_asinh_float(float %0) {
%2 = tail call float @asinhf(float %0)
ret float %2
}
/* Variables and functions */
int get_common_elements(char *, char *);
int makeEqual(char *str1, int n1, char *str2, int n2) {
  int k = get_common_elements(str1, str2);
  return n1 + n2 - 2 * k;
}


x86 assembly (clang, -O0):
<makeEqual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <get_common_elements@plt>
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    -0x20(%rbp),%ecx
shl    $0x1,%ecx
sub    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeEqual>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %esi,%ebp
mov    %rdx,%rsi
call   1030 <get_common_elements@plt>
add    %ebx,%ebp
add    %eax,%eax
sub    %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @makeEqual(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %7
%12 = call i32 @get_common_elements(i8* %10, i8* %11)
store i32 %12, i32* %9
%13 = load i32, i32* %6
%14 = load i32, i32* %8
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %9
%17 = mul nsw i32 2, %16
%18 = sub nsw i32 %15, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @makeEqual(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @get_common_elements(i8* %0, i8* %2)
%6 = add nsw i32 %3, %1
%7 = mul i32 %5, -2
%8 = add i32 %6, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ wFileClose(int);
void wFileCloseAll() {
  int i;
  for (i = 1; i <= 16; i++) {
    wFileClose(i);
  }
}


x86 assembly (clang, -O0):
<wFileCloseAll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jg     113f <wFileCloseAll+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <wFileClose@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <wFileCloseAll+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wFileCloseAll>:
push   %rax
mov    $0x1,%edi
call   1030 <wFileClose@plt>
mov    $0x2,%edi
call   1030 <wFileClose@plt>
mov    $0x3,%edi
call   1030 <wFileClose@plt>
mov    $0x4,%edi
call   1030 <wFileClose@plt>
mov    $0x5,%edi
call   1030 <wFileClose@plt>
mov    $0x6,%edi
call   1030 <wFileClose@plt>
mov    $0x7,%edi
call   1030 <wFileClose@plt>
mov    $0x8,%edi
call   1030 <wFileClose@plt>
mov    $0x9,%edi
call   1030 <wFileClose@plt>
mov    $0xa,%edi
call   1030 <wFileClose@plt>
mov    $0xb,%edi
call   1030 <wFileClose@plt>
mov    $0xc,%edi
call   1030 <wFileClose@plt>
mov    $0xd,%edi
call   1030 <wFileClose@plt>
mov    $0xe,%edi
call   1030 <wFileClose@plt>
mov    $0xf,%edi
call   1030 <wFileClose@plt>
mov    $0x10,%edi
pop    %rax
jmp    1030 <wFileClose@plt>

LLVM IR (-O0):
define void @wFileCloseAll() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp sle i32 %3, 16
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @wFileClose(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @wFileCloseAll() {
%1 = tail call i32 @wFileClose(i32 1)
%2 = tail call i32 @wFileClose(i32 2)
%3 = tail call i32 @wFileClose(i32 3)
%4 = tail call i32 @wFileClose(i32 4)
%5 = tail call i32 @wFileClose(i32 5)
%6 = tail call i32 @wFileClose(i32 6)
%7 = tail call i32 @wFileClose(i32 7)
%8 = tail call i32 @wFileClose(i32 8)
%9 = tail call i32 @wFileClose(i32 9)
%10 = tail call i32 @wFileClose(i32 10)
%11 = tail call i32 @wFileClose(i32 11)
%12 = tail call i32 @wFileClose(i32 12)
%13 = tail call i32 @wFileClose(i32 13)
%14 = tail call i32 @wFileClose(i32 14)
%15 = tail call i32 @wFileClose(i32 15)
%16 = tail call i32 @wFileClose(i32 16)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: oneof arg [..]\n", stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Usage: oneof arg [..]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"Usage: oneof arg [..]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
char *ctime(int *);
int time(int /*<<< orphan*/ *);
char *op_get_time(void) {
  time_t t = time(NULL);
  if (t == -1)
    return "";
  return ctime(&t);
}


x86 assembly (clang, -O0):
<op_get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    114e <op_get_time+0x2e>
lea    0xebb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <op_get_time+0x3b>
lea    -0xc(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_get_time>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
cmp    $0xffffffff,%eax
je     113d <op_get_time+0x1d>
lea    0x4(%rsp),%rdi
call   1030 <ctime@plt>
pop    %rcx
ret
lea    0xebc(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @op_get_time() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i32 @time(i32* null)
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 i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %1
br label %9
7: ; preds = %0
%8 = call i8* @ctime(i32* %2)
store i8* %8, i8** %1
br label %9
9: ; preds = %7, %6
%10 = load i8*, i8** %1
ret i8* %10
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @op_get_time() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = icmp eq i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i8* @ctime(i32* %1)
br label %7
7: ; preds = %0, %5
%8 = phi i8* [ %6, %5 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %0 ]
ret i8* %8
}
/* Variables and functions */
int _bitmap_scan_first_zero(void *, int);
int bitmap_scan_first_zero_64(void *bitmap) {
  return _bitmap_scan_first_zero(bitmap, 64 >> 5);
}


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

x86 assembly (clang, -O2):
<bitmap_scan_first_zero_64>:
mov    $0x2,%esi
jmp    1030 <_bitmap_scan_first_zero@plt>

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

LLVM IR (-O2):
define i32 @bitmap_scan_first_zero_64(i8* %0) {
%2 = tail call i32 @_bitmap_scan_first_zero(i8* %0, i32 2)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog) {
  fprintf(stderr,
          "%s [ -s src ] [ -i hashfile ] [-h hash ] target [ target ... ]\n",
          prog);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [64 x i8] c"%s [ -s src ] [ -i hashfile ] [-h hash ] target [ target ... ]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [64 x i8] c"%s [ -s src ] [ -i hashfile ] [-h hash ] target [ target ... ]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpu_reset(int /*<<< orphan*/);
void arch_reset(char mode) {
  if (mode == 's') {
    cpu_reset(0);
  }
}


x86 assembly (clang, -O0):
<arch_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x73,%eax
jne    1132 <arch_reset+0x22>
xor    %edi,%edi
call   1030 <cpu_reset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_reset>:
cmp    $0x73,%dil
jne    111d <arch_reset+0xd>
xor    %edi,%edi
jmp    1030 <cpu_reset@plt>
ret

LLVM IR (-O0):
define void @arch_reset(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 115
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @cpu_reset(i32 0)
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @arch_reset(i8 signext %0) {
%2 = icmp eq i8 %0, 115
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @cpu_reset(i32 0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glTexEnvfv_size(int /*<<< orphan*/);
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glTexEnviv_size(GLenum e) {
  return __glTexEnvfv_size(e);
}


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

x86 assembly (clang, -O2):
<__glTexEnviv_size>:
jmp    1030 <__glTexEnvfv_size@plt>

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

LLVM IR (-O2):
define hidden i32 @__glTexEnviv_size(i32 %0) {
%2 = tail call i32 @__glTexEnvfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ print_error(char const *, char const *, int, char const *);
void exit_error(const char *str, const char *filename, int lineno,
                const char *line) {
  print_error(str, filename, lineno, line);
  exit(1);
}


x86 assembly (clang, -O0):
<exit_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <print_error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_error>:
push   %rax
call   1030 <print_error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @exit_error(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @print_error(i8* %9, i8* %10, i32 %11, i8* %12)
%14 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @exit_error(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @print_error(i8* %0, i8* %1, i32 %2, i8* %3)
%6 = tail call i32 @exit(i32 1)
unreachable
}
void gdk_image_get_type() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_object_remove_weak_pointer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stress_set_memcpy_method(char *);
void stress_memcpy_set_default(void) { stress_set_memcpy_method("all"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"all\00"
define void @stress_memcpy_set_default() {
%1 = call i32 @stress_set_memcpy_method(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"all\00"
define void @stress_memcpy_set_default() {
%1 = tail call i32 @stress_set_memcpy_method(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
void uw_free_client_data(void *data) { (void)data; }


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

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

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

LLVM IR (-O2):
define void @uw_free_client_data(i8* nocapture %0) {
ret void
}
void foo(int *p, int (*q)[10], int r[10], int s[10][10]) {
  int a[10], b[10][10];
#pragma omp target map(tofrom : p [-1:2])
  ;
#pragma omp target map(tofrom : q [-1:2] [0:10])
  ;
#pragma omp target map(tofrom : q [-1:2] [-2:10])
  ;
#pragma omp target map(tofrom : r [-1:2])
  ;
#pragma omp target map(tofrom : s [-1:2][:])
  ;
#pragma omp target map(tofrom : s [-1:2] [-2:10])
  ;
#pragma omp target map(tofrom : a [-1:2])
  ;
#pragma omp target map(tofrom : b [-1:2] [0:])
  ;
#pragma omp target map(tofrom : b [1:2] [-2:10])
  ;
#pragma omp target map(tofrom : p [2:-3])
  ;
#pragma omp target map(tofrom : q [2:-3][:])
  ;
#pragma omp target map(tofrom : q [2:3] [0:-1])
  ;
#pragma omp target map(tofrom : r [2:-5])
  ;
#pragma omp target map(tofrom : s [2:-5][:])
  ;
#pragma omp target map(tofrom : s [2:5] [0:-4])
  ;
#pragma omp target map(tofrom : a [2:-5])
  ;
#pragma omp target map(tofrom : b [2:-5] [0:10])
  ;
#pragma omp target map(tofrom : b [2:5] [0:-4])
  ;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
add    $0x160,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(i32* %0, [10 x i32]* %1, i32* %2, [10 x i32]* %3) {
%5 = alloca i32*
%6 = alloca [10 x i32]*
%7 = alloca i32*
%8 = alloca [10 x i32]*
%9 = alloca [10 x i32]
%10 = alloca [10 x [10 x i32]]
store i32* %0, i32** %5
store [10 x i32]* %1, [10 x i32]** %6
store i32* %2, i32** %7
store [10 x i32]* %3, [10 x i32]** %8
ret void
}

LLVM IR (-O2):
define void @foo(i32* nocapture %0, [10 x i32]* nocapture %1, i32* nocapture %2, [10 x i32]* nocapture %3) {
ret void
}
int uniphier_sld3_umc_init(const struct uniphier_board_data *bd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.uniphier_board_data = type opaque
define i32 @uniphier_sld3_umc_init(%struct.uniphier_board_data* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char **buildargv_argc(char const *, int *);
char **buildargv(const char *string) {
  int argc = 0;
  return buildargv_argc(string, &argc);
}


x86 assembly (clang, -O0):
<buildargv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <buildargv_argc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildargv>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <buildargv_argc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i8** @buildargv(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i8** @buildargv_argc(i8* %0, i32* %2)
ret i8** %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
void _mm_storeu_epi64(void *, int /*<<< orphan*/);
void test_mm_storeu_epi64(void *__p, __m128i __a) {
  return _mm_storeu_epi64(__p, __a);
}


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

x86 assembly (clang, -O2):
<test_mm_storeu_epi64>:
jmp    1030 <_mm_storeu_epi64@plt>

LLVM IR (-O0):
define void @test_mm_storeu_epi64(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test_mm_storeu_epi64(i8* %0, i32 %1) {
tail call void @_mm_storeu_epi64(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atan2(double, double);
double toDegrees(int /*<<< orphan*/);
double vectorAngle(double x, double y) {
  return (x == 0 && y == 0) ? 0 : toDegrees(atan2(-y, x));
}


x86 assembly (clang, -O0):
<vectorAngle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    116f <vectorAngle+0x4f>
jp     116f <vectorAngle+0x4f>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    116f <vectorAngle+0x4f>
jp     116f <vectorAngle+0x4f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    11a1 <vectorAngle+0x81>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm1
call   1030 <atan2@plt>
mov    %eax,%edi
call   1040 <toDegrees@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vectorAngle>:
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jne    113d <vectorAngle+0x1d>
jp     113d <vectorAngle+0x1d>
ucomisd %xmm0,%xmm1
jne    113d <vectorAngle+0x1d>
jp     113d <vectorAngle+0x1d>
xorpd  %xmm0,%xmm0
ret
push   %rax
xorpd  0xeba(%rip),%xmm1
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
call   1030 <atan2@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <toDegrees@plt>

LLVM IR (-O0):
define double @vectorAngle(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 = fcmp oeq double %5, 0.000000e+00
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load double, double* %4
%9 = fcmp oeq double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
br label %17
11: ; preds = %7, %2
%12 = load double, double* %4
%13 = fneg double %12
%14 = load double, double* %3
%15 = call i32 @atan2(double %13, double %14)
%16 = call double @toDegrees(i32 %15)
br label %17
17: ; preds = %11, %10
%18 = phi double [ 0.000000e+00, %10 ], [ %16, %11 ]
ret double %18
}

LLVM IR (-O2):
define double @vectorAngle(double %0, double %1) {
%3 = fcmp oeq double %0, 0.000000e+00
%4 = fcmp oeq double %1, 0.000000e+00
%5 = and i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = fneg double %1
%8 = tail call i32 @atan2(double %7, double %0)
%9 = tail call double @toDegrees(i32 %8)
br label %10
10: ; preds = %2, %6
%11 = phi double [ %9, %6 ], [ 0.000000e+00, %2 ]
ret double %11
}
unsigned char i2c_read_nak(void) { return 0; }


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

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

LLVM IR (-O0):
define zeroext i8 @i2c_read_nak() {
ret i8 0
}

LLVM IR (-O2):
define zeroext i8 @i2c_read_nak() {
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_tainted_data_sanitize__(int);
int weekday(int year, int month, int day) {
  int w = 0;
  __coverity_tainted_data_sanitize__(year);
  __coverity_tainted_data_sanitize__(month);
  __coverity_tainted_data_sanitize__(day);
  return w;
}


x86 assembly (clang, -O0):
<weekday>:
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    -0x4(%rbp),%edi
call   1030 <__coverity_tainted_data_sanitize__@plt>
mov    -0x8(%rbp),%edi
call   1030 <__coverity_tainted_data_sanitize__@plt>
mov    -0xc(%rbp),%edi
call   1030 <__coverity_tainted_data_sanitize__@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<weekday>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <__coverity_tainted_data_sanitize__@plt>
mov    %ebp,%edi
call   1030 <__coverity_tainted_data_sanitize__@plt>
mov    %ebx,%edi
call   1030 <__coverity_tainted_data_sanitize__@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @weekday(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* %4
%9 = call i32 @__coverity_tainted_data_sanitize__(i32 %8)
%10 = load i32, i32* %5
%11 = call i32 @__coverity_tainted_data_sanitize__(i32 %10)
%12 = load i32, i32* %6
%13 = call i32 @__coverity_tainted_data_sanitize__(i32 %12)
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
define i32 @weekday(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @__coverity_tainted_data_sanitize__(i32 %0)
%5 = tail call i32 @__coverity_tainted_data_sanitize__(i32 %1)
%6 = tail call i32 @__coverity_tainted_data_sanitize__(i32 %2)
ret i32 0
}
/* Variables and functions */
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int nthreads;
  int thread;
#pragma omp parallel private(nthreads, thread)
  {
    thread = omp_get_thread_num();
    nthreads = omp_get_num_threads();
    printf("\nHola Mundo soy el hilo =%d de %d que somos en total.\n\n", thread,
           nthreads);
  }
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"\0AHola Mundo soy el hilo =%d de %d que somos en total.\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @omp_get_thread_num()
store i32 %4, i32* %3
%5 = call i32 (...) @omp_get_num_threads()
store i32 %5, i32* %2
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [56 x i8] c"\0AHola Mundo soy el hilo =%d de %d que somos en total.\0A\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 (...) @omp_get_num_threads()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void report(const char *prefix, const char *err, va_list params) {
  fputs(prefix, stderr);
  vfprintf(stderr, err, params);
  fputs("\n", stderr);
}


x86 assembly (clang, -O0):
<report>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <vfprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
lea    0xe96(%rip),%rdi
call   1030 <fputs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    0x2eb0(%rip),%r14
mov    (%r14),%esi
call   1030 <fputs@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <vfprintf@plt>
mov    (%r14),%esi
lea    0xeb1(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fputs@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @report(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* %0, i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @vfprintf(i32 %6, i8* %1, i32 %2)
%8 = load i32, i32* @stderr
%9 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t rot16l6(uint16_t x) { return (x << 6) | (x >> 10); }


x86 assembly (clang, -O0):
<rot16l6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x6,%eax
mov    -0x4(%rbp),%ecx
sar    $0xa,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot16l6>:
mov    %edi,%eax
shl    $0x6,%eax
sar    $0xa,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot16l6(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 6
%5 = load i32, i32* %2
%6 = ashr i32 %5, 10
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot16l6(i32 %0) {
%2 = shl i32 %0, 6
%3 = ashr i32 %0, 10
%4 = or i32 %2, %3
ret i32 %4
}
char test_char_3(char a, char b, char c) { return 0xf7; }


x86 assembly (clang, -O0):
<test_char_3>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    $0xf7,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_char_3>:
mov    $0xf7,%al
ret

LLVM IR (-O0):
define signext i8 @test_char_3(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
ret i8 -9
}

LLVM IR (-O2):
define signext i8 @test_char_3(i8 signext %0, i8 signext %1, i8 signext %2) {
ret i8 -9
}
void SWimp_BeginFrame(float camera_separation) {}


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

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

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

LLVM IR (-O2):
define void @SWimp_BeginFrame(float %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void imprimir(int a, int b, int r) { printf("%d x %d = %d", a, b, r); }


x86 assembly (clang, -O0):
<imprimir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimir>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"%d x %d = %d\00"
define void @imprimir(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
ret void
}
void nop5(void *a1, void *a2, void *a3, void *a4, void *a5) { return; }


x86 assembly (clang, -O0):
<nop5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @nop5(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
define void @nop5(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i8* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cvar_ForceSet(char *, char *);
int /*<<< orphan*/ StartGame();
void MediumGameFunc(void *data) {
  Cvar_ForceSet("skill", "1");
  StartGame();
}


x86 assembly (clang, -O0):
<MediumGameFunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1040 <Cvar_ForceSet@plt>
mov    $0x0,%al
call   1030 <StartGame@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MediumGameFunc>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1040 <Cvar_ForceSet@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <StartGame@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"skill\00"
@.str.1 = [2 x i8] c"1\00"
define void @MediumGameFunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @Cvar_ForceSet(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @StartGame()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"skill\00"
@.str.1 = [2 x i8] c"1\00"
define void @MediumGameFunc(i8* nocapture readnone %0) {
%2 = tail call i32 @Cvar_ForceSet(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @StartGame()
ret void
}