xunge/DecIR huggingface dataset:
/* Variables and functions */
int yas_bma250_read_reg_byte(int);
int yas_bma250_write_reg_byte(int, int);
int yas_bma250_set_eeprom_trig() {
  int ret = 0;
  int reg_data = 0;
  reg_data = yas_bma250_read_reg_byte(0x33);
  reg_data = ((reg_data & ~0x02) | ((1 << 1) & 0x02));
  ret = yas_bma250_write_reg_byte(0x33, reg_data);
  return ret;
}


x86 assembly (clang, -O0):
<yas_bma250_set_eeprom_trig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x33,%edi
call   1040 <yas_bma250_read_reg_byte@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xfffffffd,%eax
or     $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x33,%edi
call   1030 <yas_bma250_write_reg_byte@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_bma250_set_eeprom_trig>:
push   %rax
mov    $0x33,%edi
call   1040 <yas_bma250_read_reg_byte@plt>
or     $0x2,%eax
mov    $0x33,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <yas_bma250_write_reg_byte@plt>

LLVM IR (-O0):
define i32 @yas_bma250_set_eeprom_trig() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @yas_bma250_read_reg_byte(i32 51)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, -3
%6 = or i32 %5, 2
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @yas_bma250_write_reg_byte(i32 51, i32 %7)
store i32 %8, i32* %1
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @yas_bma250_set_eeprom_trig() {
%1 = tail call i32 @yas_bma250_read_reg_byte(i32 51)
%2 = or i32 %1, 2
%3 = tail call i32 @yas_bma250_write_reg_byte(i32 51, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ e_endwin();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void e_exitm(char *s, int n) {
  e_endwin();
  if (n != 0)
    printf("\n%s\n", s);
  exit(n);
}


x86 assembly (clang, -O0):
<e_exitm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <e_endwin@plt>
cmpl   $0x0,-0xc(%rbp)
je     1160 <e_exitm+0x30>
mov    -0x8(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<e_exitm>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %eax,%eax
call   1040 <e_endwin@plt>
test   %ebx,%ebx
je     1153 <e_exitm+0x23>
lea    0xeb5(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\0A%s\0A\00"
define void @e_exitm(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @e_endwin()
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %2
%12 = load i32, i32* %4
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%s\0A\00"
define void @e_exitm(i8* %0, i32 %1) {
%3 = tail call i32 (...) @e_endwin()
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @exit(i32 %1)
unreachable
}
int do_071() { return 71; }


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

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

LLVM IR (-O0):
define i32 @do_071() {
ret i32 71
}

LLVM IR (-O2):
define i32 @do_071() {
ret i32 71
}
int parent(int i, int k) { return (i - 1) / k; }


x86 assembly (clang, -O0):
<parent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<parent>:
lea    -0x1(%rdi),%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @parent(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 = sub nsw i32 %5, 1
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @parent(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = sdiv i32 %3, %1
ret i32 %4
}
/* Variables and functions */
void cicF(int *x) {
  char *y;
  y = x;
}


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

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

LLVM IR (-O0):
define void @cicF(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = bitcast i32* %4 to i8*
store i8* %5, i8** %3
ret void
}

LLVM IR (-O2):
define void @cicF(i32* nocapture %0) {
ret void
}
void do_remcnt(char *handle) {}


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

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

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

LLVM IR (-O2):
define void @do_remcnt(i8* nocapture %0) {
ret void
}
int test_imm_88uint8_reg(unsigned char val) {
  return ((val) & (-0x88 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_88uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 120
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmpic(char *, char *);
int isuucp(char *str) {
  if (strcmpic(str, "UUCP") == 0) {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<isuucp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmpic@plt>
cmp    $0x0,%rax
jne    1142 <isuucp+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <isuucp+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isuucp>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmpic@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"UUCP\00"
define i32 @isuucp(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcmpic(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [5 x i8] c"UUCP\00"
define i32 @isuucp(i8* %0) {
%2 = tail call i64 @strcmpic(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct in_addr {
  unsigned int s_addr;
};

/* Variables and functions */
char *inet_ntoa(struct in_addr);
char *my_ntoa(unsigned int ip) {
  struct in_addr a;
  a.s_addr = ip;
  return (inet_ntoa(a));
}


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

x86 assembly (clang, -O2):
<my_ntoa>:
jmp    1030 <inet_ntoa@plt>

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i8* @my_ntoa(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.in_addr
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i8* @inet_ntoa(i32 %7)
ret i8* %8
}

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

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_REVOKED_it;
X509_REVOKED *X509_REVOKED_new(void) {
  return (X509_REVOKED *)ASN1_item_new(&X509_REVOKED_it);
}


x86 assembly (clang, -O0):
<X509_REVOKED_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_REVOKED_new>:
mov    0x2ec9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@X509_REVOKED_it = global i32 0
define i32* @X509_REVOKED_new() {
%1 = call i64 @ASN1_item_new(i32* @X509_REVOKED_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@X509_REVOKED_it = global i32 0
define i32* @X509_REVOKED_new() {
%1 = tail call i64 @ASN1_item_new(i32* @X509_REVOKED_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
int fegetround(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fegetround() {
ret i32 0
}
void ieee0(void) {}


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

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

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

LLVM IR (-O2):
define void @ieee0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_ContentDirectory_CreateReference(void *,
                                                                 char *);
int /*<<< orphan*/ printf(char *, char *, char *);
void UPnPContentDirectory_CreateReference(void *upnptoken, char *ContainerID,
                                          char *ObjectID) {
  printf("Invoke: UPnPContentDirectory_CreateReference(%s,%s);\r\n",
         ContainerID, ObjectID);
  UPnPResponse_ContentDirectory_CreateReference(upnptoken, "Sample String");
}


x86 assembly (clang, -O0):
<UPnPContentDirectory_CreateReference>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xee4(%rip),%rsi
call   1040 <UPnPResponse_ContentDirectory_CreateReference@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [55 x i8] c"Invoke: UPnPContentDirectory_CreateReference(%s,%s);\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UPnPContentDirectory_CreateReference(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 @UPnPResponse_ContentDirectory_CreateReference(i8* %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"Invoke: UPnPContentDirectory_CreateReference(%s,%s);\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UPnPContentDirectory_CreateReference(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
%5 = tail call i32 @UPnPResponse_ContentDirectory_CreateReference(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct hlist_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __hlist_del(struct hlist_node *);
void hlist_del(struct hlist_node *n) { __hlist_del(n); }


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

x86 assembly (clang, -O2):
<hlist_del>:
jmp    1030 <__hlist_del@plt>

LLVM IR (-O0):
%struct.hlist_node = type { i32 }
define void @hlist_del(%struct.hlist_node* %0) {
%2 = alloca %struct.hlist_node*
store %struct.hlist_node* %0, %struct.hlist_node** %2
%3 = load %struct.hlist_node*, %struct.hlist_node** %2
%4 = call i32 @__hlist_del(%struct.hlist_node* %3)
ret void
}

LLVM IR (-O2):
%struct.hlist_node = type { i32 }
define void @hlist_del(%struct.hlist_node* %0) {
%2 = tail call i32 @__hlist_del(%struct.hlist_node* %0)
ret void
}
int __attribute__((weak)) _read(int file, char *ptr, int len) {
  file = file;
  ptr = ptr;
  len = len;
  return 0;
}


x86 assembly (clang, -O0):
<_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define weak i32 @_read(i32 %0, i8* %1, i32 %2) {
ret i32 0
}
int main(void) {
  int i = 0;
  for (;;) {
    i++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %3, %0
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
void *fixup_null_alloc(size_t);
void *realloc(void *, size_t);
void *xmalloc(size_t);
void *xrealloc(void *p, size_t n) {
  if (p == 0)
    return xmalloc(n);
  p = realloc(p, n);
  if (p == 0)
    p = fixup_null_alloc(n);
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115d <xrealloc+0x2d>
mov    -0x18(%rbp),%rdi
call   1040 <xmalloc@plt>
mov    %rax,-0x8(%rbp)
jmp    118e <xrealloc+0x5e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1186 <xrealloc+0x56>
mov    -0x18(%rbp),%rdi
call   1030 <fixup_null_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
je     1148 <xrealloc+0x18>
mov    %rbx,%rsi
call   1050 <realloc@plt>
test   %rax,%rax
je     1151 <xrealloc+0x21>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <xmalloc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fixup_null_alloc@plt>

LLVM IR (-O0):
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i64, i64* %5
%10 = call i8* @xmalloc(i64 %9)
store i8* %10, i8** %3
br label %22
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = load i64, i64* %5
%14 = call i8* @realloc(i8* %12, i64 %13)
store i8* %14, i8** %4
%15 = load i8*, i8** %4
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %20
17: ; preds = %11
%18 = load i64, i64* %5
%19 = call i8* @fixup_null_alloc(i64 %18)
store i8* %19, i8** %4
br label %20
20: ; preds = %17, %11
%21 = load i8*, i8** %4
store i8* %21, i8** %3
br label %22
22: ; preds = %20, %8
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i8* @xmalloc(i64 %1)
br label %11
6: ; preds = %2
%7 = tail call i8* @realloc(i8* %0, i64 %1)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i8* @fixup_null_alloc(i64 %1)
br label %11
11: ; preds = %6, %9, %4
%12 = phi i8* [ %5, %4 ], [ %10, %9 ], [ %7, %6 ]
ret i8* %12
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ memcpy(void *, void *, int);
void *memdup(void *m, int len) {
  void *ret;
  if (len == 0)
    return NULL;
  ret = malloc(len);
  memcpy(ret, m, len);
  return ret;
}


x86 assembly (clang, -O0):
<memdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1146 <memdup+0x26>
movq   $0x0,-0x8(%rbp)
jmp    116a <memdup+0x4a>
mov    -0x14(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memdup>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
je     1146 <memdup+0x26>
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
jmp    1148 <memdup+0x28>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @memdup(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i8* @malloc(i32 %1)
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i32 %1)
br label %7
7: ; preds = %2, %4
%8 = phi i8* [ %5, %4 ], [ null, %2 ]
ret i8* %8
}
void hda7_(void) {}


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

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

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

LLVM IR (-O2):
define void @hda7_() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ Off_Reg_Bank(int);
void Move_Ret_To_Reg_X(int index) {
  Inst_Printf("movl", "%%eax,%s", Off_Reg_Bank(index * 4));
}


x86 assembly (clang, -O0):
<Move_Ret_To_Reg_X>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x2,%edi
call   1040 <Off_Reg_Bank@plt>
mov    %eax,%edx
lea    0xec1(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Move_Ret_To_Reg_X>:
push   %rax
shl    $0x2,%edi
call   1040 <Off_Reg_Bank@plt>
lea    0xed0(%rip),%rdi
lea    0xece(%rip),%rsi
mov    %eax,%edx
pop    %rax
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"movl\00"
@.str.1 = [9 x i8] c"%%eax,%s\00"
define void @Move_Ret_To_Reg_X(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 4
%5 = call i32 @Off_Reg_Bank(i32 %4)
%6 = call i32 @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"movl\00"
@.str.1 = [9 x i8] c"%%eax,%s\00"
define void @Move_Ret_To_Reg_X(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = tail call i32 @Off_Reg_Bank(i32 %2)
%4 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}
void ff_h264dsp_init_ppc() {}


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

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

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

LLVM IR (-O2):
define void @ff_h264dsp_init_ppc() {
ret void
}
char sign(int a) {
  if (a < 0) {
    return '-';
  }
  return '+';
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111a <sign+0x1a>
movb   $0x2d,-0x1(%rbp)
jmp    111e <sign+0x1e>
movb   $0x2b,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
shr    $0x1f,%edi
lea    (%rdi,%rdi,1),%eax
add    $0x2b,%al
ret

LLVM IR (-O0):
define signext i8 @sign(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 45, i8* %2
br label %8
7: ; preds = %1
store i8 43, i8* %2
br label %8
8: ; preds = %7, %6
%9 = load i8, i8* %2
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @sign(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i8 45, i8 43
ret i8 %3
}
/* Variables and functions */
char *strchr(char const *, char);
char *strndup(char const *, int);
char *unit_name_to_prefix_and_instance(char const *);
char *unit_name_to_prefix(const char *n) {
  const char *p;
  if ((p = strchr(n, '@')))
    return strndup(n, p - n);
  return unit_name_to_prefix_and_instance(n);
}


x86 assembly (clang, -O0):
<unit_name_to_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x40,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1177 <unit_name_to_prefix+0x47>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
call   1040 <strndup@plt>
mov    %rax,-0x8(%rbp)
jmp    1184 <unit_name_to_prefix+0x54>
mov    -0x10(%rbp),%rdi
call   1050 <unit_name_to_prefix_and_instance@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unit_name_to_prefix>:
push   %rbx
mov    %rdi,%rbx
mov    $0x40,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1150 <unit_name_to_prefix+0x20>
sub    %ebx,%eax
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <strndup@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <unit_name_to_prefix_and_instance@plt>

LLVM IR (-O0):
define i8* @unit_name_to_prefix(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strchr(i8* %5, i8 signext 64)
store i8* %6, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %17
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = ptrtoint i8* %10 to i64
%13 = ptrtoint i8* %11 to i64
%14 = sub i64 %12, %13
%15 = trunc i64 %14 to i32
%16 = call i8* @strndup(i8* %9, i32 %15)
store i8* %16, i8** %2
br label %20
17: ; preds = %1
%18 = load i8*, i8** %3
%19 = call i8* @unit_name_to_prefix_and_instance(i8* %18)
store i8* %19, i8** %2
br label %20
20: ; preds = %17, %8
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @unit_name_to_prefix(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 64)
%3 = icmp eq i8* %2, null
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = ptrtoint i8* %2 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = tail call i8* @strndup(i8* %0, i32 %8)
br label %12
10: ; preds = %1
%11 = tail call i8* @unit_name_to_prefix_and_instance(i8* %0)
br label %12
12: ; preds = %10, %4
%13 = phi i8* [ %9, %4 ], [ %11, %10 ]
ret i8* %13
}
void RTTarFileGetSize(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTarFileGetSize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *strdup(char *);
char *conv_to_str(int i) {
  char str[127];
  sprintf(str, "%d", i);
  return strdup(str);
}


x86 assembly (clang, -O0):
<conv_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec1(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv_to_str>:
push   %rbx
sub    $0x80,%rsp
mov    %edi,%edx
lea    0xecf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @conv_to_str(i32 %0) {
%2 = alloca i32
%3 = alloca [127 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [127 x i8], [127 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [127 x i8], [127 x i8]* %3, i64 0, i64 0
%8 = call i8* @strdup(i8* %7)
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define noalias i8* @conv_to_str(i32 %0) {
%2 = alloca [127 x i8]
%3 = getelementptr inbounds [127 x i8], [127 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i8* @strdup(i8* %3)
ret i8* %5
}
float cos(float x) { return native_cos(((x)*0.01745329251f)); }


x86 assembly (clang, -O0):
<cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <native_cos@plt>
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cos>:
push   %rax
mulss  0xee7(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <native_cos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @cos(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3F91DF46A0000000
%5 = fpext float %4 to double
%6 = call i32 (double, ...) bitcast (i32 (...)* @native_cos to i32 (double, ...)*)(double %5)
%7 = sitofp i32 %6 to float
ret float %7
}

LLVM IR (-O2):
define float @cos(float %0) {
%2 = fmul float %0, 0x3F91DF46A0000000
%3 = fpext float %2 to double
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @native_cos to i32 (double, ...)*)(double %3)
%5 = sitofp i32 %4 to float
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_OCTET_STRING;

/* Variables and functions */
int /*<<< orphan*/ *M_ASN1_OCTET_STRING_dup(int /*<<< orphan*/ const *);
ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *x) {
  return M_ASN1_OCTET_STRING_dup(x);
}


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

x86 assembly (clang, -O2):
<ASN1_OCTET_STRING_dup>:
jmp    1030 <M_ASN1_OCTET_STRING_dup@plt>

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

LLVM IR (-O2):
define i32* @ASN1_OCTET_STRING_dup(i32* %0) {
%2 = tail call i32* @M_ASN1_OCTET_STRING_dup(i32* %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  char charName;
  charName = 'd';
  printf("%c \n", charName);
  return (0);
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%c \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext 100)
ret i32 0
}
int isenter(char buf[8]) { return buf[0] == 13; }


x86 assembly (clang, -O0):
<isenter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isenter>:
xor    %eax,%eax
cmpb   $0xd,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @isenter(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 13
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @isenter(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 13
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int execl(const char *path, const char *arg0, ...) {
  fprintf(stderr, "ERROR: execl is unsupported!\n");
  fprintf(stderr, "Tried to execute '%s' with arg0 '%s'\n", path, arg0);
  abort();
}


x86 assembly (clang, -O0):
<execl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<execl>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eae(%rip),%r15
mov    (%r15),%edi
lea    0xec4(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%edi
lea    0xed1(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"ERROR: execl is unsupported!\0A\00"
@.str.1 = [38 x i8] c"Tried to execute '%s' with arg0 '%s'\0A\00"
define i32 @execl(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %9)
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"ERROR: execl is unsupported!\0A\00"
@.str.1 = [38 x i8] c"Tried to execute '%s' with arg0 '%s'\0A\00"
define i32 @execl(i8* %0, i8* %1, ...) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
%7 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char *);
int does_exist(const char *file) {
  FILE *fp;
  fp = fopen(file, "r");
  if (fp == NULL)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<does_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1147 <does_exist+0x37>
movl   $0x0,-0x4(%rbp)
jmp    114e <does_exist+0x3e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<does_exist>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <fopen@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @does_exist(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct rfc2045 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dodump(struct rfc2045 *, int /*<<< orphan*/);
void rfc2045_xdump(struct rfc2045 *p) { dodump(p, 0); }


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

x86 assembly (clang, -O2):
<rfc2045_xdump>:
xor    %esi,%esi
jmp    1030 <dodump@plt>

LLVM IR (-O0):
%struct.rfc2045 = type { i32 }
define void @rfc2045_xdump(%struct.rfc2045* %0) {
%2 = alloca %struct.rfc2045*
store %struct.rfc2045* %0, %struct.rfc2045** %2
%3 = load %struct.rfc2045*, %struct.rfc2045** %2
%4 = call i32 @dodump(%struct.rfc2045* %3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.rfc2045 = type { i32 }
define void @rfc2045_xdump(%struct.rfc2045* %0) {
%2 = tail call i32 @dodump(%struct.rfc2045* %0, i32 0)
ret void
}
void _Locale_time_destroy(struct _Locale_time *ltime
                          __attribute__((__unused__))) {}


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

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

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

LLVM IR (-O2):
%struct._Locale_time = type opaque
define void @_Locale_time_destroy(%struct._Locale_time* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;
struct scsi_cmd {
  int dummy;
};

/* Variables and functions */
uint8_t spc_recv_diagnostics(struct scsi_cmd *cmd) {
  ;
  return 0x00;
}


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

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

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

LLVM IR (-O2):
%struct.scsi_cmd = type { i32 }
define i32 @spc_recv_diagnostics(%struct.scsi_cmd* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
bool nrf52_errata_58(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_58() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ arrow1(double, double, double, double, double);
int /*<<< orphan*/ default_line_gwt();
int /*<<< orphan*/ linewidth(double);
int /*<<< orphan*/ setgray(double);
void arrow(double x1, double y1, double x2, double y2, double d, double g,
           double w) {
  linewidth(w);
  setgray(g);
  arrow1(x1, y1, x2, y2, d);
  default_line_gwt();
  return;
}


x86 assembly (clang, -O0):
<arrow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1040 <linewidth@plt>
movsd  -0x30(%rbp),%xmm0
call   1060 <setgray@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
call   1030 <arrow1@plt>
mov    $0x0,%al
call   1050 <default_line_gwt@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrow>:
sub    $0x38,%rsp
movsd  %xmm5,0x10(%rsp)
movsd  %xmm4,0x30(%rsp)
movsd  %xmm3,0x28(%rsp)
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x8(%rsp)
movaps %xmm6,%xmm0
call   1040 <linewidth@plt>
movsd  0x10(%rsp),%xmm0
call   1060 <setgray@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
movsd  0x30(%rsp),%xmm4
call   1030 <arrow1@plt>
xor    %eax,%eax
add    $0x38,%rsp
jmp    1050 <default_line_gwt@plt>

LLVM IR (-O0):
define void @arrow(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%15 = load double, double* %14
%16 = call i32 @linewidth(double %15)
%17 = load double, double* %13
%18 = call i32 @setgray(double %17)
%19 = load double, double* %8
%20 = load double, double* %9
%21 = load double, double* %10
%22 = load double, double* %11
%23 = load double, double* %12
%24 = call i32 @arrow1(double %19, double %20, double %21, double %22, double %23)
%25 = call i32 (...) @default_line_gwt()
ret void
}

LLVM IR (-O2):
define void @arrow(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = tail call i32 @linewidth(double %6)
%9 = tail call i32 @setgray(double %5)
%10 = tail call i32 @arrow1(double %0, double %1, double %2, double %3, double %4)
%11 = tail call i32 (...) @default_line_gwt()
ret void
}
void set_cpu(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @set_cpu(i32 %0) {
ret void
}
int gcd(int a, int b) {
  if (b % a == 0)
    return a;
  return gcd(b, a % b);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1139 <gcd+0x29>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <gcd+0x3d>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%eax
cltd
idiv   %edi
test   %edx,%edx
je     1122 <gcd+0x22>
nopl   0x0(%rax)
mov    %esi,%ecx
mov    %edi,%eax
cltd
idiv   %esi
mov    %esi,%edi
mov    %edx,%esi
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = srem i32 %1, %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ %1, %2 ]
%7 = phi i32 [ %6, %5 ], [ %0, %2 ]
%8 = srem i32 %7, %6
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = phi i32 [ %0, %2 ], [ %6, %5 ]
ret i32 %11
}
void XkbLookupKeyBinding() {}


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

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

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

LLVM IR (-O2):
define void @XkbLookupKeyBinding() {
ret void
}
void g_print() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ puts(char *);
void myfunc(FILE *f) {
  char buf[1024];
  fread(buf, 1, 2048, f);
  puts(buf);
}


x86 assembly (clang, -O0):
<myfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x800,%edx
call   1040 <fread@plt>
lea    -0x410(%rbp),%rdi
call   1030 <puts@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myfunc>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x800,%edx
call   1040 <fread@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @myfunc(i32* %0) {
%2 = alloca i32*
%3 = alloca [1024 x i8]
store i32* %0, i32** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fread(i8* %4, i32 1, i32 2048, i32* %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i32 @puts(i8* %7)
ret void
}

LLVM IR (-O2):
define void @myfunc(i32* nocapture %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @fread(i8* %3, i32 1, i32 2048, i32* %0)
%5 = call i32 @puts(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ msgeln(char *);
void endmsge(char *msg) {
  msgeln(msg);
  exit(NULL);
}


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

x86 assembly (clang, -O2):
<endmsge>:
push   %rax
call   1030 <msgeln@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @endmsge(i8* %0) {
%2 = tail call i32 @msgeln(i8* %0)
%3 = tail call i32 @exit(i32* null)
unreachable
}
int isOperator(char c) { return c == '+' || c == '-' || c == '*' || c == '/'; }


x86 assembly (clang, -O0):
<isOperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     114d <isOperator+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     114d <isOperator+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2a,%ecx
mov    %al,-0x2(%rbp)
je     114d <isOperator+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0x2f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOperator>:
cmp    $0x2d,%dil
ja     1120 <isOperator+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x2c0000000000,%rdx
bt     %rcx,%rdx
jae    1120 <isOperator+0x20>
ret
xor    %eax,%eax
cmp    $0x2f,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isOperator(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, 43
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 45
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 42
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 47
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @isOperator(i8 signext %0) {
switch i8 %0, label %2 [
i8 45, label %5
i8 43, label %5
i8 42, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 47
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int read(int, void *, size_t);
int _dl_read(int fd, void *buf, size_t len) { return read(fd, buf, len); }


x86 assembly (clang, -O0):
<_dl_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dl_read>:
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define i32 @_dl_read(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
int get_next_index() {
  int ret = -1;
  return (ret);
}


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

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

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

LLVM IR (-O2):
define i32 @get_next_index() {
ret i32 -1
}