xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int f(int);
int main() {
  int a = f(1);
  assert(!a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <f@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @f(i32 1)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1)
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 0
}
void SteamAPI_ISteamHTMLSurface_KeyChar(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamHTMLSurface_KeyChar>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_KeyChar = [35 x i8] c"SteamAPI_ISteamHTMLSurface_KeyChar\00"
define void @SteamAPI_ISteamHTMLSurface_KeyChar(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_KeyChar, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_KeyChar = [35 x i8] c"SteamAPI_ISteamHTMLSurface_KeyChar\00"
define void @SteamAPI_ISteamHTMLSurface_KeyChar(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_KeyChar, i64 0, i64 0), i8* %0)
ret void
}
int IPR2() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @IPR2() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void DeletePeriLargeData(void *periattr) { free(periattr); }


x86 assembly (clang, -O0):
<DeletePeriLargeData>:
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):
<DeletePeriLargeData>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @DeletePeriLargeData(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 @DeletePeriLargeData(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ rpctime_1(char *);
int main(int argc, char *argv[]) {
  char *host;
  if (argc < 2) {
    printf("usage: %s server_host\n", argv[0]);
    exit(1);
  }
  host = argv[1];
  rpctime_1(host);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    116d <main+0x3d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <rpctime_1@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     114f <main+0x1f>
mov    (%rsi),%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    0x8(%rsi),%rdi
call   1040 <rpctime_1@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"usage: %s server_host\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
store i8* %18, i8** %6
%19 = load i8*, i8** %6
%20 = call i32 @rpctime_1(i8* %19)
%21 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"usage: %s server_host\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @rpctime_1(i8* %10)
%12 = tail call i32 @exit(i32 0)
unreachable
}
void SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList(
    void *self, const char *pchName, int nScore, float flTimePlayed) {
  xlogf("%s(self = %p, pchName = %s, nScore = %d, flTimePlayed = %f)\n",
        __func__, self, pchName, nScore, flTimePlayed);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebc(%rip),%rdi
lea    0xef2(%rip),%rsi
mov    $0x1,%al
call   1030 <xlogf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList>:
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rdx
cvtss2sd %xmm0,%xmm0
lea    0xedc(%rip),%rdi
lea    0xf12(%rip),%rsi
mov    $0x1,%al
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"%s(self = %p, pchName = %s, nScore = %d, flTimePlayed = %f)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList = [58 x i8] c"SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList\00"
define void @SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList(i8* %0, i8* %1, i32 %2, float %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca float
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store float %3, float* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load float, float* %8
%13 = fpext float %12 to double
%14 = call i32 (i8*, i8*, i8*, i8*, i32, double, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i8*, i32, double, ...)*)(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @__func__.SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList, i64 0, i64 0), i8* %9, i8* %10, i32 %11, double %13)
ret void
}

LLVM IR (-O2):
@.str = [61 x i8] c"%s(self = %p, pchName = %s, nScore = %d, flTimePlayed = %f)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList = [58 x i8] c"SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList\00"
define void @SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList(i8* %0, i8* %1, i32 %2, float %3) {
%5 = fpext float %3 to double
%6 = tail call i32 (i8*, i8*, i8*, i8*, i32, double, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i8*, i32, double, ...)*)(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @__func__.SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList, i64 0, i64 0), i8* %0, i8* %1, i32 %2, double %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void err_ret(char *str) {
  perror(str);
  exit(1);
}


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

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

LLVM IR (-O0):
define void @err_ret(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @err_ret(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tabela() {
  printf("\n\tcaractere bits codificação\n");
  printf("\t--------------------------\n");
}


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

x86 assembly (clang, -O2):
<tabela>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefb(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"\0A\09caractere bits codifica\C3\A7\C3\A3o\0A\00"
@.str.1 = [29 x i8] c"\09--------------------------\0A\00"
define void @tabela() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"\0A\09caractere bits codifica\C3\A7\C3\A3o\00"
@str.2 = [28 x i8] c"\09--------------------------\00"
define void @tabela() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.2, i64 0, i64 0))
ret void
}
const char *pcre_version(void) {
  return "4"
         "."
         "5"
         " "
         "2003-12-01";
}


x86 assembly (clang, -O0):
<pcre_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcre_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"4.5 2003-12-01\00"
define i8* @pcre_version() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"4.5 2003-12-01\00"
define i8* @pcre_version() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
void ARGBToRGB565DitherRow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToRGB565DitherRow_Any_AVX2() {
ret void
}
int cp_hash_compare_double(void *a1, void *a2) {
  double d1 = *(double *)a1;
  double d2 = *(double *)a2;
  if (d1 > d2)
    return 1;
  if (d1 < d2)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<cp_hash_compare_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1142 <cp_hash_compare_double+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1169 <cp_hash_compare_double+0x69>
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1162 <cp_hash_compare_double+0x62>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <cp_hash_compare_double+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cp_hash_compare_double>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cp_hash_compare_double(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp ogt double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp olt double %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 -1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @cp_hash_compare_double(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %4, %6
%8 = fcmp olt double %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
unsigned kol_event_check() { asm volatile("int $0x40" ::"a"(11)); }


x86 assembly (clang, -O0):
<kol_event_check>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb,%eax
int    $0x40
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_event_check>:
mov    $0xb,%eax
int    $0x40
ret

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

LLVM IR (-O2):
define i32 @kol_event_check() {
tail call void asm sideeffect "int $$0x40", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 11)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int shmget(key_t key, size_t size, int shmflg) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<shmget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shmget>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @shmget(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @shmget(i32 %0, i64 %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
/* Variables and functions */
void strcat(char *leftstr, char *rightstr) {
  while (*leftstr != '\0')
    leftstr++;
  while ((*leftstr++ = *rightstr++) != '\0')
    ;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     112d <strcat+0x2d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <strcat+0xc>
jmp    1132 <strcat+0x32>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1165 <strcat+0x65>
jmp    1132 <strcat+0x32>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1100 <strcat>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,-0x1(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcat+0x10>
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ *alloc_untraced(int /*<<< orphan*/, int /*<<< orphan*/);
uint32_t *boxUnsigned(uint32_t context_len, uint32_t x) {
  return alloc_untraced(x, context_len);
}


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

x86 assembly (clang, -O2):
<boxUnsigned>:
mov    %edi,%eax
mov    %esi,%edi
mov    %eax,%esi
jmp    1030 <alloc_untraced@plt>

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

LLVM IR (-O2):
define i32* @boxUnsigned(i32 %0, i32 %1) {
%3 = tail call i32* @alloc_untraced(i32 %1, i32 %0)
ret i32* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ sigemptyset(int /*<<< orphan*/ *);
void xempty(sigset_t *set) {
  if (sigemptyset(set) != 0)
    abort();
}


x86 assembly (clang, -O0):
<xempty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <sigemptyset@plt>
cmp    $0x0,%rax
je     1146 <xempty+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xempty>:
push   %rax
call   1040 <sigemptyset@plt>
test   %rax,%rax
jne    112d <xempty+0xd>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @xempty(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @sigemptyset(i32* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @xempty(i32* %0) {
%2 = tail call i64 @sigemptyset(i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
void *calloc(int, size_t);
int /*<<< orphan*/ out_of_memory();
void *safe_malloc(size_t size) {
  void *tmp;
  tmp = calloc(1, size);
  if (tmp == NULL && size > 0) {
    out_of_memory();
  }
  return tmp;
}


x86 assembly (clang, -O0):
<safe_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <safe_malloc+0x3b>
cmpq   $0x0,-0x8(%rbp)
jbe    115b <safe_malloc+0x3b>
mov    $0x0,%al
call   1040 <out_of_memory@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1030 <calloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1148 <safe_malloc+0x28>
test   %r14,%r14
jne    1148 <safe_malloc+0x28>
xor    %eax,%eax
call   1040 <out_of_memory@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @safe_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @calloc(i32 1, i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp ugt i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @out_of_memory()
br label %13
13: ; preds = %11, %8, %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @safe_malloc(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
%4 = icmp ne i64 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @out_of_memory()
br label %8
8: ; preds = %6, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(const int *a, int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%d ", a[i]);
  }
  printf("\n");
}


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

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

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

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

/* Variables and functions */
int TRDB_D5M_log2(int);
uint16_t TRDB_D5M_shift_amount(uint16_t mask) {
  return TRDB_D5M_log2(mask & (~mask + 1));
}


x86 assembly (clang, -O0):
<TRDB_D5M_shift_amount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
add    $0x1,%eax
and    %eax,%edi
call   1030 <TRDB_D5M_log2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TRDB_D5M_shift_amount>:
mov    %edi,%eax
neg    %eax
and    %eax,%edi
jmp    1030 <TRDB_D5M_log2@plt>

LLVM IR (-O0):
define i32 @TRDB_D5M_shift_amount(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = xor i32 %4, -1
%6 = add nsw i32 %5, 1
%7 = and i32 %3, %6
%8 = call i32 @TRDB_D5M_log2(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @TRDB_D5M_shift_amount(i32 %0) {
%2 = sub i32 0, %0
%3 = and i32 %2, %0
%4 = tail call i32 @TRDB_D5M_log2(i32 %3)
ret i32 %4
}
int kvmppc_enable_hwrng(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @kvmppc_enable_hwrng() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printA(int *a, int n) {
  int i = 0;
  for (i = 0; i < n; i++) {
    printf("%d ", a[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <printA+0x50>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <printA+0x1d>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printA(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
scalar_t__ unpack754(unsigned long long, int, int);
unsigned long long unpacku64(unsigned char *);
extern double deserialize_float64(unsigned char *buf) {
  unsigned long long int fhold = unpacku64(buf);
  return ((double)(unpack754((fhold), 64, 11)));
}


x86 assembly (clang, -O0):
<deserialize_float64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <unpacku64@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x40,%esi
mov    $0xb,%edx
call   1030 <unpack754@plt>
cvtsi2sd %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deserialize_float64>:
push   %rax
call   1040 <unpacku64@plt>
mov    %rax,%rdi
mov    $0x40,%esi
mov    $0xb,%edx
call   1030 <unpack754@plt>
cvtsi2sd %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @deserialize_float64(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @unpacku64(i8* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i64 @unpack754(i64 %6, i32 64, i32 11)
%8 = sitofp i64 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @deserialize_float64(i8* %0) {
%2 = tail call i64 @unpacku64(i8* %0)
%3 = tail call i64 @unpack754(i64 %2, i32 64, i32 11)
%4 = sitofp i64 %3 to double
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
char *strrchr(char const *, char);
void output_prog_name(const char *prog) {
  const char *lastslash;
  lastslash = strrchr(prog, '/');
  fputs(lastslash ? lastslash + 1 : prog, stderr);
}


x86 assembly (clang, -O0):
<output_prog_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115a <output_prog_name+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1162 <output_prog_name+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e73(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_prog_name>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rdi
test   %rax,%rax
cmove  %rbx,%rdi
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
pop    %rbx
jmp    1040 <fputs@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @output_prog_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
%15 = load i32, i32* @stderr
%16 = call i32 @fputs(i8* %14, i32 %15)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @output_prog_name(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
%6 = load i32, i32* @stderr
%7 = tail call i32 @fputs(i8* %5, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ voronoi(float, float, float, float *, float *, int,
                           int /*<<< orphan*/);
float voronoi_F1(float x, float y, float z) {
  float da[4], pa[12];
  voronoi(x, y, z, da, pa, 1, 0);
  return da[0];
}


x86 assembly (clang, -O0):
<voronoi_F1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
lea    -0x20(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <voronoi@plt>
movss  -0x20(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<voronoi_F1>:
sub    $0x48,%rsp
mov    %rsp,%rdi
lea    0x10(%rsp),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <voronoi@plt>
movss  (%rsp),%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define float @voronoi_F1(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca [4 x float]
%8 = alloca [12 x float]
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = load float, float* %4
%10 = load float, float* %5
%11 = load float, float* %6
%12 = getelementptr inbounds [4 x float], [4 x float]* %7, i64 0, i64 0
%13 = getelementptr inbounds [12 x float], [12 x float]* %8, i64 0, i64 0
%14 = call i32 @voronoi(float %9, float %10, float %11, float* %12, float* %13, i32 1, i32 0)
%15 = getelementptr inbounds [4 x float], [4 x float]* %7, i64 0, i64 0
%16 = load float, float* %15
ret float %16
}

LLVM IR (-O2):
define float @voronoi_F1(float %0, float %1, float %2) {
%4 = alloca [4 x float]
%5 = alloca [12 x float]
%6 = bitcast [4 x float]* %4 to i8*
%7 = bitcast [12 x float]* %5 to i8*
%8 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 0, i64 0
%9 = getelementptr inbounds [12 x float], [12 x float]* %5, i64 0, i64 0
%10 = call i32 @voronoi(float %0, float %1, float %2, float* %8, float* %9, i32 1, i32 0)
%11 = load float, float* %8
ret float %11
}
/* Variables and functions */
scalar_t__ ERR_get_error_line(char const **, int *);
scalar_t__ ERR_peek_error();
void drain_openssl_errors(void) {
  const char *file;
  int line;
  if (ERR_peek_error() == 0)
    return;
  while (ERR_get_error_line(&file, &line)) {
  }
}


x86 assembly (clang, -O0):
<drain_openssl_errors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <ERR_peek_error@plt>
cmp    $0x0,%rax
jne    113e <drain_openssl_errors+0x1e>
jmp    115f <drain_openssl_errors+0x3f>
jmp    1143 <drain_openssl_errors+0x23>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <ERR_get_error_line@plt>
cmp    $0x0,%rax
je     115f <drain_openssl_errors+0x3f>
jmp    1143 <drain_openssl_errors+0x23>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drain_openssl_errors>:
push   %r14
push   %rbx
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <ERR_peek_error@plt>
test   %rax,%rax
je     1150 <drain_openssl_errors+0x30>
lea    0x10(%rsp),%r14
lea    0xc(%rsp),%rbx
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <ERR_get_error_line@plt>
test   %rax,%rax
jne    1140 <drain_openssl_errors+0x20>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @drain_openssl_errors() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i64 (...) @ERR_peek_error()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %11
6: ; preds = %0
br label %7
7: ; preds = %10, %6
%8 = call i64 @ERR_get_error_line(i8** %1, i32* %2)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
br label %7
11: ; preds = %5, %7
ret void
}

LLVM IR (-O2):
define void @drain_openssl_errors() {
%1 = alloca i8*
%2 = alloca i32
%3 = bitcast i8** %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i64 (...) @ERR_peek_error()
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %0, %7
%8 = call i64 @ERR_get_error_line(i8** %1, i32* %2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %7
10: ; preds = %7, %0
ret void
}
void ff_hevc_put_hevc_pel_pixels24_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_pel_pixels24_8_sse4() {
ret void
}
/* Variables and functions */
int intel_piix4_gpo_set(int, int /*<<< orphan*/);
int intel_piix4_gpo27_lower(void) { return intel_piix4_gpo_set(27, 0); }


x86 assembly (clang, -O0):
<intel_piix4_gpo27_lower>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
xor    %esi,%esi
call   1030 <intel_piix4_gpo_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intel_piix4_gpo27_lower>:
mov    $0x1b,%edi
xor    %esi,%esi
jmp    1030 <intel_piix4_gpo_set@plt>

LLVM IR (-O0):
define i32 @intel_piix4_gpo27_lower() {
%1 = call i32 @intel_piix4_gpo_set(i32 27, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @intel_piix4_gpo27_lower() {
%1 = tail call i32 @intel_piix4_gpo_set(i32 27, i32 0)
ret i32 %1
}
/* Variables and functions */
double RAND_MAX;
double rand();
int selectPivotIndex(void **vals, int left, int right) {
  return left + (int)((right - left + 1) * (rand() / (RAND_MAX + 1.0)));
}


x86 assembly (clang, -O0):
<selectPivotIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x1c(%rbp),%eax
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xeac(%rip),%xmm2
mov    0x2e8d(%rip),%rcx
addsd  (%rcx),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<selectPivotIndex>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
sub    %esi,%edx
add    $0x1,%edx
cvtsi2sd %edx,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2eb4(%rip),%rax
movsd  (%rax),%xmm1
addsd  0xec0(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%eax
add    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i32 @selectPivotIndex(i8** %0, i32 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = sub nsw i32 %8, %9
%11 = add nsw i32 %10, 1
%12 = sitofp i32 %11 to double
%13 = call double (...) @rand()
%14 = load double, double* @RAND_MAX
%15 = fadd double %14, 1.000000e+00
%16 = fdiv double %13, %15
%17 = fmul double %12, %16
%18 = fptosi double %17 to i32
%19 = add nsw i32 %7, %18
ret i32 %19
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i32 @selectPivotIndex(i8** nocapture readnone %0, i32 %1, i32 %2) {
%4 = sub i32 1, %1
%5 = add i32 %4, %2
%6 = sitofp i32 %5 to double
%7 = tail call double (...) @rand()
%8 = load double, double* @RAND_MAX
%9 = fadd double %8, 1.000000e+00
%10 = fdiv double %7, %9
%11 = fmul double %10, %6
%12 = fptosi double %11 to i32
%13 = add nsw i32 %12, %1
ret i32 %13
}
void testClosureBrV(void (*closure)(char), char a1) { (*closure)(a1); }


x86 assembly (clang, -O0):
<testClosureBrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl -0x9(%rbp),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureBrV>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

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

LLVM IR (-O2):
define void @testClosureBrV(void (i8)* nocapture %0, i8 signext %1) {
tail call void %0(i8 signext %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int chown(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int errno;
int __sulong_posix_chown(const char *filename, uid_t user, gid_t group) {
  {
    int native_errno = errno;
    int result = chown(filename, user, group);
    if (result == (int)-1) {
      result = (int)(long)-errno;
    }
    errno = native_errno;
    return result;
  };
}


x86 assembly (clang, -O0):
<__sulong_posix_chown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <chown@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    115a <__sulong_posix_chown+0x4a>
xor    %eax,%eax
mov    0x2e8d(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
mov    0x2e7c(%rip),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_chown>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <chown@plt>
xor    %ecx,%ecx
sub    (%rbx),%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @__sulong_posix_chown(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* @errno
store i32 %9, i32* %7
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 @chown(i8* %10, i32 %11, i32 %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %21
16: ; preds = %3
%17 = load i32, i32* @errno
%18 = sub nsw i32 0, %17
%19 = sext i32 %18 to i64
%20 = trunc i64 %19 to i32
store i32 %20, i32* %8
br label %21
21: ; preds = %16, %3
%22 = load i32, i32* %7
store i32 %22, i32* @errno
%23 = load i32, i32* %8
ret i32 %23
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @__sulong_posix_chown(i8* nocapture %0, i32 %1, i32 %2) {
%4 = load i32, i32* @errno
%5 = tail call i32 @chown(i8* %0, i32 %1, i32 %2)
%6 = icmp eq i32 %5, -1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
%9 = select i1 %6, i32 %8, i32 %5
store i32 %4, i32* @errno
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ set_rstp_port_cfg_value(int, int /*<<< orphan*/, long);
int strtoul(char *, int /*<<< orphan*/, int);
int cli_prt_mcheck(int argc, char **argv) {
  int port_index = 0;
  if ('a' != argv[1][0]) {
    port_index = strtoul(argv[1], 0, 10);
  }
  set_rstp_port_cfg_value(port_index, 0, (1L << 5));
  return 0;
}


x86 assembly (clang, -O0):
<cli_prt_mcheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
je     1165 <cli_prt_mcheck+0x45>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
xor    %esi,%esi
mov    $0x20,%edx
call   1030 <set_rstp_port_cfg_value@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cli_prt_mcheck>:
push   %rax
mov    0x8(%rsi),%rax
xor    %edi,%edi
cmpb   $0x61,(%rax)
je     113d <cli_prt_mcheck+0x1d>
mov    %rax,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %eax,%edi
mov    $0x20,%edx
xor    %esi,%esi
call   1030 <set_rstp_port_cfg_value@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cli_prt_mcheck(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %5
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 97, %11
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i8**, i8*** %4
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @strtoul(i8* %16, i32 0, i32 10)
store i32 %17, i32* %5
br label %18
18: ; preds = %13, %2
%19 = load i32, i32* %5
%20 = call i32 @set_rstp_port_cfg_value(i32 %19, i32 0, i64 32)
ret i32 0
}

LLVM IR (-O2):
define i32 @cli_prt_mcheck(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 97
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @strtoul(i8* %4, i32 0, i32 10)
br label %9
9: ; preds = %7, %2
%10 = phi i32 [ %8, %7 ], [ 0, %2 ]
%11 = tail call i32 @set_rstp_port_cfg_value(i32 %10, i32 0, i64 32)
ret i32 0
}
int test_imm_A3uint8_reg(unsigned char val) {
  return ((val) & (-0xA3 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_A3uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 93
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
long long PAPI_get_virt_usec();
void papif_get_virt_usec__(long long *time) { *time = PAPI_get_virt_usec(); }


x86 assembly (clang, -O0):
<papif_get_virt_usec__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <PAPI_get_virt_usec@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_get_virt_usec__>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <PAPI_get_virt_usec@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_get_virt_usec__(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i64 (...) @PAPI_get_virt_usec()
%4 = load i64*, i64** %2
store i64 %3, i64* %4
ret void
}

LLVM IR (-O2):
define void @papif_get_virt_usec__(i64* nocapture writeonly %0) {
%2 = tail call i64 (...) @PAPI_get_virt_usec()
store i64 %2, i64* %0
ret void
}