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

/* Variables and functions */
int /*<<< orphan*/ _mm_mul_epu32(int /*<<< orphan*/ const,
                                 int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_sub_epi64(int /*<<< orphan*/, int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/ const);
__m128i multiply_apply_sign_sse2(const __m128i in, const __m128i sign,
                                 const __m128i cospi) {
  __m128i out = _mm_mul_epu32(in, cospi);
  out = _mm_xor_si128(out, sign);
  return _mm_sub_epi64(out, sign);
}


x86 assembly (clang, -O0):
<multiply_apply_sign_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <_mm_mul_epu32@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_sub_epi64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiply_apply_sign_sse2>:
push   %rbx
mov    %esi,%ebx
mov    %edx,%esi
call   1050 <_mm_mul_epu32@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <_mm_sub_epi64@plt>

LLVM IR (-O0):
define i32 @multiply_apply_sign_sse2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = call i32 @_mm_mul_epu32(i32 %8, i32 %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = load i32, i32* %5
%13 = call i32 @_mm_xor_si128(i32 %11, i32 %12)
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = load i32, i32* %5
%16 = call i32 @_mm_sub_epi64(i32 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @multiply_apply_sign_sse2(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_mm_mul_epu32(i32 %0, i32 %2)
%5 = tail call i32 @_mm_xor_si128(i32 %4, i32 %1)
%6 = tail call i32 @_mm_sub_epi64(i32 %5, i32 %1)
ret i32 %6
}
void delay(volatile int count) {
  count *= 50000;
  while (count--)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
imul   $0xc350,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     112c <delay+0x2c>
jmp    1113 <delay+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
mov    %edi,-0x4(%rsp)
imul   $0xc350,-0x4(%rsp),%eax
mov    %eax,-0x4(%rsp)
subl   $0x1,-0x4(%rsp)
jae    1110 <delay+0x10>
ret

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = mul nsw i32 %3, 50000
store volatile i32 %4, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load volatile i32, i32* %2
%7 = add nsw i32 %6, -1
store volatile i32 %7, i32* %2
%8 = icmp ne i32 %6, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = mul nsw i32 %3, 50000
store volatile i32 %4, i32* %2
br label %5
5: ; preds = %5, %1
%6 = load volatile i32, i32* %2
%7 = add nsw i32 %6, -1
store volatile i32 %7, i32* %2
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %5
9: ; preds = %5
ret void
}
/* Variables and functions */
unsigned int AES_BLOCK_SIZE;
unsigned int crypt_aescbc_getencryptbuflen(unsigned int inlen) {
  return (inlen / AES_BLOCK_SIZE + 1) * AES_BLOCK_SIZE;
}


x86 assembly (clang, -O0):
<crypt_aescbc_getencryptbuflen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed7(%rip),%rcx
xor    %edx,%edx
divl   (%rcx)
add    $0x1,%eax
mov    0x2ec9(%rip),%rcx
imul   (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_aescbc_getencryptbuflen>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
mov    (%rcx),%ecx
xor    %edx,%edx
div    %ecx
add    $0x1,%eax
imul   %ecx,%eax
ret

LLVM IR (-O0):
@AES_BLOCK_SIZE = global i32 0
define i32 @crypt_aescbc_getencryptbuflen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @AES_BLOCK_SIZE
%5 = udiv i32 %3, %4
%6 = add i32 %5, 1
%7 = load i32, i32* @AES_BLOCK_SIZE
%8 = mul i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
@AES_BLOCK_SIZE = global i32 0
define i32 @crypt_aescbc_getencryptbuflen(i32 %0) {
%2 = load i32, i32* @AES_BLOCK_SIZE
%3 = udiv i32 %0, %2
%4 = add i32 %3, 1
%5 = mul i32 %4, %2
ret i32 %5
}
unsigned long long rdpmc(unsigned int counter) {
  unsigned int low, high;
  __asm__ volatile("rdpmc" : "=a"(low), "=d"(high) : "c"(counter));
  return (unsigned long long)low | ((unsigned long long)high) << 32;
}


x86 assembly (clang, -O0):
<rdpmc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
rdpmc
mov    %eax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdpmc>:
mov    %edi,%ecx
rdpmc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @rdpmc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call { i32, i32 } asm sideeffect "rdpmc", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %5)
%7 = extractvalue { i32, i32 } %6, 0
%8 = extractvalue { i32, i32 } %6, 1
store i32 %7, i32* %3
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
%11 = load i32, i32* %4
%12 = zext i32 %11 to i64
%13 = shl i64 %12, 32
%14 = or i64 %10, %13
ret i64 %14
}

LLVM IR (-O2):
define i64 @rdpmc(i32 %0) {
%2 = tail call { i32, i32 } asm sideeffect "rdpmc", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
%3 = extractvalue { i32, i32 } %2, 0
%4 = extractvalue { i32, i32 } %2, 1
%5 = zext i32 %3 to i64
%6 = zext i32 %4 to i64
%7 = shl nuw i64 %6, 32
%8 = or i64 %7, %5
ret i64 %8
}
/* Variables and functions */
scalar_t__ errno;
int stub1(char const *);
int unlink_handle_error(const char *pathname, int (*real_unlink)(const char *),
                        int in_case_of_failure) {
  if (in_case_of_failure == 1)
    return (*real_unlink)(pathname);
  else {
    errno = 0;
    return -1;
  }
}


x86 assembly (clang, -O0):
<unlink_handle_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    112f <unlink_handle_error+0x2f>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
mov    %eax,-0x4(%rbp)
jmp    1144 <unlink_handle_error+0x44>
mov    0x2eaa(%rip),%rax
movq   $0x0,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlink_handle_error>:
cmp    $0x1,%edx
jne    1107 <unlink_handle_error+0x7>
jmp    *%rsi
mov    0x2ed2(%rip),%rax
movq   $0x0,(%rax)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@errno = global i64 0
define i32 @unlink_handle_error(i8* %0, i32 (i8*)* nocapture %1, i32 %2) {
%4 = icmp eq i32 %2, 1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 %1(i8* %0)
br label %8
7: ; preds = %3
store i64 0, i64* @errno
br label %8
8: ; preds = %7, %5
%9 = phi i32 [ %6, %5 ], [ -1, %7 ]
ret i32 %9
}
void crFreeStrings(char **strings) {
  int i;
  for (i = 0; strings[i]; i++) {
    crFree(strings[i]);
  }
  crFree(strings);
}


x86 assembly (clang, -O0):
<crFreeStrings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1157 <crFreeStrings+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <crFree@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <crFreeStrings+0x13>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <crFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crFreeStrings>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1143 <crFreeStrings+0x33>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1030 <crFree@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <crFreeStrings+0x20>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <crFree@plt>

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

LLVM IR (-O2):
define void @crFreeStrings(i8** %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @crFree to i32 (i8*, ...)*)(i8* %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 (i8**, ...) bitcast (i32 (...)* @crFree to i32 (i8**, ...)*)(i8** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fincstp() {
  db(0xD9);
  db(0xF7);
}


x86 assembly (clang, -O0):
<fincstp>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xf7,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fincstp>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xf7,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fincstp() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 247)
ret void
}

LLVM IR (-O2):
define void @fincstp() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 247)
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int a_strncpy(char *, int, char const *, int);
int a_strnlen(char *, int);
ssize_t a_strncat(char *dst, ssize_t n, const char *src, ssize_t l) {
  ssize_t dlen = a_strnlen(dst, n - 1);
  return dlen + a_strncpy(dst + dlen, n - dlen, src, l);
}


x86 assembly (clang, -O0):
<a_strncat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <a_strnlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x20(%rbp),%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
sub    -0x20(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <a_strncpy@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_strncat>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%rbx
lea    -0x1(%rbp),%esi
call   1030 <a_strnlen@plt>
movslq %eax,%r12
add    %r12,%rbx
sub    %r12d,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1040 <a_strncpy@plt>
add    %r12d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @a_strncat(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = sub nsw i32 %11, 1
%13 = call i32 @a_strnlen(i8* %10, i32 %12)
store i32 %13, i32* %9
%14 = load i32, i32* %9
%15 = load i8*, i8** %5
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i32, i32* %6
%20 = load i32, i32* %9
%21 = sub nsw i32 %19, %20
%22 = load i8*, i8** %7
%23 = load i32, i32* %8
%24 = call i32 @a_strncpy(i8* %18, i32 %21, i8* %22, i32 %23)
%25 = add nsw i32 %14, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @a_strncat(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = add nsw i32 %1, -1
%6 = tail call i32 @a_strnlen(i8* %0, i32 %5)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = sub nsw i32 %1, %6
%10 = tail call i32 @a_strncpy(i8* %8, i32 %9, i8* %2, i32 %3)
%11 = add nsw i32 %10, %6
ret i32 %11
}
void ADCReferenceSet(unsigned long ulBase, unsigned long ulRef) {
  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x00000038))) =
      ((*((volatile unsigned long *)(ulBase + 0x00000038))) & ~0x00000003) |
      ulRef;
}


x86 assembly (clang, -O0):
<ADCReferenceSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rcx
and    $0xfffffffffffffffc,%rcx
or     -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x38(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCReferenceSet>:
mov    0x38(%rdi),%rax
and    $0xfffffffffffffffc,%rax
or     %rsi,%rax
mov    %rax,0x38(%rdi)
ret

LLVM IR (-O0):
define void @ADCReferenceSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = add i64 %5, 56
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, -4
%10 = load i64, i64* %4
%11 = or i64 %9, %10
%12 = load i64, i64* %3
%13 = add i64 %12, 56
%14 = inttoptr i64 %13 to i64*
store volatile i64 %11, i64* %14
ret void
}

LLVM IR (-O2):
define void @ADCReferenceSet(i64 %0, i64 %1) {
%3 = add i64 %0, 56
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -4
%7 = or i64 %6, %1
store volatile i64 %7, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outerr(int /*<<< orphan*/, char *);
void cmd_ambiguous(char *cmdpnt) { outerr(0, "ambiguous command\n"); }


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

x86 assembly (clang, -O2):
<cmd_ambiguous>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <outerr@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"ambiguous command\0A\00"
define void @cmd_ambiguous(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @outerr(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"ambiguous command\0A\00"
define void @cmd_ambiguous(i8* nocapture readnone %0) {
%2 = tail call i32 @outerr(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ si_code;
};
typedef TYPE_1__ siginfo_t;

/* Variables and functions */
scalar_t__ SEGV_ACCERR;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void handler(int signo, siginfo_t *info, void *uctx) {
  if (info->si_code == SEGV_ACCERR) {
    fprintf(stderr, "SCUDO SIGSEGV\n");
    exit(0);
  }
  exit(1);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x2ea7(%rip),%rcx
cmp    (%rcx),%rax
jne    1166 <handler+0x46>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xea6(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handler>:
push   %rax
mov    (%rsi),%rax
mov    0x2ebd(%rip),%rcx
cmp    (%rcx),%rax
jne    114c <handler+0x2c>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64 }
@SEGV_ACCERR = global i64 0
@stderr = global i32 0
@.str = [15 x i8] c"SCUDO SIGSEGV\0A\00"
define void @handler(i32 %0, %struct.TYPE_3__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_3__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
store i8* %2, i8** %6
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 0
%9 = load i64, i64* %8
%10 = load i64, i64* @SEGV_ACCERR
%11 = icmp eq i64 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 0)
unreachable
16: ; preds = %3
%17 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64 }
@SEGV_ACCERR = global i64 0
@stderr = global i32 0
@.str = [15 x i8] c"SCUDO SIGSEGV\0A\00"
define void @handler(i32 %0, %struct.TYPE_3__* nocapture %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = load i64, i64* @SEGV_ACCERR
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @exit(i32 0)
unreachable
12: ; preds = %3
%13 = tail call i32 @exit(i32 1)
unreachable
}
int c071(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c071() {
ret i32 0
}
/* Variables and functions */
int abs(unsigned int);
int /*<<< orphan*/ printf(char *, int);
void cursor_forward(unsigned int columns) { printf("\e[%uC", abs(columns)); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[%uC\00"
define void @cursor_forward(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @abs(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%uC\00"
define void @cursor_forward(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
int test_imm_E6uint16_mem(unsigned short *val) {
  return ((*val) & (0xE6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E6uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xe6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E6uint16_mem>:
testb  $0xe6,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E6uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 230
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int checkMove(char position[4]) {
  char word[4] = "exit";
  if (strcmp(position, word) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<checkMove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    0xede(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1148 <checkMove+0x38>
movl   $0x1,-0x4(%rbp)
jmp    114f <checkMove+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkMove>:
push   %rax
movl   $0x74697865,0x4(%rsp)
74
lea    0x4(%rsp),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.checkMove.word = [4 x i8] c"exit"
define i32 @checkMove(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [4 x i8]
store i8* %0, i8** %3
%5 = bitcast [4 x i8]* %4 to i8*
%6 = load i8*, i8** %3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%8 = call i64 @strcmp(i8* %6, i8* %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @checkMove(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1953069157, i32* %2
%4 = call i64 @strcmp(i8* %0, i8* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
uint32_t hash_str(const char *str, int bits) {
  unsigned int seed = 131;
  unsigned int hash = 0;
  while (*str) {
    hash = hash * seed + (*str++);
  }
  return hash >> (32 - bits);
}


x86 assembly (clang, -O0):
<hash_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x83,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1149 <hash_str+0x49>
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <hash_str+0x19>
mov    -0x14(%rbp),%eax
mov    $0x20,%ecx
sub    -0xc(%rbp),%ecx
shr    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_str>:
mov    %esi,%ecx
mov    (%rdi),%dl
test   %dl,%dl
je     1128 <hash_str+0x28>
add    $0x1,%rdi
xor    %eax,%eax
xchg   %ax,%ax
imul   $0x83,%eax,%esi
movsbl %dl,%eax
add    %esi,%eax
movzbl (%rdi),%edx
add    $0x1,%rdi
test   %dl,%dl
jne    1110 <hash_str+0x10>
jmp    112a <hash_str+0x2a>
xor    %eax,%eax
neg    %cl
shr    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_str(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %12, %5 ], [ 0, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = mul i32 %7, 131
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = sext i8 %6 to i32
%12 = add i32 %9, %11
%13 = load i8, i8* %10
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %12, %5 ]
%17 = sub nsw i32 32, %1
%18 = lshr i32 %16, %17
ret i32 %18
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t is_decodable(uint8_t msg_id) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @is_decodable(i32 %0) {
ret i32 1
}
/* Type definitions */
typedef float int32_t;

/* Variables and functions */
int32_t iradians(float radians) {
  return radians * 4096.0f / 2 / 3.1415926535897932;
}


x86 assembly (clang, -O0):
<iradians>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xefb(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<iradians>:
mulss  0xef8(%rip),%xmm0
mulss  0xef4(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xeec(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @iradians(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 4.096000e+03
%5 = fdiv float %4, 2.000000e+00
%6 = fpext float %5 to double
%7 = fdiv double %6, 0x400921FB54442D18
%8 = fptrunc double %7 to float
ret float %8
}

LLVM IR (-O2):
define float @iradians(float %0) {
%2 = fmul float %0, 4.096000e+03
%3 = fmul float %2, 5.000000e-01
%4 = fpext float %3 to double
%5 = fdiv double %4, 0x400921FB54442D18
%6 = fptrunc double %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void foo(void) {
  if (1) {
    goto bla;
  } else {
  xxx : {
  bla:
    bar();
    return;
  }
    goto xxx;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%al
test   $0x1,%al
jne    1123 <foo+0x13>
jmp    1128 <foo+0x18>
jmp    1132 <foo+0x22>
jmp    112d <foo+0x1d>
jmp    1132 <foo+0x22>
mov    $0x0,%al
call   1030 <bar@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
br i1 true, label %1, label %2
1: ; preds = %0
br label %4
2: ; preds = %0
br label %3
3: ; preds = %2
br label %4
4: ; preds = %3, %1
%5 = call i32 (...) @bar()
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 (...) @bar()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ _delta_decode_block(void const *, void *, size_t, int);
int16_t delta_decode(const void *_delta, void *_output, size_t out_size) {
  return _delta_decode_block(_delta, _output, out_size, 64);
}


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

x86 assembly (clang, -O2):
<delta_decode>:
mov    $0x40,%ecx
jmp    1030 <_delta_decode_block@plt>

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

LLVM IR (-O2):
define i32 @delta_decode(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @_delta_decode_block(i8* %0, i8* %1, i64 %2, i32 64)
ret i32 %4
}
/* Variables and functions */
int *f() {
  int *x;
  x = NULL;
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i32* @f() {
ret i32* null
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ ENOENT;
scalar_t__ errno;
int /*<<< orphan*/ fatal(char *, char const *);
int /*<<< orphan*/ *fopen(char const *, char *);
FILE *openFile(const char *name) {
  FILE *fp;
  if ((fp = fopen(name, "r")) == NULL && errno != ENOENT)
    fatal("Error in opening file %s\n", name);
  return fp;
}


x86 assembly (clang, -O0):
<openFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1174 <openFile+0x54>
mov    0x2e8f(%rip),%rax
mov    (%rax),%rax
mov    0x2e75(%rip),%rcx
cmp    (%rcx),%rax
je     1174 <openFile+0x54>
mov    -0x8(%rbp),%rsi
lea    0xe93(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFile>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xed2(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1160 <openFile+0x40>
mov    0x2e9e(%rip),%rax
mov    (%rax),%rax
mov    0x2e84(%rip),%rcx
cmp    (%rcx),%rax
je     1160 <openFile+0x40>
lea    0xeaa(%rip),%rdi
mov    %r14,%rsi
call   1040 <fatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@errno = global i64 0
@ENOENT = global i64 0
@.str.1 = [26 x i8] c"Error in opening file %s\0A\00"
define i32* @openFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %14
7: ; preds = %1
%8 = load i64, i64* @errno
%9 = load i64, i64* @ENOENT
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i8*, i8** %2
%13 = call i32 @fatal(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %7, %1
%15 = load i32*, i32** %3
ret i32* %15
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@errno = global i64 0
@ENOENT = global i64 0
@.str.1 = [26 x i8] c"Error in opening file %s\0A\00"
define noalias i32* @openFile(i8* %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i64, i64* @errno
%6 = load i64, i64* @ENOENT
%7 = icmp eq i64 %5, %6
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = tail call i32 @fatal(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %10
10: ; preds = %8, %4, %1
ret i32* %2
}
/* Variables and functions */
int f410(int *);
int f411(int *p) { return f410(p); }


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

x86 assembly (clang, -O2):
<f411>:
jmp    1030 <f410@plt>

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

LLVM IR (-O2):
define i32 @f411(i32* %0) {
%2 = tail call i32 @f410(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_sqrt_ps(int /*<<< orphan*/);
int /*<<< orphan*/ _mm_xor_ps(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 t4(__m128 a, __m128 b) {
  a = _mm_sqrt_ps(a);
  b = _mm_sqrt_ps(b);
  return _mm_xor_ps(a, b);
}


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

x86 assembly (clang, -O2):
<t4>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1040 <_mm_sqrt_ps@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <_mm_sqrt_ps@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_mm_xor_ps@plt>

LLVM IR (-O0):
define i32 @t4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @_mm_sqrt_ps(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @_mm_sqrt_ps(i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @_mm_xor_ps(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @t4(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sqrt_ps(i32 %0)
%4 = tail call i32 @_mm_sqrt_ps(i32 %1)
%5 = tail call i32 @_mm_xor_ps(i32 %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int counter = 0;
  do {
    counter++;
    printf("Number of counter: %d\n", counter);
  } while (counter < 7);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x7,-0x8(%rbp)
jl     1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"Number of counter: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 6)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 7)
ret i32 0
}
bar(x) {}


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

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

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
ret i32 undef
}
long long uuus() { return 0x7fff7fff7fffffffLL; }


x86 assembly (clang, -O0):
<uuus>:
push   %rbp
mov    %rsp,%rbp
movabs $0x7fff7fff7fffffff,%rax
7f ff 7f
pop    %rbp
ret

x86 assembly (clang, -O2):
<uuus>:
movabs $0x7fff7fff7fffffff,%rax
7f ff 7f
ret

LLVM IR (-O0):
define i64 @uuus() {
ret i64 9223231297218936831
}

LLVM IR (-O2):
define i64 @uuus() {
ret i64 9223231297218936831
}
void OpenFlexCatCatalog(void) {}


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

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

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

LLVM IR (-O2):
define void @OpenFlexCatCatalog() {
ret void
}
int d_blt_mm1(double *a1, double *a2) { return (__builtin_isless(*a1, *a2)); }


x86 assembly (clang, -O0):
<d_blt_mm1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_blt_mm1>:
movsd  (%rsi),%xmm0
xor    %eax,%eax
ucomisd (%rdi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @d_blt_mm1(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = fcmp olt double %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @d_blt_mm1(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp olt double %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void SuppressLineNoise() {}


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

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

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

LLVM IR (-O2):
define void @SuppressLineNoise() {
ret void
}
int Bematech_FI_NumeroCaixa(Var, Retorno) {
  return Formata("\x1b|35|14|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_NumeroCaixa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_NumeroCaixa>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|14|\1B\00"
define i32 @Bematech_FI_NumeroCaixa(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|14|\1B\00"
define i32 @Bematech_FI_NumeroCaixa(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
double asin(double);
double d_asin(double *x) { return (asin(*x)); }


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

x86 assembly (clang, -O2):
<d_asin>:
movsd  (%rdi),%xmm0
jmp    1030 <asin@plt>

LLVM IR (-O0):
define double @d_asin(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
%5 = call double @asin(double %4)
ret double %5
}

LLVM IR (-O2):
define double @d_asin(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call double @asin(double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int test_ssl_certificate();
int main() {
  int err = test_ssl_certificate();
  if (err != 0) {
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_ssl_certificate@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114d <main+0x2d>
mov    $0x1,%edi
call   1040 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_ssl_certificate@plt>
test   %eax,%eax
jne    1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_ssl_certificate()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 1)
unreachable
5: ; preds = %0
ret i32 0
}
int max_of_four(int a, int b, int c, int d) {
  int max;
  max = (a > b ? a : b);
  max = (c > d ? (c > max ? c : max) : (d > max ? d : max));
  return max;
}


x86 assembly (clang, -O0):
<max_of_four>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1127 <max_of_four+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    112d <max_of_four+0x2d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1167 <max_of_four+0x67>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1156 <max_of_four+0x56>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    115c <max_of_four+0x5c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    118a <max_of_four+0x8a>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    117e <max_of_four+0x7e>
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1184 <max_of_four+0x84>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @max_of_four(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %4
%14 = load i32, i32* %5
br label %17
15: ; preds = %4
%16 = load i32, i32* %6
br label %17
17: ; preds = %15, %13
%18 = phi i32 [ %14, %13 ], [ %16, %15 ]
store i32 %18, i32* %9
%19 = load i32, i32* %7
%20 = load i32, i32* %8
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %32
22: ; preds = %17
%23 = load i32, i32* %7
%24 = load i32, i32* %9
%25 = icmp sgt i32 %23, %24
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = load i32, i32* %7
br label %30
28: ; preds = %22
%29 = load i32, i32* %9
br label %30
30: ; preds = %28, %26
%31 = phi i32 [ %27, %26 ], [ %29, %28 ]
br label %42
32: ; preds = %17
%33 = load i32, i32* %8
%34 = load i32, i32* %9
%35 = icmp sgt i32 %33, %34
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = load i32, i32* %8
br label %40
38: ; preds = %32
%39 = load i32, i32* %9
br label %40
40: ; preds = %38, %36
%41 = phi i32 [ %37, %36 ], [ %39, %38 ]
br label %42
42: ; preds = %40, %30
%43 = phi i32 [ %31, %30 ], [ %41, %40 ]
store i32 %43, i32* %9
%44 = load i32, i32* %9
ret i32 %44
}

LLVM IR (-O2):
define i32 @max_of_four(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %0, %1
%6 = select i1 %5, i32 %0, i32 %1
%7 = icmp slt i32 %6, %2
%8 = select i1 %7, i32 %2, i32 %6
%9 = icmp sgt i32 %8, %3
%10 = select i1 %9, i32 %8, i32 %3
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("Voce não vai passar em laboratorio!\n");
  printf("Se voce for escolhido sua equipe vai tirar zero!\n");
  printf("Voce não vai conseguir superar isto!\n");
  printf("Voce não vai terminar a lista no prazo.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2e(%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>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xf26(%rip),%rdi
call   1030 <puts@plt>
lea    0xf40(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Voce n\C3\A3o vai passar em laboratorio!\0A\00"
@.str.1 = [50 x i8] c"Se voce for escolhido sua equipe vai tirar zero!\0A\00"
@.str.2 = [39 x i8] c"Voce n\C3\A3o vai conseguir superar isto!\0A\00"
@.str.3 = [42 x i8] c"Voce n\C3\A3o vai terminar a lista no prazo.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [37 x i8] c"Voce n\C3\A3o vai passar em laboratorio!\00"
@str.4 = [49 x i8] c"Se voce for escolhido sua equipe vai tirar zero!\00"
@str.5 = [38 x i8] c"Voce n\C3\A3o vai conseguir superar isto!\00"
@str.6 = [41 x i8] c"Voce n\C3\A3o vai terminar a lista no prazo.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}