xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void early_serial_init() {
  outb(0x3f8 + 1, 0x00);
  outb(0x3f8 + 3, 0x80);
  outb(0x3f8 + 0, 0x03);
  outb(0x3f8 + 1, 0x00);
  outb(0x3f8 + 3, 0x03);
  outb(0x3f8 + 2, 0xC7);
  outb(0x3f8 + 4, 0x0B);
}


x86 assembly (clang, -O0):
<early_serial_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x80,%esi
call   1030 <outb@plt>
mov    $0x3f8,%edi
mov    $0x3,%esi
call   1030 <outb@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1030 <outb@plt>
mov    $0x3fa,%edi
mov    $0xc7,%esi
call   1030 <outb@plt>
mov    $0x3fc,%edi
mov    $0xb,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<early_serial_init>:
push   %rax
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x80,%esi
call   1030 <outb@plt>
mov    $0x3f8,%edi
mov    $0x3,%esi
call   1030 <outb@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1030 <outb@plt>
mov    $0x3fa,%edi
mov    $0xc7,%esi
call   1030 <outb@plt>
mov    $0x3fc,%edi
mov    $0xb,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @early_serial_init() {
%1 = call i32 @outb(i32 1017, i32 0)
%2 = call i32 @outb(i32 1019, i32 128)
%3 = call i32 @outb(i32 1016, i32 3)
%4 = call i32 @outb(i32 1017, i32 0)
%5 = call i32 @outb(i32 1019, i32 3)
%6 = call i32 @outb(i32 1018, i32 199)
%7 = call i32 @outb(i32 1020, i32 11)
ret void
}

LLVM IR (-O2):
define void @early_serial_init() {
%1 = tail call i32 @outb(i32 1017, i32 0)
%2 = tail call i32 @outb(i32 1019, i32 128)
%3 = tail call i32 @outb(i32 1016, i32 3)
%4 = tail call i32 @outb(i32 1017, i32 0)
%5 = tail call i32 @outb(i32 1019, i32 3)
%6 = tail call i32 @outb(i32 1018, i32 199)
%7 = tail call i32 @outb(i32 1020, i32 11)
ret void
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double nearbyintl(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<nearbyintl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @nearbyintl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @nearbyintl(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
void Write32(void *base, unsigned int reg, unsigned int v) {
  *((volatile unsigned int *)(base + reg)) = v;
}


x86 assembly (clang, -O0):
<Write32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %edx,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Write32>:
mov    %esi,%eax
mov    %edx,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @Write32(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* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = zext i32 %9 to i64
%11 = getelementptr i8, i8* %8, i64 %10
%12 = bitcast i8* %11 to i32*
store volatile i32 %7, i32* %12
ret void
}

LLVM IR (-O2):
define void @Write32(i8* %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
%5 = getelementptr i8, i8* %0, i64 %4
%6 = bitcast i8* %5 to i32*
store volatile i32 %2, i32* %6
ret void
}
void Timer2B_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<Timer2B_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Timer2B_Handler+0x9>
jmp    1109 <Timer2B_Handler+0x9>

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

LLVM IR (-O0):
define void @Timer2B_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Timer2B_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int int32_t;
typedef int int16_t;

/* Variables and functions */
int PQCLEAN_KYBER51290S_CLEAN_montgomery_reduce(int);
int16_t fqmul(int16_t a, int16_t b) {
  return PQCLEAN_KYBER51290S_CLEAN_montgomery_reduce((int32_t)a * b);
}


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

x86 assembly (clang, -O2):
<fqmul>:
imul   %esi,%edi
jmp    1030 <PQCLEAN_KYBER51290S_CLEAN_montgomery_reduce@plt>

LLVM IR (-O0):
define i32 @fqmul(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 = mul nsw i32 %5, %6
%8 = call i32 @PQCLEAN_KYBER51290S_CLEAN_montgomery_reduce(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @fqmul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = tail call i32 @PQCLEAN_KYBER51290S_CLEAN_montgomery_reduce(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int plat_cpu_clock_get(void) {
  FILE *f;
  int ret = 0;
  f = fopen("/proc/pandora/cpu_mhz_max", "r");
  if (f) {
    fscanf(f, "%d", &ret);
    fclose(f);
  }
  return ret;
}


x86 assembly (clang, -O0):
<plat_cpu_clock_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
lea    0xeba(%rip),%rdi
lea    0xecd(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117e <plat_cpu_clock_get+0x4e>
mov    -0x8(%rbp),%rdi
lea    0xeb0(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plat_cpu_clock_get>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xebc(%rip),%rdi
lea    0xecf(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     117a <plat_cpu_clock_get+0x4a>
mov    %rax,%rbx
lea    0xebd(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rax,%rdi
call   1040 <fscanf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0xc(%rsp),%eax
jmp    117c <plat_cpu_clock_get+0x4c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [26 x i8] c"/proc/pandora/cpu_mhz_max\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @plat_cpu_clock_get() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %9, label %5
5: ; preds = %0
%6 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%7 = call i32 @fclose(i32* %3)
%8 = load i32, i32* %1
br label %9
9: ; preds = %5, %0
%10 = phi i32 [ %8, %5 ], [ 0, %0 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
scalar_t__ send(int, char *, scalar_t__, int /*<<< orphan*/);
scalar_t__ strlen(char *);
int sendCmdStr(int soc, char *sdCmd) {
  if (send(soc, sdCmd, strlen(sdCmd) + 1, 0) < 0) {
    perror("send");
    return -99;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sendCmdStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
xor    %ecx,%ecx
call   1040 <send@plt>
cmp    $0x0,%rax
jge    118d <sendCmdStr+0x5d>
lea    0xe84(%rip),%rdi
call   1050 <perror@plt>
movl   $0xffffff9d,-0x4(%rbp)
jmp    1194 <sendCmdStr+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendCmdStr>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
xor    %r14d,%r14d
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %ecx,%ecx
call   1040 <send@plt>
test   %rax,%rax
js     1161 <sendCmdStr+0x31>
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xe98(%rip),%rdi
call   1050 <perror@plt>
mov    $0xffffff9d,%r14d
jmp    1159 <sendCmdStr+0x29>

LLVM IR (-O0):
@.str = [5 x i8] c"send\00"
define i32 @sendCmdStr(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = load i8*, i8** %5
%8 = load i8*, i8** %5
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %9, 1
%11 = call i64 @send(i32 %6, i8* %7, i64 %10, i32 0)
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 -99, i32* %3
br label %16
15: ; preds = %2
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [5 x i8] c"send\00"
define i32 @sendCmdStr(i32 %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i64 @send(i32 %0, i8* %1, i64 %4, i32 0)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ -99, %7 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void mergeSort(int *list, int low, int high) {
  int mid;
  if (low < high) {
    mid = (low + high) / 2;
    mergeSort(list, low, mid);
    mergeSort(list, mid + 1, high);
    merge(list, low, mid, high);
  }
}


x86 assembly (clang, -O0):
<mergeSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <mergeSort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergeSort>:
cmp    %edx,%esi
jge    1172 <mergeSort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <mergeSort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <mergeSort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <merge@plt>
ret

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

LLVM IR (-O2):
define void @mergeSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @mergeSort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @mergeSort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
__attribute__((weak)) void ADCC0_IrqHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<ADCC0_IrqHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <ADCC0_IrqHandler+0x9>
jmp    1109 <ADCC0_IrqHandler+0x9>

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

LLVM IR (-O0):
define weak void @ADCC0_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @ADCC0_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn13() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn13");
  return result;
}


x86 assembly (clang, -O0):
<fn13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn13>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn13\00"
define i8* @fn13() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn13\00"
define i8* @fn13() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
float hex_to_fp32(unsigned char *);
void hex_to_nfp32(unsigned char *datahex, float *dataf, int n) {
  for (int i = 0; i < n; ++i) {
    dataf[i] = hex_to_fp32(&datahex[i * 4]);
  }
}


x86 assembly (clang, -O0):
<hex_to_nfp32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1165 <hex_to_nfp32+0x55>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%eax
shl    $0x2,%eax
cltq
add    %rax,%rdi
call   1030 <hex_to_fp32@plt>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <hex_to_nfp32+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_to_nfp32>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1148 <hex_to_nfp32+0x38>
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%r12d
shl    $0x2,%r12
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rdi
call   1030 <hex_to_fp32@plt>
movss  %xmm0,(%r14,%rbx,1)
add    $0x4,%rbx
cmp    %rbx,%r12
jne    1130 <hex_to_nfp32+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @hex_to_nfp32(i8* %0, float* nocapture writeonly %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %8
7: ; preds = %8, %3
ret void
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %14, %8 ]
%10 = shl nsw i64 %9, 2
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = tail call float @hex_to_fp32(i8* %11)
%13 = getelementptr inbounds float, float* %1, i64 %9
store float %12, float* %13
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %7, label %8
}
void jac_chain_nm3_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @jac_chain_nm3_incref() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int setup(void) {
  printf("It's a twap!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"It's a twap!\0A\00"
define i32 @setup() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"It's a twap!\00"
define i32 @setup() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ blinkdash();
int /*<<< orphan*/ blinkdot();
int /*<<< orphan*/ sleep(double);
int blinkX() {
  blinkdash();
  blinkdot();
  blinkdot();
  blinkdash();
  sleep(1.5);
  return 0;
}


x86 assembly (clang, -O0):
<blinkX>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <blinkdash@plt>
mov    $0x0,%al
call   1030 <blinkdot@plt>
mov    $0x0,%al
call   1030 <blinkdot@plt>
mov    $0x0,%al
call   1040 <blinkdash@plt>
movsd  0xea8(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blinkX>:
push   %rax
xor    %eax,%eax
call   1040 <blinkdash@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1040 <blinkdash@plt>
movsd  0xeab(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blinkX() {
%1 = call i32 (...) @blinkdash()
%2 = call i32 (...) @blinkdot()
%3 = call i32 (...) @blinkdot()
%4 = call i32 (...) @blinkdash()
%5 = call i32 @sleep(double 1.500000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @blinkX() {
%1 = tail call i32 (...) @blinkdash()
%2 = tail call i32 (...) @blinkdot()
%3 = tail call i32 (...) @blinkdot()
%4 = tail call i32 (...) @blinkdash()
%5 = tail call i32 @sleep(double 1.500000e+00)
ret i32 0
}
int ft_iscntrl(int c) {
  if ((c >= 0 && c <= 31) && (c == 127))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1131 <ft_iscntrl+0x31>
cmpl   $0x1f,-0x8(%rbp)
jg     1131 <ft_iscntrl+0x31>
cmpl   $0x7f,-0x8(%rbp)
jne    1131 <ft_iscntrl+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1138 <ft_iscntrl+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ft_iscntrl(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 31
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 127
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %2
br label %14
13: ; preds = %9, %6, %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @ft_iscntrl(i32 %0) {
ret i32 0
}
OP(dd, fc) {
  illegal_1();
  op_fc();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_fc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_fc()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_fc()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int leernumero() {
  int *p_num = NULL;
  printf("Introduce un numero \n");
  scanf("%d", p_num);
  return *p_num;
}


x86 assembly (clang, -O0):
<leernumero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xecf(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leernumero>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
xor    %esi,%esi
pop    %rax
jmp    1040 <scanf@plt>

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [21 x i8] c"Introduce un numero \00"
define i32 @leernumero() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ rw_msg(int, void *, int, size_t);
ssize_t read_msg(int sd, void *msg, size_t size) {
  return rw_msg(sd, msg, 0x00, size);
}


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

x86 assembly (clang, -O2):
<read_msg>:
mov    %rdx,%rcx
xor    %edx,%edx
jmp    1030 <rw_msg@plt>

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

LLVM IR (-O2):
define i32 @read_msg(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @rw_msg(i32 %0, i8* %1, i32 0, i64 %2)
ret i32 %4
}
int foo4(void) { return (4); }


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

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

LLVM IR (-O0):
define i32 @foo4() {
ret i32 4
}

LLVM IR (-O2):
define i32 @foo4() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void writeln(void *mellowStr) {
  printf("%s\n", (char *)(mellowStr + ((8) + (8))));
}


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

x86 assembly (clang, -O2):
<writeln>:
lea    0x10(%rdi),%rsi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

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


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

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

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

LLVM IR (-O2):
define void @RTUtf16ToUtf8ExTag() {
ret void
}
int ascix(char c) { return (c - 'a'); }


x86 assembly (clang, -O0):
<ascix>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascix>:
lea    -0x61(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ascix(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 97
ret i32 %5
}

LLVM IR (-O2):
define i32 @ascix(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -97
ret i32 %3
}
int flag_match(const char c) {
  int i;
  const char *flag;
  i = 0;
  flag = "dcsi";
  while (flag[i]) {
    if (c == flag[i])
      return (i);
    i++;
  }
  return (-1);
}


x86 assembly (clang, -O0):
<flag_match>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xee8(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115f <flag_match+0x5f>
movsbl -0x5(%rbp),%eax
mov    -0x18(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1151 <flag_match+0x51>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <flag_match+0x66>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111c <flag_match+0x1c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flag_match>:
add    $0x9d,%dil
cmp    $0x10,%dil
ja     1126 <flag_match+0x26>
xor    %eax,%eax
movzbl %dil,%ecx
lea    0xee9(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x1,%eax
ret
mov    $0xffffffff,%eax
ret
mov    $0x3,%eax
ret
mov    $0x2,%eax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"dcsi\00"
define i32 @flag_match(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
%5 = alloca i8*
store i8 %0, i8* %3
store i32 0, i32* %4
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %5
br label %6
6: ; preds = %25, %1
%7 = load i8*, i8** %5
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
br i1 %12, label %13, label %28
13: ; preds = %6
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = load i8*, i8** %5
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %15, %21
br i1 %22, label %23, label %25
23: ; preds = %13
%24 = load i32, i32* %4
store i32 %24, i32* %2
br label %29
25: ; preds = %13
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %6
28: ; preds = %6
store i32 -1, i32* %2
br label %29
29: ; preds = %28, %23
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @flag_match(i8 signext %0) {
switch i8 %0, label %2 [
i8 100, label %6
i8 99, label %3
i8 115, label %4
i8 105, label %5
]
2: ; preds = %1
br label %6
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3, %2
%7 = phi i32 [ 0, %1 ], [ -1, %2 ], [ 1, %3 ], [ 2, %4 ], [ 3, %5 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ hook_signal_send(char *, char *, int /*<<< orphan*/ *);
void gui_input_search_signal() {
  hook_signal_send("input_search", "string", NULL);
}


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

x86 assembly (clang, -O2):
<gui_input_search_signal>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %edx,%edx
jmp    1030 <hook_signal_send@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"input_search\00"
@.str.1 = [7 x i8] c"string\00"
define void @gui_input_search_signal() {
%1 = call i32 @hook_signal_send(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"input_search\00"
@.str.1 = [7 x i8] c"string\00"
define void @gui_input_search_signal() {
%1 = tail call i32 @hook_signal_send(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int _fork_init();
int /*<<< orphan*/ dmtcp_plugin_disable_ckpt();
int /*<<< orphan*/ dmtcp_plugin_enable_ckpt();
int ibv_fork_init(void) {
  dmtcp_plugin_disable_ckpt();
  int rslt = _fork_init();
  dmtcp_plugin_enable_ckpt();
  return rslt;
}


x86 assembly (clang, -O0):
<ibv_fork_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <dmtcp_plugin_disable_ckpt@plt>
mov    $0x0,%al
call   1030 <_fork_init@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibv_fork_init>:
push   %rbx
xor    %eax,%eax
call   1040 <dmtcp_plugin_disable_ckpt@plt>
xor    %eax,%eax
call   1030 <_fork_init@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ibv_fork_init() {
%1 = alloca i32
%2 = call i32 (...) @dmtcp_plugin_disable_ckpt()
%3 = call i32 (...) @_fork_init()
store i32 %3, i32* %1
%4 = call i32 (...) @dmtcp_plugin_enable_ckpt()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @ibv_fork_init() {
%1 = tail call i32 (...) @dmtcp_plugin_disable_ckpt()
%2 = tail call i32 (...) @_fork_init()
%3 = tail call i32 (...) @dmtcp_plugin_enable_ckpt()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
void usage(void) { errx(-1, "no arguments allowed\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
lea    0xee0(%rip),%rsi
call   1030 <errx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rsi
mov    $0xffffffff,%edi
jmp    1030 <errx@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"no arguments allowed\0A\00"
define void @usage() {
%1 = call i32 @errx(i32 -1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"no arguments allowed\0A\00"
define void @usage() {
%1 = tail call i32 @errx(i32 -1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct compat_semaphore {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ compat_up(struct compat_semaphore *);
void up(struct compat_semaphore *sem) { compat_up(sem); }


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

x86 assembly (clang, -O2):
<up>:
jmp    1030 <compat_up@plt>

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

LLVM IR (-O2):
%struct.compat_semaphore = type { i32 }
define void @up(%struct.compat_semaphore* %0) {
%2 = tail call i32 @compat_up(%struct.compat_semaphore* %0)
ret void
}
/* Type definitions */
typedef int xcb_keysym_t;

/* Variables and functions */
int xcb_is_private_keypad_key(xcb_keysym_t keysym) {
  return ((keysym >= 0x11000000) && (keysym <= 0x1100FFFF));
}


x86 assembly (clang, -O0):
<xcb_is_private_keypad_key>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x11000000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xcb_is_private_keypad_key+0x26>
cmpl   $0x1100ffff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcb_is_private_keypad_key>:
and    $0xffff0000,%edi
xor    %eax,%eax
cmp    $0x11000000,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xcb_is_private_keypad_key(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 285212672
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 285278207
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xcb_is_private_keypad_key(i32 %0) {
%2 = and i32 %0, -65536
%3 = icmp eq i32 %2, 285212672
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ u_long;

/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ munmap(char *, int /*<<< orphan*/);
void unmap_file(char *buf, int fd, u_long mapsize) {
  if (buf) {
    munmap(buf, mapsize);
  }
  close(fd);
}


x86 assembly (clang, -O0):
<unmap_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <unmap_file+0x29>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <munmap@plt>
mov    -0xc(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unmap_file>:
push   %rbx
mov    %esi,%ebx
test   %rdi,%rdi
je     112f <unmap_file+0xf>
mov    %edx,%esi
call   1040 <munmap@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @unmap_file(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 i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i8*, i8** %4
%11 = load i32, i32* %6
%12 = call i32 @munmap(i8* %10, i32 %11)
br label %13
13: ; preds = %9, %3
%14 = load i32, i32* %5
%15 = call i32 @close(i32 %14)
ret void
}

LLVM IR (-O2):
define void @unmap_file(i8* %0, i32 %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @munmap(i8* %0, i32 %2)
br label %7
7: ; preds = %5, %3
%8 = tail call i32 @close(i32 %1)
ret void
}
const char *get_cmdline(void) { return 0; }


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

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

LLVM IR (-O0):
define i8* @get_cmdline() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @get_cmdline() {
ret i8* null
}
void test_isascii_macro(void) {
  int i, j;
  for (i = -127; i < 256;)
    j = i, printf("%s: %d -> %d\n", __FUNCTION__, j, isascii(i++) ? 1 : 0);
}


x86 assembly (clang, -O0):
<test_isascii_macro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffff81,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1186 <test_isascii_macro+0x66>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <isascii@plt>
mov    -0xc(%rbp),%edx
mov    %eax,%esi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%esi
cmovne %eax,%ecx
lea    0xe8d(%rip),%rdi
lea    0xe94(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <test_isascii_macro+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isascii_macro>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xffffff81,%ebx
lea    0xecd(%rip),%r14
lea    0xed4(%rip),%r15
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <isascii@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebp,%ebx
cmp    $0x100,%ebp
jne    1140 <test_isascii_macro+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_isascii_macro = [19 x i8] c"test_isascii_macro\00"
define void @test_isascii_macro() {
%1 = alloca i32
%2 = alloca i32
store i32 -127, i32* %1
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
%11 = call i32 (i32, ...) bitcast (i32 (...)* @isascii to i32 (i32, ...)*)(i32 %9)
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.test_isascii_macro, i64 0, i64 0), i32 %8, i32 %14)
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_isascii_macro = [19 x i8] c"test_isascii_macro\00"
define void @test_isascii_macro() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ -127, %0 ], [ %3, %1 ]
%3 = add nsw i32 %2, 1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @isascii to i32 (i32, ...)*)(i32 %2)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.test_isascii_macro, i64 0, i64 0), i32 %2, i32 %6)
%8 = icmp eq i32 %3, 256
br i1 %8, label %9, label %1
9: ; preds = %1
ret void
}
void phyUartDebug_byte(char byte) {}


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

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

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

LLVM IR (-O2):
define void @phyUartDebug_byte(i8 signext %0) {
ret void
}
/* Variables and functions */
int mainloop_remove_fd(int);
int mainloop_remove_timeout(int id) { return mainloop_remove_fd(id); }


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

x86 assembly (clang, -O2):
<mainloop_remove_timeout>:
jmp    1030 <mainloop_remove_fd@plt>

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

LLVM IR (-O2):
define i32 @mainloop_remove_timeout(i32 %0) {
%2 = tail call i32 @mainloop_remove_fd(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void mog_die_fopenr(const char *filename) {
  printf("Error! Could not open file '%s' for reading!\n", filename);
  exit(1);
}


x86 assembly (clang, -O0):
<mog_die_fopenr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<mog_die_fopenr>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Error! Could not open file '%s' for reading!\0A\00"
define void @mog_die_fopenr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [46 x i8] c"Error! Could not open file '%s' for reading!\0A\00"
define void @mog_die_fopenr(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void subroutine2SUBROUTINE_ABSOLUTE() {}


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

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

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

LLVM IR (-O2):
define void @subroutine2SUBROUTINE_ABSOLUTE() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct xdg_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int, int /*<<< orphan*/);
void xdg_surface_pong(struct xdg_surface *xdg_surface, uint32_t serial) {
  wl_proxy_marshal((struct wl_proxy *)xdg_surface, 4, serial);
}


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

x86 assembly (clang, -O2):
<xdg_surface_pong>:
mov    %esi,%edx
mov    $0x4,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.xdg_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @xdg_surface_pong(%struct.xdg_surface* %0, i32 %1) {
%3 = alloca %struct.xdg_surface*
%4 = alloca i32
store %struct.xdg_surface* %0, %struct.xdg_surface** %3
store i32 %1, i32* %4
%5 = load %struct.xdg_surface*, %struct.xdg_surface** %3
%6 = bitcast %struct.xdg_surface* %5 to %struct.wl_proxy*
%7 = load i32, i32* %4
%8 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %6, i32 4, i32 %7)
ret void
}

LLVM IR (-O2):
%struct.xdg_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @xdg_surface_pong(%struct.xdg_surface* %0, i32 %1) {
%3 = bitcast %struct.xdg_surface* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %3, i32 4, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float sin(double);
int main() {
  float value;
  value = sin(3.14 / 2);
  printf("%f\n", value);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
call   1040 <sin@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <sin@plt>
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call float @sin(double 1.570000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %1)
ret i32 0
}