xunge/DecIR huggingface dataset:
void modbus_t15_expired(void) {}


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

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

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

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

/* Variables and functions */
void write_long(u_int32_t *addr, u_int32_t value) { *addr = value; }


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

x86 assembly (clang, -O2):
<write_long>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @write_long(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ deallocate(int *, int);
void free_integer(int *i) { deallocate(i, sizeof(int)); }


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

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

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

LLVM IR (-O2):
define void @free_integer(i32* %0) {
%2 = tail call i32 @deallocate(i32* %0, i32 4)
ret void
}
float __ocl_radians_float(float degrees) {
  return (0x1.921fb6p+1f / 180.0f) * degrees;
}


x86 assembly (clang, -O0):
<__ocl_radians_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_radians_float>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @__ocl_radians_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 0x3F91DF46A0000000, %3
ret float %4
}

LLVM IR (-O2):
define float @__ocl_radians_float(float %0) {
%2 = fmul float %0, 0x3F91DF46A0000000
ret float %2
}
unsigned int oct2uint(char *oct, unsigned int size) {
  unsigned int out = 0;
  int i = 0;
  while ((i < size) && oct[i]) {
    out = (out << 3) | (unsigned int)(oct[i++] - '0');
  }
  return out;
}


x86 assembly (clang, -O0):
<oct2uint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x15(%rbp)
jae    113f <oct2uint+0x3f>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    114f <oct2uint+0x4f>
jmp    1178 <oct2uint+0x78>
mov    -0x10(%rbp),%eax
shl    $0x3,%eax
mov    -0x8(%rbp),%rcx
mov    -0x14(%rbp),%edx
mov    %edx,%esi
add    $0x1,%esi
mov    %esi,-0x14(%rbp)
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    $0x30,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <oct2uint+0x19>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oct2uint>:
test   %esi,%esi
je     112a <oct2uint+0x2a>
mov    %esi,%ecx
xor    %edx,%edx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movsbl (%rdi,%rdx,1),%esi
test   %esi,%esi
je     1129 <oct2uint+0x29>
shl    $0x3,%eax
add    $0x1,%rdx
add    $0xffffffd0,%esi
or     %esi,%eax
cmp    %rdx,%rcx
jne    1110 <oct2uint+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @oct2uint(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp ult i32 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 0
br label %19
19: ; preds = %11, %7
%20 = phi i1 [ false, %7 ], [ %18, %11 ]
br i1 %20, label %21, label %33
21: ; preds = %19
%22 = load i32, i32* %5
%23 = shl i32 %22, 3
%24 = load i8*, i8** %3
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %6
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds i8, i8* %24, i64 %27
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = sub nsw i32 %30, 48
%32 = or i32 %23, %31
store i32 %32, i32* %5
br label %7
33: ; preds = %19
%34 = load i32, i32* %5
ret i32 %34
}

LLVM IR (-O2):
define i32 @oct2uint(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %19, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %12
%7 = phi i64 [ 0, %4 ], [ %15, %12 ]
%8 = phi i32 [ 0, %4 ], [ %17, %12 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %19, label %12
12: ; preds = %6
%13 = sext i8 %10 to i32
%14 = shl i32 %8, 3
%15 = add nuw nsw i64 %7, 1
%16 = add nsw i32 %13, -48
%17 = or i32 %16, %14
%18 = icmp eq i64 %15, %5
br i1 %18, label %19, label %6
19: ; preds = %6, %12, %2
%20 = phi i32 [ 0, %2 ], [ %17, %12 ], [ %8, %6 ]
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ Term_redraw();
int /*<<< orphan*/ Term_xtra(int, int /*<<< orphan*/);
int /*<<< orphan*/ do_cmd_pref_file_hack(int);
void colors_pref_load(void *unused, const char *title) {
  do_cmd_pref_file_hack(8);
  Term_xtra(10, 0);
  Term_redraw();
}


x86 assembly (clang, -O0):
<colors_pref_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x8,%edi
call   1030 <do_cmd_pref_file_hack@plt>
mov    $0xa,%edi
xor    %esi,%esi
call   1050 <Term_xtra@plt>
mov    $0x0,%al
call   1040 <Term_redraw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<colors_pref_load>:
push   %rax
mov    $0x8,%edi
call   1030 <do_cmd_pref_file_hack@plt>
mov    $0xa,%edi
xor    %esi,%esi
call   1050 <Term_xtra@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <Term_redraw@plt>

LLVM IR (-O0):
define void @colors_pref_load(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @do_cmd_pref_file_hack(i32 8)
%6 = call i32 @Term_xtra(i32 10, i32 0)
%7 = call i32 (...) @Term_redraw()
ret void
}

LLVM IR (-O2):
define void @colors_pref_load(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @do_cmd_pref_file_hack(i32 8)
%4 = tail call i32 @Term_xtra(i32 10, i32 0)
%5 = tail call i32 (...) @Term_redraw()
ret void
}
signed int signedint_ignoring_unsignedlongint(signed int x,
                                              unsigned long int y) {
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @signedint_ignoring_unsignedlongint(i32 returned %0, i64 %1) {
ret i32 %0
}
/* Variables and functions */
int _write_sysfs_int(char *, char *, int, int);
int write_sysfs_int_and_verify(char *filename, char *basedir, int val) {
  return _write_sysfs_int(filename, basedir, val, 1);
}


x86 assembly (clang, -O0):
<write_sysfs_int_and_verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1030 <_write_sysfs_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_sysfs_int_and_verify>:
mov    $0x1,%ecx
jmp    1030 <_write_sysfs_int@plt>

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

LLVM IR (-O2):
define i32 @write_sysfs_int_and_verify(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_write_sysfs_int(i8* %0, i8* %1, i32 %2, i32 1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void memChrSet8None(uint16_t addr, uint8_t val) {
  (void)addr;
  (void)val;
}


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

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

LLVM IR (-O0):
define void @memChrSet8None(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
ret void
}

LLVM IR (-O2):
define void @memChrSet8None(i32 %0, i32 %1) {
ret void
}
void Osal_platformSpiCsExit(void) { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ARGBColorMatrix() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f1();
int /*<<< orphan*/ f2(int /*<<< orphan*/);
void f3() {
  f1();
  f2(0);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <f1@plt>
xor    %edi,%edi
call   1030 <f2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
push   %rax
xor    %eax,%eax
call   1040 <f1@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <f2@plt>

LLVM IR (-O0):
define void @f3() {
%1 = call i32 (...) @f1()
%2 = call i32 @f2(i32 0)
ret void
}

LLVM IR (-O2):
define void @f3() {
%1 = tail call i32 (...) @f1()
%2 = tail call i32 @f2(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strspn(char *, char *);
void uninivar_strspn(void) {
  char *cs;
  char *ct;
  (void)strspn(cs, ct);
}


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

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

LLVM IR (-O0):
define void @uninivar_strspn() {
%1 = alloca i8*
%2 = alloca i8*
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strspn(i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
define void @uninivar_strspn() {
ret void
}
/* Variables and functions */
int rand();
int random_num() {
  int temp;
  temp = rand();
  temp = temp % 24;
  return (temp);
}


x86 assembly (clang, -O0):
<random_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_num>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x22,%rcx
add    %edx,%ecx
shl    $0x3,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @random_num() {
%1 = alloca i32
%2 = call i32 (...) @rand()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = srem i32 %3, 24
store i32 %4, i32* %1
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @random_num() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 24
ret i32 %2
}
void RTLinuxSysFsExists(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLinuxSysFsExists() {
ret void
}
int PckBacpNetRsp(unsigned char *pRqtFrm, int nRqtFrmLen,
                  unsigned char *pRspFrm) {
  unsigned int nSeq;
  if (((void *)0) == pRspFrm) {
    return 0;
  }
  memcpy(&nSeq, (pRqtFrm + 7), 4);
  return PckBacpNetRspEx(nSeq, pRspFrm);
}


x86 assembly (clang, -O0):
<PckBacpNetRsp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
xor    %eax,%eax
cmp    -0x20(%rbp),%rax
jne    113b <PckBacpNetRsp+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1156 <PckBacpNetRsp+0x46>
mov    -0x10(%rbp),%rax
mov    0x7(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1030 <PckBacpNetRspEx@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PckBacpNetRsp>:
test   %rdx,%rdx
je     1122 <PckBacpNetRsp+0x12>
mov    0x7(%rdi),%edi
mov    %rdx,%rsi
xor    %eax,%eax
jmp    1030 <PckBacpNetRspEx@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @PckBacpNetRsp(i8* nocapture %0, i32 %1, i8* %2) {
%4 = icmp eq i8* %2, null
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = getelementptr inbounds i8, i8* %0, i64 7
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @PckBacpNetRspEx to i32 (i32, i8*, ...)*)(i32 %8, i8* %2)
br label %10
10: ; preds = %3, %5
%11 = phi i32 [ %9, %5 ], [ 0, %3 ]
ret i32 %11
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long parent;
};
typedef TYPE_1__ XCirculateRequestEvent;

/* Variables and functions */
void set_XCirculateRequestEvent_parent(void *_p, unsigned long _v) {
  ((XCirculateRequestEvent *)_p)->parent = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XCirculateRequestEvent_parent(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Print() { printf("Something.\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Something.\0A\00"
define void @Print() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"Something.\00"
define void @Print() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int eqcmp(char *str, char *pat) {
  int i;
  i = strlen(pat);
  if (!strncmp(str, pat, i) && str[i] == '=')
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<eqcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1176 <eqcmp+0x56>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3d,%eax
jne    1176 <eqcmp+0x56>
movl   $0x0,-0x4(%rbp)
jmp    117d <eqcmp+0x5d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eqcmp>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    1151 <eqcmp+0x31>
movslq %ebp,%rcx
xor    %eax,%eax
cmpb   $0x3d,(%r14,%rcx,1)
je     1156 <eqcmp+0x36>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @eqcmp(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 61
br i1 %10, label %12, label %11
11: ; preds = %6, %2
br label %12
12: ; preds = %6, %11
%13 = phi i32 [ 1, %11 ], [ 0, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void strdispose(char *dest) { free(dest); }


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

x86 assembly (clang, -O2):
<strdispose>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @strdispose(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned long strlen(const char *str) {
  long cnt = 0;
  if (!str) {
    return 0;
  }
  while (*str != '\0') {
    cnt++;
    str++;
  }
  return cnt;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1128 <strlen+0x28>
movq   $0x0,-0x8(%rbp)
jmp    1162 <strlen+0x62>
jmp    112d <strlen+0x2d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115a <strlen+0x5a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112d <strlen+0x2d>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
test   %rdi,%rdi
je     111f <strlen+0x1f>
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = add nuw nsw i64 %7, 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i64 [ 0, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ ft_putstr_fd(char const *, int);
int /*<<< orphan*/ write(int, char *, int);
void ft_putendl_fd(char const *s, int fd) {
  if (s != NULL) {
    ft_putstr_fd(s, fd);
    write(fd, "\n", 1);
  }
}


x86 assembly (clang, -O0):
<ft_putendl_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115a <ft_putendl_fd+0x3a>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <ft_putstr_fd@plt>
mov    -0xc(%rbp),%edi
lea    0xeb0(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl_fd>:
test   %rdi,%rdi
je     1141 <ft_putendl_fd+0x21>
push   %rbx
mov    %esi,%ebx
call   1040 <ft_putstr_fd@plt>
lea    0xecc(%rip),%rsi
mov    %ebx,%edi
mov    $0x1,%edx
pop    %rbx
jmp    1030 <write@plt>
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @ft_putendl_fd(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @ft_putstr_fd(i8* %8, i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @write(i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
br label %13
13: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @ft_putendl_fd(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @ft_putstr_fd(i8* %0, i32 %1)
%6 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
br label %7
7: ; preds = %4, %2
ret void
}
void foo053(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo053(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("I am plain C.\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>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"I am plain C.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"I am plain C.\00"
define i32 @main() {
%1 = 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*/ add_example_fail_tests();
int /*<<< orphan*/ add_example_pass_tests();
int assert_run(int, char **);
int main(int argc, char *argv[]) {
  add_example_pass_tests();
  add_example_fail_tests();
  return assert_run(argc, argv);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <add_example_pass_tests@plt>
mov    $0x0,%al
call   1050 <add_example_fail_tests@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <assert_run@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <add_example_pass_tests@plt>
xor    %eax,%eax
call   1050 <add_example_fail_tests@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <assert_run@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @add_example_pass_tests()
%7 = call i32 (...) @add_example_fail_tests()
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @assert_run(i32 %8, i8** %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @add_example_pass_tests()
%4 = tail call i32 (...) @add_example_fail_tests()
%5 = tail call i32 @assert_run(i32 %0, i8** %1)
ret i32 %5
}
void sys_enable_interrupts(void) { asm volatile("sti" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @sys_enable_interrupts() {
tail call void asm sideeffect "sti", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
void foo467() {}


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

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

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

LLVM IR (-O2):
define void @foo467() {
ret void
}
/* Variables and functions */
int close(int);
int i2cClose(int fileDescriptor) { return close(fileDescriptor); }


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

x86 assembly (clang, -O2):
<i2cClose>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @i2cClose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void zk_clo_fini() { return; }


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

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

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

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


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

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

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

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

/* Variables and functions */
int syscall(int, int, int /*<<< orphan*/);
int inotify_rm_watch(int fd, __u32 wd) { return syscall(255, fd, wd); }


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

x86 assembly (clang, -O2):
<inotify_rm_watch>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0xff,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @inotify_rm_watch(i32 %0, i32 %1) {
%3 = tail call i32 @syscall(i32 255, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
scalar_t__ getpid();
int open(char const *const, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int, char const *const);
int main(int argc, char *argv[]) {
  const char *const filename = argv[1];
  int fd = open(filename, O_RDONLY);
  printf("in process %d, file descriptor %d is open to %s\n", (int)getpid(),
         (int)fd, filename);
  while (1)
    ;
  return 0;
}


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),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
jmp    1183 <main+0x53>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    0x8(%rsi),%rbx
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <open@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xea8(%rip),%rdi
mov    %eax,%esi
mov    %ebp,%edx
mov    %rbx,%rcx
call   1040 <printf@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1170 <main+0x40>

LLVM IR (-O0):
@O_RDONLY = global i32 0
@.str = [49 x i8] c"in process %d, file descriptor %d is open to %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = load i32, i32* @O_RDONLY
%13 = call i32 @open(i8* %11, i32 %12)
store i32 %13, i32* %7
%14 = call i64 (...) @getpid()
%15 = trunc i64 %14 to i32
%16 = load i32, i32* %7
%17 = load i8*, i8** %6
%18 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i8* %17)
br label %19
19: ; preds = %2, %19
br label %19
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@.str = [49 x i8] c"in process %d, file descriptor %d is open to %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = load i32, i32* @O_RDONLY
%6 = tail call i32 @open(i8* %4, i32 %5)
%7 = tail call i64 (...) @getpid()
%8 = trunc i64 %7 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %6, i8* %4)
br label %10
10: ; preds = %10, %2
br label %10
}
/* Variables and functions */
size_t unserialize_uint8(unsigned char const *in, size_t in_size,
                         unsigned char *v) {
  if (in_size < 1)
    return 0;
  if (v != NULL)
    *v = in[0];
  return 1;
}


x86 assembly (clang, -O0):
<unserialize_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x1,-0x18(%rbp)
jae    1128 <unserialize_uint8+0x28>
movq   $0x0,-0x8(%rbp)
jmp    1147 <unserialize_uint8+0x47>
cmpq   $0x0,-0x20(%rbp)
je     113f <unserialize_uint8+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unserialize_uint8>:
test   %rsi,%rsi
je     1114 <unserialize_uint8+0x14>
mov    $0x1,%eax
test   %rdx,%rdx
je     1113 <unserialize_uint8+0x13>
mov    (%rdi),%cl
mov    %cl,(%rdx)
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @unserialize_uint8(i8* %0, i64 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
%8 = load i64, i64* %6
%9 = icmp ult i64 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %3
store i64 0, i64* %4
br label %20
11: ; preds = %3
%12 = load i8*, i8** %7
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i64 0
%17 = load i8, i8* %16
%18 = load i8*, i8** %7
store i8 %17, i8* %18
br label %19
19: ; preds = %14, %11
store i64 1, i64* %4
br label %20
20: ; preds = %19, %10
%21 = load i64, i64* %4
ret i64 %21
}

LLVM IR (-O2):
define i64 @unserialize_uint8(i8* nocapture %0, i64 %1, i8* writeonly %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = icmp eq i8* %2, null
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = load i8, i8* %0
store i8 %8, i8* %2
br label %9
9: ; preds = %5, %7, %3
%10 = phi i64 [ 0, %3 ], [ 1, %7 ], [ 1, %5 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ trim_left(char *);
int /*<<< orphan*/ trim_right(char *);
char *trim(char *pStr) {
  trim_right(pStr);
  trim_left(pStr);
  return pStr;
}


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

x86 assembly (clang, -O2):
<trim>:
push   %rbx
mov    %rdi,%rbx
call   1030 <trim_right@plt>
mov    %rbx,%rdi
call   1040 <trim_left@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @trim(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @trim_right(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @trim_left(i8* %5)
%7 = load i8*, i8** %2
ret i8* %7
}

LLVM IR (-O2):
define i8* @trim(i8* returned %0) {
%2 = tail call i32 @trim_right(i8* %0)
%3 = tail call i32 @trim_left(i8* %0)
ret i8* %0
}
void qd_copy(const double *a, double *b) {
  b[0] = a[0];
  b[1] = a[1];
  b[2] = a[2];
  b[3] = a[3];
}


x86 assembly (clang, -O0):
<qd_copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<qd_copy>:
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsi)
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rsi)
movsd  0x18(%rdi),%xmm0
movsd  %xmm0,0x18(%rsi)
ret

LLVM IR (-O0):
define void @qd_copy(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
store double %7, double* %9
%10 = load double*, double** %3
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = load double*, double** %4
%14 = getelementptr inbounds double, double* %13, i64 1
store double %12, double* %14
%15 = load double*, double** %3
%16 = getelementptr inbounds double, double* %15, i64 2
%17 = load double, double* %16
%18 = load double*, double** %4
%19 = getelementptr inbounds double, double* %18, i64 2
store double %17, double* %19
%20 = load double*, double** %3
%21 = getelementptr inbounds double, double* %20, i64 3
%22 = load double, double* %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 3
store double %22, double* %24
ret void
}

LLVM IR (-O2):
define void @qd_copy(double* nocapture %0, double* nocapture writeonly %1) {
%3 = load double, double* %0
store double %3, double* %1
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %1, i64 1
store double %5, double* %6
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 2
store double %8, double* %9
%10 = getelementptr inbounds double, double* %0, i64 3
%11 = load double, double* %10
%12 = getelementptr inbounds double, double* %1, i64 3
store double %11, double* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_virtual_aux_data(int /*<<< orphan*/, unsigned char, int,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/,
                                         int /*<<< orphan*/);
int send_rf_flood_message(unsigned char vflags) {
  send_virtual_aux_data(0, vflags, 0x7b, 0, 0, 0, 0);
  return 0;
}


x86 assembly (clang, -O0):
<send_rf_flood_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %r9d,%r9d
mov    $0x7b,%edx
mov    %r9d,%edi
movzbl -0x1(%rbp),%esi
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <send_virtual_aux_data@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_rf_flood_message>:
push   %rax
mov    %edi,%esi
movl   $0x0,(%rsp)
xor    %edi,%edi
mov    $0x7b,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <send_virtual_aux_data@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @send_rf_flood_message(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @send_virtual_aux_data(i32 0, i8 zeroext %3, i32 123, i32 0, i32 0, i32 0, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @send_rf_flood_message(i8 zeroext %0) {
%2 = tail call i32 @send_virtual_aux_data(i32 0, i8 zeroext %0, i32 123, i32 0, i32 0, i32 0, i32 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ COND_VS();
int /*<<< orphan*/ EA_AY_AI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_svs_8_ai(void) {
  m68ki_write_8(EA_AY_AI_8(), COND_VS() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_svs_8_ai>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AY_AI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_VS@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_svs_8_ai>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AY_AI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_VS@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_svs_8_ai() {
%1 = call i32 (...) @EA_AY_AI_8()
%2 = call i64 (...) @COND_VS()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_svs_8_ai() {
%1 = tail call i32 (...) @EA_AY_AI_8()
%2 = tail call i64 (...) @COND_VS()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(
      stderr,
      "Usage:\n"
      "jcgimage -o outfile -u uImage [-m maxsize] [-v version]\n"
      "jcgimage -o outfile -k kernel -f rootfs [-m maxsize] [-v version]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [130 x i8] c"Usage:\0Ajcgimage -o outfile -u uImage [-m maxsize] [-v version]\0Ajcgimage -o outfile -k kernel -f rootfs [-m maxsize] [-v version]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [130 x i8] c"Usage:\0Ajcgimage -o outfile -u uImage [-m maxsize] [-v version]\0Ajcgimage -o outfile -k kernel -f rootfs [-m maxsize] [-v version]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void g_unichar_validate() {}


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

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

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

LLVM IR (-O2):
define void @g_unichar_validate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_err(char *, char *, int, size_t);
void *realloc(void *, size_t);
void *my_realloc(void *ptr, size_t n_bytes) {
  ptr = realloc(ptr, n_bytes);
  if (!ptr) {
    my_err("%s:%d: could not allocate %ld bytes of memory\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/bmvdgeijn/WASP/refs/heads/master/snp2h5/"
           "memutil.c",
           47, n_bytes);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<my_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1168 <my_realloc+0x48>
mov    -0x10(%rbp),%rcx
lea    0xea9(%rip),%rdi
lea    0xed1(%rip),%rsi
mov    $0x2f,%edx
call   1040 <my_err@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_realloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114f <my_realloc+0x2f>
lea    0xec5(%rip),%rdi
lea    0xeed(%rip),%rsi
mov    $0x2f,%edx
mov    %r14,%rcx
call   1040 <my_err@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [47 x i8] c"%s:%d: could not allocate %ld bytes of memory\0A\00"
@.str.1 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bmvdgeijn/WASP/refs/heads/master/snp2h5/memutil.c\00"
define i8* @my_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = load i64, i64* %4
%12 = call i32 @my_err(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0), i32 47, i64 %11)
br label %13
13: ; preds = %10, %2
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [47 x i8] c"%s:%d: could not allocate %ld bytes of memory\0A\00"
@.str.1 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bmvdgeijn/WASP/refs/heads/master/snp2h5/memutil.c\00"
define noalias i8* @my_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @my_err(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0), i32 47, i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system_command(char *);
int main(int argc, char **argv) {
  int i;
  for (i = 1; i < argc; i++) {
    system_command(argv[i]);
    printf("\n");
  }
  return 0;
}


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)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1174 <main+0x54>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <system_command@plt>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     115c <main+0x3c>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1040 <system_command@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\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
store i32 1, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @system_command(i8* %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @system_command(i8* %9)
%11 = tail call i32 @putchar(i32 10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
int rbt_memtype_check_insert(struct memtype *new,
                             enum page_cache_mode *new_type) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.memtype = type opaque
define i32 @rbt_memtype_check_insert(%struct.memtype* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}