xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ pc2iso_size(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void pc2iso(char *buffer) { pc2iso_size(buffer, strlen(buffer)); }


x86 assembly (clang, -O0):
<pc2iso>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <pc2iso_size@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pc2iso>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <pc2iso_size@plt>

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

LLVM IR (-O2):
define void @pc2iso(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @pc2iso_size(i8* %0, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int main(int argc, char **argv) {
  int x = 15;
  int y = x;
  int *a, *b, *c, *d;
  a = (int *)malloc(sizeof(int));
  if (x < 10) {
    b = a;
  } else {
    d = a;
  }
  *b = x;
  a = c;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xf,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1158 <main+0x48>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1160 <main+0x50>
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x30(%rbp),%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0xf,(%rax)
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**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 15, i32* %6
%12 = load i32, i32* %6
store i32 %12, i32* %7
%13 = call i64 @malloc(i32 4)
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %8
%15 = load i32, i32* %6
%16 = icmp slt i32 %15, 10
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = load i32*, i32** %8
store i32* %18, i32** %9
br label %21
19: ; preds = %2
%20 = load i32*, i32** %8
store i32* %20, i32** %11
br label %21
21: ; preds = %19, %17
%22 = load i32, i32* %6
%23 = load i32*, i32** %9
store i32 %22, i32* %23
%24 = load i32*, i32** %10
store i32* %24, i32** %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
store i32 15, i32* %4
ret i32 0
}
/* Type definitions */
struct buffer {
  int dummy;
};

/* Variables and functions */
int buffer_insert(struct buffer **, scalar_t__, char const *, size_t);
scalar_t__ buffer_length(struct buffer *);
int buffer_pushs(struct buffer **b, const char *s, size_t len) {
  return buffer_insert(b, buffer_length(*b) - 1, s, len);
}


x86 assembly (clang, -O0):
<buffer_pushs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <buffer_length@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rsi
sub    $0x1,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <buffer_insert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_pushs>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <buffer_length@plt>
lea    -0x1(%rax),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <buffer_insert@plt>

LLVM IR (-O0):
%struct.buffer = type { i32 }
define i32 @buffer_pushs(%struct.buffer** %0, i8* %1, i64 %2) {
%4 = alloca %struct.buffer**
%5 = alloca i8*
%6 = alloca i64
store %struct.buffer** %0, %struct.buffer*** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.buffer**, %struct.buffer*** %4
%8 = load %struct.buffer**, %struct.buffer*** %4
%9 = load %struct.buffer*, %struct.buffer** %8
%10 = call i64 @buffer_length(%struct.buffer* %9)
%11 = sub nsw i64 %10, 1
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = call i32 @buffer_insert(%struct.buffer** %7, i64 %11, i8* %12, i64 %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define i32 @buffer_pushs(%struct.buffer** %0, i8* %1, i64 %2) {
%4 = load %struct.buffer*, %struct.buffer** %0
%5 = tail call i64 @buffer_length(%struct.buffer* %4)
%6 = add nsw i64 %5, -1
%7 = tail call i32 @buffer_insert(%struct.buffer** %0, i64 %6, i8* %1, i64 %2)
ret i32 %7
}
void arr_float_metric(float *pfMetricValue, float *pFloat,
                      unsigned long int count) {
  unsigned short int i;
  float fMetricValue = 0;
  for (i = 0; i < count; i++) {
    fMetricValue += pFloat[i];
  }
  *pfMetricValue = fMetricValue;
}


x86 assembly (clang, -O0):
<arr_float_metric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movw   $0x0,-0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
cmp    -0x18(%rbp),%rax
jae    1154 <arr_float_metric+0x54>
mov    -0x10(%rbp),%rax
movzwl -0x1a(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x1a(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1a(%rbp)
jmp    111e <arr_float_metric+0x1e>
movss  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<arr_float_metric>:
xorps  %xmm0,%xmm0
test   %rdx,%rdx
je     1122 <arr_float_metric+0x22>
mov    $0x1,%eax
nopl   (%rax)
addss  -0x4(%rsi,%rax,4),%xmm0
movzwl %ax,%ecx
add    $0x1,%rax
cmp    %rdx,%rcx
jb     1110 <arr_float_metric+0x10>
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @arr_float_metric(float* %0, float* %1, i64 %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i64
%7 = alloca i16
%8 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store i64 %2, i64* %6
store float 0.000000e+00, float* %8
store i16 0, i16* %7
br label %9
9: ; preds = %22, %3
%10 = load i16, i16* %7
%11 = zext i16 %10 to i64
%12 = load i64, i64* %6
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %25
14: ; preds = %9
%15 = load float*, float** %5
%16 = load i16, i16* %7
%17 = zext i16 %16 to i64
%18 = getelementptr inbounds float, float* %15, i64 %17
%19 = load float, float* %18
%20 = load float, float* %8
%21 = fadd float %20, %19
store float %21, float* %8
br label %22
22: ; preds = %14
%23 = load i16, i16* %7
%24 = add i16 %23, 1
store i16 %24, i16* %7
br label %9
25: ; preds = %9
%26 = load float, float* %8
%27 = load float*, float** %4
store float %26, float* %27
ret void
}

LLVM IR (-O2):
define void @arr_float_metric(float* nocapture writeonly %0, float* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %14, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %11, %5 ], [ 0, %3 ]
%7 = phi float [ %10, %5 ], [ 0.000000e+00, %3 ]
%8 = getelementptr inbounds float, float* %1, i64 %6
%9 = load float, float* %8
%10 = fadd float %7, %9
%11 = add i64 %6, 1
%12 = and i64 %11, 65535
%13 = icmp ult i64 %12, %2
br i1 %13, label %5, label %14
14: ; preds = %5, %3
%15 = phi float [ 0.000000e+00, %3 ], [ %10, %5 ]
store float %15, float* %0
ret void
}
float wibble() { return 0.0f; }


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

x86 assembly (clang, -O2):
<wibble>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @wibble() {
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @wibble() {
ret float 0.000000e+00
}
int ft_isprint(int c) { return (c > 31 && c < 127); }


x86 assembly (clang, -O0):
<ft_isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1120 <ft_isprint+0x20>
cmpl   $0x7f,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
long long sumAnn(long long n) {}


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

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

LLVM IR (-O0):
define i64 @sumAnn(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %2
ret i64 %4
}

LLVM IR (-O2):
define i64 @sumAnn(i64 %0) {
ret i64 undef
}
int minval(int v0, int v1) { return (v0 < v1) ? v0 : v1; }


x86 assembly (clang, -O0):
<minval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <minval+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <minval+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minval>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @minval(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @minval(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ __SOCKADDR_ARG;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t recvfrom(int __fd, void *__restrict __buf, size_t __n, int __flags,
                 __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<recvfrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recvfrom>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @recvfrom(i32 %0, i8* noalias %1, i64 %2, i32 %3, i32 %4, i32* noalias %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
store i32 %0, i32* %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32* %5, i32** %12
%13 = load i32, i32* @ENOSYS
%14 = call i32 @__set_errno(i32 %13)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @recvfrom(i32 %0, i8* noalias nocapture readnone %1, i64 %2, i32 %3, i32 %4, i32* noalias nocapture readnone %5) {
%7 = load i32, i32* @ENOSYS
%8 = tail call i32 @__set_errno(i32 %7)
ret i32 -1
}
__attribute__((no)) void diversion(void) {}


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

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

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

LLVM IR (-O2):
define void @diversion() {
ret void
}
/* Variables and functions */
int readint2(int *);
int test2(int *x) { return readint2(x); }


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

x86 assembly (clang, -O2):
<test2>:
jmp    1030 <readint2@plt>

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

LLVM IR (-O2):
define i32 @test2(i32* %0) {
%2 = tail call i32 @readint2(i32* %0)
ret i32 %2
}
/* Type definitions */
struct ssl_handler_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ssl_handler_t *);
void sslhandler_destroy(struct ssl_handler_t *t) { free(t); }


x86 assembly (clang, -O0):
<sslhandler_destroy>:
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):
<sslhandler_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.ssl_handler_t = type { i32 }
define void @sslhandler_destroy(%struct.ssl_handler_t* nocapture %0) {
%2 = tail call i32 @free(%struct.ssl_handler_t* %0)
ret void
}
void initcomplement() {}


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

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

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

LLVM IR (-O2):
define void @initcomplement() {
ret void
}
void rop3_161_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = ~T;
  stk3 = S & stk4;
  stk2 = *D | stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


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

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

LLVM IR (-O0):
define void @rop3_161_1_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* %6
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %10
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
%17 = load i8, i8* %10
%18 = zext i8 %17 to i32
%19 = and i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %9
%21 = load i8*, i8** %4
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = load i8, i8* %9
%25 = zext i8 %24 to i32
%26 = or i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %8
%28 = load i8, i8* %6
%29 = zext i8 %28 to i32
%30 = load i8, i8* %8
%31 = zext i8 %30 to i32
%32 = xor i32 %29, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %7
%34 = load i8, i8* %7
%35 = zext i8 %34 to i32
%36 = xor i32 %35, -1
%37 = trunc i32 %36 to i8
store i8 %37, i8* %7
%38 = load i8, i8* %7
%39 = zext i8 %38 to i32
%40 = load i8, i8* %5
%41 = zext i8 %40 to i32
%42 = xor i32 %41, -1
%43 = and i32 %39, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = load i8, i8* %5
%48 = zext i8 %47 to i32
%49 = and i32 %46, %48
%50 = or i32 %43, %49
%51 = trunc i32 %50 to i8
%52 = load i8*, i8** %4
store i8 %51, i8* %52
ret void
}

LLVM IR (-O2):
define void @rop3_161_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, -1
%5 = and i8 %4, %1
%6 = load i8, i8* %0
%7 = or i8 %6, %5
%8 = xor i8 %7, %2
%9 = or i8 %8, %1
%10 = xor i8 %9, -1
%11 = and i8 %6, %1
%12 = or i8 %11, %10
store i8 %12, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sample_var(double *, double, int);
double sqrt(int /*<<< orphan*/);
double sample_std(double *list, double mean, int n) {
  return sqrt(sample_var(list, mean, n));
}


x86 assembly (clang, -O0):
<sample_std>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%esi
call   1030 <sample_var@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sample_std>:
push   %rax
call   1030 <sample_var@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @sample_std(double* %0, double %1, i32 %2) {
%4 = alloca double*
%5 = alloca double
%6 = alloca i32
store double* %0, double** %4
store double %1, double* %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = load double, double* %5
%9 = load i32, i32* %6
%10 = call i32 @sample_var(double* %7, double %8, i32 %9)
%11 = call double @sqrt(i32 %10)
ret double %11
}

LLVM IR (-O2):
define double @sample_std(double* %0, double %1, i32 %2) {
%4 = tail call i32 @sample_var(double* %0, double %1, i32 %2)
%5 = tail call double @sqrt(i32 %4)
ret double %5
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x > 0) {
    x = x + y;
    y = y + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1154 <main+0x44>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int oct(int, int);
void main() {
  int x, y, res;
  if (x <= y) {
    res = oct(x, y);
    assert(res == 1);
  }
  res = oct(x, y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1153 <main+0x33>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <oct@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <oct@plt>
mov    %eax,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <oct@plt>

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @oct(i32 undef, i32 undef)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fd_nrf8001_directed_connect_error(int);
int /*<<< orphan*/ fd_nrf8001_directed_connect_success();
void fd_nrf8001_dispatch_directed_connect_response(uint8_t status,
                                                   uint8_t *response_data
                                                   __attribute__((unused)),
                                                   uint32_t response_data_length
                                                   __attribute__((unused))) {
  if (status != 0x00) {
    fd_nrf8001_directed_connect_error(status);
    return;
  }
  fd_nrf8001_directed_connect_success();
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1149 <fd_nrf8001_dispatch_directed_connect_response+0x29>
mov    -0x4(%rbp),%edi
call   1030 <fd_nrf8001_directed_connect_error@plt>
jmp    1150 <fd_nrf8001_dispatch_directed_connect_response+0x30>
mov    $0x0,%al
call   1040 <fd_nrf8001_directed_connect_success@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
test   %edi,%edi
je     1129 <fd_nrf8001_dispatch_directed_connect_response+0x9>
jmp    1030 <fd_nrf8001_directed_connect_error@plt>
xor    %eax,%eax
jmp    1040 <fd_nrf8001_directed_connect_success@plt>

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

LLVM IR (-O2):
define void @fd_nrf8001_dispatch_directed_connect_response(i32 %0, i32* nocapture readnone %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @fd_nrf8001_directed_connect_error(i32 %0)
br label %9
7: ; preds = %3
%8 = tail call i32 (...) @fd_nrf8001_directed_connect_success()
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EVIOCGRAB;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ close_oya_state();
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
void close_app(int fdi, int fdo) {
  ioctl(fdi, EVIOCGRAB, 0);
  close(fdi);
  close(fdo);
  close_oya_state();
}


x86 assembly (clang, -O0):
<close_app>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <ioctl@plt>
mov    -0x4(%rbp),%edi
call   1050 <close@plt>
mov    -0x8(%rbp),%edi
call   1050 <close@plt>
mov    $0x0,%al
call   1030 <close_oya_state@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_app>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <ioctl@plt>
mov    %ebp,%edi
call   1050 <close@plt>
mov    %ebx,%edi
call   1050 <close@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <close_oya_state@plt>

LLVM IR (-O0):
@EVIOCGRAB = global i32 0
define void @close_app(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* @EVIOCGRAB
%7 = call i32 @ioctl(i32 %5, i32 %6, i32 0)
%8 = load i32, i32* %3
%9 = call i32 @close(i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @close(i32 %10)
%12 = call i32 (...) @close_oya_state()
ret void
}

LLVM IR (-O2):
@EVIOCGRAB = global i32 0
define void @close_app(i32 %0, i32 %1) {
%3 = load i32, i32* @EVIOCGRAB
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32 0)
%5 = tail call i32 @close(i32 %0)
%6 = tail call i32 @close(i32 %1)
%7 = tail call i32 (...) @close_oya_state()
ret void
}
int HelpItem19(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @HelpItem19() {
ret i32 0
}

LLVM IR (-O2):
define i32 @HelpItem19() {
ret i32 0
}
double ln_range_radians2(double angle) {
  double temp;
  if (angle > (-2.0 * 3.1415926535897932384626433832795) &&
      angle < (2.0 * 3.1415926535897932384626433832795))
    return angle;
  temp = (int)(angle / (3.1415926535897932384626433832795 * 2.0));
  temp *= (3.1415926535897932384626433832795 * 2.0);
  return angle - temp;
}


x86 assembly (clang, -O0):
<ln_range_radians2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1142 <ln_range_radians2+0x42>
movsd  0xee0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1142 <ln_range_radians2+0x42>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1181 <ln_range_radians2+0x81>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb9(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xea0(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_range_radians2>:
ucomisd 0xef8(%rip),%xmm0
jbe    1119 <ln_range_radians2+0x19>
movsd  0xef6(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1119 <ln_range_radians2+0x19>
ret
movsd  0xee7(%rip),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
cvttpd2dq %xmm2,%xmm2
cvtdq2pd %xmm2,%xmm2
mulsd  %xmm1,%xmm2
subsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @ln_range_radians2(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp ogt double %5, 0xC01921FB54442D18
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp olt double %8, 0x401921FB54442D18
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = load double, double* %3
store double %11, double* %2
br label %22
12: ; preds = %7, %1
%13 = load double, double* %3
%14 = fdiv double %13, 0x401921FB54442D18
%15 = fptosi double %14 to i32
%16 = sitofp i32 %15 to double
store double %16, double* %4
%17 = load double, double* %4
%18 = fmul double %17, 0x401921FB54442D18
store double %18, double* %4
%19 = load double, double* %3
%20 = load double, double* %4
%21 = fsub double %19, %20
store double %21, double* %2
br label %22
22: ; preds = %12, %10
%23 = load double, double* %2
ret double %23
}

LLVM IR (-O2):
define double @ln_range_radians2(double %0) {
%2 = fcmp ogt double %0, 0xC01921FB54442D18
%3 = fcmp olt double %0, 0x401921FB54442D18
%4 = and i1 %2, %3
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = fdiv double %0, 0x401921FB54442D18
%7 = fptosi double %6 to i32
%8 = sitofp i32 %7 to double
%9 = fmul double %8, 0x401921FB54442D18
%10 = fsub double %0, %9
br label %11
11: ; preds = %1, %5
%12 = phi double [ %10, %5 ], [ %0, %1 ]
ret double %12
}
void INT_Excep_MTU9_TGIC9(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU9_TGIC9() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xde() {
  Assert_real((ispunct(222) == 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_ispunct.c",
              1115, ("ispunct should be 0 for 0xde"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xde\00"
define void @t_ispunct_0xde() {
%1 = tail call i64 @ispunct(i32 222)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int A(int *, int *);
int f(int *arr, int *in) { return A(arr, in); }


x86 assembly (clang, -O0):
<f>:
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 <A@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
jmp    1030 <A@plt>

LLVM IR (-O0):
define i32 @f(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 @A(i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @f(i32* %0, i32* %1) {
%3 = tail call i32 @A(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 0;
  printf("%d\n", i);
  i = 1;
  printf("%d\n", i);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Type definitions */
struct timespec {
  double tv_sec;
  double tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_BOOTTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
double millis_since_boot() {
  struct timespec t;
  clock_gettime(CLOCK_BOOTTIME, &t);
  return t.tv_sec * 1000.0 + t.tv_nsec / 1000000.0;
}


x86 assembly (clang, -O0):
<millis_since_boot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xecc(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xeb8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<millis_since_boot>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
movsd  0x10(%rsp),%xmm1
divsd  0xecb(%rip),%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  0xec5(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { double, double }
@CLOCK_BOOTTIME = global i32 0
define double @millis_since_boot() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_BOOTTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = call double @llvm.fmuladd.f64(double %5, double 1.000000e+03, double %8)
ret double %9
}

LLVM IR (-O2):
%struct.timespec = type { double, double }
@CLOCK_BOOTTIME = global i32 0
define double @millis_since_boot() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_BOOTTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%8 = load double, double* %7
%9 = fdiv double %8, 1.000000e+06
%10 = call double @llvm.fmuladd.f64(double %6, double 1.000000e+03, double %9)
ret double %10
}
/* Variables and functions */
int unlink(char const *);
int remove(const char *filename) { return unlink(filename); }


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

x86 assembly (clang, -O2):
<remove>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @remove(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_help(int argc, char **argv) {
  fprintf(stderr, "USAGE: %s <port>\n", argv[0]);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"USAGE: %s <port>\0A\00"
define void @print_help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stderr
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"USAGE: %s <port>\0A\00"
define void @print_help(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Type definitions */
struct __sk_buff {
  int dummy;
};
typedef int /*<<< orphan*/ __u8;
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
void cilium_trace_capture(struct __sk_buff *skb, __u8 type, __u32 arg1) {}


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

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

LLVM IR (-O0):
%struct.__sk_buff = type { i32 }
define void @cilium_trace_capture(%struct.__sk_buff* %0, i32 %1, i32 %2) {
%4 = alloca %struct.__sk_buff*
%5 = alloca i32
%6 = alloca i32
store %struct.__sk_buff* %0, %struct.__sk_buff** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.__sk_buff = type { i32 }
define void @cilium_trace_capture(%struct.__sk_buff* nocapture %0, i32 %1, i32 %2) {
ret void
}
int updateMode(int oldmode, const char mode, int type) {
  int ret, masque = 0;
  switch (mode) {
  case 'v':
    masque = 1;
    break;
  case 'h':
    masque = 2;
    break;
  case 'o':
    masque = 4;
    break;
  };
  ret = (type == 0) ? oldmode & ~masque : oldmode | masque;
  return ret;
}


x86 assembly (clang, -O0):
<updateMode>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0x18(%rbp)
sub    $0x68,%eax
je     115a <updateMode+0x5a>
jmp    112c <updateMode+0x2c>
mov    -0x18(%rbp),%eax
sub    $0x6f,%eax
je     1166 <updateMode+0x66>
jmp    113d <updateMode+0x3d>
mov    -0x18(%rbp),%eax
sub    $0x76,%eax
jne    116d <updateMode+0x6d>
jmp    114e <updateMode+0x4e>
movl   $0x1,-0x14(%rbp)
jmp    116d <updateMode+0x6d>
movl   $0x2,-0x14(%rbp)
jmp    116d <updateMode+0x6d>
movl   $0x4,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    118a <updateMode+0x8a>
mov    -0x4(%rbp),%eax
mov    -0x14(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x1c(%rbp)
jmp    1193 <updateMode+0x93>
mov    -0x4(%rbp),%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<updateMode>:
cmp    $0x68,%esi
je     1118 <updateMode+0x18>
cmp    $0x6f,%esi
je     111f <updateMode+0x1f>
xor    %eax,%eax
cmp    $0x76,%esi
jne    1124 <updateMode+0x24>
mov    $0x1,%eax
jmp    1124 <updateMode+0x24>
mov    $0x2,%eax
jmp    1124 <updateMode+0x24>
mov    $0x4,%eax
mov    %eax,%ecx
not    %ecx
and    %edi,%ecx
or     %edi,%eax
test   %edx,%edx
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @updateMode(i32 %0, i8 signext %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i8 %1, i8* %5
store i32 %2, i32* %6
store i32 0, i32* %8
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
switch i32 %10, label %14 [
i32 118, label %11
i32 104, label %12
i32 111, label %13
]
11: ; preds = %3
store i32 1, i32* %8
br label %14
12: ; preds = %3
store i32 2, i32* %8
br label %14
13: ; preds = %3
store i32 4, i32* %8
br label %14
14: ; preds = %3, %13, %12, %11
%15 = load i32, i32* %6
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = load i32, i32* %4
%19 = load i32, i32* %8
%20 = xor i32 %19, -1
%21 = and i32 %18, %20
br label %26
22: ; preds = %14
%23 = load i32, i32* %4
%24 = load i32, i32* %8
%25 = or i32 %23, %24
br label %26
26: ; preds = %22, %17
%27 = phi i32 [ %21, %17 ], [ %25, %22 ]
store i32 %27, i32* %7
%28 = load i32, i32* %7
ret i32 %28
}

LLVM IR (-O2):
define i32 @updateMode(i32 %0, i8 signext %1, i32 %2) {
%4 = sext i8 %1 to i32
switch i32 %4, label %8 [
i32 118, label %5
i32 104, label %6
i32 111, label %7
]
5: ; preds = %3
br label %8
6: ; preds = %3
br label %8
7: ; preds = %3
br label %8
8: ; preds = %3, %7, %6, %5
%9 = phi i32 [ 0, %3 ], [ 4, %7 ], [ 2, %6 ], [ 1, %5 ]
%10 = icmp eq i32 %2, 0
%11 = xor i32 %9, -1
%12 = and i32 %11, %0
%13 = or i32 %9, %0
%14 = select i1 %10, i32 %12, i32 %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ state_free(void *);
void _cp_state_hash_table_free(void *item) { state_free(item); }


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

x86 assembly (clang, -O2):
<_cp_state_hash_table_free>:
jmp    1030 <state_free@plt>

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

LLVM IR (-O2):
define void @_cp_state_hash_table_free(i8* %0) {
%2 = tail call i32 @state_free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addrange(int /*<<< orphan*/, char);
void addranges_d(void) { addrange('0', '9'); }


x86 assembly (clang, -O0):
<addranges_d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x30,%edi
mov    $0x39,%esi
call   1030 <addrange@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addranges_d>:
mov    $0x30,%edi
mov    $0x39,%esi
jmp    1030 <addrange@plt>

LLVM IR (-O0):
define void @addranges_d() {
%1 = call i32 @addrange(i32 48, i8 signext 57)
ret void
}

LLVM IR (-O2):
define void @addranges_d() {
%1 = tail call i32 @addrange(i32 48, i8 signext 57)
ret void
}
int test_imm_BAuint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xBA << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_BAuint64_lowword_reg>:
test   $0xba,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BAuint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 186
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int divide_power2(int, int);
int mul3div4(int x) {
  int mul3 = (x << 1) + x;
  return divide_power2(mul3, 2);
}


x86 assembly (clang, -O0):
<mul3div4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1030 <divide_power2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul3div4>:
lea    (%rdi,%rdi,2),%edi
mov    $0x2,%esi
jmp    1030 <divide_power2@plt>

LLVM IR (-O0):
define i32 @mul3div4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = shl i32 %4, 1
%6 = load i32, i32* %2
%7 = add nsw i32 %5, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @divide_power2(i32 %8, i32 2)
ret i32 %9
}

LLVM IR (-O2):
define i32 @mul3div4(i32 %0) {
%2 = mul i32 %0, 3
%3 = tail call i32 @divide_power2(i32 %2, i32 2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ always_true();
int twolevels_inner();
int twolevels_outer(void) {
  int rc;
  always_true();
  rc = twolevels_inner();
  always_true();
  return rc;
}


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

x86 assembly (clang, -O2):
<twolevels_outer>:
push   %rbx
xor    %eax,%eax
call   1040 <always_true@plt>
xor    %eax,%eax
call   1030 <twolevels_inner@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <always_true@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @twolevels_outer() {
%1 = alloca i32
%2 = call i32 (...) @always_true()
%3 = call i32 (...) @twolevels_inner()
store i32 %3, i32* %1
%4 = call i32 (...) @always_true()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @twolevels_outer() {
%1 = tail call i32 (...) @always_true()
%2 = tail call i32 (...) @twolevels_inner()
%3 = tail call i32 (...) @always_true()
ret i32 %2
}
/* Type definitions */
struct bufrdeco {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprint_sec4_info(char *, int, struct bufrdeco *);
void print_sec4_info(struct bufrdeco *b) {
  char caux[8192];
  caux[0] = 0;
  sprint_sec4_info(caux, 8192, b);
  printf("%s", caux);
}


x86 assembly (clang, -O0):
<print_sec4_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2010,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x2010(%rbp)
lea    -0x2010(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x2000,%esi
call   1030 <sprint_sec4_info@plt>
lea    -0x2010(%rbp),%rsi
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
add    $0x2010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_sec4_info>:
push   %rbx
sub    $0x2000,%rsp
mov    %rdi,%rdx
movb   $0x0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x2000,%esi
call   1030 <sprint_sec4_info@plt>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x2000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.bufrdeco = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @print_sec4_info(%struct.bufrdeco* %0) {
%2 = alloca %struct.bufrdeco*
%3 = alloca [8192 x i8]
store %struct.bufrdeco* %0, %struct.bufrdeco** %2
%4 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%5 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%6 = load %struct.bufrdeco*, %struct.bufrdeco** %2
%7 = call i32 @sprint_sec4_info(i8* %5, i32 8192, %struct.bufrdeco* %6)
%8 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
%struct.bufrdeco = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @print_sec4_info(%struct.bufrdeco* %0) {
%2 = alloca [8192 x i8]
%3 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
store i8 0, i8* %3
%4 = call i32 @sprint_sec4_info(i8* %3, i32 8192, %struct.bufrdeco* %0)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}