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

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
FILE *OpenFile(char FileName[], char *mode) {
  FILE *myfile = NULL;
  myfile = fopen(FileName, mode);
  return myfile;
}


x86 assembly (clang, -O0):
<OpenFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpenFile>:
jmp    1030 <fopen@plt>

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

LLVM IR (-O2):
define noalias i32* @OpenFile(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
ret i32* %3
}
void RSA_new(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ snprintb(char *, int, int, char *);
const char *c_typestr(int t) {
  static char buf[64];
  snprintb(buf, sizeof(buf), t, "\020\01ADDR\02DATE");
  return buf;
}


x86 assembly (clang, -O0):
<c_typestr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f1b(%rip),%rdi
mov    $0x40,%esi
lea    0xecf(%rip),%rcx
call   1030 <snprintb@plt>
lea    0x2f03(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_typestr>:
push   %rbx
mov    %edi,%edx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rcx
mov    %rbx,%rdi
mov    $0x40,%esi
call   1030 <snprintb@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@c_typestr.buf = internal global [64 x i8] zeroinitializer
@.str = [12 x i8] c"\10\01ADDR\02DATE\00"
define i8* @c_typestr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @snprintb(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @c_typestr.buf, i64 0, i64 0), i32 64, i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @c_typestr.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@c_typestr.buf = internal global [64 x i8] zeroinitializer
@.str = [12 x i8] c"\10\01ADDR\02DATE\00"
define i8* @c_typestr(i32 %0) {
%2 = tail call i32 @snprintb(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @c_typestr.buf, i64 0, i64 0), i32 64, i32 %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @c_typestr.buf, i64 0, i64 0)
}
AR0IR1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if ((p0[10000000]) <= (*p1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0IR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movzwl 0x1312d00(%rax),%eax
mov    -0x20(%rbp),%rcx
movzwl (%rcx),%ecx
cmp    %ecx,%eax
jg     1145 <AR0IR1+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <AR0IR1+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0IR1>:
movzwl 0x1312d00(%r8),%ecx
01
xor    %eax,%eax
cmp    (%r9),%cx
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @AR0IR1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture %5) {
%7 = getelementptr inbounds i16, i16* %4, i64 10000000
%8 = load i16, i16* %7
%9 = load i16, i16* %5
%10 = icmp ule i16 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
int isDelimeter(char c) {
  if (c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' || c >= '0' && c <= '9')
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<isDelimeter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1124 <isDelimeter+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    1158 <isDelimeter+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     113e <isDelimeter+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    1158 <isDelimeter+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1164 <isDelimeter+0x64>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1164 <isDelimeter+0x64>
movl   $0x0,-0x4(%rbp)
jmp    116b <isDelimeter+0x6b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isDelimeter>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xa5,%al
cmp    $0xe6,%al
setb   %al
add    $0xc6,%dil
cmp    $0xf6,%dil
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isDelimeter(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %27, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 122
br i1 %18, label %27, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sge i32 %21, 48
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp sle i32 %25, 57
br i1 %26, label %27, label %28
27: ; preds = %23, %15, %7
store i32 0, i32* %2
br label %29
28: ; preds = %23, %19
store i32 1, i32* %2
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @isDelimeter(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -91
%4 = icmp ult i8 %3, -26
%5 = add i8 %0, -58
%6 = icmp ult i8 %5, -10
%7 = and i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int is_first_in_group_TrdgSesGrp(size_t __tag) {
  return (__tag == (336)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_first_in_group_TrdgSesGrp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x150,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_first_in_group_TrdgSesGrp>:
xor    %eax,%eax
cmp    $0x150,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_first_in_group_TrdgSesGrp(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 336
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_first_in_group_TrdgSesGrp(i64 %0) {
%2 = icmp eq i64 %0, 336
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ glRasterPos2d(int /*<<< orphan*/, int /*<<< orphan*/);
void RasterPos2d(GLdouble x, GLdouble y) { glRasterPos2d(x, y); }


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

x86 assembly (clang, -O2):
<RasterPos2d>:
jmp    1030 <glRasterPos2d@plt>

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

LLVM IR (-O2):
define void @RasterPos2d(i32 %0, i32 %1) {
%3 = tail call i32 @glRasterPos2d(i32 %0, i32 %1)
ret void
}
unsigned int ECAPTimeStampRead(unsigned int baseAdd, unsigned int capEvtFlag) {
  return ((*((volatile unsigned int *)(baseAdd + capEvtFlag))));
}


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

x86 assembly (clang, -O2):
<ECAPTimeStampRead>:
add    %esi,%edi
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ECAPTimeStampRead(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add i32 %5, %6
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @ECAPTimeStampRead(i32 %0, i32 %1) {
%3 = add i32 %1, %0
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
ret i32 %6
}
/* Type definitions */
struct testlog {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ c2x(unsigned int);
int /*<<< orphan*/ tlog_putc(struct testlog *, int /*<<< orphan*/);
void tlog_putx(struct testlog *log, char c) {
  tlog_putc(log, c2x((unsigned)c / 16));
  tlog_putc(log, c2x((unsigned)c % 16));
}


x86 assembly (clang, -O0):
<tlog_putx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movsbl -0x9(%rbp),%edi
shr    $0x4,%edi
call   1030 <c2x@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1040 <tlog_putc@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movsbl -0x9(%rbp),%edi
and    $0xf,%edi
call   1030 <c2x@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <tlog_putc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tlog_putx>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
shr    $0x4,%edi
call   1030 <c2x@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1040 <tlog_putc@plt>
and    $0xf,%ebx
mov    %ebx,%edi
call   1030 <c2x@plt>
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <tlog_putc@plt>

LLVM IR (-O0):
%struct.testlog = type { i32 }
define void @tlog_putx(%struct.testlog* %0, i8 signext %1) {
%3 = alloca %struct.testlog*
%4 = alloca i8
store %struct.testlog* %0, %struct.testlog** %3
store i8 %1, i8* %4
%5 = load %struct.testlog*, %struct.testlog** %3
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = udiv i32 %7, 16
%9 = call i32 @c2x(i32 %8)
%10 = call i32 @tlog_putc(%struct.testlog* %5, i32 %9)
%11 = load %struct.testlog*, %struct.testlog** %3
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = urem i32 %13, 16
%15 = call i32 @c2x(i32 %14)
%16 = call i32 @tlog_putc(%struct.testlog* %11, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.testlog = type { i32 }
define void @tlog_putx(%struct.testlog* %0, i8 signext %1) {
%3 = sext i8 %1 to i32
%4 = lshr i32 %3, 4
%5 = tail call i32 @c2x(i32 %4)
%6 = tail call i32 @tlog_putc(%struct.testlog* %0, i32 %5)
%7 = and i32 %3, 15
%8 = tail call i32 @c2x(i32 %7)
%9 = tail call i32 @tlog_putc(%struct.testlog* %0, i32 %8)
ret void
}
void __init_libc() {}


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

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

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

LLVM IR (-O2):
define void @__init_libc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Write_LCD(int, char *, int);
void Enable_Scroll(int fd) {
  char cmd[] = {254, 81, 253};
  Write_LCD(fd, cmd, 3);
}


x86 assembly (clang, -O0):
<Enable_Scroll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xed6(%rip),%al
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x7(%rbp),%rsi
mov    $0x3,%edx
call   1030 <Write_LCD@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Enable_Scroll>:
push   %rax
movb   $0xfd,0x6(%rsp)
movw   $0x51fe,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x3,%edx
call   1030 <Write_LCD@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.Enable_Scroll.cmd = [3 x i8] c"\FEQ\FD"
define void @Enable_Scroll(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i8]
store i32 %0, i32* %2
%4 = bitcast [3 x i8]* %3 to i8*
%5 = load i32, i32* %2
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%7 = call i32 @Write_LCD(i32 %5, i8* %6, i32 3)
ret void
}

LLVM IR (-O2):
@__const.Enable_Scroll.cmd = [3 x i8] c"\FEQ\FD"
define void @Enable_Scroll(i32 %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = call i32 @Write_LCD(i32 %0, i8* %3, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bname(char *, char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *);
int main() {
  char basename[128], dirname[128];
  bname("/aaaddd/eeee", dirname, basename);
  printf("%s, %s\n", dirname, basename);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rsi
lea    -0x90(%rbp),%rdx
lea    0xeb9(%rip),%rdi
call   1040 <bname@plt>
lea    -0x110(%rbp),%rsi
lea    -0x90(%rbp),%rdx
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x108,%rsp
lea    0xecf(%rip),%rdi
mov    %rsp,%rbx
lea    0x80(%rsp),%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <bname@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/aaaddd/eeee\00"
@.str.1 = [8 x i8] c"%s, %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca [128 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%6 = call i32 @bname(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"/aaaddd/eeee\00"
@.str.1 = [8 x i8] c"%s, %s\0A\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = call i32 @bname(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ generate_bash_history_with_special_chars();
void main() { generate_bash_history_with_special_chars(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @generate_bash_history_with_special_chars()
ret void
}
__attribute__((always_)) void
sk_membar_acquire__after_atomic_conditional_inc() {}


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

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

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

LLVM IR (-O2):
define void @sk_membar_acquire__after_atomic_conditional_inc() {
ret void
}
/* Variables and functions */
int isspace(char);
int isstop(char c, char stop) {
  if (stop == '\n') {
    return isspace(c);
  } else {
    return c == stop;
  }
}


x86 assembly (clang, -O0):
<isstop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
cmp    $0xa,%eax
jne    1142 <isstop+0x32>
movsbl -0x5(%rbp),%edi
call   1030 <isspace@plt>
mov    %eax,-0x4(%rbp)
jmp    1157 <isstop+0x47>
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isstop>:
cmp    $0xa,%sil
jne    111f <isstop+0xf>
movsbl %dil,%edi
jmp    1030 <isspace@plt>
xor    %eax,%eax
cmp    %sil,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isstop(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %1, 10
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @isspace(i8 signext %0)
br label %9
6: ; preds = %2
%7 = icmp eq i8 %0, %1
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %6, %4
%10 = phi i32 [ %5, %4 ], [ %8, %6 ]
ret i32 %10
}
/* Variables and functions */
scalar_t__ log2(unsigned int);
unsigned make_log2_friendly(unsigned cache_size) {
  return 1 << (int)log2(cache_size);
}


x86 assembly (clang, -O0):
<make_log2_friendly>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <log2@plt>
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_log2_friendly>:
push   %rax
call   1030 <log2@plt>
mov    $0x1,%edx
mov    %eax,%ecx
shl    %cl,%edx
mov    %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @make_log2_friendly(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @log2(i32 %3)
%5 = trunc i64 %4 to i32
%6 = shl i32 1, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @make_log2_friendly(i32 %0) {
%2 = tail call i64 @log2(i32 %0)
%3 = trunc i64 %2 to i32
%4 = shl nuw i32 1, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ error(int, char *);
long addlong(register long a, register long b, char *s) {
  a += b;
  if (a >= 01000000000L * 8)
    error(1, s);
  return a;
}


x86 assembly (clang, -O0):
<addlong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x40000000,-0x8(%rbp)
40
jl     114c <addlong+0x3c>
mov    -0x18(%rbp),%rsi
mov    $0x1,%edi
call   1030 <error@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addlong>:
push   %rbx
mov    %rdi,%rbx
add    %rsi,%rbx
cmp    $0x40000000,%rbx
jl     112d <addlong+0x1d>
mov    $0x1,%edi
mov    %rdx,%rsi
call   1030 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @addlong(i64 %0, i64 %1, i8* %2) {
%4 = add nsw i64 %1, %0
%5 = icmp sgt i64 %4, 1073741823
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @error(i32 1, i8* %2)
br label %8
8: ; preds = %6, %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ scrprintf(char *, int);
void csrright(int n) { scrprintf("\033[%dD", n); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dD\00"
define void @csrright(i32 %0) {
%2 = tail call i32 @scrprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int HadTu_decoding(void const *);
unsigned HadTu_alignment(const void *my) {
  return 1 << (HadTu_decoding(my) >> 16 & 0xff);
}


x86 assembly (clang, -O0):
<HadTu_alignment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <HadTu_decoding@plt>
mov    %eax,%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HadTu_alignment>:
push   %rax
call   1030 <HadTu_decoding@plt>
shr    $0x10,%eax
mov    $0x1,%edx
mov    %eax,%ecx
shl    %cl,%edx
mov    %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @HadTu_alignment(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @HadTu_decoding(i8* %3)
%5 = ashr i32 %4, 16
%6 = and i32 %5, 255
%7 = shl i32 1, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @HadTu_alignment(i8* %0) {
%2 = tail call i32 @HadTu_decoding(i8* %0)
%3 = lshr i32 %2, 16
%4 = and i32 %3, 255
%5 = shl nuw i32 1, %4
ret i32 %5
}
void f_acc_loop(void) {
  int i;
#pragma acc parallel
#pragma acc loop
  for (i = 0; i < 2; ++i) {
#pragma omp atomic write
    i = 0;
  }
}


x86 assembly (clang, -O0):
<f_acc_loop>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    112a <f_acc_loop+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <f_acc_loop+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @f_acc_loop() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 2
br i1 %4, label %5, label %9
5: ; preds = %2
store i32 0, i32* %1
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
/* Type definitions */
typedef int /*<<< orphan*/ atomic_long;

/* Variables and functions */
int /*<<< orphan*/ __my_atomic_begin();
int /*<<< orphan*/ __my_atomic_end();
long atomic_load_explicit(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ atomic_store_explicit(int /*<<< orphan*/ *, long,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ memory_order_seq_cst;
long my_atomic_exchange(atomic_long *obj, long v) {
  __my_atomic_begin();
  long t = atomic_load_explicit(obj, memory_order_seq_cst);
  atomic_store_explicit(obj, v, memory_order_seq_cst);
  __my_atomic_end();
  return t;
}


x86 assembly (clang, -O0):
<my_atomic_exchange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <__my_atomic_begin@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
call   1040 <atomic_load_explicit@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6c(%rip),%rax
mov    (%rax),%edx
call   1050 <atomic_store_explicit@plt>
mov    $0x0,%al
call   1030 <__my_atomic_end@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_atomic_exchange>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1060 <__my_atomic_begin@plt>
mov    0x2e8c(%rip),%r12
mov    (%r12),%esi
mov    %rbx,%rdi
call   1040 <atomic_load_explicit@plt>
mov    %rax,%r15
mov    (%r12),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <atomic_store_explicit@plt>
xor    %eax,%eax
call   1030 <__my_atomic_end@plt>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@memory_order_seq_cst = global i32 0
define i64 @my_atomic_exchange(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = call i32 (...) @__my_atomic_begin()
%7 = load i32*, i32** %3
%8 = load i32, i32* @memory_order_seq_cst
%9 = call i64 @atomic_load_explicit(i32* %7, i32 %8)
store i64 %9, i64* %5
%10 = load i32*, i32** %3
%11 = load i64, i64* %4
%12 = load i32, i32* @memory_order_seq_cst
%13 = call i32 @atomic_store_explicit(i32* %10, i64 %11, i32 %12)
%14 = call i32 (...) @__my_atomic_end()
%15 = load i64, i64* %5
ret i64 %15
}

LLVM IR (-O2):
@memory_order_seq_cst = global i32 0
define i64 @my_atomic_exchange(i32* %0, i64 %1) {
%3 = tail call i32 (...) @__my_atomic_begin()
%4 = load i32, i32* @memory_order_seq_cst
%5 = tail call i64 @atomic_load_explicit(i32* %0, i32 %4)
%6 = load i32, i32* @memory_order_seq_cst
%7 = tail call i32 @atomic_store_explicit(i32* %0, i64 %1, i32 %6)
%8 = tail call i32 (...) @__my_atomic_end()
ret i64 %5
}
float foo(float x, float y) { return x * y; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @foo(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 = load float, float* %4
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @foo(float %0, float %1) {
%3 = fmul float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ strtol(char *, char **, int);
int is_number(char *pValue) {
  char *pEndPtr = NULL;
  strtol(pValue, &pEndPtr, 10);
  return *pEndPtr == '\0';
}


x86 assembly (clang, -O0):
<is_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    (%rsp),%rcx
xor    %eax,%eax
cmpb   $0x0,(%rcx)
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_number(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = call i32 @strtol(i8* %4, i8** %3, i32 10)
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_number(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
store i8* null, i8** %2
%4 = call i32 @strtol(i8* %0, i8** %2, i32 10)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           char const *, char const *);
int /*<<< orphan*/ stderr;
void assert_impl(const char *file, int line, const char *func,
                 const char *expr) {
  fprintf(stderr, "Assertion FAILED|%s(%d)|%s: %s", file, line, func, expr);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<assert_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<assert_impl>:
push   %rax
mov    %rcx,%r9
mov    %rdx,%r8
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Assertion FAILED|%s(%d)|%s: %s\00"
@EXIT_FAILURE = global i32 0
define void @assert_impl(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11, i8* %12, i8* %13)
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Assertion FAILED|%s(%d)|%s: %s\00"
@EXIT_FAILURE = global i32 0
define void @assert_impl(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2, i8* %3)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x1d() {
  Assert_real((isgraph(29) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              150, ("isgraph should be 0 for 0x1d"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x1d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d,%edi
call   1040 <isgraph@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x96,%edx
lea    0xf5b(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x1d>:
push   %rax
mov    $0x1d,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x96,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x1d\00"
define void @t_isgraph_0x1d() {
%1 = call i64 @isgraph(i32 29)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x1d\00"
define void @t_isgraph_0x1d() {
%1 = tail call i64 @isgraph(i32 29)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main() {
  float f = 10.0f;
  float *floatPointer = &f;
  int *buffer = (int *)floatPointer;
  return *buffer;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movss  0xeed(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float*
%4 = alloca i32*
store i32 0, i32* %1
store float 1.000000e+01, float* %2
store float* %2, float** %3
%5 = load float*, float** %3
%6 = bitcast float* %5 to i32*
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1092616192
}
/* Variables and functions */
int /*<<< orphan*/ LC_MESSAGES;
char const *setlocale(int /*<<< orphan*/, int /*<<< orphan*/ *);
const char *plugin_api_info_locale_cb(const void *pointer, void *data,
                                      const char *info_name,
                                      const char *arguments) {
  (void)pointer;
  (void)data;
  (void)info_name;
  (void)arguments;
  return setlocale(LC_MESSAGES, NULL);
}


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

x86 assembly (clang, -O2):
<plugin_api_info_locale_cb>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <setlocale@plt>

LLVM IR (-O0):
@LC_MESSAGES = global i32 0
define i8* @plugin_api_info_locale_cb(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = load i32, i32* @LC_MESSAGES
%14 = call i8* @setlocale(i32 %13, i32* null)
ret i8* %14
}

LLVM IR (-O2):
@LC_MESSAGES = global i32 0
define i8* @plugin_api_info_locale_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = load i32, i32* @LC_MESSAGES
%6 = tail call i8* @setlocale(i32 %5, i32* null)
ret i8* %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void test_vorrimm_u32x2(uint32_t *__restrict__ dest, uint32_t *a) {
  int i;
  for (i = 0; i < 2; i++) {
    dest[i] = a[i] | 1;
  }
}


x86 assembly (clang, -O0):
<test_vorrimm_u32x2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1144 <test_vorrimm_u32x2+0x44>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
or     $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <test_vorrimm_u32x2+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vorrimm_u32x2>:
mov    (%rsi),%eax
or     $0x1,%eax
mov    %eax,(%rdi)
mov    0x4(%rsi),%eax
or     $0x1,%eax
mov    %eax,0x4(%rdi)
ret

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

LLVM IR (-O2):
define void @test_vorrimm_u32x2(i32* noalias nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = or i32 %3, 1
store i32 %4, i32* %0
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = load i32, i32* %5
%7 = or i32 %6, 1
%8 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %7, i32* %8
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ target;
};
typedef TYPE_1__ XSelectionEvent;

/* Variables and functions */
unsigned long get_XSelectionEvent_target(void *_p) {
  return (unsigned long)((XSelectionEvent *)_p)->target;
}


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

x86 assembly (clang, -O2):
<get_XSelectionEvent_target>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XSelectionEvent_target(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ bitmap_n_bytes(size_t);
unsigned long *xmemdup(unsigned long const *, int /*<<< orphan*/);
unsigned long *bitmap_clone(const unsigned long *bitmap, size_t n_bits) {
  return xmemdup(bitmap, bitmap_n_bytes(n_bits));
}


x86 assembly (clang, -O0):
<bitmap_clone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <bitmap_n_bytes@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <xmemdup@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_clone>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <bitmap_n_bytes@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <xmemdup@plt>

LLVM IR (-O0):
define i64* @bitmap_clone(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %4
%7 = call i32 @bitmap_n_bytes(i64 %6)
%8 = call i64* @xmemdup(i64* %5, i32 %7)
ret i64* %8
}

LLVM IR (-O2):
define i64* @bitmap_clone(i64* %0, i64 %1) {
%3 = tail call i32 @bitmap_n_bytes(i64 %1)
%4 = tail call i64* @xmemdup(i64* %0, i32 %3)
ret i64* %4
}
/* Variables and functions */
int /*<<< orphan*/ blah(int *);
__attribute__((no)) int func(void) {
  int a[4096];
  blah(a);
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4010,%rsp
lea    -0x4010(%rbp),%rdi
call   1030 <blah@plt>
mov    -0x4(%rbp),%eax
add    $0x4010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
sub    $0x4008,%rsp
mov    %rsp,%rdi
call   1030 <blah@plt>
add    $0x4008,%rsp
ret

LLVM IR (-O0):
define i32 @func() {
%1 = alloca i32
%2 = alloca [4096 x i32]
%3 = getelementptr inbounds [4096 x i32], [4096 x i32]* %2, i64 0, i64 0
%4 = call i32 @blah(i32* %3)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @func() {
%1 = alloca [4096 x i32]
%2 = bitcast [4096 x i32]* %1 to i8*
%3 = getelementptr inbounds [4096 x i32], [4096 x i32]* %1, i64 0, i64 0
%4 = call i32 @blah(i32* %3)
ret i32 undef
}
/* Variables and functions */
int Getb(int);
extern void WaitGE(void) {
  while (Getb(0x20) & 0x80)
    ;
}


x86 assembly (clang, -O0):
<WaitGE>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <WaitGE+0x9>
mov    $0x20,%edi
call   1030 <Getb@plt>
and    $0x80,%eax
cmp    $0x0,%eax
je     1136 <WaitGE+0x26>
jmp    1119 <WaitGE+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WaitGE>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <Getb@plt>
test   $0x80,%al
jne    1120 <WaitGE+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @WaitGE() {
br label %1
1: ; preds = %5, %0
%2 = call i32 @Getb(i32 32)
%3 = and i32 %2, 128
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @WaitGE() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @Getb(i32 32)
%3 = and i32 %2, 128
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *strdup(const char *str) {
  size_t len;
  char *copy;
  len = strlen(str) + 1;
  copy = malloc(len);
  if (copy == NULL)
    return NULL;
  memcpy(copy, str, len);
  return copy;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1173 <strdup+0x43>
movq   $0x0,-0x8(%rbp)
jmp    118c <strdup+0x5c>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1161 <strdup+0x31>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %4)
br label %9
9: ; preds = %1, %7
ret i8* %5
}
double objective_function(double delay_weight, double area_weight,
                          double power_weight, double delay, double area,
                          double power) {
  return (double)(area_weight * area + delay_weight * delay +
                  power_weight * power);
}


x86 assembly (clang, -O0):
<objective_function>:
push   %rbp
mov    %rsp,%rbp
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  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<objective_function>:
mulsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm1
addsd  %xmm1,%xmm0
mulsd  %xmm5,%xmm2
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @objective_function(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %8
%14 = load double, double* %11
%15 = load double, double* %7
%16 = load double, double* %10
%17 = fmul double %15, %16
%18 = call double @llvm.fmuladd.f64(double %13, double %14, double %17)
%19 = load double, double* %9
%20 = load double, double* %12
%21 = call double @llvm.fmuladd.f64(double %19, double %20, double %18)
ret double %21
}

LLVM IR (-O2):
define double @objective_function(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fmul double %0, %3
%8 = tail call double @llvm.fmuladd.f64(double %1, double %4, double %7)
%9 = tail call double @llvm.fmuladd.f64(double %2, double %5, double %8)
ret double %9
}
/* Variables and functions */
double cos(double);
double sin(double);
void polar_math(double radius, double theta, double *X, double *Y) {
  *X = radius * cos(theta * 0.0174532925199);
  *Y = radius * sin(theta * 0.0174532925199);
}


x86 assembly (clang, -O0):
<polar_math>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xeb4(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe84(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polar_math>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
mulsd  0xec5(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm1,%xmm0
call   1040 <cos@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @polar_math(double %0, double %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = fmul double %10, 0x3F91DF46A2526C7A
%12 = call double @cos(double %11)
%13 = fmul double %9, %12
%14 = load double*, double** %7
store double %13, double* %14
%15 = load double, double* %5
%16 = load double, double* %6
%17 = fmul double %16, 0x3F91DF46A2526C7A
%18 = call double @sin(double %17)
%19 = fmul double %15, %18
%20 = load double*, double** %8
store double %19, double* %20
ret void
}

LLVM IR (-O2):
define void @polar_math(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = fmul double %1, 0x3F91DF46A2526C7A
%6 = tail call double @cos(double %5)
%7 = fmul double %6, %0
store double %7, double* %2
%8 = tail call double @sin(double %5)
%9 = fmul double %8, %0
store double %9, double* %3
ret void
}
void foo399() {}


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

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

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

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