xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const, int const);
void assert_int_not_equals(const int val1, const int val2) {
  if (val1 != val2)
    printf("\033[00;32mOK: Asserting that %d is different than %d\033[00m\n",
           val1, val2);
  else
    printf("\033[31mKO: Asserting that %d is different than %d\033[00m\n", val1,
           val2);
}


x86 assembly (clang, -O0):
<assert_int_not_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1141 <assert_int_not_equals+0x31>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    1153 <assert_int_not_equals+0x43>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeeb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_int_not_equals>:
mov    %esi,%edx
mov    %edi,%esi
cmp    %edx,%edi
jne    1126 <assert_int_not_equals+0x16>
lea    0xf1a(%rip),%rdi
mov    %esi,%edx
jmp    1030 <printf@plt>
lea    0xed3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"\1B[00;32mOK: Asserting that %d is different than %d\1B[00m\0A\00"
@.str.1 = [54 x i8] c"\1B[31mKO: Asserting that %d is different than %d\1B[00m\0A\00"
define void @assert_int_not_equals(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 = icmp ne i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
br label %16
12: ; preds = %2
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 %13, i32 %14)
br label %16
16: ; preds = %12, %8
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"\1B[00;32mOK: Asserting that %d is different than %d\1B[00m\0A\00"
@.str.1 = [54 x i8] c"\1B[31mKO: Asserting that %d is different than %d\1B[00m\0A\00"
define void @assert_int_not_equals(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
br label %8
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %0)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char);
int decChar(char ch) { return (ch == '-' || ch == '+' || isdigit(ch)); }


x86 assembly (clang, -O0):
<decChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     1155 <decChar+0x45>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     1155 <decChar+0x45>
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decChar>:
mov    $0x1,%eax
cmp    $0x2b,%dil
je     1121 <decChar+0x11>
cmp    $0x2d,%dil
jne    1122 <decChar+0x12>
ret
push   %rax
movsbl %dil,%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @decChar(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, 45
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 43
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = call i64 @isdigit(i8 signext %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @decChar(i8 signext %0) {
switch i8 %0, label %2 [
i8 45, label %6
i8 43, label %6
]
2: ; preds = %1
%3 = tail call i64 @isdigit(i8 signext %0)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
br label %6
6: ; preds = %1, %1, %2
%7 = phi i32 [ 1, %1 ], [ %5, %2 ], [ 1, %1 ]
ret i32 %7
}
int hicsetsubsttex(long picnum, long palnum, char *filen, float alphacut) {
  return 0;
}


x86 assembly (clang, -O0):
<hicsetsubsttex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @hicsetsubsttex(i64 %0, i64 %1, i8* %2, float %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
%8 = alloca float
store i64 %0, i64* %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store float %3, float* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @hicsetsubsttex(i64 %0, i64 %1, i8* nocapture readnone %2, float %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ do_step();
int /*<<< orphan*/ do_swapd();
void do_fold(void) {
  do_swapd();
  do_step();
}


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

x86 assembly (clang, -O2):
<do_fold>:
push   %rax
xor    %eax,%eax
call   1040 <do_swapd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <do_step@plt>

LLVM IR (-O0):
define void @do_fold() {
%1 = call i32 (...) @do_swapd()
%2 = call i32 (...) @do_step()
ret void
}

LLVM IR (-O2):
define void @do_fold() {
%1 = tail call i32 (...) @do_swapd()
%2 = tail call i32 (...) @do_step()
ret void
}
/* Variables and functions */
bool nrf52_errata_245(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_245() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XkbLibraryVersion() {
  printf("XkbLibraryVersion called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [25 x i8] c"XkbLibraryVersion called\00"
define i32 @XkbLibraryVersion() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void hboot_dpm_show_software_start(unsigned long ulBootSource
                                   __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @hboot_dpm_show_software_start(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int get_height_inches(void) {
  int value = 0.0;
  printf("Please enter Height (y Inches): ");
  scanf("%d", &value);
  return value;
}


x86 assembly (clang, -O0):
<get_height_inches>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_height_inches>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Please enter Height (y Inches): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @get_height_inches() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [33 x i8] c"Please enter Height (y Inches): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @get_height_inches() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int ASN1_item_i2d_bio(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                      int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_it;
int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7) {
  return ASN1_item_i2d_bio(&PKCS7_it, bp, p7);
}


x86 assembly (clang, -O0):
<i2d_PKCS7_bio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    0x2eb1(%rip),%rdi
call   1030 <ASN1_item_i2d_bio@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_PKCS7_bio>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rdi
jmp    1030 <ASN1_item_i2d_bio@plt>

LLVM IR (-O0):
@PKCS7_it = global i32 0
define i32 @i2d_PKCS7_bio(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 @ASN1_item_i2d_bio(i32* @PKCS7_it, i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
@PKCS7_it = global i32 0
define i32 @i2d_PKCS7_bio(i32* %0, i32* %1) {
%3 = tail call i32 @ASN1_item_i2d_bio(i32* @PKCS7_it, i32* %0, i32* %1)
ret i32 %3
}
char *strstr(const char *cs, const char *ct) {
  register char *__res;
  __asm__("cld\n\t"
          "movl %4,%%edi\n\t"
          "repne\n\t"
          "scasb\n\t"
          "notl %%ecx\n\t"
          "decl %%ecx\n\t"
          "movl %%ecx,%%edx\n"
          "1:\tmovl %4,%%edi\n\t"
          "movl %%esi,%%eax\n\t"
          "movl %%edx,%%ecx\n\t"
          "repe\n\t"
          "cmpsb\n\t"
          "je 2f\n\t"
          "xchgl %%eax,%%esi\n\t"
          "incl %%esi\n\t"
          "cmpb $0,-1(%%eax)\n\t"
          "jne 1b\n\t"
          "xorl %%eax,%%eax\n\t"
          "2:"
          : "=a"(__res)
          : "0"(0), "c"(0xffffffff), "S"(cs), "g"(ct));
  return __res;
}


x86 assembly (clang, -O0):
<strstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    $0xffffffff,%ecx
cld
mov    -0x20(%rbp),%edi
repnz scas %es:(%rdi),%al
not    %ecx
dec    %ecx
mov    %ecx,%edx
mov    -0x20(%rbp),%edi
mov    %esi,%eax
mov    %edx,%ecx
repz cmpsb %es:(%rdi),%ds:(%rsi)
je     114a <strstr+0x4a>
xchg   %eax,%esi
inc    %esi
cmpb   $0x0,-0x1(%eax)
jne    112b <strstr+0x2b>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i8* @strstr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* asm "cld\0A\09movl $4,%edi\0A\09repne\0A\09scasb\0A\09notl %ecx\0A\09decl %ecx\0A\09movl %ecx,%edx\0A1:\09movl $4,%edi\0A\09movl %esi,%eax\0A\09movl %edx,%ecx\0A\09repe\0A\09cmpsb\0A\09je 2f\0A\09xchgl %eax,%esi\0A\09incl %esi\0A\09cmpb $$0,-1(%eax)\0A\09jne 1b\0A\09xorl %eax,%eax\0A\092:", "={ax},0,{cx},{si},imr,~{dirflag},~{fpsr},~{flags}"(i64 0, i32 -1, i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int cichlid_rotate_right_64(int, int);
uint64_t Sigma0(uint64_t x) {
  return cichlid_rotate_right_64(x, 28) ^ cichlid_rotate_right_64(x, 34) ^
         cichlid_rotate_right_64(x, 39);
}


x86 assembly (clang, -O0):
<Sigma0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1c,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x22,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x27,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sigma0>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x1c,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0x22,%esi
call   1030 <cichlid_rotate_right_64@plt>
mov    %eax,%ebp
xor    %r14d,%ebp
mov    %ebx,%edi
mov    $0x27,%esi
call   1030 <cichlid_rotate_right_64@plt>
xor    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Sigma0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cichlid_rotate_right_64(i32 %3, i32 28)
%5 = load i32, i32* %2
%6 = call i32 @cichlid_rotate_right_64(i32 %5, i32 34)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = call i32 @cichlid_rotate_right_64(i32 %8, i32 39)
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @Sigma0(i32 %0) {
%2 = tail call i32 @cichlid_rotate_right_64(i32 %0, i32 28)
%3 = tail call i32 @cichlid_rotate_right_64(i32 %0, i32 34)
%4 = xor i32 %3, %2
%5 = tail call i32 @cichlid_rotate_right_64(i32 %0, i32 39)
%6 = xor i32 %4, %5
ret i32 %6
}
unsigned long XNextRequest() {}


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

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

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

LLVM IR (-O2):
define i64 @XNextRequest() {
ret i64 undef
}
BOOST_AUTO_TEST_CASE(sinh) { TESTCASE1(sinh, 0, 0); }


x86 assembly (clang, -O0):
<BOOST_AUTO_TEST_CASE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <TESTCASE1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BOOST_AUTO_TEST_CASE>:
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
jmp    1030 <TESTCASE1@plt>

LLVM IR (-O0):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %4, i32 0, i32 0)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 0, i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ setlinebuf(int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
int /*<<< orphan*/ stdout;
unsigned int la_version(unsigned int v) {
  setlinebuf(stdout);
  printf("version: %u\n", v);
  char buf[20];
  sprintf(buf, "%u", v);
  return v;
}


x86 assembly (clang, -O0):
<la_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1040 <setlinebuf@plt>
mov    -0x4(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xea7(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<la_version>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <setlinebuf@plt>
lea    0xeb4(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xeb3(%rip),%rsi
mov    %rsp,%rdi
mov    %ebx,%edx
call   1050 <sprintf@plt>
mov    %ebx,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [13 x i8] c"version: %u\0A\00"
@.str.1 = [3 x i8] c"%u\00"
define i32 @la_version(i32 %0) {
%2 = alloca i32
%3 = alloca [20 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* @stdout
%5 = call i32 @setlinebuf(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%9 = load i32, i32* %2
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [13 x i8] c"version: %u\0A\00"
@.str.1 = [3 x i8] c"%u\00"
define i32 @la_version(i32 returned %0) {
%2 = alloca [20 x i8]
%3 = load i32, i32* @stdout
%4 = tail call i32 @setlinebuf(i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret i32 %0
}
int bar() { return 20; }


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

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

LLVM IR (-O0):
define i32 @bar() {
ret i32 20
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 20
}
/* Variables and functions */
int ping(char *);
int /*<<< orphan*/ printf(char *, ...);
void *Ping(void *ipaddr) {
  int status = 0;
  char *ip = ipaddr;
  status = ping(ip);
  if (status == 0) {
    printf("Could ping %s successfully, status %d\n", ip, status);
  } else {
    printf("Machine not reachable, status %d\n", status);
  }
}


x86 assembly (clang, -O0):
<Ping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <ping@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    116b <Ping+0x4b>
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117c <Ping+0x5c>
mov    -0x14(%rbp),%esi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ping>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ping@plt>
test   %eax,%eax
je     113f <Ping+0x1f>
lea    0xef3(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rbx
ret
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Could ping %s successfully, status %d\0A\00"
@.str.1 = [34 x i8] c"Machine not reachable, status %d\0A\00"
define i8* @Ping(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 0, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = call i32 @ping(i8* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i8*, i8** %5
%13 = load i32, i32* %4
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %12, i32 %13)
br label %18
15: ; preds = %1
%16 = load i32, i32* %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %11
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
@.str = [39 x i8] c"Could ping %s successfully, status %d\0A\00"
@.str.1 = [34 x i8] c"Machine not reachable, status %d\0A\00"
define noalias i8* @Ping(i8* %0) {
%2 = tail call i32 @ping(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0, i32 0)
br label %8
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %2)
br label %8
8: ; preds = %6, %4
ret i8* undef
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  int up;
  i = __VERIFIER_nondet_int();
  up = 0;
  while (0 <= i && i <= 10) {
    if (i >= 10) {
      up = 0;
    }
    if (i <= 0) {
      up = 1;
    }
    if (up >= 1) {
      i = i + 1;
    } else {
      i = i - 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 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
xor    %ecx,%ecx
cmp    -0x8(%rbp),%ecx
mov    %al,-0xd(%rbp)
jg     114a <main+0x3a>
cmpl   $0xa,-0x8(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115a <main+0x4a>
jmp    11a2 <main+0x92>
cmpl   $0xa,-0x8(%rbp)
jl     116b <main+0x5b>
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     117c <main+0x6c>
movl   $0x1,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jl     1194 <main+0x84>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    119d <main+0x8d>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %30, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 0, %6
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 10
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
br i1 %12, label %13, label %31
13: ; preds = %11
%14 = load i32, i32* %2
%15 = icmp sge i32 %14, 10
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 0, i32* %3
br label %17
17: ; preds = %16, %13
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 1, i32* %3
br label %21
21: ; preds = %20, %17
%22 = load i32, i32* %3
%23 = icmp sge i32 %22, 1
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %30
27: ; preds = %21
%28 = load i32, i32* %2
%29 = sub nsw i32 %28, 1
store i32 %29, i32* %2
br label %30
30: ; preds = %27, %24
br label %5
31: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
unsigned char ds1337_read_register(int);
int /*<<< orphan*/ ds1337_write_register(int, unsigned char);
void ds1337_clear_alarm2_flag() {
  unsigned char status = ds1337_read_register(0x0F);
  status &= 0xFD;
  ds1337_write_register(0x0F, status);
}


x86 assembly (clang, -O0):
<ds1337_clear_alarm2_flag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xf,%edi
call   1040 <ds1337_read_register@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xfd,%eax
mov    %al,-0x1(%rbp)
mov    $0xf,%edi
movzbl -0x1(%rbp),%esi
call   1030 <ds1337_write_register@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds1337_clear_alarm2_flag>:
push   %rax
mov    $0xf,%edi
call   1040 <ds1337_read_register@plt>
and    $0xfd,%al
movzbl %al,%esi
mov    $0xf,%edi
pop    %rax
jmp    1030 <ds1337_write_register@plt>

LLVM IR (-O0):
define void @ds1337_clear_alarm2_flag() {
%1 = alloca i8
%2 = call zeroext i8 @ds1337_read_register(i32 15)
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = and i32 %4, 253
%6 = trunc i32 %5 to i8
store i8 %6, i8* %1
%7 = load i8, i8* %1
%8 = call i32 @ds1337_write_register(i32 15, i8 zeroext %7)
ret void
}

LLVM IR (-O2):
define void @ds1337_clear_alarm2_flag() {
%1 = tail call zeroext i8 @ds1337_read_register(i32 15)
%2 = and i8 %1, -3
%3 = tail call i32 @ds1337_write_register(i32 15, i8 zeroext %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ usleep(int);
int main() {
  char *buf = (char *)malloc(100);
  usleep(1);
  free(buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x1,%edi
call   1050 <usleep@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x1,%edi
call   1050 <usleep@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 100)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = call i32 @usleep(i32 1)
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 100)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @usleep(i32 1)
%4 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Variables and functions */
scalar_t__ strtoll(char const *, char **, int);
unsigned long long int strtoull(const char *nptr, char **endptr, int base) {
  return (unsigned long long int)strtoll(nptr, endptr, base);
}


x86 assembly (clang, -O0):
<strtoull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strtoll@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoull>:
jmp    1030 <strtoll@plt>

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

LLVM IR (-O2):
define i64 @strtoull(i8* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i64 @strtoll(i8* %0, i8** %1, i32 %2)
ret i64 %4
}
/* Variables and functions */
int ulongGreaterThan(void const *, void const *);
int ulongLessThan(const void *a, const void *b) {
  return ulongGreaterThan(b, a);
}


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

x86 assembly (clang, -O2):
<ulongLessThan>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <ulongGreaterThan@plt>

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

LLVM IR (-O2):
define i32 @ulongLessThan(i8* %0, i8* %1) {
%3 = tail call i32 @ulongGreaterThan(i8* %1, i8* %0)
ret i32 %3
}
/* Variables and functions */
scalar_t__ ceil(size_t);
size_t MCMEstimateBas64EncodedDataSize(size_t inDataSize) {
  size_t theEncodedDataSize = (int)ceil(inDataSize / 3.0) * 4;
  theEncodedDataSize = theEncodedDataSize / 72 * 74 + theEncodedDataSize % 72;
  return (theEncodedDataSize);
}


x86 assembly (clang, -O0):
<MCMEstimateBas64EncodedDataSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movaps 0xedd(%rip),%xmm1
movq   -0x8(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xedc(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rdi
mov    %rdi,%rcx
sar    $0x3f,%rcx
movsd  0xec2(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
and    %rcx,%rax
or     %rax,%rdi
call   1030 <ceil@plt>
shl    $0x2,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x48,%ecx
xor    %edx,%edx
div    %rcx
imul   $0x4a,%rax,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x48,%ecx
xor    %edx,%edx
div    %rcx
mov    -0x18(%rbp),%rax
add    %rdx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MCMEstimateBas64EncodedDataSize>:
push   %rax
movq   %rdi,%xmm0
punpckldq 0xee2(%rip),%xmm0
subpd  0xeea(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
divsd  0xee6(%rip),%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
subsd  0xeda(%rip),%xmm1
cvttsd2si %xmm1,%rdi
and    %rcx,%rdi
or     %rax,%rdi
call   1030 <ceil@plt>
shl    $0x2,%eax
movslq %eax,%rcx
movabs $0xe38e38e38e38e38f,%rdx
38 8e e3
mov    %rcx,%rax
mul    %rdx
shr    $0x6,%rdx
imul   $0x4a,%rdx,%rax
shl    $0x3,%rdx
lea    (%rdx,%rdx,8),%rdx
sub    %rdx,%rcx
add    %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @MCMEstimateBas64EncodedDataSize(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = uitofp i64 %4 to double
%6 = fdiv double %5, 3.000000e+00
%7 = fptoui double %6 to i64
%8 = call i64 @ceil(i64 %7)
%9 = trunc i64 %8 to i32
%10 = mul nsw i32 %9, 4
%11 = sext i32 %10 to i64
store i64 %11, i64* %3
%12 = load i64, i64* %3
%13 = udiv i64 %12, 72
%14 = mul i64 %13, 74
%15 = load i64, i64* %3
%16 = urem i64 %15, 72
%17 = add i64 %14, %16
store i64 %17, i64* %3
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
define i64 @MCMEstimateBas64EncodedDataSize(i64 %0) {
%2 = uitofp i64 %0 to double
%3 = fdiv double %2, 3.000000e+00
%4 = fptoui double %3 to i64
%5 = tail call i64 @ceil(i64 %4)
%6 = trunc i64 %5 to i32
%7 = shl nsw i32 %6, 2
%8 = sext i32 %7 to i64
%9 = udiv i64 %8, 72
%10 = mul i64 %9, 74
%11 = urem i64 %8, 72
%12 = add i64 %10, %11
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/);
int font(int n) {
  if (n < 0 || n > 19)
    return (1);
  printf("$%d%c", n, 0);
  return (0);
}


x86 assembly (clang, -O0):
<font>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     112f <font+0x1f>
cmpl   $0x13,-0x8(%rbp)
jle    113b <font+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1153 <font+0x43>
mov    -0x8(%rbp),%esi
lea    0xebb(%rip),%rdi
xor    %edx,%edx
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<font>:
push   %rbx
mov    $0x1,%ebx
cmp    $0x13,%edi
ja     112d <font+0x1d>
mov    %edi,%esi
lea    0xedc(%rip),%rdi
xor    %ebx,%ebx
xor    %edx,%edx
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"$%d%c\00"
define i32 @font(i32 %0) {
%2 = icmp ugt i32 %0, 19
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0, i32 0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 0, %3 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
char *calloc(int, int);
int main() {
  char *val = calloc(5, sizeof(char));
  val[4] = 123;
  return val[4];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x7b,0x4(%rax)
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @calloc(i32 5, i32 1)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 4
store i8 123, i8* %5
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
ret i32 123
}
/* Variables and functions */
int /*<<< orphan*/ HwFlyingF4Handle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void HwFlyingF4Updated() { UAVObjUpdated(HwFlyingF4Handle()); }


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

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

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

LLVM IR (-O2):
define void @HwFlyingF4Updated() {
%1 = tail call i32 (...) @HwFlyingF4Handle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
int Max(int a, int b) { return a >= b ? a : b; }


x86 assembly (clang, -O0):
<Max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1121 <Max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <Max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Max>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

LLVM IR (-O0):
define i32 @Max(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 = icmp sge i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @Max(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
extern void libvampsdk_v_2_3_1_present(void) {}


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

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

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

LLVM IR (-O2):
define void @libvampsdk_v_2_3_1_present() {
ret void
}
unsigned f() {
  long long l2;
  unsigned short us;
  unsigned long long ul;
  short s2;
  ul = us = l2 = s2 = -1;
  return ul;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movw   $0xffff,-0x1a(%rbp)
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
movw   $0xffff,-0xa(%rbp)
movq   $0xffff,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i64
%2 = alloca i16
%3 = alloca i64
%4 = alloca i16
store i16 -1, i16* %4
store i64 -1, i64* %1
store i16 -1, i16* %2
store i64 65535, i64* %3
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f() {
ret i32 65535
}
void avio_read_to_bprint() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_widget_reset_shapes() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
long double __ieee754_hypotl(long double x, long double y) {
  fputs("__ieee754_hypotl not implemented\n", stderr);
  __set_errno(ENOSYS);
  return 0.0;
}


x86 assembly (clang, -O0):
<__ieee754_hypotl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"__ieee754_hypotl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__ieee754_hypotl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
@.str = [34 x i8] c"__ieee754_hypotl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__ieee754_hypotl(x86_fp80 %0, x86_fp80 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @ENOSYS
%6 = tail call i32 @__set_errno(i32 %5)
ret x86_fp80 0xK00000000000000000000
}
/* Variables and functions */
int getline2(char *);
int /*<<< orphan*/ puts(char *);
int main(void) {
  char str[1000];
  int len;
  while ((len = getline2(str)) > 0)
    if (len > 80)
      puts(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
call   1030 <getline2@plt>
mov    %eax,-0x3f4(%rbp)
cmp    $0x0,%eax
jle    116b <main+0x4b>
cmpl   $0x50,-0x3f4(%rbp)
jle    1166 <main+0x46>
lea    -0x3f0(%rbp),%rdi
call   1040 <puts@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rdi
call   1030 <getline2@plt>
test   %eax,%eax
jle    115b <main+0x3b>
mov    %rsp,%rbx
jmp    114c <main+0x2c>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <getline2@plt>
test   %eax,%eax
jle    115b <main+0x3b>
cmp    $0x51,%eax
jb     1140 <main+0x20>
mov    %rbx,%rdi
call   1040 <puts@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %14, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%6 = call i32 @getline2(i8* %5)
store i32 %6, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 80
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%13 = call i32 @puts(i8* %12)
br label %14
14: ; preds = %11, %8
br label %4
15: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline2(i8* %2)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp ugt i32 %6, 80
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @puts(i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @getline2(i8* %2)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int m(char const key[], char const exp[], int val) {
  if (strcmp(key + 1, exp) != 0) {
    val = -1;
  }
  return val;
}


x86 assembly (clang, -O0):
<m>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1145 <m+0x35>
movl   $0xffffffff,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m>:
push   %rbx
mov    %edx,%ebx
add    $0x1,%rdi
call   1030 <strcmp@plt>
neg    %rax
sbb    %eax,%eax
or     %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @m(i8* %0, i8* %1, i32 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = tail call i64 @strcmp(i8* %4, i8* %1)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 %2, i32 -1
ret i32 %7
}
int isastream(int fd) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @isastream(i32 %0) {
ret i32 0
}
void f2(unsigned char a) {}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f2(i8 zeroext %0) {
ret void
}
/* Type definitions */
struct triple {
  int dummy;
};
struct compile_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ conditional_expr(struct compile_state *);
struct triple *eval_const_expr(struct compile_state *, int /*<<< orphan*/);
struct triple *constant_expr(struct compile_state *state) {
  return eval_const_expr(state, conditional_expr(state));
}


x86 assembly (clang, -O0):
<constant_expr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <conditional_expr@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <eval_const_expr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<constant_expr>:
push   %rbx
mov    %rdi,%rbx
call   1040 <conditional_expr@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <eval_const_expr@plt>

LLVM IR (-O0):
%struct.triple = type { i32 }
%struct.compile_state = type { i32 }
define %struct.triple* @constant_expr(%struct.compile_state* %0) {
%2 = alloca %struct.compile_state*
store %struct.compile_state* %0, %struct.compile_state** %2
%3 = load %struct.compile_state*, %struct.compile_state** %2
%4 = load %struct.compile_state*, %struct.compile_state** %2
%5 = call i32 @conditional_expr(%struct.compile_state* %4)
%6 = call %struct.triple* @eval_const_expr(%struct.compile_state* %3, i32 %5)
ret %struct.triple* %6
}

LLVM IR (-O2):
%struct.triple = type { i32 }
%struct.compile_state = type { i32 }
define %struct.triple* @constant_expr(%struct.compile_state* %0) {
%2 = tail call i32 @conditional_expr(%struct.compile_state* %0)
%3 = tail call %struct.triple* @eval_const_expr(%struct.compile_state* %0, i32 %2)
ret %struct.triple* %3
}
int handle_event_ver2(int code, const unsigned char *ps, unsigned int ps_ptr,
                      struct lv_event *event) {
  (void)code;
  (void)ps;
  (void)ps_ptr;
  (void)event;
  return 4;
}


x86 assembly (clang, -O0):
<handle_event_ver2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x4,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.lv_event = type opaque
define i32 @handle_event_ver2(i32 %0, i8* %1, i32 %2, %struct.lv_event* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.lv_event*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store %struct.lv_event* %3, %struct.lv_event** %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load %struct.lv_event*, %struct.lv_event** %8
ret i32 4
}

LLVM IR (-O2):
%struct.lv_event = type opaque
define i32 @handle_event_ver2(i32 %0, i8* nocapture readnone %1, i32 %2, %struct.lv_event* nocapture readnone %3) {
ret i32 4
}
int compare(const void *i, const void *j) { return (*(int *)i - *(int *)j); }


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

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}