xunge/DecIR huggingface dataset:
int dummy_open(struct bladerf *device, struct bladerf_devinfo *info) {
  return (-7);
}


x86 assembly (clang, -O0):
<dummy_open>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xfffffff9,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.bladerf = type opaque
%struct.bladerf_devinfo = type opaque
define i32 @dummy_open(%struct.bladerf* %0, %struct.bladerf_devinfo* %1) {
%3 = alloca %struct.bladerf*
%4 = alloca %struct.bladerf_devinfo*
store %struct.bladerf* %0, %struct.bladerf** %3
store %struct.bladerf_devinfo* %1, %struct.bladerf_devinfo** %4
ret i32 -7
}

LLVM IR (-O2):
%struct.bladerf = type opaque
%struct.bladerf_devinfo = type opaque
define i32 @dummy_open(%struct.bladerf* nocapture readnone %0, %struct.bladerf_devinfo* nocapture readnone %1) {
ret i32 -7
}
/* Variables and functions */
int /*<<< orphan*/ doublesubcycle3();
void doublesubcycle2(void) { doublesubcycle3(); }


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

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

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

LLVM IR (-O2):
define void @doublesubcycle2() {
%1 = tail call i32 (...) @doublesubcycle3()
ret void
}
/* Type definitions */
struct lconv {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __softboundmpx_store_return_metadata(struct lconv *,
                                                        struct lconv *);
struct lconv *localeconv();
__attribute__((__weak__, __always___)) struct lconv *
softboundmpx_localeconv(void) {
  struct lconv *temp = localeconv();
  __softboundmpx_store_return_metadata(temp, temp + 1024);
  return temp;
}


x86 assembly (clang, -O0):
<softboundmpx_localeconv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <localeconv@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1000,%rsi
call   1040 <__softboundmpx_store_return_metadata@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_localeconv>:
push   %rbx
xor    %eax,%eax
call   1030 <localeconv@plt>
mov    %rax,%rbx
lea    0x1000(%rax),%rsi
mov    %rax,%rdi
call   1040 <__softboundmpx_store_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.lconv = type { i32 }
define weak %struct.lconv* @softboundmpx_localeconv() {
%1 = alloca %struct.lconv*
%2 = call %struct.lconv* (...) @localeconv()
store %struct.lconv* %2, %struct.lconv** %1
%3 = load %struct.lconv*, %struct.lconv** %1
%4 = load %struct.lconv*, %struct.lconv** %1
%5 = getelementptr inbounds %struct.lconv, %struct.lconv* %4, i64 1024
%6 = call i32 @__softboundmpx_store_return_metadata(%struct.lconv* %3, %struct.lconv* %5)
%7 = load %struct.lconv*, %struct.lconv** %1
ret %struct.lconv* %7
}

LLVM IR (-O2):
%struct.lconv = type { i32 }
define weak %struct.lconv* @softboundmpx_localeconv() {
%1 = tail call %struct.lconv* (...) @localeconv()
%2 = getelementptr inbounds %struct.lconv, %struct.lconv* %1, i64 1024
%3 = tail call i32 @__softboundmpx_store_return_metadata(%struct.lconv* %1, %struct.lconv* %2)
ret %struct.lconv* %1
}
/* Type definitions */
struct sockaddr {
  scalar_t__ sa_data;
  int /*<<< orphan*/ sa_family;
};
struct ether_addr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ARPHRD_ETHER;
int iw_ether_aton(char const *, struct ether_addr *);
int iw_saether_aton(const char *bufp, struct sockaddr *sap) {
  sap->sa_family = ARPHRD_ETHER;
  return iw_ether_aton(bufp, (struct ether_addr *)sap->sa_data);
}


x86 assembly (clang, -O0):
<iw_saether_aton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   1030 <iw_ether_aton@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iw_saether_aton>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x8(%rsi)
mov    (%rsi),%rsi
jmp    1030 <iw_ether_aton@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i64, i32 }
%struct.ether_addr = type { i32 }
@ARPHRD_ETHER = global i32 0
define i32 @iw_saether_aton(i8* %0, %struct.sockaddr* %1) {
%3 = alloca i8*
%4 = alloca %struct.sockaddr*
store i8* %0, i8** %3
store %struct.sockaddr* %1, %struct.sockaddr** %4
%5 = load i32, i32* @ARPHRD_ETHER
%6 = load %struct.sockaddr*, %struct.sockaddr** %4
%7 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %6, i32 0, i32 1
store i32 %5, i32* %7
%8 = load i8*, i8** %3
%9 = load %struct.sockaddr*, %struct.sockaddr** %4
%10 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %9, i32 0, i32 0
%11 = load i64, i64* %10
%12 = inttoptr i64 %11 to %struct.ether_addr*
%13 = call i32 @iw_ether_aton(i8* %8, %struct.ether_addr* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.sockaddr = type { i64, i32 }
%struct.ether_addr = type { i32 }
@ARPHRD_ETHER = global i32 0
define i32 @iw_saether_aton(i8* %0, %struct.sockaddr* nocapture %1) {
%3 = load i32, i32* @ARPHRD_ETHER
%4 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %1, i64 0, i32 1
store i32 %3, i32* %4
%5 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to %struct.ether_addr*
%8 = tail call i32 @iw_ether_aton(i8* %0, %struct.ether_addr* %7)
ret i32 %8
}
/* Variables and functions */
double sin(double);
double double_sin(double val) { return sin(val); }


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

x86 assembly (clang, -O2):
<double_sin>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @double_sin(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
void wrapc_getnameuidgid(char *name, int *uid, int *gid) {
  *uid = -1;
  *gid = -1;
}


x86 assembly (clang, -O0):
<wrapc_getnameuidgid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    -0x18(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrapc_getnameuidgid>:
movl   $0xffffffff,(%rsi)
movl   $0xffffffff,(%rdx)
ret

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

LLVM IR (-O2):
define void @wrapc_getnameuidgid(i8* nocapture readnone %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
store i32 -1, i32* %1
store i32 -1, i32* %2
ret void
}
unsigned int f1(int diff) { return ((unsigned int)(diff < 0 ? -diff : diff)); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <f1+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <f1+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @f1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
struct timex {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int clock_adjtime(int /*<<< orphan*/, struct timex *);
int adjtimex(struct timex *tx) { return clock_adjtime(CLOCK_REALTIME, tx); }


x86 assembly (clang, -O0):
<adjtimex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <clock_adjtime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjtimex>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <clock_adjtime@plt>

LLVM IR (-O0):
%struct.timex = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @adjtimex(%struct.timex* %0) {
%2 = alloca %struct.timex*
store %struct.timex* %0, %struct.timex** %2
%3 = load i32, i32* @CLOCK_REALTIME
%4 = load %struct.timex*, %struct.timex** %2
%5 = call i32 @clock_adjtime(i32 %3, %struct.timex* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.timex = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @adjtimex(%struct.timex* %0) {
%2 = load i32, i32* @CLOCK_REALTIME
%3 = tail call i32 @clock_adjtime(i32 %2, %struct.timex* %0)
ret i32 %3
}
/* Variables and functions */
int ledctl(unsigned int);
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ sscanf(char *, char *, unsigned int *);
int main(int argc, char *argv[]) {
  unsigned int mask;
  sscanf(argv[1], "0x%x", &mask);
  printf("%x\n", mask);
  return ledctl(mask);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeab(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1050 <sscanf@plt>
mov    -0x14(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
call   1040 <ledctl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
lea    0xec4(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1050 <sscanf@plt>
mov    0x4(%rsp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%edi
call   1040 <ledctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"0x%x\00"
@.str.1 = [4 x i8] c"%x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %6)
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %6
%14 = call i32 @ledctl(i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@.str = [5 x i8] c"0x%x\00"
@.str.1 = [4 x i8] c"%x\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %3
%11 = call i32 @ledctl(i32 %10)
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ clrhd(char *);
void clrhd_(char *header, int lheader) { clrhd(header); }


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

x86 assembly (clang, -O2):
<clrhd_>:
jmp    1030 <clrhd@plt>

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

LLVM IR (-O2):
define void @clrhd_(i8* %0, i32 %1) {
%3 = tail call i32 @clrhd(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *s) {
  fprintf(stderr, "error occured: %s. Exiting...\n", s);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"error occured: %s. Exiting...\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"error occured: %s. Exiting...\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ siftdown(int *, int, int);
void adjust(int *head, int len) {
  int n = len / 2;
  int min = 0;
  for (int i = n; i > 0; i--) {
    siftdown(head, len, i);
  }
}


x86 assembly (clang, -O0):
<adjust>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    1161 <adjust+0x51>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <siftdown@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <adjust+0x2a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjust>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%esi
jl     1146 <adjust+0x36>
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%ebx
shr    %ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <siftdown@plt>
lea    -0x1(%rbx),%eax
cmp    $0x1,%ebx
mov    %eax,%ebx
ja     1130 <adjust+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @adjust(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = sdiv i32 %8, 2
store i32 %9, i32* %5
store i32 0, i32* %6
%10 = load i32, i32* %5
store i32 %10, i32* %7
br label %11
11: ; preds = %19, %2
%12 = load i32, i32* %7
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %11
%15 = load i32*, i32** %3
%16 = load i32, i32* %4
%17 = load i32, i32* %7
%18 = call i32 @siftdown(i32* %15, i32 %16, i32 %17)
br label %19
19: ; preds = %14
%20 = load i32, i32* %7
%21 = add nsw i32 %20, -1
store i32 %21, i32* %7
br label %11
22: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @adjust(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = lshr i32 %1, 1
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i32 [ %10, %7 ], [ %5, %4 ]
%9 = tail call i32 @siftdown(i32* %0, i32 %1, i32 %8)
%10 = add nsw i32 %8, -1
%11 = icmp ugt i32 %8, 1
br i1 %11, label %7, label %6
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool I2CMasterBusBusy(uint32_t ui32Base) {
  ;
  if ((*((volatile unsigned long *)(ui32Base + 0x00000004))) & 0x00000040) {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<I2CMasterBusBusy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%rax
and    $0x40,%rax
cmp    $0x0,%rax
je     112a <I2CMasterBusBusy+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <I2CMasterBusBusy+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterBusBusy>:
mov    0x4(%rdi),%rax
shr    $0x6,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @I2CMasterBusBusy(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = add nsw i64 %4, 4
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = and i64 %7, 64
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @I2CMasterBusBusy(i64 %0) {
%2 = add nsw i64 %0, 4
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = lshr i32 %5, 6
%7 = and i32 %6, 1
ret i32 %7
}
/* Variables and functions */
int introspect_enter_PEMU(int, int, int, int, int, int, int);
int pemusysenter(int sysnum, int arg1, int arg2, int arg3, int arg4, int arg5,
                 int arg6) {
  return introspect_enter_PEMU(sysnum, arg1, arg2, arg3, arg4, arg5, arg6);
}


x86 assembly (clang, -O0):
<pemusysenter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <introspect_enter_PEMU@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pemusysenter>:
jmp    1030 <introspect_enter_PEMU@plt>

LLVM IR (-O0):
define i32 @pemusysenter(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = 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
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32, i32* %13
%21 = load i32, i32* %14
%22 = call i32 @introspect_enter_PEMU(i32 %15, i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @pemusysenter(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @introspect_enter_PEMU(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
ret i32 %8
}
int security_shm_associate(struct shmid_kernel *shp, int shmflg) { return 0; }


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

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

LLVM IR (-O0):
%struct.shmid_kernel = type opaque
define i32 @security_shm_associate(%struct.shmid_kernel* %0, i32 %1) {
%3 = alloca %struct.shmid_kernel*
%4 = alloca i32
store %struct.shmid_kernel* %0, %struct.shmid_kernel** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.shmid_kernel = type opaque
define i32 @security_shm_associate(%struct.shmid_kernel* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Type definitions */
struct clad_test {
  int dummy;
};

/* Variables and functions */
struct clad_test *clad_test_assert(struct clad_test *, int /*<<< orphan*/,
                                   char *, void *, char const *);
struct clad_test *clad_test_notnull(struct clad_test *test, void *ptr,
                                    const char *explain) {
  return clad_test_assert(test, ptr != NULL,
                          "Pointer should be not null: %p; %s", ptr, explain);
}


x86 assembly (clang, -O0):
<clad_test_notnull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%esi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xebc(%rip),%rdx
call   1030 <clad_test_assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clad_test_notnull>:
mov    %rdx,%r8
mov    %rsi,%rcx
xor    %esi,%esi
test   %rcx,%rcx
setne  %sil
lea    0xeda(%rip),%rdx
jmp    1030 <clad_test_assert@plt>

LLVM IR (-O0):
%struct.clad_test = type { i32 }
@.str = [35 x i8] c"Pointer should be not null: %p; %s\00"
define %struct.clad_test* @clad_test_notnull(%struct.clad_test* %0, i8* %1, i8* %2) {
%4 = alloca %struct.clad_test*
%5 = alloca i8*
%6 = alloca i8*
store %struct.clad_test* %0, %struct.clad_test** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.clad_test*, %struct.clad_test** %4
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
%10 = zext i1 %9 to i32
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call %struct.clad_test* @clad_test_assert(%struct.clad_test* %7, i32 %10, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
ret %struct.clad_test* %13
}

LLVM IR (-O2):
%struct.clad_test = type { i32 }
@.str = [35 x i8] c"Pointer should be not null: %p; %s\00"
define %struct.clad_test* @clad_test_notnull(%struct.clad_test* %0, i8* %1, i8* %2) {
%4 = icmp ne i8* %1, null
%5 = zext i1 %4 to i32
%6 = tail call %struct.clad_test* @clad_test_assert(%struct.clad_test* %0, i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
ret %struct.clad_test* %6
}
void gtk_cell_renderer_get_size() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ lseek(int, int /*<<< orphan*/, int);
__attribute__((__weak__, __always___)) off_t
softboundmpx_lseek(int fildes, off_t offset, int whence) {
  return lseek(fildes, offset, whence);
}


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

x86 assembly (clang, -O2):
<softboundmpx_lseek>:
jmp    1030 <lseek@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @lseek(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
int sys$dacefc(unsigned int efn) {
  return ({
    unsigned long resultvar;
    register long int _a1 asm("rdi") = (long)(efn);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x81\n\t"
                 : "=a"(resultvar)
                 : "i"(43), "r"(_a1)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$dacefc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2b,%rax
int    $0x81
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$dacefc>:
mov    %edi,%edi
mov    $0x2b,%rax
int    $0x81
ret

LLVM IR (-O0):
define i32 @"sys$dacefc"(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
store i64 %7, i64* %4
%8 = load i64, i64* %4
%9 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 43, i64 %8)
store i64 %9, i64* %3
%10 = load i64, i64* %3
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @"sys$dacefc"(i32 %0) {
%2 = zext i32 %0 to i64
%3 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 43, i64 %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
int lockd_free_lv(struct cmd_context *cmd, struct volume_group *vg,
                  const char *lv_name, struct id *lv_id,
                  const char *lock_args) {
  return 1;
}


x86 assembly (clang, -O0):
<lockd_free_lv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.cmd_context = type opaque
%struct.volume_group = type opaque
%struct.id = type opaque
define i32 @lockd_free_lv(%struct.cmd_context* %0, %struct.volume_group* %1, i8* %2, %struct.id* %3, i8* %4) {
%6 = alloca %struct.cmd_context*
%7 = alloca %struct.volume_group*
%8 = alloca i8*
%9 = alloca %struct.id*
%10 = alloca i8*
store %struct.cmd_context* %0, %struct.cmd_context** %6
store %struct.volume_group* %1, %struct.volume_group** %7
store i8* %2, i8** %8
store %struct.id* %3, %struct.id** %9
store i8* %4, i8** %10
ret i32 1
}

LLVM IR (-O2):
%struct.cmd_context = type opaque
%struct.volume_group = type opaque
%struct.id = type opaque
define i32 @lockd_free_lv(%struct.cmd_context* nocapture readnone %0, %struct.volume_group* nocapture readnone %1, i8* nocapture readnone %2, %struct.id* nocapture readnone %3, i8* nocapture readnone %4) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test_nfa_engine_advance();
int /*<<< orphan*/ test_nfa_engine_basic();
int /*<<< orphan*/ test_nfa_engine_translate();
void test_nfa_engine(void) {
  test_nfa_engine_basic();
  test_nfa_engine_translate();
  test_nfa_engine_advance();
}


x86 assembly (clang, -O0):
<test_nfa_engine>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_nfa_engine_basic@plt>
mov    $0x0,%al
call   1040 <test_nfa_engine_translate@plt>
mov    $0x0,%al
call   1050 <test_nfa_engine_advance@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nfa_engine>:
push   %rax
xor    %eax,%eax
call   1030 <test_nfa_engine_basic@plt>
xor    %eax,%eax
call   1040 <test_nfa_engine_translate@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <test_nfa_engine_advance@plt>

LLVM IR (-O0):
define void @test_nfa_engine() {
%1 = call i32 (...) @test_nfa_engine_basic()
%2 = call i32 (...) @test_nfa_engine_translate()
%3 = call i32 (...) @test_nfa_engine_advance()
ret void
}

LLVM IR (-O2):
define void @test_nfa_engine() {
%1 = tail call i32 (...) @test_nfa_engine_basic()
%2 = tail call i32 (...) @test_nfa_engine_translate()
%3 = tail call i32 (...) @test_nfa_engine_advance()
ret void
}
void get_rapl_limit(const int socket, struct rapl_limit *limit1,
                    struct rapl_limit *limit2, struct rapl_limit *dram) {}


x86 assembly (clang, -O0):
<get_rapl_limit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.rapl_limit = type opaque
define void @get_rapl_limit(i32 %0, %struct.rapl_limit* %1, %struct.rapl_limit* %2, %struct.rapl_limit* %3) {
%5 = alloca i32
%6 = alloca %struct.rapl_limit*
%7 = alloca %struct.rapl_limit*
%8 = alloca %struct.rapl_limit*
store i32 %0, i32* %5
store %struct.rapl_limit* %1, %struct.rapl_limit** %6
store %struct.rapl_limit* %2, %struct.rapl_limit** %7
store %struct.rapl_limit* %3, %struct.rapl_limit** %8
ret void
}

LLVM IR (-O2):
%struct.rapl_limit = type opaque
define void @get_rapl_limit(i32 %0, %struct.rapl_limit* nocapture %1, %struct.rapl_limit* nocapture %2, %struct.rapl_limit* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strlen(char *);
int system(char *);
int test_if_file_exists(char *path) {
  char com[strlen(path) + 7];
  sprintf(com, "test -f \"%s\"", path);
  return system(com);
}


x86 assembly (clang, -O0):
<test_if_file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x7,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x20(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xe8a(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x20(%rbp),%rdi
call   1040 <system@plt>
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_if_file_exists>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x7,%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    0xea6(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"test -f \22%s\22\00"
define i32 @test_if_file_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 7
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %3
%10 = alloca i8, i64 %8
store i64 %8, i64* %4
%11 = load i8*, i8** %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @system(i8* %10)
%14 = load i8*, i8** %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [13 x i8] c"test -f \22%s\22\00"
define i32 @test_if_file_exists(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 7
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%7 = call i32 @system(i8* %5)
ret i32 %7
}
/* Variables and functions */
int _Dmain();
int main(void) { return _Dmain(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <_Dmain@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @_Dmain()
ret i32 %1
}
/* Variables and functions */
char *__ulltoa_internal__(int, char *, int, int, int);
char *itoa(int value, char *str, int base) {
  return __ulltoa_internal__((value < 0) ? -value : value, str, base, value < 0,
                             0xFFFFFFFF);
}


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1139 <itoa+0x29>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    113f <itoa+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
cmpl   $0x0,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%ecx
mov    $0xffffffff,%r8d
call   1030 <__ulltoa_internal__@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
mov    %edi,%ecx
neg    %edi
cmovs  %ecx,%edi
shr    $0x1f,%ecx
mov    $0xffffffff,%r8d
jmp    1030 <__ulltoa_internal__@plt>

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

LLVM IR (-O2):
define i8* @itoa(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%5 = lshr i32 %0, 31
%6 = tail call i8* @__ulltoa_internal__(i32 %4, i8* %1, i32 %2, i32 %5, i32 -1)
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int iscntrl(int /*<<< orphan*/);
int iswcntrl(wint_t wc) { return iscntrl(wc); }


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

x86 assembly (clang, -O2):
<iswcntrl>:
jmp    1030 <iscntrl@plt>

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

LLVM IR (-O2):
define i32 @iswcntrl(i32 %0) {
%2 = tail call i32 @iscntrl(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello, ");
  printf("world");
  printf("!");
  printf("\n");
  printf("Hello, world!\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <printf@plt>
lea    0xec4(%rip),%rdi
call   1050 <printf@plt>
mov    $0x21,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeaa(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"Hello, \00"
@.str.1 = [6 x i8] c"world\00"
@str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 33)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int daemonize();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  int ret;
  if ((ret = daemonize()) < 0) {
    exit(EXIT_FAILURE);
  }
  sleep(10);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <daemonize@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1167 <main+0x37>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    $0xa,%edi
call   1050 <sleep@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <daemonize@plt>
test   %eax,%eax
jns    114a <main+0x1a>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    $0xa,%edi
call   1050 <sleep@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @daemonize()
store i32 %7, i32* %6
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %2
%13 = call i32 @sleep(i32 10)
%14 = load i32, i32* @EXIT_SUCCESS
%15 = call i32 @exit(i32 %14)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @daemonize()
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %2
%9 = tail call i32 @sleep(i32 10)
%10 = load i32, i32* @EXIT_SUCCESS
%11 = tail call i32 @exit(i32 %10)
unreachable
}
void os_set_proc_name(const char *dummy) {}


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

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

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

LLVM IR (-O2):
define void @os_set_proc_name(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int __builtin_inb(int);
int /*<<< orphan*/ __builtin_outb(unsigned char, int);
void uart_tx_byte(unsigned char data) {
  while (!(__builtin_inb(0x3f8 + 0x05) & 0x20))
    ;
  __builtin_outb(data, 0x3f8 + 0x00);
  while (!(__builtin_inb(0x3f8 + 0x05) & 0x40))
    ;
}


x86 assembly (clang, -O0):
<uart_tx_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x3fd,%edi
call   1030 <__builtin_inb@plt>
and    $0x20,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1150 <uart_tx_byte+0x30>
jmp    1155 <uart_tx_byte+0x35>
jmp    112e <uart_tx_byte+0xe>
mov    $0x3f8,%esi
movzbl -0x1(%rbp),%edi
call   1040 <__builtin_outb@plt>
mov    $0x3fd,%edi
call   1030 <__builtin_inb@plt>
and    $0x40,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1185 <uart_tx_byte+0x65>
jmp    118a <uart_tx_byte+0x6a>
jmp    1163 <uart_tx_byte+0x43>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_tx_byte>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x3fd,%edi
call   1030 <__builtin_inb@plt>
test   $0x20,%al
je     1130 <uart_tx_byte+0x10>
movzbl %bl,%edi
mov    $0x3f8,%esi
call   1040 <__builtin_outb@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x3fd,%edi
call   1030 <__builtin_inb@plt>
test   $0x40,%al
je     1150 <uart_tx_byte+0x30>
pop    %rbx
ret

LLVM IR (-O0):
define void @uart_tx_byte(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %8, %1
%4 = call i32 @__builtin_inb(i32 1021)
%5 = and i32 %4, 32
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
%10 = load i8, i8* %2
%11 = call i32 @__builtin_outb(i8 zeroext %10, i32 1016)
br label %12
12: ; preds = %17, %9
%13 = call i32 @__builtin_inb(i32 1021)
%14 = and i32 %13, 64
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
br i1 %16, label %17, label %18
17: ; preds = %12
br label %12
18: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @uart_tx_byte(i8 zeroext %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @__builtin_inb(i32 1021)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call i32 @__builtin_outb(i8 zeroext %0, i32 1016)
br label %8
8: ; preds = %8, %6
%9 = tail call i32 @__builtin_inb(i32 1021)
%10 = and i32 %9, 64
%11 = icmp eq i32 %10, 0
br i1 %11, label %8, label %12
12: ; preds = %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void *interrupt_Handler() {
  printf("\r%sType '??quit' to exit.\n%s", "\e[1;33m", "\e[0m");
  return 0;
}


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

x86 assembly (clang, -O2):
<interrupt_Handler>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xefe(%rip),%rsi
lea    0xeff(%rip),%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"\0D%sType '??quit' to exit.\0A%s\00"
@.str.1 = [8 x i8] c"\1B[1;33m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define i8* @interrupt_Handler() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [29 x i8] c"\0D%sType '??quit' to exit.\0A%s\00"
@.str.1 = [8 x i8] c"\1B[1;33m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define noalias i8* @interrupt_Handler() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
double JKISS();
double FS_JKISS(void) { return (JKISS() / 4294967296.0); }


x86 assembly (clang, -O0):
<FS_JKISS>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <JKISS@plt>
movsd  0xedd(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FS_JKISS>:
push   %rax
xor    %eax,%eax
call   1030 <JKISS@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @FS_JKISS() {
%1 = call double (...) @JKISS()
%2 = fdiv double %1, 0x41F0000000000000
ret double %2
}

LLVM IR (-O2):
define double @FS_JKISS() {
%1 = tail call double (...) @JKISS()
%2 = fmul double %1, 0x3DF0000000000000
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void main() {
  char *a = "en strenga";
  printf("%s", a);
  char b[] = "en strengb";
  printf("%s", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
mov    0xed4(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xed1(%rip),%ax
mov    %ax,-0xb(%rbp)
mov    0xec9(%rip),%al
mov    %al,-0x9(%rbp)
lea    -0x13(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeef(%rip),%rbx
lea    0xedd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
movabs $0x6e65727473206e65,%rax
72 65 6e
mov    %rax,(%rsp)
movl   $0x62676e,0x7(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"en strenga\00"
@.str.1 = [3 x i8] c"%s\00"
@__const.main.b = [11 x i8] c"en strengb\00"
define void @main() {
%1 = alloca i8*
%2 = alloca [11 x i8]
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = bitcast [11 x i8]* %2 to i8*
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"en strenga\00"
@.str.1 = [3 x i8] c"%s\00"
@__const.main.b = [11 x i8] c"en strengb\00"
define void @main() {
%1 = alloca [11 x i8]
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dcopy_(int *, double *, int *, double *, int *);
void dcopy(int n, const double *x, int incx, double *y, int incy) {
  dcopy_(&n, (double *)x, &incx, y, &incy);
}


x86 assembly (clang, -O0):
<dcopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
lea    -0x24(%rbp),%r8
call   1030 <dcopy_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcopy>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
mov    %edx,0x10(%rsp)
mov    %r8d,0xc(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%r8
call   1030 <dcopy_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @dcopy(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca double*
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32
store i32 %0, i32* %6
store double* %1, double** %7
store i32 %2, i32* %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double*, double** %7
%12 = load double*, double** %9
%13 = call i32 @dcopy_(i32* %6, double* %11, i32* %8, double* %12, i32* %10)
ret void
}

LLVM IR (-O2):
define void @dcopy(i32 %0, double* %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %6
store i32 %2, i32* %7
store i32 %4, i32* %8
%9 = call i32 @dcopy_(i32* %6, double* %1, i32* %7, double* %3, i32* %8)
ret void
}