xunge/DecIR huggingface dataset:
/* Variables and functions */
long inet_addr(char *);
int isSameSubnet(char *ipAddr1, char *ipAddr2, char *mask) {
  long netAddr1, netAddr2, netMask;
  netAddr1 = inet_addr(ipAddr1);
  netAddr2 = inet_addr(ipAddr2);
  netMask = inet_addr(mask);
  if ((netAddr1 & netMask) != (netAddr2 & netMask))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isSameSubnet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <inet_addr@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <inet_addr@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <inet_addr@plt>
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
and    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
and    -0x38(%rbp),%rcx
cmp    %rcx,%rax
je     1170 <isSameSubnet+0x60>
movl   $0x0,-0x4(%rbp)
jmp    1177 <isSameSubnet+0x67>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSameSubnet>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <inet_addr@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1030 <inet_addr@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <inet_addr@plt>
xor    %r15,%rbx
xor    %ecx,%ecx
test   %rax,%rbx
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @isSameSubnet(i8* %0, i8* %1, i8* %2) {
%4 = tail call i64 @inet_addr(i8* %0)
%5 = tail call i64 @inet_addr(i8* %1)
%6 = tail call i64 @inet_addr(i8* %2)
%7 = xor i64 %5, %4
%8 = and i64 %7, %6
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
double ceil(double x) {
  int num = (int)x;
  if (num == x) {
    return num;
  }
  return num + 1;
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    1136 <ceil+0x36>
jp     1136 <ceil+0x36>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1145 <ceil+0x45>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
cvttsd2si %xmm0,%eax
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
add    $0x1,%eax
cvtsi2sd %eax,%xmm2
cmpeqsd %xmm1,%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ceil(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
%5 = load double, double* %3
%6 = fptosi double %5 to i32
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = load double, double* %3
%10 = fcmp oeq double %8, %9
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i32, i32* %4
%13 = sitofp i32 %12 to double
store double %13, double* %2
br label %18
14: ; preds = %1
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
%17 = sitofp i32 %16 to double
store double %17, double* %2
br label %18
18: ; preds = %14, %11
%19 = load double, double* %2
ret double %19
}

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fcmp oeq double %3, %0
%5 = add nsw i32 %2, 1
%6 = sitofp i32 %5 to double
%7 = select i1 %4, double %3, double %6
ret double %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int send_event;
};
typedef TYPE_1__ XSelectionRequestEvent;

/* Variables and functions */
void set_XSelectionRequestEvent_send_event(void *_p, int _v) {
  ((XSelectionRequestEvent *)_p)->send_event = (int)_v;
}


x86 assembly (clang, -O0):
<set_XSelectionRequestEvent_send_event>:
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):
<set_XSelectionRequestEvent_send_event>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XSelectionRequestEvent_send_event(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %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 i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XSelectionRequestEvent_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assembler_signed();
int /*<<< orphan*/ assembler_unsigned();
int main(void) {
  assembler_signed();
  assembler_unsigned();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <assembler_signed@plt>
xor    %eax,%eax
call   1040 <assembler_unsigned@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @assembler_signed()
%2 = tail call i32 (...) @assembler_unsigned()
ret i32 0
}
void rop3_104_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = *D | S;
  stk4 = ~stk4;
  stk3 = T | stk4;
  stk2 = S ^ stk3;
  stk1 = *D ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_104_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xe(%rbp)
movzbl -0xe(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xe(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xe(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_104_0_0>:
mov    (%rdi),%al
mov    %eax,%ecx
or     %sil,%cl
not    %cl
or     %dl,%cl
xor    %sil,%al
xor    %cl,%al
not    %al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_104_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
%17 = trunc i32 %16 to i8
store i8 %17, i8* %10
%18 = load i8, i8* %10
%19 = zext i8 %18 to i32
%20 = xor i32 %19, -1
%21 = trunc i32 %20 to i8
store i8 %21, i8* %10
%22 = load i8, i8* %6
%23 = zext i8 %22 to i32
%24 = load i8, i8* %10
%25 = zext i8 %24 to i32
%26 = or i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %9
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = load i8, i8* %9
%31 = zext i8 %30 to i32
%32 = xor i32 %29, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %8
%34 = load i8*, i8** %4
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = load i8, i8* %8
%38 = zext i8 %37 to i32
%39 = xor i32 %36, %38
%40 = trunc i32 %39 to i8
store i8 %40, i8* %7
%41 = load i8, i8* %7
%42 = zext i8 %41 to i32
%43 = xor i32 %42, -1
%44 = trunc i32 %43 to i8
store i8 %44, i8* %7
%45 = load i8, i8* %7
%46 = load i8*, i8** %4
store i8 %45, i8* %46
ret void
}

LLVM IR (-O2):
define void @rop3_104_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %1
%6 = xor i8 %5, -1
%7 = or i8 %6, %2
%8 = xor i8 %4, %1
%9 = xor i8 %8, %7
%10 = xor i8 %9, -1
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ d2(int);
void d1(int n) { d2(n); }


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

x86 assembly (clang, -O2):
<d1>:
jmp    1030 <d2@plt>

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

LLVM IR (-O2):
define void @d1(i32 %0) {
%2 = tail call i32 @d2(i32 %0)
ret void
}
void ABGRToUVRow_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ABGRToUVRow_Any_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ f(char *, char *);
main() {
  if (!f((char *)0, (char *)1))
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <f@plt>
cmp    $0x0,%eax
jne    115d <main+0x2d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%esi
xor    %edi,%edi
call   1040 <f@plt>
test   %eax,%eax
jne    1148 <main+0x18>
xor    %eax,%eax
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i8* null, i8* inttoptr (i64 1 to i8*))
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i8* null, i8* inttoptr (i64 1 to i8*))
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int PROT_READ;
int PROT_WRITE;
int /*<<< orphan*/ __NR_mprotect;
int ppc_syscall(int /*<<< orphan*/, void *, unsigned int, int);
int ppc_mprotect_rdwr(void *base, unsigned size) {
  return ppc_syscall(__NR_mprotect, base, size, PROT_READ | PROT_WRITE);
}


x86 assembly (clang, -O0):
<ppc_mprotect_rdwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    0x2ec2(%rip),%rax
mov    (%rax),%ecx
mov    0x2e91(%rip),%rax
or     (%rax),%ecx
call   1030 <ppc_syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ppc_mprotect_rdwr>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ecc(%rip),%rax
mov    (%rax),%edi
mov    0x2ed3(%rip),%rax
mov    0x2ea4(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
jmp    1030 <ppc_syscall@plt>

LLVM IR (-O0):
@__NR_mprotect = global i32 0
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
define i32 @ppc_mprotect_rdwr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @__NR_mprotect
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = load i32, i32* @PROT_READ
%9 = load i32, i32* @PROT_WRITE
%10 = or i32 %8, %9
%11 = call i32 @ppc_syscall(i32 %5, i8* %6, i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@__NR_mprotect = global i32 0
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
define i32 @ppc_mprotect_rdwr(i8* %0, i32 %1) {
%3 = load i32, i32* @__NR_mprotect
%4 = load i32, i32* @PROT_READ
%5 = load i32, i32* @PROT_WRITE
%6 = or i32 %5, %4
%7 = tail call i32 @ppc_syscall(i32 %3, i8* %0, i32 %1, i32 %6)
ret i32 %7
}
/* Variables and functions */
void *malloc(int);
void radar_11358224_test_double_assign_ints_positive_2() {
  void *ptr = malloc(16);
  ptr = ptr;
}


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

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

LLVM IR (-O0):
define void @radar_11358224_test_double_assign_ints_positive_2() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 16)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
store i8* %3, i8** %1
ret void
}

LLVM IR (-O2):
define void @radar_11358224_test_double_assign_ints_positive_2() {
ret void
}
int main() {
  int x;
  x = 4;
  if (!x != 0)
    return 1;
  if (!!x != 1)
    return 1;
  if (-x != 0 - 4)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     1135 <main+0x35>
movl   $0x1,-0x4(%rbp)
jmp    117b <main+0x7b>
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
je     115a <main+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    117b <main+0x7b>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
cmp    $0xfffffffc,%eax
je     1174 <main+0x74>
movl   $0x1,-0x4(%rbp)
jmp    117b <main+0x7b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 4, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 1, i32* %1
br label %23
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
%15 = icmp ne i32 %14, 1
br i1 %15, label %16, label %17
16: ; preds = %9
store i32 1, i32* %1
br label %23
17: ; preds = %9
%18 = load i32, i32* %2
%19 = sub nsw i32 0, %18
%20 = icmp ne i32 %19, -4
br i1 %20, label %21, label %22
21: ; preds = %17
store i32 1, i32* %1
br label %23
22: ; preds = %17
store i32 0, i32* %1
br label %23
23: ; preds = %22, %21, %16, %8
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void cpy_clk_code() {}


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

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

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

LLVM IR (-O2):
define void @cpy_clk_code() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblockq_willneed() {
  printf("NOT IMPLEMENTED:"
         "pa_memblockq_willneed"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"NOT IMPLEMENTED:pa_memblockq_willneed\0A\00"
define i32 @pa_memblockq_willneed() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [38 x i8] c"NOT IMPLEMENTED:pa_memblockq_willneed\00"
define i32 @pa_memblockq_willneed() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
long long llabs(long long j) { return (j < 0) ? -j : j; }


x86 assembly (clang, -O0):
<llabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <llabs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <llabs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
int test_imm_EEint64_midword_reg(long long val) {
  return ((val >> 16) & (0xEE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EEint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xee,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EEint64_midword_reg>:
test   $0xee0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_EEint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 238
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_EEint64_midword_reg(i64 %0) {
%2 = and i64 %0, 15597568
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void warn(char const message[]) {
  printf("\33[31m"
         "%s"
         "\33[0m"
         "\n",
         message);
}


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"\1B[31m%s\1B[0m\0A\00"
define void @warn(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int optimum(int, int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int dizi[] = {3, 5, 6};
  printf("Sonuc: %d\n", optimum(10, dizi, 3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rsi
mov    $0xa,%edi
mov    $0x3,%edx
call   1040 <optimum@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    $0xa,%edi
mov    $0x3,%edx
call   1040 <optimum@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.dizi = [3 x i32] [i32 3, i32 5, i32 6]
@.str = [11 x i8] c"Sonuc: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
store i32 0, i32* %1
%3 = bitcast [3 x i32]* %2 to i8*
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%5 = call i32 @optimum(i32 10, i32* %4, i32 3)
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.dizi = [3 x i32] [i32 3, i32 5, i32 6]
@.str = [11 x i8] c"Sonuc: %d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = call i32 @optimum(i32 10, i32* %3, i32 3)
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
struct genlist_link {
  int dummy;
};
struct genlist {
  int dummy;
};
struct fileinfo_list_link {
  int dummy;
};
struct fileinfo_list {
  int dummy;
};
struct fileinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_insert_after(struct genlist *, struct fileinfo *,
                                        struct genlist_link *);
void fileinfo_list_insert_after(struct fileinfo_list *tthis,
                                struct fileinfo *pfoo,
                                struct fileinfo_list_link *plink) {
  genlist_insert_after((struct genlist *)tthis, pfoo,
                       (struct genlist_link *)plink);
}


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

x86 assembly (clang, -O2):
<fileinfo_list_insert_after>:
jmp    1030 <genlist_insert_after@plt>

LLVM IR (-O0):
%struct.fileinfo_list = type { i32 }
%struct.fileinfo = type { i32 }
%struct.fileinfo_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @fileinfo_list_insert_after(%struct.fileinfo_list* %0, %struct.fileinfo* %1, %struct.fileinfo_list_link* %2) {
%4 = alloca %struct.fileinfo_list*
%5 = alloca %struct.fileinfo*
%6 = alloca %struct.fileinfo_list_link*
store %struct.fileinfo_list* %0, %struct.fileinfo_list** %4
store %struct.fileinfo* %1, %struct.fileinfo** %5
store %struct.fileinfo_list_link* %2, %struct.fileinfo_list_link** %6
%7 = load %struct.fileinfo_list*, %struct.fileinfo_list** %4
%8 = bitcast %struct.fileinfo_list* %7 to %struct.genlist*
%9 = load %struct.fileinfo*, %struct.fileinfo** %5
%10 = load %struct.fileinfo_list_link*, %struct.fileinfo_list_link** %6
%11 = bitcast %struct.fileinfo_list_link* %10 to %struct.genlist_link*
%12 = call i32 @genlist_insert_after(%struct.genlist* %8, %struct.fileinfo* %9, %struct.genlist_link* %11)
ret void
}

LLVM IR (-O2):
%struct.fileinfo_list = type { i32 }
%struct.fileinfo = type { i32 }
%struct.fileinfo_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @fileinfo_list_insert_after(%struct.fileinfo_list* %0, %struct.fileinfo* %1, %struct.fileinfo_list_link* %2) {
%4 = bitcast %struct.fileinfo_list* %0 to %struct.genlist*
%5 = bitcast %struct.fileinfo_list_link* %2 to %struct.genlist_link*
%6 = tail call i32 @genlist_insert_after(%struct.genlist* %4, %struct.fileinfo* %1, %struct.genlist_link* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x13() {
  Assert_real((isxdigit(19) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              100, ("isxdigit should be 0 for 0x13"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x13>:
push   %rax
mov    $0x13,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x64,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x13\00"
define void @t_isxdigit_0x13() {
%1 = tail call i64 @isxdigit(i32 19)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char HttpStatus_isServerError(int code) { return (code >= 500 && code < 600); }


x86 assembly (clang, -O0):
<HttpStatus_isServerError>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1f4,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <HttpStatus_isServerError+0x26>
cmpl   $0x258,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HttpStatus_isServerError>:
add    $0xfffffe0c,%edi
cmp    $0x64,%edi
setb   %al
ret

LLVM IR (-O0):
define signext i8 @HttpStatus_isServerError(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 500
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 600
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @HttpStatus_isServerError(i32 %0) {
%2 = add i32 %0, -500
%3 = icmp ult i32 %2, 100
%4 = zext i1 %3 to i8
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, char *, char *);
int /*<<< orphan*/ perror(char *);
int main(void) {
  execl("/bin/bash", "/bin/bash", "/start.sh", (char *)NULL);
  perror("exec (\"/bin/bash\", \"/start.sh\") failed");
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rsi
lea    0xecd(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
mov    %rsi,%rdi
call   1040 <execl@plt>
lea    0xec4(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedb(%rip),%rdx
mov    %rdi,%rsi
xor    %ecx,%ecx
call   1040 <execl@plt>
lea    0xed4(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/bin/bash\00"
@.str.1 = [10 x i8] c"/start.sh\00"
@.str.2 = [39 x i8] c"exec (\22/bin/bash\22, \22/start.sh\22) failed\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @execl(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* null)
%3 = call i32 @perror(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [10 x i8] c"/bin/bash\00"
@.str.1 = [10 x i8] c"/start.sh\00"
@.str.2 = [39 x i8] c"exec (\22/bin/bash\22, \22/start.sh\22) failed\00"
define i32 @main() {
%1 = tail call i32 @execl(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* null)
%2 = tail call i32 @perror(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
ret i32 -1
}
int f(i) { return 12; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 12
}
void do_nothing(char *fmt, ...) { return; }


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

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

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

LLVM IR (-O2):
define void @do_nothing(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(char);
void outimmed() { outbyte('#'); }


x86 assembly (clang, -O0):
<outimmed>:
push   %rbp
mov    %rsp,%rbp
mov    $0x23,%edi
call   1030 <outbyte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<outimmed>:
mov    $0x23,%edi
jmp    1030 <outbyte@plt>

LLVM IR (-O0):
define void @outimmed() {
%1 = call i32 @outbyte(i8 signext 35)
ret void
}

LLVM IR (-O2):
define void @outimmed() {
%1 = tail call i32 @outbyte(i8 signext 35)
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printString(char *);
int main(void) {
  int i = 0;
  char array[100];
  while ((array[i] = getchar()) != '\n')
    i++;
  array[i] = '\0';
  printString(array);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
movslq -0x8(%rbp),%rcx
mov    %al,-0x70(%rbp,%rcx,1)
movsbl %al,%eax
cmp    $0xa,%eax
je     115f <main+0x3f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
movslq -0x8(%rbp),%rax
movb   $0x0,-0x70(%rbp,%rax,1)
lea    -0x70(%rbp),%rdi
call   1030 <printString@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    $0xffffffffffffffff,%rbx
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0x1(%rsp,%rbx,1)
add    $0x1,%rbx
cmp    $0xa,%al
jne    1130 <main+0x10>
mov    %ebx,%eax
movb   $0x0,(%rsp,%rax,1)
mov    %rsp,%rdi
call   1030 <printString@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %11, %0
%5 = call signext i8 (...) @getchar()
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %7
store i8 %5, i8* %8
%9 = sext i8 %5 to i32
%10 = icmp ne i32 %9, 10
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %2
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %16
store i8 0, i8* %17
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%19 = call i32 @printString(i8* %18)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %3, %0
%4 = phi i64 [ %8, %3 ], [ 0, %0 ]
%5 = tail call signext i8 (...) @getchar()
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %4
store i8 %5, i8* %6
%7 = icmp eq i8 %5, 10
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = and i64 %4, 4294967295
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %10
store i8 0, i8* %11
%12 = call i32 @printString(i8* %2)
ret i32 0
}
/* Variables and functions */
char *date_now16(int);
char *date_get_now16(int utc_offset) { return date_now16(utc_offset); }


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

x86 assembly (clang, -O2):
<date_get_now16>:
jmp    1030 <date_now16@plt>

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

LLVM IR (-O2):
define i8* @date_get_now16(i32 %0) {
%2 = tail call i8* @date_now16(i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ close(int const);
int /*<<< orphan*/ tty_delete_lock();
int irlink_close(const int port) {
  if (port != -1) {
    tty_delete_lock();
    close(port);
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<irlink_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
je     1150 <irlink_close+0x30>
mov    $0x0,%al
call   1040 <tty_delete_lock@plt>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
movl   $0x0,-0x4(%rbp)
jmp    1157 <irlink_close+0x37>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irlink_close>:
push   %rbp
push   %rbx
push   %rax
cmp    $0xffffffff,%edi
je     113c <irlink_close+0x1c>
mov    %edi,%ebp
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <tty_delete_lock@plt>
mov    %ebp,%edi
call   1030 <close@plt>
jmp    1141 <irlink_close+0x21>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @irlink_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 (...) @tty_delete_lock()
%8 = load i32, i32* %3
%9 = call i32 @close(i32 %8)
store i32 0, i32* %2
br label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %11
11: ; preds = %10, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @irlink_close(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 (...) @tty_delete_lock()
%5 = tail call i32 @close(i32 %0)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ 0, %3 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fib(long);
int /*<<< orphan*/ printf(char *, long, int /*<<< orphan*/);
int main(void) {
  long i;
  for (i = 0; i <= 80; i++) {
    printf("Fib(%li) = %li\n", i, fib(i));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x50,-0x10(%rbp)
jg     1176 <main+0x56>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <fib@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <main+0x17>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %rbx,%rdi
call   1040 <fib@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x51,%rbx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Fib(%li) = %li\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %11, %0
%4 = load i64, i64* %2
%5 = icmp sle i64 %4, 80
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i64, i64* %2
%8 = load i64, i64* %2
%9 = call i32 @fib(i64 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %7, i32 %9)
br label %11
11: ; preds = %6
%12 = load i64, i64* %2
%13 = add nsw i64 %12, 1
store i64 %13, i64* %2
br label %3
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Fib(%li) = %li\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @fib(i64 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %2, i32 %3)
%5 = add nuw nsw i64 %2, 1
%6 = icmp eq i64 %5, 81
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct timespec {
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
scalar_t__ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
time_t MHD_monotonic_time(void) {
  struct timespec ts;
  if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
    return ts.tv_sec;
  return time(NULL);
}


x86 assembly (clang, -O0):
<MHD_monotonic_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
cmp    $0x0,%rax
jne    114f <MHD_monotonic_time+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115b <MHD_monotonic_time+0x3b>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MHD_monotonic_time>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
test   %rax,%rax
je     1140 <MHD_monotonic_time+0x20>
xor    %edi,%edi
call   1040 <time@plt>
pop    %rcx
ret
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @MHD_monotonic_time() {
%1 = alloca i32
%2 = alloca %struct.timespec
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 0
%8 = load i32, i32* %7
store i32 %8, i32* %1
br label %11
9: ; preds = %0
%10 = call i32 @time(i32* null)
store i32 %10, i32* %1
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @MHD_monotonic_time() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%8 = load i32, i32* %7
br label %11
9: ; preds = %0
%10 = call i32 @time(i32* null)
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}
char upCase(const char c) { return ('a' <= c && c <= 'z') ? c - 'a' + 'A' : c; }


x86 assembly (clang, -O0):
<upCase>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     113a <upCase+0x3a>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     113a <upCase+0x3a>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <upCase+0x41>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<upCase>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @upCase(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 97, %4
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 97
%14 = add nsw i32 %13, 65
br label %18
15: ; preds = %6, %1
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
br label %18
18: ; preds = %15, %10
%19 = phi i32 [ %14, %10 ], [ %17, %15 ]
%20 = trunc i32 %19 to i8
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @upCase(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int pigpio_command(int, int, int /*<<< orphan*/, int /*<<< orphan*/, int);
int clear_bank_1(int pi, uint32_t levels) {
  return pigpio_command(pi, 12, levels, 0, 1);
}


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

x86 assembly (clang, -O2):
<clear_bank_1>:
mov    %esi,%edx
mov    $0xc,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @clear_bank_1(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 @pigpio_command(i32 %5, i32 12, i32 %6, i32 0, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @clear_bank_1(i32 %0, i32 %1) {
%3 = tail call i32 @pigpio_command(i32 %0, i32 12, i32 %1, i32 0, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void initPrint(void) {
  printf("Initializing Modules:\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"Initializing Modules:\00"
define void @initPrint() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int nokia_buttons();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int sum = 0;
  sum = nokia_buttons();
  printf("%d", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <nokia_buttons@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <nokia_buttons@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 (...) @nokia_buttons()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp_ci(char *, char *);
int string_ci_ge(char *s1, char *s2, int k) {
  k = 0;
  return strcmp_ci(s1, s2) >= 0;
}


x86 assembly (clang, -O0):
<string_ci_ge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp_ci@plt>
cmp    $0x0,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_ci_ge>:
push   %rax
call   1030 <strcmp_ci@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @string_ci_ge(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
store i32 0, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i64 @strcmp_ci(i8* %7, i8* %8)
%10 = icmp sge i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @string_ci_ge(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strcmp_ci(i8* %0, i8* %1)
%5 = lshr i64 %4, 63
%6 = trunc i64 %5 to i32
%7 = xor i32 %6, 1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ my_aff_params(int, char **);
int main(int argc, char *argv[]) {
  my_aff_params(argc, argv);
  return (0);
}


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <my_aff_params@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <my_aff_params@plt>
xor    %eax,%eax
pop    %rcx
ret

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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @my_aff_params(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @my_aff_params(i32 %0, i8** %1)
ret i32 0
}
int lace_builtin_main(const char *name, unsigned argc, char **argv) {
  (void)name;
  (void)argc;
  (void)argv;
  return -1;
}


x86 assembly (clang, -O0):
<lace_builtin_main>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @lace_builtin_main(i8* nocapture readnone %0, i32 %1, i8** nocapture readnone %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(char *prg) {
  fprintf(stderr, "Usage: %s [can-interface]\n", prg);
}


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

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Usage: %s [can-interface]\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Usage: %s [can-interface]\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}