xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __maplocaltime();
int /*<<< orphan*/ __tzfile_map(int /*<<< orphan*/, int *, int);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void tzset(void) {
  int isdst;
  __maplocaltime();
  __tzfile_map(time(0), &isdst, 1);
}


x86 assembly (clang, -O0):
<tzset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <__maplocaltime@plt>
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
lea    -0x4(%rbp),%rsi
mov    $0x1,%edx
call   1030 <__tzfile_map@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tzset>:
push   %rax
xor    %eax,%eax
call   1040 <__maplocaltime@plt>
xor    %edi,%edi
call   1050 <time@plt>
lea    0x4(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1030 <__tzfile_map@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @tzset() {
%1 = alloca i32
%2 = call i32 (...) @__maplocaltime()
%3 = call i32 @time(i32 0)
%4 = call i32 @__tzfile_map(i32 %3, i32* %1, i32 1)
ret void
}

LLVM IR (-O2):
define void @tzset() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (...) @__maplocaltime()
%4 = tail call i32 @time(i32 0)
%5 = call i32 @__tzfile_map(i32 %4, i32* %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memcpy(unsigned char *, char *, size_t);
unsigned char *toString(char *p, size_t len) {
  static unsigned char buf[1024];
  assert(len + 1 < sizeof buf);
  memcpy(buf, p, len);
  buf[len] = 0;
  return buf;
}


x86 assembly (clang, -O0):
<toString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
cmp    $0x400,%rax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0x2ee6(%rip),%rdi
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rcx
lea    0x2ed6(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2ecb(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toString>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x1(%rsi),%rax
xor    %edi,%edi
cmp    $0x400,%rax
setb   %dil
call   1030 <assert@plt>
lea    0x2ef9(%rip),%r15
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@toString.buf = internal global [1024 x i8] zeroinitializer
define i8* @toString(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = add i64 %5, 1
%7 = icmp ult i64 %6, 1024
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = call i32 @memcpy(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @toString.buf, i64 0, i64 0), i8* %10, i64 %11)
%13 = load i64, i64* %4
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* @toString.buf, i64 0, i64 %13
store i8 0, i8* %14
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @toString.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@toString.buf = internal global [1024 x i8] zeroinitializer
define i8* @toString(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = icmp ult i64 %3, 1024
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @memcpy(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @toString.buf, i64 0, i64 0), i8* %0, i64 %1)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* @toString.buf, i64 0, i64 %1
store i8 0, i8* %8
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @toString.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ japi_setmin(int, int);
void j_setmin(int arg0, int arg1) { japi_setmin(arg0, arg1); }


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

x86 assembly (clang, -O2):
<j_setmin>:
jmp    1030 <japi_setmin@plt>

LLVM IR (-O0):
define void @j_setmin(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 @japi_setmin(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @j_setmin(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setmin(i32 %0, i32 %1)
ret void
}
void compute(void) {
  volatile double x = 0.0;
  for (int i = 0; i < 50; i++) {
    x += 1.0;
  }
}


x86 assembly (clang, -O0):
<compute>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x32,-0xc(%rbp)
jge    1141 <compute+0x41>
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1113 <compute+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute>:
movq   $0x0,-0x8(%rsp)
mov    $0x32,%eax
movsd  0xeea(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
movsd  -0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x8(%rsp)
movsd  -0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x8(%rsp)
movsd  -0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x8(%rsp)
movsd  -0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x8(%rsp)
movsd  -0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x8(%rsp)
add    $0xfffffffb,%eax
jne    1120 <compute+0x20>
ret

LLVM IR (-O0):
define void @compute() {
%1 = alloca double
%2 = alloca i32
store volatile double 0.000000e+00, double* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 50
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load volatile double, double* %1
%8 = fadd double %7, 1.000000e+00
store volatile double %8, double* %1
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @compute() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store volatile double 0.000000e+00, double* %1
br label %4
3: ; preds = %4
ret void
4: ; preds = %4, %0
%5 = phi i32 [ 0, %0 ], [ %16, %4 ]
%6 = load volatile double, double* %1
%7 = fadd double %6, 1.000000e+00
store volatile double %7, double* %1
%8 = load volatile double, double* %1
%9 = fadd double %8, 1.000000e+00
store volatile double %9, double* %1
%10 = load volatile double, double* %1
%11 = fadd double %10, 1.000000e+00
store volatile double %11, double* %1
%12 = load volatile double, double* %1
%13 = fadd double %12, 1.000000e+00
store volatile double %13, double* %1
%14 = load volatile double, double* %1
%15 = fadd double %14, 1.000000e+00
store volatile double %15, double* %1
%16 = add nuw nsw i32 %5, 5
%17 = icmp eq i32 %16, 50
br i1 %17, label %3, label %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
unsigned long djb2_hash(char *str) {
  assert(str);
  unsigned long hashed = 5381;
  int c;
  while ((c = *str++))
    hashed = ((hashed << 5) + hashed) + c;
  return hashed;
}


x86 assembly (clang, -O0):
<djb2_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1167 <djb2_hash+0x57>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    112d <djb2_hash+0x1d>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2_hash>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    (%rbx),%cl
test   %cl,%cl
je     114e <djb2_hash+0x3e>
add    $0x1,%rbx
mov    $0x1505,%eax
nopl   0x0(%rax,%rax,1)
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1130 <djb2_hash+0x20>
pop    %rbx
ret
mov    $0x1505,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @djb2_hash(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %13, %5 ], [ %3, %1 ]
%7 = phi i8* [ %9, %5 ], [ %0, %1 ]
%8 = phi i64 [ %12, %5 ], [ 5381, %1 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i64 %8, 33
%11 = sext i8 %6 to i64
%12 = add i64 %10, %11
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %1
%16 = phi i64 [ 5381, %1 ], [ %12, %5 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hola\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"Hola\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned char answer_4(unsigned char arg0, int arg1) { return 0; }


x86 assembly (clang, -O0):
<answer_4>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @answer_4(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
ret i8 0
}

LLVM IR (-O2):
define zeroext i8 @answer_4(i8 zeroext %0, i32 %1) {
ret i8 0
}
char encode_est_velocity(float ev) { return ((char)(ev * 25.0)); }


x86 assembly (clang, -O0):
<encode_est_velocity>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_est_velocity>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define signext i8 @encode_est_velocity(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double %4, 2.500000e+01
%6 = fptosi double %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @encode_est_velocity(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 2.500000e+01
%4 = fptosi double %3 to i8
ret i8 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
void *mmap(void *, size_t, int, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ unix_error(char *);
void *Mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) {
  void *ptr;
  if ((ptr = mmap(addr, len, prot, flags, fd, offset)) == ((void *)-1))
    unix_error("mmap error");
  return (ptr);
}


x86 assembly (clang, -O0):
<Mmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
call   1030 <mmap@plt>
mov    %rax,-0x28(%rbp)
mov    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
jne    1179 <Mmap+0x59>
lea    0xe8c(%rip),%rdi
call   1040 <unix_error@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mmap>:
push   %rbx
call   1030 <mmap@plt>
mov    %rax,%rbx
cmp    $0xffffffffffffffff,%rax
jne    113b <Mmap+0x1b>
lea    0xeca(%rip),%rdi
call   1040 <unix_error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"mmap error\00"
define i8* @Mmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
store i8* %0, i8** %7
store i64 %1, i64* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load i8*, i8** %7
%15 = load i64, i64* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = call i8* @mmap(i8* %14, i64 %15, i32 %16, i32 %17, i32 %18, i32 %19)
store i8* %20, i8** %13
%21 = icmp eq i8* %20, inttoptr (i64 -1 to i8*)
br i1 %21, label %22, label %24
22: ; preds = %6
%23 = call i32 @unix_error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %24
24: ; preds = %22, %6
%25 = load i8*, i8** %13
ret i8* %25
}

LLVM IR (-O2):
@.str = [11 x i8] c"mmap error\00"
define i8* @Mmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i8* @mmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5)
%8 = icmp eq i8* %7, inttoptr (i64 -1 to i8*)
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @unix_error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
ret i8* %7
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  int res;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  res = 0;
  while (x >= y && y > 0) {
    x = x - y;
    res = res + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
jl     1155 <main+0x45>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1165 <main+0x55>
jmp    117c <main+0x6c>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x20,%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
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
store i32 0, i32* %4
br label %7
7: ; preds = %16, %0
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp sgt i32 %12, 0
br label %14
14: ; preds = %11, %7
%15 = phi i1 [ false, %7 ], [ %13, %11 ]
br i1 %15, label %16, label %22
16: ; preds = %14
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = sub nsw i32 %17, %18
store i32 %19, i32* %2
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %7
22: ; preds = %14
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
}
/* Type definitions */
struct sockaddr_storage {
  int dummy;
};
struct msg_decoded {
  int dummy;
};

/* Variables and functions */
int ms_response(int, struct sockaddr_storage const *,
                struct msg_decoded const *, struct sockaddr_storage const *,
                int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/ *,
                int /*<<< orphan*/);
int ms_stop(int ucast_socket, const struct sockaddr_storage *mcast_addr,
            const struct msg_decoded *decoded,
            const struct sockaddr_storage *to) {
  return (ms_response(ucast_socket, mcast_addr, decoded, to, 0, 0, NULL, 0));
}


x86 assembly (clang, -O0):
<ms_stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r9d,%r9d
xor    %eax,%eax
mov    %r9d,%r8d
movq   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <ms_response@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ms_stop>:
push   %rax
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1030 <ms_response@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.msg_decoded = type { i32 }
%struct.sockaddr_storage = type { i32 }
define i32 @ms_stop(i32 %0, %struct.sockaddr_storage* %1, %struct.msg_decoded* %2, %struct.sockaddr_storage* %3) {
%5 = alloca i32
%6 = alloca %struct.sockaddr_storage*
%7 = alloca %struct.msg_decoded*
%8 = alloca %struct.sockaddr_storage*
store i32 %0, i32* %5
store %struct.sockaddr_storage* %1, %struct.sockaddr_storage** %6
store %struct.msg_decoded* %2, %struct.msg_decoded** %7
store %struct.sockaddr_storage* %3, %struct.sockaddr_storage** %8
%9 = load i32, i32* %5
%10 = load %struct.sockaddr_storage*, %struct.sockaddr_storage** %6
%11 = load %struct.msg_decoded*, %struct.msg_decoded** %7
%12 = load %struct.sockaddr_storage*, %struct.sockaddr_storage** %8
%13 = call i32 @ms_response(i32 %9, %struct.sockaddr_storage* %10, %struct.msg_decoded* %11, %struct.sockaddr_storage* %12, i32 0, i32 0, i32* null, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.msg_decoded = type { i32 }
%struct.sockaddr_storage = type { i32 }
define i32 @ms_stop(i32 %0, %struct.sockaddr_storage* %1, %struct.msg_decoded* %2, %struct.sockaddr_storage* %3) {
%5 = tail call i32 @ms_response(i32 %0, %struct.sockaddr_storage* %1, %struct.msg_decoded* %2, %struct.sockaddr_storage* %3, i32 0, i32 0, i32* null, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fini_1(void) { printf("fini array 1\n"); }


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"fini array 1\00"
define void @fini_1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void error_exit() { exit(1); }


x86 assembly (clang, -O0):
<error_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<error_exit>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @error_exit() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @error_exit() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
void foo(float p) {
  int w;
  return;
}


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

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

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

LLVM IR (-O2):
define void @foo(float %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void WatchdogUnlock(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000C00))) = 0x1ACCE551;
}


x86 assembly (clang, -O0):
<WatchdogUnlock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x1acce551,0xc00(%rax)
51 e5 cc 1a
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogUnlock>:
movq   $0x1acce551,0xc00(%rdi)
51 e5 cc 1a
ret

LLVM IR (-O0):
define void @WatchdogUnlock(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 3072
%5 = inttoptr i64 %4 to i64*
store volatile i64 449635665, i64* %5
ret void
}

LLVM IR (-O2):
define void @WatchdogUnlock(i64 %0) {
%2 = add nsw i64 %0, 3072
%3 = inttoptr i64 %2 to i64*
store volatile i64 449635665, i64* %3
ret void
}
int int_ops_not(int l) { return ~l; }


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

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

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

LLVM IR (-O2):
define i32 @int_ops_not(i32 %0) {
%2 = xor i32 %0, -1
ret i32 %2
}
/* Type definitions */
struct mem_section {
  int dummy;
};

/* Variables and functions */
struct mem_section *__nr_to_section(unsigned long);
__attribute__((always_)) struct mem_section *
__pfn_to_section(unsigned long pfn) {
  return __nr_to_section(((pfn) >> (27 - 12)));
}


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

x86 assembly (clang, -O2):
<__pfn_to_section>:
shr    $0xf,%rdi
jmp    1030 <__nr_to_section@plt>

LLVM IR (-O0):
%struct.mem_section = type { i32 }
define %struct.mem_section* @__pfn_to_section(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 15
%5 = call %struct.mem_section* @__nr_to_section(i64 %4)
ret %struct.mem_section* %5
}

LLVM IR (-O2):
%struct.mem_section = type { i32 }
define %struct.mem_section* @__pfn_to_section(i64 %0) {
%2 = lshr i64 %0, 15
%3 = tail call %struct.mem_section* @__nr_to_section(i64 %2)
ret %struct.mem_section* %3
}
/* Variables and functions */
int atoi(char *);
int main(int argument_antall, char *argument_vektor[]) {
  int x = atoi(argument_vektor[1]);
  return x + 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <atoi@plt>
add    $0x1,%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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @atoi(i8* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = add nsw i32 %11, 1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = add nsw i32 %5, 1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_warning(void) {
  static int first = 1;
  if (first) {
    fprintf(stderr,
            "*** PBC asserts enabled: potential performance penalties ***\n");
    first = 0;
  }
}


x86 assembly (clang, -O0):
<print_warning>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f0d(%rip)
je     1140 <print_warning+0x30>
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,0x2ee8(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_warning>:
push   %rax
cmpb   $0x0,0x2f14(%rip)
jne    1136 <print_warning+0x26>
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
lea    0xed6(%rip),%rsi
call   1030 <fprintf@plt>
movb   $0x1,0x2ef6(%rip)
pop    %rax
ret

LLVM IR (-O0):
@print_warning.first = internal global i32 1
@stderr = global i32 0
@.str = [62 x i8] c"*** PBC asserts enabled: potential performance penalties ***\0A\00"
define void @print_warning() {
%1 = load i32, i32* @print_warning.first
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* @print_warning.first
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@print_warning.first = internal unnamed_addr global i1 false
@stderr = global i32 0
@.str = [62 x i8] c"*** PBC asserts enabled: potential performance penalties ***\0A\00"
define void @print_warning() {
%1 = load i1, i1* @print_warning.first
br i1 %1, label %5, label %2
2: ; preds = %0
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
store i1 true, i1* @print_warning.first
br label %5
5: ; preds = %2, %0
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISREG(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int fd_isreg(const char *filename) {
  struct stat st;
  if (stat(filename, &st))
    return -1;
  return S_ISREG(st.st_mode);
}


x86 assembly (clang, -O0):
<fd_isreg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     114f <fd_isreg+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <fd_isreg+0x3a>
mov    -0x18(%rbp),%edi
call   1040 <S_ISREG@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_isreg>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     1138 <fd_isreg+0x18>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @fd_isreg(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %13
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISREG(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fd_isreg(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISREG(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ -1, %1 ]
ret i32 %11
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int TRDB_D5M_shift_amount(int);
uint16_t TRDB_D5M_READ(uint16_t full_reg_value, uint16_t mask) {
  return (full_reg_value & mask) >> TRDB_D5M_shift_amount(mask);
}


x86 assembly (clang, -O0):
<TRDB_D5M_READ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <TRDB_D5M_shift_amount@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sar    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TRDB_D5M_READ>:
push   %rbx
mov    %edi,%ebx
and    %esi,%ebx
mov    %esi,%edi
call   1030 <TRDB_D5M_shift_amount@plt>
mov    %eax,%ecx
sar    %cl,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @TRDB_D5M_READ(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 = and i32 %5, %6
%8 = load i32, i32* %4
%9 = call i32 @TRDB_D5M_shift_amount(i32 %8)
%10 = ashr i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @TRDB_D5M_READ(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = tail call i32 @TRDB_D5M_shift_amount(i32 %1)
%5 = ashr i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int munlockall();
int unlockProcessPages() { return munlockall(); }


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

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

LLVM IR (-O0):
define i32 @unlockProcessPages() {
%1 = call i32 (...) @munlockall()
ret i32 %1
}

LLVM IR (-O2):
define i32 @unlockProcessPages() {
%1 = tail call i32 (...) @munlockall()
ret i32 %1
}
char *create_clone_filename_get_directory_name(char *appaserver_data_directory,
                                               char *directory_name) {
  if (directory_name)
    return directory_name;
  else
    return appaserver_data_directory;
}


x86 assembly (clang, -O0):
<create_clone_filename_get_directory_name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1124 <create_clone_filename_get_directory_name+0x24>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112c <create_clone_filename_get_directory_name+0x2c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_clone_filename_get_directory_name>:
mov    %rdi,%rax
test   %rsi,%rsi
cmovne %rsi,%rax
ret

LLVM IR (-O0):
define i8* @create_clone_filename_get_directory_name(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i8*, i8** %5
store i8* %9, i8** %3
br label %12
10: ; preds = %2
%11 = load i8*, i8** %4
store i8* %11, i8** %3
br label %12
12: ; preds = %10, %8
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @create_clone_filename_get_directory_name(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %1, null
%4 = select i1 %3, i8* %0, i8* %1
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uintmax_t;

/* Variables and functions */
int ft_numlen_un(uintmax_t n, uintmax_t base) {
  int size;
  size = 0;
  while (n != 0) {
    size++;
    n /= base;
  }
  return (size);
}


x86 assembly (clang, -O0):
<ft_numlen_un>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1135 <ft_numlen_un+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1111 <ft_numlen_un+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_numlen_un>:
test   %edi,%edi
je     111d <ft_numlen_un+0x1d>
mov    %edi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%ecx
cltd
idiv   %esi
test   %eax,%eax
jne    1110 <ft_numlen_un+0x10>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_numlen_un(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = phi i32 [ %8, %4 ], [ %0, %2 ]
%7 = add nuw nsw i32 %5, 1
%8 = sdiv i32 %6, %1
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = phi i32 [ 0, %2 ], [ %7, %4 ]
ret i32 %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SSIAdvDataPutFrameEnd(uint32_t ui32Base, uint32_t ui32Data) {
  ;
  ;
  while (!((*((volatile uint32_t *)(ui32Base + 0x0000000C))) & 0x00000002)) {
  }
  (*((volatile uint32_t *)(ui32Base + 0x00000004))) |= 0x00000800;
  (*((volatile uint32_t *)(ui32Base + 0x00000008))) = ui32Data;
}


x86 assembly (clang, -O0):
<SSIAdvDataPutFrameEnd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112c <SSIAdvDataPutFrameEnd+0x2c>
jmp    1131 <SSIAdvDataPutFrameEnd+0x31>
jmp    110a <SSIAdvDataPutFrameEnd+0xa>
mov    -0x4(%rbp),%eax
add    $0x4,%eax
cltq
mov    (%rax),%ecx
or     $0x800,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x8,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIAdvDataPutFrameEnd>:
movslq %edi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
testl  $0x2,0xc(%rax)
je     1110 <SSIAdvDataPutFrameEnd+0x10>
orl    $0x800,0x4(%rax)
mov    %esi,0x8(%rax)
ret

LLVM IR (-O0):
define void @SSIAdvDataPutFrameEnd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %14, %2
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 12
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 %10, 2
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br i1 %13, label %14, label %15
14: ; preds = %5
br label %5
15: ; preds = %5
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 4
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
%20 = load volatile i32, i32* %19
%21 = or i32 %20, 2048
store volatile i32 %21, i32* %19
%22 = load i32, i32* %4
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 8
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to i32*
store volatile i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @SSIAdvDataPutFrameEnd(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 12
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
br label %6
6: ; preds = %6, %2
%7 = load volatile i32, i32* %5
%8 = and i32 %7, 2
%9 = icmp eq i32 %8, 0
br i1 %9, label %6, label %10
10: ; preds = %6
%11 = add nsw i32 %0, 4
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = or i32 %14, 2048
store volatile i32 %15, i32* %13
%16 = add nsw i32 %0, 8
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
store volatile i32 %1, i32* %18
ret void
}
/* Variables and functions */
scalar_t__ chdir(char *);
int main(int argc, const char *argv[]) {
  if (chdir("/") != 0)
    return (1);
  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)
lea    0xed3(%rip),%rdi
call   1030 <chdir@plt>
cmp    $0x0,%rax
je     1148 <main+0x38>
movl   $0x1,-0x4(%rbp)
jmp    114f <main+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %10
9: ; preds = %2
store i32 0, i32* %3
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void XtAppSetErrorMsgHandler() {}


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

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

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

LLVM IR (-O2):
define void @XtAppSetErrorMsgHandler() {
ret void
}
/* Variables and functions */
int pasteitin(int, char *);
int ch_cmd_paste(int crpt, int cidx, int eidx, const char **s_r) {
  return (pasteitin(crpt, "PASTE"));
}


x86 assembly (clang, -O0):
<ch_cmd_paste>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    0xed1(%rip),%rsi
call   1030 <pasteitin@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch_cmd_paste>:
lea    0xee9(%rip),%rsi
jmp    1030 <pasteitin@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"PASTE\00"
define i32 @ch_cmd_paste(i32 %0, i32 %1, i32 %2, i8** %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8**
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%9 = load i32, i32* %5
%10 = call i32 @pasteitin(i32 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %10
}

LLVM IR (-O2):
@.str = [6 x i8] c"PASTE\00"
define i32 @ch_cmd_paste(i32 %0, i32 %1, i32 %2, i8** nocapture readnone %3) {
%5 = tail call i32 @pasteitin(i32 %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %5
}
int LE_OP(int x, int y) { return x <= y; }


x86 assembly (clang, -O0):
<LE_OP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LE_OP>:
xor    %eax,%eax
cmp    %esi,%edi
setle  %al
ret

LLVM IR (-O0):
define i32 @LE_OP(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 sle i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @LE_OP(i32 %0, i32 %1) {
%3 = icmp sle i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void end_emulation(void) {}


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

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

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

LLVM IR (-O2):
define void @end_emulation() {
ret void
}
unsigned int qsd_lsensor_read_cal_data(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @qsd_lsensor_read_cal_data() {
ret i32 0
}
/* Variables and functions */
scalar_t__ isdigit(int);
int isxdigit(int c) { return isdigit(c) || ((unsigned)c | 32) - 'a' < 6; }


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1147 <isxdigit+0x37>
mov    -0x4(%rbp),%eax
or     $0x20,%eax
sub    $0x61,%eax
cmp    $0x6,%eax
setb   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
or     $0x20,%ebx
add    $0xffffff9f,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = or i32 %7, 32
%9 = sub i32 %8, 97
%10 = icmp ult i32 %9, 6
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ true, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = or i32 %0, 32
%5 = add i32 %4, -97
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ merge_groups(int *, int, int);
void merge_sort_down2up(int a[], int len) {
  int n;
  if (a == NULL || len <= 0)
    return;
  for (n = 1; n < len; n *= 2)
    merge_groups(a, len, n);
}


x86 assembly (clang, -O0):
<merge_sort_down2up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <merge_sort_down2up+0x24>
cmpl   $0x0,-0xc(%rbp)
jg     1139 <merge_sort_down2up+0x29>
jmp    1169 <merge_sort_down2up+0x59>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1169 <merge_sort_down2up+0x59>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <merge_groups@plt>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1140 <merge_sort_down2up+0x30>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort_down2up>:
push   %rbp
push   %r14
push   %rbx
test   %rdi,%rdi
je     1142 <merge_sort_down2up+0x32>
mov    %esi,%ebx
cmp    $0x2,%esi
jl     1142 <merge_sort_down2up+0x32>
mov    %rdi,%r14
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <merge_groups@plt>
add    %ebp,%ebp
cmp    %ebx,%ebp
jl     1130 <merge_sort_down2up+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @merge_sort_down2up(i32* %0, i32 %1) {
%3 = icmp ne i32* %0, null
%4 = icmp sgt i32 %1, 1
%5 = and i1 %3, %4
br i1 %5, label %6, label %11
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ 1, %2 ]
%8 = tail call i32 @merge_groups(i32* %0, i32 %1, i32 %7)
%9 = shl nsw i32 %7, 1
%10 = icmp slt i32 %9, %1
br i1 %10, label %6, label %11
11: ; preds = %6, %2
ret void
}
void sec_log_buf_init(void) {}


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

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

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

LLVM IR (-O2):
define void @sec_log_buf_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xa7() {
  Assert_real((ispunct(167) == 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",
              840, ("ispunct should be 0 for 0xa7"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xa7>:
push   %rax
mov    $0xa7,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x348,%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 0xa7\00"
define void @t_ispunct_0xa7() {
%1 = call i64 @ispunct(i32 167)
%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 840, 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 0xa7\00"
define void @t_ispunct_0xa7() {
%1 = tail call i64 @ispunct(i32 167)
%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 840, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint32_t now_usec(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return ((tv.tv_sec) * 1000000) + tv.tv_usec;
}


x86 assembly (clang, -O0):
<now_usec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now_usec>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq 0x8(%rsp),%rax
imul   $0xf4240,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @now_usec() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000000
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @now_usec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %9, %7
ret i64 %10
}
int board_model_id_match_open_source_id(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @board_model_id_match_open_source_id() {
ret i32 0
}