xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
scalar_t__ task_queue_not_totally_broken_tests();
int main(void) {
  int failed = 0;
  if (task_queue_not_totally_broken_tests() != 0) {
    ++failed;
  }
  printf("\n[SUITE ERR ] %d suite(s)\n", failed);
  return failed;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <task_queue_not_totally_broken_tests@plt>
cmp    $0x0,%rax
je     1150 <main+0x30>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <task_queue_not_totally_broken_tests@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
lea    0xec9(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\0A[SUITE ERR ] %d suite(s)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i64 (...) @task_queue_not_totally_broken_tests()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
br label %8
8: ; preds = %5, %0
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0A[SUITE ERR ] %d suite(s)\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @task_queue_not_totally_broken_tests()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 %3
}
void RTSemPingWait(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemPingWait() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlcpy(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void test8() { strlcpy(0, 0, 0); }


x86 assembly (clang, -O0):
<test8>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <strlcpy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test8>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <strlcpy@plt>

LLVM IR (-O0):
define void @test8() {
%1 = call i32 @strlcpy(i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @test8() {
%1 = tail call i32 @strlcpy(i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
void *malloc(size_t const);
int /*<<< orphan*/ memcpy(void *, void const *, size_t const);
void *memdup(const void *source, const size_t size) {
  void *dest = malloc(size);
  if (dest != NULL) {
    memcpy(dest, source, size);
  }
  return (dest);
}


x86 assembly (clang, -O0):
<memdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <memdup+0x39>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memdup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1149 <memdup+0x29>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @memdup(i8* %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
int STRCASECMP(a, b) const char *a;
const char *b;
{
  while (tolower((unsigned char)*a++) == tolower((unsigned char)*b++))
    ;
  return b - a;
}


x86 assembly (clang, -O0):
<STRCASECMP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%edi
call   1030 <tolower@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%edi
call   1030 <tolower@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jne    1163 <STRCASECMP+0x53>
jmp    1120 <STRCASECMP+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STRCASECMP>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
nop
movzbl (%r14,%rbx,1),%edi
call   1030 <tolower@plt>
mov    %eax,%ebp
movzbl (%r15,%rbx,1),%edi
call   1030 <tolower@plt>
add    $0x1,%rbx
cmp    %eax,%ebp
je     1120 <STRCASECMP+0x10>
add    %ebx,%r15d
add    %ebx,%r14d
sub    %r14d,%r15d
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @STRCASECMP(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 = %17, %2
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = call i32 @tolower(i32 %9)
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %4
%13 = load i8, i8* %11
%14 = zext i8 %13 to i32
%15 = call i32 @tolower(i32 %14)
%16 = icmp eq i32 %10, %15
br i1 %16, label %17, label %18
17: ; preds = %5
br label %5
18: ; preds = %5
%19 = load i8*, i8** %4
%20 = load i8*, i8** %3
%21 = ptrtoint i8* %19 to i64
%22 = ptrtoint i8* %20 to i64
%23 = sub i64 %21, %22
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @STRCASECMP(i8* %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %6, %3 ]
%5 = phi i8* [ %1, %2 ], [ %10, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = tail call i32 @tolower(i32 %8)
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = tail call i32 @tolower(i32 %12)
%14 = icmp eq i32 %9, %13
br i1 %14, label %3, label %15
15: ; preds = %3
%16 = ptrtoint i8* %10 to i64
%17 = ptrtoint i8* %6 to i64
%18 = sub i64 %16, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}
void putns(void) {}


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

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

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

LLVM IR (-O2):
define void @putns() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _pfatal(int /*<<< orphan*/ *, int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *xmalloc(size_t sz) {
  void *ptr = malloc(sz);
  if (!ptr)
    _pfatal(NULL, 0, "xmalloc");
  ;
  memset(ptr, 0, sz);
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1166 <xmalloc+0x36>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
lea    0xe9f(%rip),%rdx
call   1050 <_pfatal@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1154 <xmalloc+0x24>
lea    0xeb5(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1050 <_pfatal@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"xmalloc\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @_pfatal(i32* null, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
%12 = load i64, i64* %2
%13 = call i32 @memset(i8* %11, i32 0, i64 %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [8 x i8] c"xmalloc\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @_pfatal(i32* null, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
/* Variables and functions */
size_t CHAR_BIT;
void bits_set(void *bits, size_t i) {
  ((unsigned char *)bits)[i / CHAR_BIT] |=
      ((1 << (CHAR_BIT - 1)) >> (i % CHAR_BIT));
}


x86 assembly (clang, -O0):
<bits_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x10(%rbp),%rax
mov    0x2eb2(%rip),%rcx
xor    %edx,%edx
divq   (%rcx)
mov    %edx,%ecx
sar    %cl,%esi
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2e96(%rip),%rcx
xor    %edx,%edx
divq   (%rcx)
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movzbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits_set>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%r9
lea    -0x1(%r9),%ecx
mov    $0x1,%r8d
shl    %cl,%r8d
mov    %rsi,%rax
mov    %rsi,%rcx
or     %r9,%rcx
shr    $0x20,%rcx
je     1130 <bits_set+0x30>
xor    %edx,%edx
div    %r9
mov    %rdx,%rcx
jmp    1137 <bits_set+0x37>
xor    %edx,%edx
div    %r9d
mov    %edx,%ecx
sar    %cl,%r8d
or     %r8b,(%rdi,%rax,1)
ret

LLVM IR (-O0):
@CHAR_BIT = global i64 0
define void @bits_set(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* @CHAR_BIT
%6 = sub i64 %5, 1
%7 = trunc i64 %6 to i32
%8 = shl i32 1, %7
%9 = load i64, i64* %4
%10 = load i64, i64* @CHAR_BIT
%11 = urem i64 %9, %10
%12 = trunc i64 %11 to i32
%13 = ashr i32 %8, %12
%14 = load i8*, i8** %3
%15 = load i64, i64* %4
%16 = load i64, i64* @CHAR_BIT
%17 = udiv i64 %15, %16
%18 = getelementptr inbounds i8, i8* %14, i64 %17
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = or i32 %20, %13
%22 = trunc i32 %21 to i8
store i8 %22, i8* %18
ret void
}

LLVM IR (-O2):
@CHAR_BIT = global i64 0
define void @bits_set(i8* nocapture %0, i64 %1) {
%3 = load i64, i64* @CHAR_BIT
%4 = trunc i64 %3 to i32
%5 = add i32 %4, -1
%6 = shl nuw i32 1, %5
%7 = urem i64 %1, %3
%8 = trunc i64 %7 to i32
%9 = ashr i32 %6, %8
%10 = udiv i64 %1, %3
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = trunc i32 %9 to i8
%14 = or i8 %12, %13
store i8 %14, i8* %11
ret void
}
__attribute__((noreturn)) void IntDefaultHandler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<IntDefaultHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <IntDefaultHandler+0x9>
jmp    1109 <IntDefaultHandler+0x9>

x86 assembly (clang, -O2):
<IntDefaultHandler>:
jmp    1100 <IntDefaultHandler>

LLVM IR (-O0):
define void @IntDefaultHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @IntDefaultHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ bfree(char **);
void strlist_free(char **strlist) { bfree(strlist); }


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

x86 assembly (clang, -O2):
<strlist_free>:
jmp    1030 <bfree@plt>

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

LLVM IR (-O2):
define void @strlist_free(i8** %0) {
%2 = tail call i32 @bfree(i8** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ curmove(int /*<<< orphan*/, int /*<<< orphan*/);
void tos() { curmove(0, 0); }


x86 assembly (clang, -O0):
<tos>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <curmove@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tos>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <curmove@plt>

LLVM IR (-O0):
define void @tos() {
%1 = call i32 @curmove(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @tos() {
%1 = tail call i32 @curmove(i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f0_tvos(int /*<<< orphan*/);
int /*<<< orphan*/ f1_tvos(int /*<<< orphan*/);
int /*<<< orphan*/ f2_tvos(int /*<<< orphan*/);
int /*<<< orphan*/ f3_tvos(int /*<<< orphan*/);
int /*<<< orphan*/ f4_tvos(int /*<<< orphan*/);
int /*<<< orphan*/ f5_attr_reversed_tvos(int /*<<< orphan*/);
int /*<<< orphan*/ f5_tvos(int /*<<< orphan*/);
int /*<<< orphan*/ f5b_tvos(int /*<<< orphan*/);
int /*<<< orphan*/ f5c_tvos(int /*<<< orphan*/);
int /*<<< orphan*/ f6_tvos(int /*<<< orphan*/);
void test_tvos() {
  f0_tvos(0);
  f1_tvos(0);
  f2_tvos(0);
  f3_tvos(0);
  f4_tvos(0);
  f5_tvos(0);
  f5_attr_reversed_tvos(0);
  f5b_tvos(0);
  f5c_tvos(0);
  f6_tvos(0);
}


x86 assembly (clang, -O0):
<test_tvos>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <f0_tvos@plt>
xor    %edi,%edi
call   10b0 <f1_tvos@plt>
xor    %edi,%edi
call   1080 <f2_tvos@plt>
xor    %edi,%edi
call   10a0 <f3_tvos@plt>
xor    %edi,%edi
call   1040 <f4_tvos@plt>
xor    %edi,%edi
call   1060 <f5_tvos@plt>
xor    %edi,%edi
call   1090 <f5_attr_reversed_tvos@plt>
xor    %edi,%edi
call   10c0 <f5b_tvos@plt>
xor    %edi,%edi
call   1070 <f5c_tvos@plt>
xor    %edi,%edi
call   1030 <f6_tvos@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_tvos>:
push   %rax
xor    %edi,%edi
call   1050 <f0_tvos@plt>
xor    %edi,%edi
call   10b0 <f1_tvos@plt>
xor    %edi,%edi
call   1080 <f2_tvos@plt>
xor    %edi,%edi
call   10a0 <f3_tvos@plt>
xor    %edi,%edi
call   1040 <f4_tvos@plt>
xor    %edi,%edi
call   1060 <f5_tvos@plt>
xor    %edi,%edi
call   1090 <f5_attr_reversed_tvos@plt>
xor    %edi,%edi
call   10c0 <f5b_tvos@plt>
xor    %edi,%edi
call   1070 <f5c_tvos@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <f6_tvos@plt>

LLVM IR (-O0):
define void @test_tvos() {
%1 = call i32 @f0_tvos(i32 0)
%2 = call i32 @f1_tvos(i32 0)
%3 = call i32 @f2_tvos(i32 0)
%4 = call i32 @f3_tvos(i32 0)
%5 = call i32 @f4_tvos(i32 0)
%6 = call i32 @f5_tvos(i32 0)
%7 = call i32 @f5_attr_reversed_tvos(i32 0)
%8 = call i32 @f5b_tvos(i32 0)
%9 = call i32 @f5c_tvos(i32 0)
%10 = call i32 @f6_tvos(i32 0)
ret void
}

LLVM IR (-O2):
define void @test_tvos() {
%1 = tail call i32 @f0_tvos(i32 0)
%2 = tail call i32 @f1_tvos(i32 0)
%3 = tail call i32 @f2_tvos(i32 0)
%4 = tail call i32 @f3_tvos(i32 0)
%5 = tail call i32 @f4_tvos(i32 0)
%6 = tail call i32 @f5_tvos(i32 0)
%7 = tail call i32 @f5_attr_reversed_tvos(i32 0)
%8 = tail call i32 @f5b_tvos(i32 0)
%9 = tail call i32 @f5c_tvos(i32 0)
%10 = tail call i32 @f6_tvos(i32 0)
ret void
}
void xen_early_init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @xen_early_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("\nBom dia, Ola Mundo\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0ABom dia, Ola Mundo\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"\0ABom dia, Ola Mundo\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ count(int *, int /*<<< orphan*/);
scalar_t__ count_opt(int *, int /*<<< orphan*/);
int test_empty_array() {
  int array[] = {};
  return 0 == count(array, 0) && 0 == count_opt(array, 0);
}


x86 assembly (clang, -O0):
<test_empty_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
call   1030 <count@plt>
mov    %rax,%rdx
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %rdx,%rcx
mov    %al,-0x5(%rbp)
jne    115f <test_empty_array+0x3f>
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
call   1040 <count_opt@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_empty_array>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdi
xor    %ebx,%ebx
xor    %esi,%esi
call   1030 <count@plt>
test   %rax,%rax
jne    114c <test_empty_array+0x2c>
lea    0xc(%rsp),%rdi
xor    %esi,%esi
call   1040 <count_opt@plt>
xor    %ebx,%ebx
test   %rax,%rax
sete   %bl
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_empty_array() {
%1 = alloca [0 x i32]
%2 = bitcast [0 x i32]* %1 to i8*
%3 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
%4 = call i64 @count(i32* %3, i32 0)
%5 = icmp eq i64 0, %4
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
%8 = call i64 @count_opt(i32* %7, i32 0)
%9 = icmp eq i64 0, %8
br label %10
10: ; preds = %6, %0
%11 = phi i1 [ false, %0 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @test_empty_array() {
%1 = alloca [0 x i32]
%2 = bitcast [0 x i32]* %1 to i8*
%3 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
%4 = call i64 @count(i32* %3, i32 0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = call i64 @count_opt(i32* %3, i32 0)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %0
%11 = phi i32 [ 0, %0 ], [ %9, %6 ]
ret i32 %11
}
void gtk_widget_thaw_child_notify() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_thaw_child_notify() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int _mm_movemask_pi8(int /*<<< orphan*/);
int test24(__m64 a) { return _mm_movemask_pi8(a); }


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

x86 assembly (clang, -O2):
<test24>:
jmp    1030 <_mm_movemask_pi8@plt>

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

LLVM IR (-O2):
define i32 @test24(i32 %0) {
%2 = tail call i32 @_mm_movemask_pi8(i32 %0)
ret i32 %2
}
void RotateUV270() {}


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

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

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

LLVM IR (-O2):
define void @RotateUV270() {
ret void
}
int n_digits(const unsigned char source[], int position, int length) {
  int i;
  for (i = position; ((source[i] >= '0') && (source[i] <= '9')) && (i < length);
       i++)
    ;
  return i - position;
}


x86 assembly (clang, -O0):
<n_digits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x15(%rbp)
jl     1154 <n_digits+0x54>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x39,%ecx
mov    %al,-0x15(%rbp)
jg     1154 <n_digits+0x54>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
setl   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1164 <n_digits+0x64>
jmp    1177 <n_digits+0x77>
jmp    1169 <n_digits+0x69>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1114 <n_digits+0x14>
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<n_digits>:
movslq %esi,%rsi
movslq %edx,%rcx
mov    $0xffffffff,%eax
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rsi,1),%edx
add    $0xd0,%dl
add    $0x1,%eax
cmp    $0x9,%dl
ja     112b <n_digits+0x2b>
lea    0x1(%rsi),%rdx
cmp    %rcx,%rsi
mov    %rdx,%rsi
jl     1110 <n_digits+0x10>
ret

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

LLVM IR (-O2):
define i32 @n_digits(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = sext i32 %2 to i64
br label %6
6: ; preds = %6, %3
%7 = phi i64 [ %14, %6 ], [ %4, %3 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = add i8 %9, -48
%11 = icmp ult i8 %10, 10
%12 = icmp slt i64 %7, %5
%13 = select i1 %11, i1 %12, i1 false
%14 = add nsw i64 %7, 1
br i1 %13, label %6, label %15
15: ; preds = %6
%16 = trunc i64 %7 to i32
%17 = sub nsw i32 %16, %1
ret i32 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int pthread_cond_signal(int /*<<< orphan*/ *);
int /*<<< orphan*/ syserr(int, char *);
void cond_signal(pthread_cond_t *c) {
  int err;
  if ((err = pthread_cond_signal(c)) != 0) {
    syserr(err, "cond signal failed");
  }
}


x86 assembly (clang, -O0):
<cond_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pthread_cond_signal@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1150 <cond_signal+0x30>
mov    -0xc(%rbp),%edi
lea    0xeb5(%rip),%rsi
call   1030 <syserr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cond_signal>:
push   %rax
call   1040 <pthread_cond_signal@plt>
test   %eax,%eax
je     1139 <cond_signal+0x19>
lea    0xecf(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <syserr@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"cond signal failed\00"
define void @cond_signal(i32* %0) {
%2 = tail call i32 @pthread_cond_signal(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @syserr(i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int caret;
};
typedef TYPE_1__ XIMPreeditDrawCallbackStruct;

/* Variables and functions */
void set_XIMPreeditDrawCallbackStruct_caret(void *_p, int _v) {
  ((XIMPreeditDrawCallbackStruct *)_p)->caret = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XIMPreeditDrawCallbackStruct_caret>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XIMPreeditDrawCallbackStruct_caret(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int);
void vec_swapsplice_(char **data, int *length, int *capacity, int memsz,
                     int start, int count) {
  (void)capacity;
  memmove(*data + start * memsz, *data + (*length - count) * memsz,
          count * memsz);
}


x86 assembly (clang, -O0):
<vec_swapsplice_>:
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    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x20(%rbp),%eax
imul   -0x1c(%rbp),%eax
cltq
add    %rax,%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
sub    -0x24(%rbp),%eax
imul   -0x1c(%rbp),%eax
cltq
add    %rax,%rsi
mov    -0x24(%rbp),%edx
imul   -0x1c(%rbp),%edx
call   1030 <memmove@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec_swapsplice_>:
mov    %r9d,%edx
mov    (%rdi),%rax
imul   %ecx,%r8d
movslq %r8d,%rdi
add    %rax,%rdi
mov    (%rsi),%esi
sub    %r9d,%esi
imul   %ecx,%esi
movslq %esi,%rsi
add    %rax,%rsi
imul   %ecx,%edx
jmp    1030 <memmove@plt>

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

LLVM IR (-O2):
define void @vec_swapsplice_(i8** nocapture %0, i32* nocapture %1, i32* nocapture readnone %2, i32 %3, i32 %4, i32 %5) {
%7 = load i8*, i8** %0
%8 = mul nsw i32 %4, %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i32, i32* %1
%12 = sub nsw i32 %11, %5
%13 = mul nsw i32 %12, %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %7, i64 %14
%16 = mul nsw i32 %5, %3
%17 = tail call i32 @memmove(i8* %10, i8* %15, i32 %16)
ret void
}
/* Variables and functions */
char *trimheadchar(char *str, char token, size_t len) {
  char *newstr = str;
  while ((*newstr != token) && (newstr < str + len)) {
    newstr++;
  }
  return newstr;
}


x86 assembly (clang, -O0):
<trimheadchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
movsbl -0x9(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x21(%rbp)
je     1147 <trimheadchar+0x47>
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
add    -0x18(%rbp),%rcx
cmp    %rcx,%rax
setb   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1157 <trimheadchar+0x57>
jmp    1168 <trimheadchar+0x68>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111a <trimheadchar+0x1a>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trimheadchar>:
add    %rdi,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x1(%rdi),%rax
cmp    %sil,(%rdi)
je     1121 <trimheadchar+0x21>
cmp    %rdx,%rdi
mov    %rax,%rdi
jb     1110 <trimheadchar+0x10>
add    $0xffffffffffffffff,%rax
ret

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

LLVM IR (-O2):
define i8* @trimheadchar(i8* %0, i8 signext %1, i64 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 %2
br label %5
5: ; preds = %5, %3
%6 = phi i8* [ %0, %3 ], [ %11, %5 ]
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, %1
%9 = icmp ult i8* %6, %4
%10 = select i1 %8, i1 %9, i1 false
%11 = getelementptr inbounds i8, i8* %6, i64 1
br i1 %10, label %5, label %12
12: ; preds = %5
ret i8* %6
}
/* Type definitions */
typedef scalar_t__ const int64_t;

/* Variables and functions */
__attribute__((always_)) const int64_t xceill(long double x) {
  return (int64_t)x + (x < 0 ? 0 : 1);
}


x86 assembly (clang, -O0):
<xceill>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
xor    %eax,%eax
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fnstcw -0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x1c(%rbp)
fldcw  -0x1c(%rbp)
fld    %st(0)
fistpll -0x18(%rbp)
fldcw  -0x1a(%rbp)
mov    -0x18(%rbp),%rax
fldz
fucomip %st(1),%st
fstp   %st(0)
setbe  %cl
movzbl %cl,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xceill>:
fldt   0x8(%rsp)
fnstcw -0xc(%rsp)
movzwl -0xc(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0xa(%rsp)
fldcw  -0xa(%rsp)
fld    %st(0)
fistpll -0x8(%rsp)
fldcw  -0xc(%rsp)
fldz
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setbe  %al
add    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @xceill(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptosi x86_fp80 %3 to i64
%5 = load x86_fp80, x86_fp80* %2
%6 = fcmp olt x86_fp80 %5, 0xK00000000000000000000
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 0, i32 1
%9 = sext i32 %8 to i64
%10 = add nsw i64 %4, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @xceill(x86_fp80 %0) {
%2 = fptosi x86_fp80 %0 to i64
%3 = fcmp uge x86_fp80 %0, 0xK00000000000000000000
%4 = zext i1 %3 to i64
%5 = add nsw i64 %4, %2
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ bgntmesh();
void bgntme_() { bgntmesh(); }


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

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

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

LLVM IR (-O2):
define void @bgntme_() {
%1 = tail call i32 (...) @bgntmesh()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put1(char);
void put(char c) {
  if (c == '\n')
    put1('\r');
  put1(c);
}


x86 assembly (clang, -O0):
<put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1135 <put+0x25>
mov    $0xd,%edi
call   1030 <put1@plt>
movsbl -0x1(%rbp),%edi
call   1030 <put1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put>:
push   %rbx
mov    %edi,%ebx
cmp    $0xa,%bl
jne    1122 <put+0x12>
mov    $0xd,%edi
call   1030 <put1@plt>
movsbl %bl,%edi
pop    %rbx
jmp    1030 <put1@plt>

LLVM IR (-O0):
define void @put(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, 10
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @put1(i8 signext 13)
br label %8
8: ; preds = %6, %1
%9 = load i8, i8* %2
%10 = call i32 @put1(i8 signext %9)
ret void
}

LLVM IR (-O2):
define void @put(i8 signext %0) {
%2 = icmp eq i8 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @put1(i8 signext 13)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @put1(i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GeoFenceSettingsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void GeoFenceSettingsUpdated() { UAVObjUpdated(GeoFenceSettingsHandle()); }


x86 assembly (clang, -O0):
<GeoFenceSettingsUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GeoFenceSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GeoFenceSettingsUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <GeoFenceSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @GeoFenceSettingsUpdated() {
%1 = call i32 (...) @GeoFenceSettingsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @GeoFenceSettingsUpdated() {
%1 = tail call i32 (...) @GeoFenceSettingsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ printf(char *, void *);
void our_free(void *ptr) {
  printf("FREE 0x%p\n", ptr);
  free(ptr);
}


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

x86 assembly (clang, -O2):
<our_free>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"FREE 0x%p\0A\00"
define void @our_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"FREE 0x%p\0A\00"
define void @our_free(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct term {
  int dummy;
};

/* Variables and functions */
struct term *_rec_subs_free(int /*<<< orphan*/ *, struct term *, char *,
                            struct term *);
struct term *substitute_free(struct term *t, char *var, struct term *subs) {
  return _rec_subs_free(NULL, t, var, subs);
}


x86 assembly (clang, -O0):
<substitute_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edi
call   1030 <_rec_subs_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<substitute_free>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <_rec_subs_free@plt>

LLVM IR (-O0):
%struct.term = type { i32 }
define %struct.term* @substitute_free(%struct.term* %0, i8* %1, %struct.term* %2) {
%4 = alloca %struct.term*
%5 = alloca i8*
%6 = alloca %struct.term*
store %struct.term* %0, %struct.term** %4
store i8* %1, i8** %5
store %struct.term* %2, %struct.term** %6
%7 = load %struct.term*, %struct.term** %4
%8 = load i8*, i8** %5
%9 = load %struct.term*, %struct.term** %6
%10 = call %struct.term* @_rec_subs_free(i32* null, %struct.term* %7, i8* %8, %struct.term* %9)
ret %struct.term* %10
}

LLVM IR (-O2):
%struct.term = type { i32 }
define %struct.term* @substitute_free(%struct.term* %0, i8* %1, %struct.term* %2) {
%4 = tail call %struct.term* @_rec_subs_free(i32* null, %struct.term* %0, i8* %1, %struct.term* %2)
ret %struct.term* %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int read_standard_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(13, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<read_standard_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xd,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_standard_start_system>:
mov    $0xd,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @read_standard_start_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 13, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @read_standard_start_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 13, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int Distance(int, int, float **);
int Sum_S(int, float **);
float Agglomerative_criterion(int i, int j, float **delta, int r) {
  float Qij;
  Qij = (r - 2) * Distance(i, j, delta) - Sum_S(i, delta) - Sum_S(j, delta);
  return (Qij);
}


x86 assembly (clang, -O0):
<Agglomerative_criterion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1040 <Distance@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <Sum_S@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <Sum_S@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Agglomerative_criterion>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%ebx
mov    %rdx,%r14
mov    %esi,%r15d
mov    %edi,%r12d
add    $0xfffffffe,%ebx
call   1040 <Distance@plt>
mov    %eax,%ebp
imul   %ebx,%ebp
mov    %r12d,%edi
mov    %r14,%rsi
call   1030 <Sum_S@plt>
mov    %eax,%ebx
mov    %r15d,%edi
mov    %r14,%rsi
call   1030 <Sum_S@plt>
add    %ebx,%eax
sub    %eax,%ebp
cvtsi2ss %ebp,%xmm0
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define float @Agglomerative_criterion(i32 %0, i32 %1, float** %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca float**
%8 = alloca i32
%9 = alloca float
store i32 %0, i32* %5
store i32 %1, i32* %6
store float** %2, float*** %7
store i32 %3, i32* %8
%10 = load i32, i32* %8
%11 = sub nsw i32 %10, 2
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = load float**, float*** %7
%15 = call i32 @Distance(i32 %12, i32 %13, float** %14)
%16 = mul nsw i32 %11, %15
%17 = load i32, i32* %5
%18 = load float**, float*** %7
%19 = call i32 @Sum_S(i32 %17, float** %18)
%20 = sub nsw i32 %16, %19
%21 = load i32, i32* %6
%22 = load float**, float*** %7
%23 = call i32 @Sum_S(i32 %21, float** %22)
%24 = sub nsw i32 %20, %23
%25 = sitofp i32 %24 to float
store float %25, float* %9
%26 = load float, float* %9
ret float %26
}

LLVM IR (-O2):
define float @Agglomerative_criterion(i32 %0, i32 %1, float** %2, i32 %3) {
%5 = add nsw i32 %3, -2
%6 = tail call i32 @Distance(i32 %0, i32 %1, float** %2)
%7 = mul nsw i32 %6, %5
%8 = tail call i32 @Sum_S(i32 %0, float** %2)
%9 = tail call i32 @Sum_S(i32 %1, float** %2)
%10 = add i32 %8, %9
%11 = sub i32 %7, %10
%12 = sitofp i32 %11 to float
ret float %12
}
/* Variables and functions */
unsigned char *hmac_blake384(unsigned char *, unsigned char const *, size_t,
                             unsigned char const *, size_t);
unsigned char *mac_hmac_blake384(unsigned char *out, const unsigned char *key,
                                 size_t key_len, const unsigned char *msg,
                                 size_t msg_len) {
  return hmac_blake384(out, key, key_len, msg, msg_len);
}


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

x86 assembly (clang, -O2):
<mac_hmac_blake384>:
jmp    1030 <hmac_blake384@plt>

LLVM IR (-O0):
define i8* @mac_hmac_blake384(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = load i8*, i8** %9
%15 = load i64, i64* %10
%16 = call i8* @hmac_blake384(i8* %11, i8* %12, i64 %13, i8* %14, i64 %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @mac_hmac_blake384(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i8* @hmac_blake384(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4)
ret i8* %6
}
/* Variables and functions */
int readb(int);
int /*<<< orphan*/ writeb(int, unsigned char);
void putch(unsigned char c) {
  while ((readb(0x11100017) & 0x40) == 0)
    ;
  writeb(0x11100003, c);
}


x86 assembly (clang, -O0):
<putch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x11100017,%edi
call   1030 <readb@plt>
and    $0x40,%eax
cmp    $0x0,%eax
jne    1149 <putch+0x29>
jmp    112e <putch+0xe>
mov    $0x11100003,%edi
movzbl -0x1(%rbp),%esi
call   1040 <writeb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putch>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x11100017,%edi
call   1030 <readb@plt>
test   $0x40,%al
je     1130 <putch+0x10>
movzbl %bl,%esi
mov    $0x11100003,%edi
pop    %rbx
jmp    1040 <writeb@plt>

LLVM IR (-O0):
define void @putch(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = call i32 @readb(i32 286261271)
%5 = and i32 %4, 64
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i8, i8* %2
%10 = call i32 @writeb(i32 286261251, i8 zeroext %9)
ret void
}

LLVM IR (-O2):
define void @putch(i8 zeroext %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @readb(i32 286261271)
%4 = and i32 %3, 64
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call i32 @writeb(i32 286261251, i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_openat;
int syscall(int /*<<< orphan*/, int, char const *, int);
int openat_(int dirfd, const char *pathname, int flags) {
  return syscall(__NR_openat, dirfd, pathname, flags);
}


x86 assembly (clang, -O0):
<openat_>:
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
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openat_>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@__NR_openat = global i32 0
define i32 @openat_(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @__NR_openat
%5 = tail call i32 @syscall(i32 %4, i32 %0, i8* %1, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ glLogicOp(unsigned int);
void LogicOp(unsigned int op) { glLogicOp(op); }


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

x86 assembly (clang, -O2):
<LogicOp>:
jmp    1030 <glLogicOp@plt>

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

LLVM IR (-O2):
define void @LogicOp(i32 %0) {
%2 = tail call i32 @glLogicOp(i32 %0)
ret void
}