xunge/DecIR huggingface dataset:
/* Variables and functions */
int fun(long);
int /*<<< orphan*/ printf(char *);
void main() {
  long n;
  for (n = 1; n < 100000; n++)
    if (fun(n) != 1)
      break;
  if (n >= 100000)
    printf("ok");
  else
    printf("no");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x1,-0x8(%rbp)
cmpq   $0x186a0,-0x8(%rbp)
jge    116b <main+0x4b>
mov    -0x8(%rbp),%rdi
call   1030 <fun@plt>
cmp    $0x1,%eax
je     1155 <main+0x35>
jmp    116b <main+0x4b>
jmp    115a <main+0x3a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1130 <main+0x10>
cmpq   $0x186a0,-0x8(%rbp)
jl     118a <main+0x6a>
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
jmp    1196 <main+0x76>
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x1,%ebx
lea    0xed2(%rip),%r14
lea    0xec8(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <fun@plt>
cmp    $0x1,%eax
jne    115d <main+0x3d>
add    $0x1,%rbx
cmp    $0x186a0,%rbx
jne    1140 <main+0x20>
mov    %r15,%r14
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"ok\00"
@.str.1 = [3 x i8] c"no\00"
define void @main() {
%1 = alloca i64
store i64 1, i64* %1
br label %2
2: ; preds = %11, %0
%3 = load i64, i64* %1
%4 = icmp slt i64 %3, 100000
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = load i64, i64* %1
%7 = call i32 @fun(i64 %6)
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %5
br label %14
10: ; preds = %5
br label %11
11: ; preds = %10
%12 = load i64, i64* %1
%13 = add nsw i64 %12, 1
store i64 %13, i64* %1
br label %2
14: ; preds = %9, %2
%15 = load i64, i64* %1
%16 = icmp sge i64 %15, 100000
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %21
19: ; preds = %14
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"ok\00"
@.str.1 = [3 x i8] c"no\00"
define void @main() {
br label %4
1: ; preds = %4
%2 = add nuw nsw i64 %5, 1
%3 = icmp eq i64 %2, 100000
br i1 %3, label %8, label %4
4: ; preds = %0, %1
%5 = phi i64 [ 1, %0 ], [ %2, %1 ]
%6 = tail call i32 @fun(i64 %5)
%7 = icmp eq i32 %6, 1
br i1 %7, label %1, label %8
8: ; preds = %4, %1
%9 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %4 ]
%10 = tail call i32 @printf(i8* dereferenceable(1) %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ console_draw(char const);
void console_write(const char *str, int length) {
  int i;
  for (i = 0; i < length; i++) {
    console_draw(str[i]);
  }
}


x86 assembly (clang, -O0):
<console_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <console_write+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <console_draw@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <console_write+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_write>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1143 <console_write+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <console_draw@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <console_write+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @console_write(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @console_draw(i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void bakup_sta() { system("cp /root/wireless.sta /root/wireless.sta.bak"); }


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"cp /root/wireless.sta /root/wireless.sta.bak\00"
define void @bakup_sta() {
%1 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"cp /root/wireless.sta /root/wireless.sta.bak\00"
define void @bakup_sta() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ir_remote {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void fprint_remote_foot(FILE *f, const struct ir_remote *rem) {
  fprintf(f, "end remote\n");
}


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

x86 assembly (clang, -O2):
<fprint_remote_foot>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
%struct.ir_remote = type { i32 }
@.str = [12 x i8] c"end remote\0A\00"
define void @fprint_remote_foot(i32* %0, %struct.ir_remote* %1) {
%3 = alloca i32*
%4 = alloca %struct.ir_remote*
store i32* %0, i32** %3
store %struct.ir_remote* %1, %struct.ir_remote** %4
%5 = load i32*, i32** %3
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.ir_remote = type { i32 }
@.str = [12 x i8] c"end remote\0A\00"
define void @fprint_remote_foot(i32* nocapture %0, %struct.ir_remote* nocapture readnone %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 11, i64 1, i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ isblank(char);
char *skip_blanks(char *p) {
  while (*p && isblank(*p))
    p++;
  return p;
}


x86 assembly (clang, -O0):
<skip_blanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <skip_blanks+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isblank@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <skip_blanks+0x47>
jmp    1168 <skip_blanks+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_blanks+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_blanks>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <skip_blanks+0x29>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isblank@plt>
test   %rax,%rax
je     1139 <skip_blanks+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_blanks+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_blanks(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i64 @isblank(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
int i8042_pnp_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @i8042_pnp_init() {
ret i32 0
}
int needs_escape(int c) {
  switch (c) {
  case '\\':
  case '\"':
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<needs_escape>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x22,%eax
je     112c <needs_escape+0x2c>
jmp    111b <needs_escape+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x5c,%eax
jne    1138 <needs_escape+0x38>
jmp    112c <needs_escape+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    113f <needs_escape+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<needs_escape>:
cmp    $0x5c,%edi
sete   %al
cmp    $0x22,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @needs_escape(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 92, label %5
i32 34, label %5
]
5: ; preds = %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @needs_escape(i32 %0) {
%2 = icmp eq i32 %0, 92
%3 = icmp eq i32 %0, 34
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x, y;
  scanf("%d", &x);
  y = x % 3;
  printf("reszta z dzieleniea to :%d \n", y);
  return x % 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x55555556,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movslq 0x4(%rsp),%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [29 x i8] c"reszta z dzieleniea to :%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = srem i32 %4, 3
%6 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = srem i32 %7, 3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ lcd_cmd_slow(unsigned char);
void lcd_cmd_fast(unsigned char c) { lcd_cmd_slow(c); }


x86 assembly (clang, -O0):
<lcd_cmd_fast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <lcd_cmd_slow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_cmd_fast>:
jmp    1030 <lcd_cmd_slow@plt>

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

LLVM IR (-O2):
define void @lcd_cmd_fast(i8 zeroext %0) {
%2 = tail call i32 @lcd_cmd_slow(i8 zeroext %0)
ret void
}
int withinArray(int *intArray, int size, int *ptr) {
  int diff = ptr - intArray;
  int diff_size = size - diff - 1;
  int positive = !((diff >> 31) & 0x1);
  int positive_diff = !((diff_size >> 31) & 0x1);
  return positive & positive_diff;
}


x86 assembly (clang, -O0):
<withinArray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
and    -0x28(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<withinArray>:
sub    %rdi,%rdx
shr    $0x2,%rdx
mov    %edx,%eax
not    %eax
sub    %esi,%edx
and    %edx,%eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @withinArray(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%11 = load i32*, i32** %6
%12 = load i32*, i32** %4
%13 = ptrtoint i32* %11 to i64
%14 = ptrtoint i32* %12 to i64
%15 = sub i64 %13, %14
%16 = sdiv exact i64 %15, 4
%17 = trunc i64 %16 to i32
store i32 %17, i32* %7
%18 = load i32, i32* %5
%19 = load i32, i32* %7
%20 = sub nsw i32 %18, %19
%21 = sub nsw i32 %20, 1
store i32 %21, i32* %8
%22 = load i32, i32* %7
%23 = ashr i32 %22, 31
%24 = and i32 %23, 1
%25 = icmp ne i32 %24, 0
%26 = xor i1 %25, true
%27 = zext i1 %26 to i32
store i32 %27, i32* %9
%28 = load i32, i32* %8
%29 = ashr i32 %28, 31
%30 = and i32 %29, 1
%31 = icmp ne i32 %30, 0
%32 = xor i1 %31, true
%33 = zext i1 %32 to i32
store i32 %33, i32* %10
%34 = load i32, i32* %9
%35 = load i32, i32* %10
%36 = and i32 %34, %35
ret i32 %36
}

LLVM IR (-O2):
define i32 @withinArray(i32* %0, i32 %1, i32* %2) {
%4 = ptrtoint i32* %2 to i64
%5 = ptrtoint i32* %0 to i64
%6 = sub i64 %4, %5
%7 = lshr exact i64 %6, 2
%8 = trunc i64 %7 to i32
%9 = xor i32 %8, -1
%10 = sub i32 %8, %1
%11 = and i32 %10, %9
%12 = lshr i32 %11, 31
ret i32 %12
}
void __attribute__((weak)) i2c2_ev_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<i2c2_ev_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c2_ev_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.i2c2_ev_isr = [12 x i8] c"i2c2_ev_isr\00"
define weak void @i2c2_ev_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.i2c2_ev_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.i2c2_ev_isr = [12 x i8] c"i2c2_ev_isr\00"
define weak void @i2c2_ev_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.i2c2_ev_isr, i64 0, i64 0))
ret void
}
int char_is_in(char c, const char *s) {
  char sc;
  while ((sc = *(s++)))
    if (sc == c)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<char_is_in>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
cmp    $0x0,%al
je     114b <char_is_in+0x4b>
movsbl -0x11(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1146 <char_is_in+0x46>
movl   $0x1,-0x4(%rbp)
jmp    1152 <char_is_in+0x52>
jmp    110e <char_is_in+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_is_in>:
movzbl (%rsi),%eax
test   %al,%al
je     1116 <char_is_in+0x16>
add    $0x1,%rsi
cmp    %dil,%al
jne    1100 <char_is_in>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @char_is_in(i8 signext %0, i8* nocapture %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %1, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = icmp eq i8 %5, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %7
%11 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %11
}
int test_imm_DBint8_reg(signed char val) {
  return ((val) & (-0xDB << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_DBint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -219
%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_DBint8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -219
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void gtk_scrolled_window_get_shadow_type() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ia_unsetbit64(int /*<<< orphan*/, int);
void ia_unsetbitv64(uint64_t *words, int i) {
  words[i / 64] = ia_unsetbit64(words[i / 64], i % 64);
}


x86 assembly (clang, -O0):
<ia_unsetbitv64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edi
mov    -0xc(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
call   1030 <ia_unsetbit64@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ia_unsetbitv64>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0x3f(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
mov    %eax,%ecx
sar    $0x6,%ecx
movslq %ecx,%rbx
mov    (%rdi,%rbx,4),%edi
and    $0xffffffc0,%eax
sub    %eax,%esi
call   1030 <ia_unsetbit64@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ia_unsetbitv64(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 = sdiv i32 %6, 64
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
%11 = load i32, i32* %4
%12 = srem i32 %11, 64
%13 = call i32 @ia_unsetbit64(i32 %10, i32 %12)
%14 = load i32*, i32** %3
%15 = load i32, i32* %4
%16 = sdiv i32 %15, 64
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %14, i64 %17
store i32 %13, i32* %18
ret void
}

LLVM IR (-O2):
define void @ia_unsetbitv64(i32* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 64
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = srem i32 %1, 64
%8 = tail call i32 @ia_unsetbit64(i32 %6, i32 %7)
store i32 %8, i32* %5
ret void
}
void pthread_key_create() {}


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

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

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

LLVM IR (-O2):
define void @pthread_key_create() {
ret void
}
void ADCPhaseDelaySet(unsigned long ulBase, unsigned long ulPhase) {
  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x00000024))) = ulPhase;
}


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

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

LLVM IR (-O0):
define void @ADCPhaseDelaySet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 36
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @ADCPhaseDelaySet(i64 %0, i64 %1) {
%3 = add i64 %0, 36
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
void vbe_biosfn_set_get_palette_data(AX) {}


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

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

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

LLVM IR (-O2):
define void @vbe_biosfn_set_get_palette_data(i32 %0) {
ret void
}
int test_imm_D7int16_reg(short val) {
  return ((val) & (0xD7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D7int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xd7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_D7int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 215
%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_D7int16_reg(i16 signext %0) {
%2 = and i16 %0, 215
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char *bn_getvowel(char *t) {
  if (t[0] == 'c') {
    return (++t);
  } else {
    return (t);
  }
}


x86 assembly (clang, -O0):
<bn_getvowel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x63,%eax
jne    112d <bn_getvowel+0x2d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
jmp    1135 <bn_getvowel+0x35>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bn_getvowel>:
xor    %eax,%eax
cmpb   $0x63,(%rdi)
sete   %al
add    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @bn_getvowel(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 99
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
store i8* %11, i8** %2
br label %14
12: ; preds = %1
%13 = load i8*, i8** %3
store i8* %13, i8** %2
br label %14
14: ; preds = %12, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @bn_getvowel(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 99
%4 = zext i1 %3 to i64
%5 = getelementptr i8, i8* %0, i64 %4
ret i8* %5
}
extern void SetLongLong(long long *llg) { *llg = 15324; }


x86 assembly (clang, -O0):
<SetLongLong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x3bdc,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetLongLong>:
movq   $0x3bdc,(%rdi)
ret

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

LLVM IR (-O2):
define void @SetLongLong(i64* nocapture writeonly %0) {
store i64 15324, i64* %0
ret void
}
int test_imm_35uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x35 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_35uint64_highword_reg>:
movabs $0x3500000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_35uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 53
%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_35uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 227633266688
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
bool lwan_tpl_int_is_empty(void *ptr) { return (*(int *)ptr) == 0; }


x86 assembly (clang, -O0):
<lwan_tpl_int_is_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lwan_tpl_int_is_empty>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @lwan_tpl_int_is_empty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @lwan_tpl_int_is_empty(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ QRcode_clearCache();
int /*<<< orphan*/ prof_ver1to10();
int /*<<< orphan*/ prof_ver31to40();
int main(void) {
  prof_ver1to10();
  prof_ver31to40();
  QRcode_clearCache();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @prof_ver1to10()
%2 = tail call i32 (...) @prof_ver31to40()
%3 = tail call i32 (...) @QRcode_clearCache()
ret i32 0
}
int mapping_del() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mapping_del() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x58() {
  Assert_real((islower(88) == 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",
              445, ("islower should be 0 for X"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x58>:
push   %rax
mov    $0x58,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1bd,%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 = [26 x i8] c"islower should be 0 for X\00"
define void @t_islower_0x58() {
%1 = call i64 @islower(i32 88)
%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 445, i8* getelementptr inbounds ([26 x i8], [26 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 = [26 x i8] c"islower should be 0 for X\00"
define void @t_islower_0x58() {
%1 = tail call i64 @islower(i32 88)
%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 445, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void *test_anti_range_65(unsigned short n) {
  extern void *alloc_anti_range_65(unsigned short)
      __attribute__((alloc_size(1)));
  if (0 <= n && n <= 0)
    n = 0 - 1;
  return alloc_anti_range_65(n);
}


x86 assembly (clang, -O0):
<test_anti_range_65>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jg     1140 <test_anti_range_65+0x30>
movzwl -0x2(%rbp),%eax
cmp    $0x0,%eax
jg     1140 <test_anti_range_65+0x30>
movw   $0xffff,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <alloc_anti_range_65@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_65>:
cmp    $0x1,%edi
sbb    %eax,%eax
or     %edi,%eax
movzwl %ax,%edi
jmp    1030 <alloc_anti_range_65@plt>

LLVM IR (-O0):
define i8* @test_anti_range_65(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = icmp sle i32 0, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i16 -1, i16* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i16, i16* %2
%13 = call i8* @alloc_anti_range_65(i16 zeroext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_65(i16 zeroext %0) {
%2 = icmp eq i16 %0, 0
%3 = select i1 %2, i16 -1, i16 %0
%4 = tail call i8* @alloc_anti_range_65(i16 zeroext %3)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ _plibc_syscall(int, int /*<<< orphan*/ *);
time_t time(time_t *tloc) { return _plibc_syscall(201, tloc); }


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

x86 assembly (clang, -O2):
<time>:
mov    %rdi,%rsi
mov    $0xc9,%edi
jmp    1030 <_plibc_syscall@plt>

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

LLVM IR (-O2):
define i32 @time(i32* %0) {
%2 = tail call i32 @_plibc_syscall(i32 201, i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ should_inline2(int /*<<< orphan*/);
unused2() { should_inline2(0); }


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

x86 assembly (clang, -O2):
<unused2>:
xor    %edi,%edi
jmp    1030 <should_inline2@plt>

LLVM IR (-O0):
define i32 @unused2() {
%1 = alloca i32
%2 = call i32 @should_inline2(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @unused2() {
%1 = tail call i32 @should_inline2(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ HID_Disable();
void usb_off() { HID_Disable(); }


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

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

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

LLVM IR (-O2):
define void @usb_off() {
%1 = tail call i32 (...) @HID_Disable()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ download_cache_clear();
void roadmap_camera_image_shutdown() { download_cache_clear(); }


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

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

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

LLVM IR (-O2):
define void @roadmap_camera_image_shutdown() {
%1 = tail call i32 (...) @download_cache_clear()
ret void
}
int ld_ne_rc2(long double a1) { return !(((a1) != (100))); }


x86 assembly (clang, -O0):
<ld_ne_rc2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fucomip %st(1),%st
fstp   %st(0)
setp   %cl
setne  %al
or     %cl,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_ne_rc2>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
fucomip %st(1),%st
fstp   %st(0)
setnp  %al
sete   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ld_ne_rc2(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp une x86_fp80 %3, 0xK4005C800000000000000
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ld_ne_rc2(x86_fp80 %0) {
%2 = fcmp oeq x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memmove(int *, int *, int);
void array_ror(int *a, int size) {
  int t;
  t = *(a + size - 1);
  memmove(a + 1, a, (size - 1) * sizeof(int));
  *a = t;
}


x86 assembly (clang, -O0):
<array_ror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    -0x4(%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memmove@plt>
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_ror>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movslq %esi,%rax
mov    -0x4(%rdi,%rax,4),%ebp
add    $0x4,%rdi
lea    -0x4(,%rax,4),%edx
mov    %rbx,%rsi
call   1030 <memmove@plt>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @array_ror(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 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
%10 = getelementptr inbounds i32, i32* %9, i64 -1
%11 = load i32, i32* %10
store i32 %11, i32* %5
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32*, i32** %3
%15 = load i32, i32* %4
%16 = sub nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = mul i64 %17, 4
%19 = trunc i64 %18 to i32
%20 = call i32 @memmove(i32* %13, i32* %14, i32 %19)
%21 = load i32, i32* %5
%22 = load i32*, i32** %3
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @array_ror(i32* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = getelementptr inbounds i32, i32* %4, i64 -1
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 1
%8 = shl i32 %1, 2
%9 = add i32 %8, -4
%10 = tail call i32 @memmove(i32* %7, i32* %0, i32 %9)
store i32 %6, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
void io_file_cleanup(char *file_name) { unlink(file_name); }


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

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

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

LLVM IR (-O2):
define void @io_file_cleanup(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ instruction_count_end();
int /*<<< orphan*/ instruction_count_start();
int write(int, char *, int);
void __attribute__((optimize("0"))) instruction_count_init(void) {
  int size;
  size = write(197, "init", sizeof("init"));
  if (size != sizeof("init"))
    exit(EXIT_FAILURE);
  instruction_count_start();
  instruction_count_end();
}


x86 assembly (clang, -O0):
<instruction_count_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc5,%edi
lea    0xeac(%rip),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
cmp    $0x5,%rax
je     117d <instruction_count_init+0x3d>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    $0x0,%al
call   1060 <instruction_count_start@plt>
mov    $0x0,%al
call   1040 <instruction_count_end@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<instruction_count_init>:
push   %rax
lea    0xeb8(%rip),%rsi
mov    $0xc5,%edi
mov    $0x5,%edx
call   1030 <write@plt>
cmp    $0x5,%eax
jne    116b <instruction_count_init+0x2b>
xor    %eax,%eax
call   1060 <instruction_count_start@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <instruction_count_end@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"init\00"
@EXIT_FAILURE = global i32 0
define void @instruction_count_init() {
%1 = alloca i32
%2 = call i32 @write(i32 197, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 5)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = icmp ne i64 %4, 5
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
%10 = call i32 (...) @instruction_count_start()
%11 = call i32 (...) @instruction_count_end()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"init\00"
@EXIT_FAILURE = global i32 0
define void @instruction_count_init() {
%1 = tail call i32 @write(i32 197, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = icmp eq i32 %1, 5
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
6: ; preds = %0
%7 = tail call i32 (...) @instruction_count_start()
%8 = tail call i32 (...) @instruction_count_end()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lp_reset(int);
int lp_init(int fd) {
  lp_reset(fd);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @lp_init(i32 %0) {
%2 = tail call i32 @lp_reset(i32 %0)
ret i32 0
}
long os_atomic_inc_long(volatile long *val) {
  return __sync_add_and_fetch(val, 1);
}


x86 assembly (clang, -O0):
<os_atomic_inc_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%eax
lock xadd %rax,(%rcx)
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_atomic_inc_long>:
mov    $0x1,%eax
lock xadd %rax,(%rdi)
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @os_atomic_inc_long(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = atomicrmw add i64* %3, i64 1 seq_cst
%5 = add i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @os_atomic_inc_long(i64* nocapture %0) {
%2 = atomicrmw add i64* %0, i64 1 seq_cst
%3 = add i64 %2, 1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ freeMem(char *);
char *md5HexForFile(char *);
int /*<<< orphan*/ md5HexToMd5(char *, unsigned char *);
void md5ForFile(char *fileName, unsigned char md5[16]) {
  char *hex = md5HexForFile(fileName);
  md5HexToMd5(hex, md5);
  freeMem(hex);
}


x86 assembly (clang, -O0):
<md5ForFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <md5HexForFile@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <md5HexToMd5@plt>
mov    -0x18(%rbp),%rdi
call   1040 <freeMem@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md5ForFile>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1050 <md5HexForFile@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <md5HexToMd5@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <freeMem@plt>

LLVM IR (-O0):
define void @md5ForFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @md5HexForFile(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = call i32 @md5HexToMd5(i8* %8, i8* %9)
%11 = load i8*, i8** %5
%12 = call i32 @freeMem(i8* %11)
ret void
}

LLVM IR (-O2):
define void @md5ForFile(i8* %0, i8* %1) {
%3 = tail call i8* @md5HexForFile(i8* %0)
%4 = tail call i32 @md5HexToMd5(i8* %3, i8* %1)
%5 = tail call i32 @freeMem(i8* %3)
ret void
}
int Operand_uimm16x4_rtoa(unsigned int *valp, unsigned int pc) {
  *valp += ((pc + 3) & ~0x3);
  return 0;
}


x86 assembly (clang, -O0):
<Operand_uimm16x4_rtoa>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
add    $0x3,%ecx
and    $0xfffffffc,%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_uimm16x4_rtoa>:
add    $0x3,%esi
and    $0xfffffffc,%esi
add    %esi,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_uimm16x4_rtoa(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = add i32 %5, 3
%7 = and i32 %6, -4
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = add i32 %9, %7
store i32 %10, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_uimm16x4_rtoa(i32* nocapture %0, i32 %1) {
%3 = add i32 %1, 3
%4 = and i32 %3, -4
%5 = load i32, i32* %0
%6 = add i32 %5, %4
store i32 %6, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_PCMPGTD(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0x66);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
}


x86 assembly (clang, -O0):
<MMX_PCMPGTD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_PCMPGTD>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x66,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebp
or     %ebx,%ebp
or     $0xc0,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_PCMPGTD(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 102)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_PCMPGTD(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 102)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 192
%9 = tail call i32 @addbyte(i32 %8)
ret void
}
void RTTarFileRead(void) {}


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

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

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

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