xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint64_t;
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};

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


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

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

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

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i32 @arch_current_time() {
%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 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = add nsw i32 %7, %9
ret i32 %10
}
int test_imm_8Fint64_lowword_mem(long long *val) {
  return ((*val) & (0x8F << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_8Fint64_lowword_mem>:
testb  $0x8f,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Fint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 143
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gmx_covar(int, char **);
int main(int argc, char *argv[]) {
  gmx_covar(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_covar(i32 %0, i8** %1)
ret i32 0
}
int digits(long number, int radix) {
  int ans = 0;
  if (number == 0)
    return 1;
  if (number < 0) {
    number *= -1;
    ans++;
  }
  while (number != 0) {
    number /= radix;
    ans++;
  }
  return ans;
}


x86 assembly (clang, -O0):
<digits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1129 <digits+0x29>
movl   $0x1,-0x4(%rbp)
jmp    117b <digits+0x7b>
cmpq   $0x0,-0x10(%rbp)
jge    1146 <digits+0x46>
imul   $0xffffffffffffffff,-0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114b <digits+0x4b>
cmpq   $0x0,-0x10(%rbp)
je     1175 <digits+0x75>
movslq -0x14(%rbp),%rcx
mov    -0x10(%rbp),%rax
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114b <digits+0x4b>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digits>:
test   %rdi,%rdi
je     1142 <digits+0x42>
mov    %rdi,%rcx
shr    $0x3f,%rcx
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
movslq %esi,%rdi
jmp    112d <digits+0x2d>
nopl   0x0(%rax,%rax,1)
cqto
idiv   %rdi
add    $0x1,%ecx
test   %rax,%rax
je     113f <digits+0x3f>
mov    %rax,%rdx
or     %rdi,%rdx
shr    $0x20,%rdx
jne    1120 <digits+0x20>
xor    %edx,%edx
div    %esi
jmp    1125 <digits+0x25>
mov    %ecx,%eax
ret
mov    $0x1,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @digits(i64 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 0, i32* %6
%7 = load i64, i64* %4
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %31
10: ; preds = %2
%11 = load i64, i64* %4
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i64, i64* %4
%15 = mul nsw i64 %14, -1
store i64 %15, i64* %4
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %18
18: ; preds = %13, %10
br label %19
19: ; preds = %22, %18
%20 = load i64, i64* %4
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %29
22: ; preds = %19
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = load i64, i64* %4
%26 = sdiv i64 %25, %24
store i64 %26, i64* %4
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
br label %19
29: ; preds = %19
%30 = load i32, i32* %6
store i32 %30, i32* %3
br label %31
31: ; preds = %29, %9
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @digits(i64 %0, i32 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = lshr i64 %0, 63
%6 = trunc i64 %5 to i32
%7 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
%8 = sext i32 %1 to i64
br label %9
9: ; preds = %4, %9
%10 = phi i32 [ %6, %4 ], [ %13, %9 ]
%11 = phi i64 [ %7, %4 ], [ %12, %9 ]
%12 = sdiv i64 %11, %8
%13 = add nuw nsw i32 %10, 1
%14 = icmp eq i64 %12, 0
br i1 %14, label %15, label %9
15: ; preds = %9, %2
%16 = phi i32 [ 1, %2 ], [ %13, %9 ]
ret i32 %16
}
void comment(char **suboptionpp, int *i, int *Item_Ptr, char *subwrdptr,
             int *subnext, char **wrdpp, double vals[], int nwrd, int *N_Cntr) {
  *subnext = 1;
  while (*subnext) {
    if ((*i) + 1 == nwrd)
      break;
    (*i)++;
    Item_Ptr++;
  }
}


x86 assembly (clang, -O0):
<comment>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
je     1171 <comment+0x71>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
cmp    0x18(%rbp),%eax
jne    1155 <comment+0x55>
jmp    1171 <comment+0x71>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
jmp    1131 <comment+0x31>
pop    %rbp
ret

x86 assembly (clang, -O2):
<comment>:
mov    0x10(%rsp),%eax
movl   $0x1,(%r8)
mov    (%rsi),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     111f <comment+0x1f>
mov    %ecx,(%rsi)
add    $0x1,%ecx
cmpl   $0x0,(%r8)
jne    1110 <comment+0x10>
ret

LLVM IR (-O0):
define void @comment(i8** %0, i32* %1, i32* %2, i8* %3, i32* %4, i8** %5, double* %6, i32 %7, i32* %8) {
%10 = alloca i8**
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i8*
%14 = alloca i32*
%15 = alloca i8**
%16 = alloca double*
%17 = alloca i32
%18 = alloca i32*
store i8** %0, i8*** %10
store i32* %1, i32** %11
store i32* %2, i32** %12
store i8* %3, i8** %13
store i32* %4, i32** %14
store i8** %5, i8*** %15
store double* %6, double** %16
store i32 %7, i32* %17
store i32* %8, i32** %18
%19 = load i32*, i32** %14
store i32 1, i32* %19
br label %20
20: ; preds = %31, %9
%21 = load i32*, i32** %14
%22 = load i32, i32* %21
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %37
24: ; preds = %20
%25 = load i32*, i32** %11
%26 = load i32, i32* %25
%27 = add nsw i32 %26, 1
%28 = load i32, i32* %17
%29 = icmp eq i32 %27, %28
br i1 %29, label %30, label %31
30: ; preds = %24
br label %37
31: ; preds = %24
%32 = load i32*, i32** %11
%33 = load i32, i32* %32
%34 = add nsw i32 %33, 1
store i32 %34, i32* %32
%35 = load i32*, i32** %12
%36 = getelementptr inbounds i32, i32* %35, i32 1
store i32* %36, i32** %12
br label %20
37: ; preds = %30, %20
ret void
}

LLVM IR (-O2):
define void @comment(i8** nocapture readnone %0, i32* nocapture %1, i32* nocapture readnone %2, i8* nocapture readnone %3, i32* nocapture %4, i8** nocapture readnone %5, double* nocapture readnone %6, i32 %7, i32* nocapture readnone %8) {
store i32 1, i32* %4
%10 = load i32, i32* %1
br label %11
11: ; preds = %9, %15
%12 = phi i32 [ %10, %9 ], [ %13, %15 ]
%13 = add nsw i32 %12, 1
%14 = icmp eq i32 %13, %7
br i1 %14, label %18, label %15
15: ; preds = %11
store i32 %13, i32* %1
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %11
18: ; preds = %11, %15
ret void
}
/* Variables and functions */
int /*<<< orphan*/ extern_func1_15(int, char *, unsigned long);
void extern_func1_14(int a, char *b, unsigned long c) {
  extern_func1_15(a, b, c);
}


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

x86 assembly (clang, -O2):
<extern_func1_14>:
jmp    1030 <extern_func1_15@plt>

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

LLVM IR (-O2):
define void @extern_func1_14(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @extern_func1_15(i32 %0, i8* %1, i64 %2)
ret void
}
int add_integers(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<add_integers>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @add_integers(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @add_integers(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ getAddress();
void entry_to() { getAddress(); }


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

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

LLVM IR (-O0):
define void @entry_to() {
%1 = call i32 (...) @getAddress()
ret void
}

LLVM IR (-O2):
define void @entry_to() {
%1 = tail call i32 (...) @getAddress()
ret void
}
char *strchr(const char *str, int c) {
  const char ch = c;
  for (; *str != ch; str++)
    if (*str == '\0')
      return 0;
  return (char *)str;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x15(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x15(%rbp),%ecx
cmp    %ecx,%eax
je     1157 <strchr+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1141 <strchr+0x41>
movq   $0x0,-0x8(%rbp)
jmp    115f <strchr+0x5f>
jmp    1146 <strchr+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1111 <strchr+0x11>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    %rdi,%rax
movsbl %sil,%ecx
movsbl (%rdi),%edx
cmp    %edx,%ecx
je     1120 <strchr+0x20>
xchg   %ax,%ax
test   %dl,%dl
je     1121 <strchr+0x21>
movsbl 0x1(%rax),%edx
add    $0x1,%rax
cmp    %edx,%ecx
jne    1110 <strchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %4, %6
br i1 %7, label %17, label %8
8: ; preds = %2, %12
%9 = phi i8 [ %14, %12 ], [ %5, %2 ]
%10 = phi i8* [ %13, %12 ], [ %0, %2 ]
%11 = icmp eq i8 %9, 0
br i1 %11, label %17, label %12
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %10, i64 1
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %4, %15
br i1 %16, label %17, label %8
17: ; preds = %8, %12, %2
%18 = phi i8* [ %0, %2 ], [ %13, %12 ], [ null, %8 ]
ret i8* %18
}
/* Variables and functions */
scalar_t__ bio_read(int);
int t2_getcommacode() {
  int n;
  for (n = 0; bio_read(1); n++) {
  }
  return n;
}


x86 assembly (clang, -O0):
<t2_getcommacode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <bio_read@plt>
cmp    $0x0,%rax
je     1146 <t2_getcommacode+0x36>
jmp    1138 <t2_getcommacode+0x28>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <t2_getcommacode+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2_getcommacode>:
push   %rbx
mov    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <bio_read@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1120 <t2_getcommacode+0x10>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @t2_getcommacode() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = call i64 @bio_read(i32 1)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @t2_getcommacode() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i64 @bio_read(i32 1)
%4 = icmp eq i64 %3, 0
%5 = add nuw nsw i32 %2, 1
br i1 %4, label %6, label %1
6: ; preds = %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ forwd(int);
int /*<<< orphan*/ turnleft(int);
void back(int n) {
  turnleft(180);
  forwd(n);
  turnleft(180);
}


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

x86 assembly (clang, -O2):
<back>:
push   %rbx
mov    %edi,%ebx
mov    $0xb4,%edi
call   1030 <turnleft@plt>
mov    %ebx,%edi
call   1040 <forwd@plt>
mov    $0xb4,%edi
pop    %rbx
jmp    1030 <turnleft@plt>

LLVM IR (-O0):
define void @back(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @turnleft(i32 180)
%4 = load i32, i32* %2
%5 = call i32 @forwd(i32 %4)
%6 = call i32 @turnleft(i32 180)
ret void
}

LLVM IR (-O2):
define void @back(i32 %0) {
%2 = tail call i32 @turnleft(i32 180)
%3 = tail call i32 @forwd(i32 %0)
%4 = tail call i32 @turnleft(i32 180)
ret void
}
int test_imm_38uint8_reg(unsigned char val) {
  return ((val) & (0x38 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_38uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x38,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_38uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 56
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void printf_warn(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @printf_warn(i8* nocapture %0, ...) {
ret void
}
void nxp_ion_set_platdata(void) {}


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

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

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

LLVM IR (-O2):
define void @nxp_ion_set_platdata() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xaa() {
  Assert_real((isascii(170) == 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_isascii.c",
              855, ("isascii should be 0 for 0xaa"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xaa>:
push   %rax
mov    $0xaa,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x357,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xaa\00"
define void @t_isascii_0xaa() {
%1 = call i64 @isascii(i32 170)
%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 855, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xaa\00"
define void @t_isascii_0xaa() {
%1 = tail call i64 @isascii(i32 170)
%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 855, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cdecl_func__optopt(int /*<<< orphan*/);
int /*<<< orphan*/ optopt;
void cdecl_expr__optopt() { cdecl_func__optopt(optopt); }


x86 assembly (clang, -O0):
<cdecl_expr__optopt>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <cdecl_func__optopt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdecl_expr__optopt>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <cdecl_func__optopt@plt>

LLVM IR (-O0):
@optopt = global i32 0
define void @cdecl_expr__optopt() {
%1 = load i32, i32* @optopt
%2 = call i32 @cdecl_func__optopt(i32 %1)
ret void
}

LLVM IR (-O2):
@optopt = global i32 0
define void @cdecl_expr__optopt() {
%1 = load i32, i32* @optopt
%2 = tail call i32 @cdecl_func__optopt(i32 %1)
ret void
}
unsigned xrop3_144_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ S;
  stk2 = ~stk2;
  stk1 = T & stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_144_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_144_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
not    %ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
and    %ecx,%eax
and    $0xff00,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_144_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %7
%28 = load i32, i32* %9
%29 = and i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %5
%35 = load i32, i32* %6
%36 = and i32 %34, %35
%37 = or i32 %33, %36
ret i32 %37
}

LLVM IR (-O2):
define i32 @xrop3_144_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = and i32 %4, 65280
%8 = xor i32 %7, 65280
%9 = and i32 %8, %6
%10 = or i32 %9, %3
ret i32 %10
}
char *ts2fd(tsec)
double tsec;
{
  double date, time;
  ts2dt(tsec, &date, &time);
  return (dt2fd(date, time));
}


x86 assembly (clang, -O0):
<ts2fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    $0x2,%al
call   1040 <dt2fd@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts2fd>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1040 <dt2fd@plt>
cltq
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i8* @ts2fd(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %5, double* %3, double* %4)
%7 = load double, double* %3
%8 = load double, double* %4
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2fd to i32 (double, double, ...)*)(double %7, double %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @ts2fd(double %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %0, double* %2, double* %3)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2fd to i32 (double, double, ...)*)(double %7, double %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}
int DetectByteorder(void) {
  int i = 0x12345678;
  if (*(char *)&i == 0x12)
    return 4321;
  else if (*(char *)&i == 0x78)
    return 1234;
  else if (*(char *)&i == 0x34)
    return 3412;
  return -1;
}


x86 assembly (clang, -O0):
<DetectByteorder>:
push   %rbp
mov    %rsp,%rbp
movl   $0x12345678,-0x8(%rbp)
movsbl -0x8(%rbp),%eax
cmp    $0x12,%eax
jne    1124 <DetectByteorder+0x24>
movl   $0x10e1,-0x4(%rbp)
jmp    1167 <DetectByteorder+0x67>
movsbl -0x8(%rbp),%eax
cmp    $0x78,%eax
jne    113d <DetectByteorder+0x3d>
movl   $0x4d2,-0x4(%rbp)
jmp    1167 <DetectByteorder+0x67>
movsbl -0x8(%rbp),%eax
cmp    $0x34,%eax
jne    1156 <DetectByteorder+0x56>
movl   $0xd54,-0x4(%rbp)
jmp    1167 <DetectByteorder+0x67>
jmp    115b <DetectByteorder+0x5b>
jmp    1160 <DetectByteorder+0x60>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @DetectByteorder() {
%1 = alloca i32
%2 = alloca i32
store i32 305419896, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 18
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 4321, i32* %1
br label %23
8: ; preds = %0
%9 = bitcast i32* %2 to i8*
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 120
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 1234, i32* %1
br label %23
14: ; preds = %8
%15 = bitcast i32* %2 to i8*
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 52
br i1 %18, label %19, label %20
19: ; preds = %14
store i32 3412, i32* %1
br label %23
20: ; preds = %14
br label %21
21: ; preds = %20
br label %22
22: ; preds = %21
store i32 -1, i32* %1
br label %23
23: ; preds = %22, %19, %13, %7
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
define i32 @DetectByteorder() {
ret i32 1234
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ INT_MAX;
int vsnprintf(char *, int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vsprintf(char *buffer, const char *format, va_list ap) {
  return vsnprintf(buffer, INT_MAX, format, ap);
}


x86 assembly (clang, -O0):
<vsprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <vsnprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsprintf>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    0x2ecc(%rip),%rax
mov    (%rax),%esi
jmp    1030 <vsnprintf@plt>

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

LLVM IR (-O2):
@INT_MAX = global i32 0
define i32 @vsprintf(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = load i32, i32* @INT_MAX
%5 = tail call i32 @vsnprintf(i8* %0, i32 %4, i8* %1, i32 %2)
ret i32 %5
}
/* Variables and functions */
scalar_t__ isupper(char);
scalar_t__ tolower(char);
void strlwr(char *str) {
  char *s;
  for (s = str; *s; s++)
    if (isupper(*s))
      (*s) = (char)tolower(*s);
}


x86 assembly (clang, -O0):
<strlwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1181 <strlwr+0x61>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
je     116b <strlwr+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
jmp    1170 <strlwr+0x50>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <strlwr+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlwr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1155 <strlwr+0x35>
mov    %rdi,%rbx
jmp    113c <strlwr+0x1c>
nopl   0x0(%rax)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1155 <strlwr+0x35>
movsbl %al,%edi
call   1040 <isupper@plt>
test   %rax,%rax
je     1130 <strlwr+0x10>
movsbl (%rbx),%edi
call   1030 <tolower@plt>
mov    %al,(%rbx)
jmp    1130 <strlwr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @strlwr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %13
%5 = phi i8 [ %15, %13 ], [ %2, %1 ]
%6 = phi i8* [ %14, %13 ], [ %0, %1 ]
%7 = tail call i64 @isupper(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = load i8, i8* %6
%11 = tail call i64 @tolower(i8 signext %10)
%12 = trunc i64 %11 to i8
store i8 %12, i8* %6
br label %13
13: ; preds = %4, %9
%14 = getelementptr inbounds i8, i8* %6, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %13, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[], char *envp[]) {
  puts("Hello, world!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%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 = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int intel_gvt_init(struct drm_i915_private *dev_priv) { return 0; }


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

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

LLVM IR (-O0):
%struct.drm_i915_private = type opaque
define i32 @intel_gvt_init(%struct.drm_i915_private* %0) {
%2 = alloca %struct.drm_i915_private*
store %struct.drm_i915_private* %0, %struct.drm_i915_private** %2
ret i32 0
}

LLVM IR (-O2):
%struct.drm_i915_private = type opaque
define i32 @intel_gvt_init(%struct.drm_i915_private* nocapture readnone %0) {
ret i32 0
}
gt(float a, float b) { return a > b; }


x86 assembly (clang, -O0):
<gt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt>:
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @gt(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @gt(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *new_timestamp();
int /*<<< orphan*/ printf(char *, char *);
void print_timestamp(void) {
  char *ts;
  ts = new_timestamp();
  printf("%s", ts);
  free(ts);
  return;
}


x86 assembly (clang, -O0):
<print_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <new_timestamp@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_timestamp>:
push   %rbx
xor    %eax,%eax
call   1050 <new_timestamp@plt>
mov    %rax,%rbx
lea    0xebe(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @print_timestamp() {
%1 = tail call i8* (...) @new_timestamp()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int banniere(char *nom) {
  if (nom == NULL) {
    nom = "sombre inconnu";
  }
  printf("Bienvenue %s\n", nom);
  printf("---------\n\n");
}


x86 assembly (clang, -O0):
<banniere>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1132 <banniere+0x22>
lea    0xed2(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<banniere>:
push   %rax
test   %rdi,%rdi
lea    0xed5(%rip),%rsi
cmovne %rdi,%rsi
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"sombre inconnu\00"
@.str.1 = [14 x i8] c"Bienvenue %s\0A\00"
@.str.2 = [12 x i8] c"---------\0A\0A\00"
define i32 @banniere(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %3
br label %7
7: ; preds = %6, %1
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [15 x i8] c"sombre inconnu\00"
@.str.1 = [14 x i8] c"Bienvenue %s\0A\00"
@str = [11 x i8] c"---------\0A\00"
define i32 @banniere(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
long long osfreq();
long long cpucycles_amd64cpuinfo_persecond(void) { return osfreq(); }


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

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

LLVM IR (-O0):
define i64 @cpucycles_amd64cpuinfo_persecond() {
%1 = call i64 (...) @osfreq()
ret i64 %1
}

LLVM IR (-O2):
define i64 @cpucycles_amd64cpuinfo_persecond() {
%1 = tail call i64 (...) @osfreq()
ret i64 %1
}
int cmpint(const void *p1, const void *p2) { return *(int *)p1 - *(int *)p2; }


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

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

LLVM IR (-O0):
define i32 @cmpint(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmpint(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void destroy_usage(int code) {
  fprintf(stderr,
          "Destroys a VM instance managed by honeycomb.\n"
          "\n"
          "Usage: %s destroy [-i instance]\n"
          "\n"
          "	-i: Name of the VM instance\n"
          "\n",
          "hc");
  exit(code);
}


x86 assembly (clang, -O0):
<destroy_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
lea    0xf2c(%rip),%rdx
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<destroy_usage>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
lea    0xf34(%rip),%rdx
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [110 x i8] c"Destroys a VM instance managed by honeycomb.\0A\0AUsage: %s destroy [-i instance]\0A\0A\09-i: Name of the VM instance\0A\0A\00"
@.str.1 = [3 x i8] c"hc\00"
define void @destroy_usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [110 x i8] c"Destroys a VM instance managed by honeycomb.\0A\0AUsage: %s destroy [-i instance]\0A\0A\09-i: Name of the VM instance\0A\0A\00"
@.str.1 = [3 x i8] c"hc\00"
define void @destroy_usage(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
scalar_t__ sqrt(float);
float mvVecDistanceBetween2(const float *a, const float *b) {
  float tmp1 = a[0] - b[0];
  float tmp2 = a[1] - b[1];
  return (float)sqrt((tmp1 * tmp1) + (tmp2 * tmp2));
}


x86 assembly (clang, -O0):
<mvVecDistanceBetween2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x4(%rax),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
cvtsi2ss %rax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvVecDistanceBetween2>:
push   %rax
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
subss  (%rsi),%xmm0
subss  0x4(%rsi),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @mvVecDistanceBetween2(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
%6 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%7 = load float*, float** %3
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %4
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fsub float %9, %12
store float %13, float* %5
%14 = load float*, float** %3
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float*, float** %4
%18 = getelementptr inbounds float, float* %17, i64 1
%19 = load float, float* %18
%20 = fsub float %16, %19
store float %20, float* %6
%21 = load float, float* %5
%22 = load float, float* %5
%23 = load float, float* %6
%24 = load float, float* %6
%25 = fmul float %23, %24
%26 = call float @llvm.fmuladd.f32(float %21, float %22, float %25)
%27 = call i64 @sqrt(float %26)
%28 = sitofp i64 %27 to float
ret float %28
}

LLVM IR (-O2):
define float @mvVecDistanceBetween2(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fsub float %3, %4
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = fsub float %7, %9
%11 = fmul float %10, %10
%12 = tail call float @llvm.fmuladd.f32(float %5, float %5, float %11)
%13 = tail call i64 @sqrt(float %12)
%14 = sitofp i64 %13 to float
ret float %14
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int mode;
};
typedef TYPE_1__ XEnterWindowEvent;

/* Variables and functions */
void set_XEnterWindowEvent_mode(void *_p, int _v) {
  ((XEnterWindowEvent *)_p)->mode = (int)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEnterWindowEvent_mode(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xd6() {
  Assert_real((islower(214) == 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_islower.c",
              1075, ("islower should be 0 for 0xd6"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xd6>:
push   %rax
mov    $0xd6,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x433,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xd6\00"
define void @t_islower_0xd6() {
%1 = call i64 @islower(i32 214)
%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 1075, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xd6\00"
define void @t_islower_0xd6() {
%1 = tail call i64 @islower(i32 214)
%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 1075, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t vmir_vm_arg64(const void **rfp) {
  const void *rf = *rfp = *rfp - 8;
  return *(uint64_t *)rf;
}


x86 assembly (clang, -O0):
<vmir_vm_arg64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0xfffffffffffffff8,%rax
mov    -0x8(%rbp),%rcx
mov    %rax,(%rcx)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmir_vm_arg64>:
mov    (%rdi),%rax
lea    -0x8(%rax),%rcx
mov    %rcx,(%rdi)
mov    -0x8(%rax),%eax
ret

LLVM IR (-O0):
define i32 @vmir_vm_arg64(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = getelementptr i8, i8* %5, i64 -8
%7 = load i8**, i8*** %2
store i8* %6, i8** %7
store i8* %6, i8** %3
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @vmir_vm_arg64(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr i8, i8* %2, i64 -8
store i8* %3, i8** %0
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}