xunge/DecIR huggingface dataset:
yyPrint_POS(i) long i;
{ printf("%d", i); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @yyPrint_POS(i64 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntDisable(int /*<<< orphan*/);
int /*<<< orphan*/ IntUnregister(int /*<<< orphan*/);
void uDMAIntUnregister(uint32_t ui32IntChannel) {
  IntDisable(ui32IntChannel);
  IntUnregister(ui32IntChannel);
}


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

x86 assembly (clang, -O2):
<uDMAIntUnregister>:
push   %rbx
mov    %edi,%ebx
call   1030 <IntDisable@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <IntUnregister@plt>

LLVM IR (-O0):
define void @uDMAIntUnregister(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @IntDisable(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @IntUnregister(i32 %5)
ret void
}

LLVM IR (-O2):
define void @uDMAIntUnregister(i32 %0) {
%2 = tail call i32 @IntDisable(i32 %0)
%3 = tail call i32 @IntUnregister(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bputc(int);
int /*<<< orphan*/ swbytealign();
void WriteSoi() {

  swbytealign();
  bputc(0xff);
  bputc(0xd8);
}


x86 assembly (clang, -O0):
<WriteSoi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <swbytealign@plt>
mov    $0xff,%edi
call   1030 <bputc@plt>
mov    $0xd8,%edi
call   1030 <bputc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteSoi>:
push   %rax
xor    %eax,%eax
call   1040 <swbytealign@plt>
mov    $0xff,%edi
call   1030 <bputc@plt>
mov    $0xd8,%edi
pop    %rax
jmp    1030 <bputc@plt>

LLVM IR (-O0):
define void @WriteSoi() {
%1 = call i32 (...) @swbytealign()
%2 = call i32 @bputc(i32 255)
%3 = call i32 @bputc(i32 216)
ret void
}

LLVM IR (-O2):
define void @WriteSoi() {
%1 = tail call i32 (...) @swbytealign()
%2 = tail call i32 @bputc(i32 255)
%3 = tail call i32 @bputc(i32 216)
ret void
}
int is_cntrl_char(int c) {
  return (-128 <= c && c < -96) || (0 <= c && c < 32) || (127 <= c && c < 160);
}


x86 assembly (clang, -O0):
<is_cntrl_char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0xffffff80,%eax
cmp    -0x4(%rbp),%eax
jg     1124 <is_cntrl_char+0x24>
mov    $0x1,%al
cmpl   $0xffffffa0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1164 <is_cntrl_char+0x64>
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jg     113e <is_cntrl_char+0x3e>
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1164 <is_cntrl_char+0x64>
xor    %eax,%eax
mov    $0x7f,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x6(%rbp)
jg     115e <is_cntrl_char+0x5e>
cmpl   $0xa0,-0x4(%rbp)
setl   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_cntrl_char>:
mov    %edi,%eax
and    $0xffffffe0,%eax
cmp    $0xffffff80,%eax
sete   %al
cmp    $0x20,%edi
setb   %cl
or     %al,%cl
add    $0xffffff81,%edi
cmp    $0x21,%edi
setb   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_cntrl_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 -128, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, -96
br i1 %7, label %22, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sle i32 0, %9
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 32
br i1 %13, label %22, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sle i32 127, %15
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 160
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %5
%23 = phi i1 [ true, %11 ], [ true, %5 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_cntrl_char(i32 %0) {
%2 = and i32 %0, -32
%3 = icmp eq i32 %2, -128
%4 = icmp ult i32 %0, 32
%5 = or i1 %4, %3
%6 = add i32 %0, -127
%7 = icmp ult i32 %6, 33
%8 = or i1 %7, %5
%9 = zext i1 %8 to i32
ret i32 %9
}
int main(void) {
  int ***ppp = 0;
  return ***ppp;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 undef
}
void delay(int time) {
  int i, j, k;
  for (i = 0; i < time; i++) {
    for (j = 0; j < 10; j++) {
      for (k = 0; k < 10000; k++) {
      }
    }
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1178 <delay+0x78>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1165 <delay+0x65>
movl   $0x0,-0x10(%rbp)
cmpl   $0x2710,-0x10(%rbp)
jge    1152 <delay+0x52>
jmp    1144 <delay+0x44>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1132 <delay+0x32>
jmp    1157 <delay+0x57>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1121 <delay+0x21>
jmp    116a <delay+0x6a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <delay+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %6
6: ; preds = %27, %1
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %30
10: ; preds = %6
store i32 0, i32* %4
br label %11
11: ; preds = %23, %10
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 10
br i1 %13, label %14, label %26
14: ; preds = %11
store i32 0, i32* %5
br label %15
15: ; preds = %19, %14
%16 = load i32, i32* %5
%17 = icmp slt i32 %16, 10000
br i1 %17, label %18, label %22
18: ; preds = %15
br label %19
19: ; preds = %18
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %15
22: ; preds = %15
br label %23
23: ; preds = %22
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %11
26: ; preds = %11
br label %27
27: ; preds = %26
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %6
30: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int /*<<< orphan*/ getkey(int);
int shmget(int /*<<< orphan*/, int, int);
int getshm(int id) {
  key_t clave;
  clave = getkey(id);
  return (shmget(clave, 1, 0660));
}


x86 assembly (clang, -O0):
<getshm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <getkey@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
mov    $0x1b0,%edx
call   1040 <shmget@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getshm>:
push   %rax
call   1030 <getkey@plt>
mov    %eax,%edi
mov    $0x1,%esi
mov    $0x1b0,%edx
pop    %rax
jmp    1040 <shmget@plt>

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

LLVM IR (-O2):
define i32 @getshm(i32 %0) {
%2 = tail call i32 @getkey(i32 %0)
%3 = tail call i32 @shmget(i32 %2, i32 1, i32 432)
ret i32 %3
}
int gmp_detect_endian(void) {
  static const int i = 2;
  const unsigned char *p = (const unsigned char *)&i;
  return 1 - *p;
}


x86 assembly (clang, -O0):
<gmp_detect_endian>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
mov    $0x1,%eax
sub    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@gmp_detect_endian.i = internal constant i32 2
define i32 @gmp_detect_endian() {
%1 = alloca i8*
store i8* bitcast (i32* @gmp_detect_endian.i to i8*), i8** %1
%2 = load i8*, i8** %1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = sub nsw i32 1, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @gmp_detect_endian() {
ret i32 -1
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int /*<<< orphan*/ unix_error(char *);
void Stat(const char *filename, struct stat *buf) {
  if (stat(filename, buf) < 0)
    unix_error("Stat error");
}


x86 assembly (clang, -O0):
<Stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    1153 <Stat+0x33>
lea    0xeb2(%rip),%rdi
call   1040 <unix_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Stat>:
push   %rax
call   1030 <stat@plt>
test   %rax,%rax
js     112d <Stat+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <unix_error@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [11 x i8] c"Stat error\00"
define void @Stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i64 @stat(i8* %5, %struct.stat* %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @unix_error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [11 x i8] c"Stat error\00"
define void @Stat(i8* %0, %struct.stat* %1) {
%3 = tail call i64 @stat(i8* %0, %struct.stat* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @unix_error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abms_system(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
void abms_net_linkup(char *devname) {
  char lcmd[255];
  sprintf(lcmd, "%s%s link set %s up", "/app/os/sys/bin/", "ip", devname);
  abms_system(lcmd);
  return;
}


x86 assembly (clang, -O0):
<abms_net_linkup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%r8
lea    0xebf(%rip),%rsi
lea    0xecc(%rip),%rdx
lea    0xed6(%rip),%rcx
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <abms_system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abms_net_linkup>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%r8
lea    0xece(%rip),%rsi
lea    0xedb(%rip),%rdx
lea    0xee5(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <abms_system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%s%s link set %s up\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [3 x i8] c"ip\00"
define void @abms_net_linkup(i8* %0) {
%2 = alloca i8*
%3 = alloca [255 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%8 = call i32 @abms_system(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"%s%s link set %s up\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [3 x i8] c"ip\00"
define void @abms_net_linkup(i8* %0) {
%2 = alloca [255 x i8]
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%5 = call i32 @abms_system(i8* %3)
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
int ieee80211_is_probe_resp(__le16 fc) {
  return (fc & cpu_to_le16(0x000c | 0x00f0)) == cpu_to_le16(0x0000 | 0x0050);
}


x86 assembly (clang, -O0):
<ieee80211_is_probe_resp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x50,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_probe_resp>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0x50,%edi
call   1030 <cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_probe_resp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @cpu_to_le16(i32 80)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_probe_resp(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @cpu_to_le16(i32 80)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int is_intel_cpu(char *vendor) { return !strcmp(vendor, "GenuineIntel"); }


x86 assembly (clang, -O0):
<is_intel_cpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"GenuineIntel\00"
define i32 @is_intel_cpu(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strcmp(i8* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@.str = [13 x i8] c"GenuineIntel\00"
define i32 @is_intel_cpu(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void gtk_widget_get_child_visible() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_get_child_visible() {
ret void
}
/* Type definitions */
struct ejson_driver_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void d_open_object(struct ejson_driver_t *d) {
  printf("{");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<d_open_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_open_object>:
push   %rax
mov    $0x7b,%edi
call   1030 <putchar@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
%struct.ejson_driver_t = type { i32 }
@.str = [2 x i8] c"{\00"
@stdout = global i32 0
define void @d_open_object(%struct.ejson_driver_t* %0) {
%2 = alloca %struct.ejson_driver_t*
store %struct.ejson_driver_t* %0, %struct.ejson_driver_t** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
ret void
}

LLVM IR (-O2):
%struct.ejson_driver_t = type { i32 }
@stdout = global i32 0
define void @d_open_object(%struct.ejson_driver_t* nocapture readnone %0) {
%2 = tail call i32 @putchar(i32 123)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
float sqrtf(float const);
void mlVectorNormTo(const float *a, float *result) {
  *result = sqrtf(a[0] * a[0] + a[1] * a[1] + a[2] * a[2]);
}


x86 assembly (clang, -O0):
<mlVectorNormTo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlVectorNormTo>:
push   %rbx
mov    %rsi,%rbx
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1144 <mlVectorNormTo+0x34>
sqrtss %xmm0,%xmm0
jmp    1149 <mlVectorNormTo+0x39>
call   1030 <sqrtf@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @mlVectorNormTo(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %3
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %3
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = call float @llvm.fmuladd.f32(float %21, float %24, float %18)
%26 = call float @sqrtf(float %25)
%27 = load float*, float** %4
store float %26, float* %27
ret void
}

LLVM IR (-O2):
define void @mlVectorNormTo(float* nocapture %0, float* nocapture writeonly %1) {
%3 = load float, float* %0
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = fmul float %5, %5
%7 = tail call float @llvm.fmuladd.f32(float %3, float %3, float %6)
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = tail call float @llvm.fmuladd.f32(float %9, float %9, float %7)
%11 = tail call float @sqrtf(float %10)
store float %11, float* %1
ret void
}
void playMusic() {}


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

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

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

LLVM IR (-O2):
define void @playMusic() {
ret void
}
indreg0regx1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((*p0) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<indreg0regx1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
movslq -0x14(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jg     113b <indreg0regx1+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <indreg0regx1+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0regx1>:
mov    (%r8),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,4),%edx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @indreg0regx1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture %5) {
%7 = load i32, i32* %4
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
%11 = icmp sle i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
int __ocl_rhadd_int(int src1, int src2) {
  int carry = (src1 & 1) | (src2 & 1);
  return (src1 >> 1) + (src2 >> 1) + carry;
}


x86 assembly (clang, -O0):
<__ocl_rhadd_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    -0x8(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    -0x8(%rbp),%ecx
sar    $0x1,%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_rhadd_int>:
mov    %esi,%eax
or     %edi,%eax
and    $0x1,%eax
sar    %edi
sar    %esi
add    %esi,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @__ocl_rhadd_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = and i32 %6, 1
%8 = load i32, i32* %4
%9 = and i32 %8, 1
%10 = or i32 %7, %9
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = ashr i32 %11, 1
%13 = load i32, i32* %4
%14 = ashr i32 %13, 1
%15 = add nsw i32 %12, %14
%16 = load i32, i32* %5
%17 = add nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @__ocl_rhadd_int(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = and i32 %3, 1
%5 = ashr i32 %0, 1
%6 = ashr i32 %1, 1
%7 = add nsw i32 %6, %5
%8 = add nsw i32 %7, %4
ret i32 %8
}
/* Type definitions */
struct blastFile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bfError(struct blastFile *, char *);
void bfBadHeader(struct blastFile *bf) {
  bfError(bf, "Bad first line\nShould be something like:\n"
              "BLASTN 2.0.11 [Jan-20-2000]");
}


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

x86 assembly (clang, -O2):
<bfBadHeader>:
lea    0xee9(%rip),%rsi
jmp    1030 <bfError@plt>

LLVM IR (-O0):
%struct.blastFile = type { i32 }
@.str = [69 x i8] c"Bad first line\0AShould be something like:\0ABLASTN 2.0.11 [Jan-20-2000]\00"
define void @bfBadHeader(%struct.blastFile* %0) {
%2 = alloca %struct.blastFile*
store %struct.blastFile* %0, %struct.blastFile** %2
%3 = load %struct.blastFile*, %struct.blastFile** %2
%4 = call i32 @bfError(%struct.blastFile* %3, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.blastFile = type { i32 }
@.str = [69 x i8] c"Bad first line\0AShould be something like:\0ABLASTN 2.0.11 [Jan-20-2000]\00"
define void @bfBadHeader(%struct.blastFile* %0) {
%2 = tail call i32 @bfError(%struct.blastFile* %0, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void _prim_int_print(int64_t p1) { printf("%ld", p1); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define void @_prim_int_print(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void INT_Excep_PERIA_INTA216(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA216() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void string_storage_to_c(char *s) { printf("%s", s); }


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

x86 assembly (clang, -O2):
<string_storage_to_c>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @string_storage_to_c(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *xrealloc(void *inptr, size_t size) {
  void *ptr;
  ptr = realloc(inptr, size);
  if (ptr == NULL) {
    fprintf(stderr, "MALLOC FAILURE!\n");
    exit(127);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117b <xrealloc+0x4b>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x7f,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <xrealloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x7f,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"MALLOC FAILURE!\0A\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 127)
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void modzimr_init() { puts("hello local world"); }


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

x86 assembly (clang, -O2):
<modzimr_init>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"hello local world\00"
define void @modzimr_init() {
%1 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"hello local world\00"
define void @modzimr_init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ signame(int);
int /*<<< orphan*/ tprints(int /*<<< orphan*/);
void printsignal(int nr) { tprints(signame(nr)); }


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

x86 assembly (clang, -O2):
<printsignal>:
push   %rax
call   1040 <signame@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <tprints@plt>

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

LLVM IR (-O2):
define void @printsignal(i32 %0) {
%2 = tail call i32 @signame(i32 %0)
%3 = tail call i32 @tprints(i32 %2)
ret void
}
void swap(char *a, char *b) {
  char tmp = *b;
  *b = *a;
  *a = tmp;
  return;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rsi),%al
mov    (%rdi),%cl
mov    %cl,(%rsi)
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @swap(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** %4
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = load i8*, i8** %4
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %3
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = load i8, i8* %0
store i8 %4, i8* %1
store i8 %3, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ lua_pushnil();
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
int /*<<< orphan*/ lua_pushstring(int /*<<< orphan*/);
int /*<<< orphan*/ lua_pushusertag(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void pushresult(int i) {
  if (i)
    lua_pushusertag(NULL, 0);
  else {
    lua_pushnil();
    lua_pushstring(strerror(errno));
    lua_pushnumber(errno);
  }
}


x86 assembly (clang, -O0):
<pushresult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1175 <pushresult+0x25>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <lua_pushusertag@plt>
jmp    119f <pushresult+0x4f>
mov    $0x0,%al
call   1050 <lua_pushnil@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
call   1070 <strerror@plt>
mov    %eax,%edi
call   1060 <lua_pushstring@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
call   1040 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushresult>:
test   %edi,%edi
je     115d <pushresult+0xd>
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <lua_pushusertag@plt>
push   %rbx
xor    %eax,%eax
call   1050 <lua_pushnil@plt>
mov    0x2e74(%rip),%rbx
mov    (%rbx),%edi
call   1070 <strerror@plt>
mov    %eax,%edi
call   1060 <lua_pushstring@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @pushresult(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @lua_pushusertag(i32* null, i32 0)
br label %14
7: ; preds = %1
%8 = call i32 (...) @lua_pushnil()
%9 = load i32, i32* @errno
%10 = call i32 @strerror(i32 %9)
%11 = call i32 @lua_pushstring(i32 %10)
%12 = load i32, i32* @errno
%13 = call i32 @lua_pushnumber(i32 %12)
br label %14
14: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @pushresult(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @lua_pushusertag(i32* null, i32 0)
br label %12
5: ; preds = %1
%6 = tail call i32 (...) @lua_pushnil()
%7 = load i32, i32* @errno
%8 = tail call i32 @strerror(i32 %7)
%9 = tail call i32 @lua_pushstring(i32 %8)
%10 = load i32, i32* @errno
%11 = tail call i32 @lua_pushnumber(i32 %10)
br label %12
12: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ nis_name;

/* Variables and functions */
int /*<<< orphan*/ searchXYX(char *, char *);
nis_name searchowner(char *str) { return searchXYX(str, "owner="); }


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

x86 assembly (clang, -O2):
<searchowner>:
lea    0xee9(%rip),%rsi
jmp    1030 <searchXYX@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"owner=\00"
define i32 @searchowner(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @searchXYX(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [7 x i8] c"owner=\00"
define i32 @searchowner(i8* %0) {
%2 = tail call i32 @searchXYX(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ERR_print_errors_fp(int /*<<< orphan*/);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ stderr;
void secreteLibSSLError(void) {
  ERR_print_errors_fp(stderr);
  abort();
}


x86 assembly (clang, -O0):
<secreteLibSSLError>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1040 <ERR_print_errors_fp@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<secreteLibSSLError>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1040 <ERR_print_errors_fp@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @secreteLibSSLError() {
%1 = load i32, i32* @stderr
%2 = call i32 @ERR_print_errors_fp(i32 %1)
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @secreteLibSSLError() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @ERR_print_errors_fp(i32 %1)
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ outChar1(char);
void my_puts(char *str) {
  outChar1('\n');
  outChar1('\r');
  while (*str) {
    outChar1(*str);
    str++;
  }
}


x86 assembly (clang, -O0):
<my_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xa,%edi
call   1030 <outChar1@plt>
mov    $0xd,%edi
call   1030 <outChar1@plt>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <my_puts+0x4a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <outChar1@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1130 <my_puts+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_puts>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <outChar1@plt>
mov    $0xd,%edi
call   1030 <outChar1@plt>
mov    (%rbx),%al
test   %al,%al
je     1153 <my_puts+0x43>
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <outChar1@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <my_puts+0x30>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @my_puts(i8* nocapture %0) {
%2 = tail call i32 @outChar1(i8 signext 10)
%3 = tail call i32 @outChar1(i8 signext 13)
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %1, %6
%7 = phi i8 [ %11, %6 ], [ %4, %1 ]
%8 = phi i8* [ %10, %6 ], [ %0, %1 ]
%9 = tail call i32 @outChar1(i8 signext %7)
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %1
ret void
}
/* Variables and functions */
int print_ulong(unsigned long, char *);
int print_long(long n, char *buf) {
  int sign = n < 0;
  if (sign) {
    *buf++ = '-';
    n = -n;
  }
  return print_ulong((unsigned long)n, buf) + sign;
}


x86 assembly (clang, -O0):
<print_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1156 <print_long+0x46>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,(%rax)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <print_ulong@plt>
add    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_long>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
js     111e <print_long+0xe>
mov    %rbx,%rdi
jmp    112b <print_long+0x1b>
movb   $0x2d,(%rsi)
add    $0x1,%rsi
mov    %rbx,%rdi
neg    %rdi
shr    $0x3f,%rbx
call   1030 <print_ulong@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @print_long(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i32
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i64, i64* %3
%7 = icmp slt i64 %6, 0
%8 = zext i1 %7 to i32
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %4
store i8 45, i8* %12
%14 = load i64, i64* %3
%15 = sub nsw i64 0, %14
store i64 %15, i64* %3
br label %16
16: ; preds = %11, %2
%17 = load i64, i64* %3
%18 = load i8*, i8** %4
%19 = call i32 @print_ulong(i64 %17, i8* %18)
%20 = load i32, i32* %5
%21 = add nsw i32 %19, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @print_long(i64 %0, i8* %1) {
%3 = icmp slt i64 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 45, i8* %1
%6 = sub nsw i64 0, %0
br label %7
7: ; preds = %4, %2
%8 = phi i8* [ %5, %4 ], [ %1, %2 ]
%9 = phi i64 [ %6, %4 ], [ %0, %2 ]
%10 = lshr i64 %0, 63
%11 = trunc i64 %10 to i32
%12 = tail call i32 @print_ulong(i64 %9, i8* %8)
%13 = add nsw i32 %12, %11
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ MCG_DriverIRQHandler();
__attribute__((weak)) void MCG_IRQHandler(void) { MCG_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @MCG_IRQHandler() {
%1 = call i32 (...) @MCG_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @MCG_IRQHandler() {
%1 = tail call i32 (...) @MCG_DriverIRQHandler()
ret void
}
int pthread_key_create() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_key_create() {
ret i32 0
}
void swap(int nums[], int a, int b) {
  if (a == b)
    return;
  int tmp = nums[a];
  nums[a] = nums[b];
  nums[b] = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    111f <swap+0x1f>
jmp    1151 <swap+0x51>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
cmp    %edx,%esi
je     1116 <swap+0x16>
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
br label %32
12: ; preds = %3
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %7
%18 = load i32*, i32** %4
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
%27 = load i32, i32* %7
%28 = load i32*, i32** %4
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
store i32 %27, i32* %31
br label %32
32: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, %2
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = sext i32 %2 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
store i32 %11, i32* %7
store i32 %8, i32* %10
br label %12
12: ; preds = %3, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
swap() { ol("movl\tr0,r2\n\tmovl\tr1,r0\n\tmovl\tr2,r1"); }


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <ol@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
lea    0xee9(%rip),%rdi
jmp    1030 <ol@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"movl\09r0,r2\0A\09movl\09r1,r0\0A\09movl\09r2,r1\00"
define i32 @swap() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [35 x i8] c"movl\09r0,r2\0A\09movl\09r1,r0\0A\09movl\09r2,r1\00"
define i32 @swap() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct page {
  int dummy;
};
struct address_space {
  int dummy;
};

/* Variables and functions */
struct page *__page_cache_alloc(int /*<<< orphan*/);
int /*<<< orphan*/ mapping_gfp_mask(struct address_space *);
__attribute__((always_)) struct page *
page_cache_alloc(struct address_space *x) {
  return __page_cache_alloc(mapping_gfp_mask(x));
}


x86 assembly (clang, -O0):
<page_cache_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mapping_gfp_mask@plt>
mov    %eax,%edi
call   1040 <__page_cache_alloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<page_cache_alloc>:
push   %rax
call   1030 <mapping_gfp_mask@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <__page_cache_alloc@plt>

LLVM IR (-O0):
%struct.page = type { i32 }
%struct.address_space = type { i32 }
define %struct.page* @page_cache_alloc(%struct.address_space* %0) {
%2 = alloca %struct.address_space*
store %struct.address_space* %0, %struct.address_space** %2
%3 = load %struct.address_space*, %struct.address_space** %2
%4 = call i32 @mapping_gfp_mask(%struct.address_space* %3)
%5 = call %struct.page* @__page_cache_alloc(i32 %4)
ret %struct.page* %5
}

LLVM IR (-O2):
%struct.page = type { i32 }
%struct.address_space = type { i32 }
define %struct.page* @page_cache_alloc(%struct.address_space* %0) {
%2 = tail call i32 @mapping_gfp_mask(%struct.address_space* %0)
%3 = tail call %struct.page* @__page_cache_alloc(i32 %2)
ret %struct.page* %3
}
int main(int argc, char *argv[]) {
  int a[5] = {1, 2, 3, 4, 5};
  int *p = a;
  *p++ = 100;
  *(p++) = 101;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xee7(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xee4(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xee2(%rip),%eax
mov    %eax,-0x20(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x38(%rbp)
movl   $0x64,(%rax)
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x38(%rbp)
movl   $0x65,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i32]
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [5 x i32]* %6 to i8*
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
store i32* %9, i32** %7
%10 = load i32*, i32** %7
%11 = getelementptr inbounds i32, i32* %10, i32 1
store i32* %11, i32** %7
store i32 100, i32* %10
%12 = load i32*, i32** %7
%13 = getelementptr inbounds i32, i32* %12, i32 1
store i32* %13, i32** %7
store i32 101, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}