xunge/DecIR huggingface dataset:
int test_imm_6Fuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x6F << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_6Fuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 476741369856
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int errno;
int lstat(char const *, struct stat *);
int __sulong_posix_lstat(const char *path, struct stat *statbuf) {
  {
    int native_errno = errno;
    int result = lstat(path, statbuf);
    if (result == (int)-1) {
      result = (int)(long)-errno;
    }
    errno = native_errno;
    return result;
  }
}


x86 assembly (clang, -O0):
<__sulong_posix_lstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <lstat@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1156 <__sulong_posix_lstat+0x46>
xor    %eax,%eax
mov    0x2e91(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
mov    0x2e80(%rip),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_lstat>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <lstat@plt>
xor    %ecx,%ecx
sub    (%rbx),%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@errno = global i32 0
define i32 @__sulong_posix_lstat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%7 = load i32, i32* @errno
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = load %struct.stat*, %struct.stat** %4
%10 = call i32 @lstat(i8* %8, %struct.stat* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i32, i32* @errno
%15 = sub nsw i32 0, %14
%16 = sext i32 %15 to i64
%17 = trunc i64 %16 to i32
store i32 %17, i32* %6
br label %18
18: ; preds = %13, %2
%19 = load i32, i32* %5
store i32 %19, i32* @errno
%20 = load i32, i32* %6
ret i32 %20
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@errno = global i32 0
define i32 @__sulong_posix_lstat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = load i32, i32* @errno
%4 = tail call i32 @lstat(i8* %0, %struct.stat* %1)
%5 = icmp eq i32 %4, -1
%6 = load i32, i32* @errno
%7 = sub nsw i32 0, %6
%8 = select i1 %5, i32 %7, i32 %4
store i32 %3, i32* @errno
ret i32 %8
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzFetchPush_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKUP(int);
void BrzFetchPush_ackdown(struct comp *comp, int port) {
  struct BrzFetchPush_ *c = (struct BrzFetchPush_ *)comp;
  SEND_ACKUP(0);
  SEND_ACKUP(1);
}


x86 assembly (clang, -O0):
<BrzFetchPush_ackdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %edi,%edi
call   1030 <SEND_ACKUP@plt>
mov    $0x1,%edi
call   1030 <SEND_ACKUP@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzFetchPush_ackdown>:
push   %rax
xor    %edi,%edi
call   1030 <SEND_ACKUP@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <SEND_ACKUP@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzFetchPush_ = type { i32 }
define void @BrzFetchPush_ackdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzFetchPush_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzFetchPush_*
store %struct.BrzFetchPush_* %7, %struct.BrzFetchPush_** %5
%8 = call i32 @SEND_ACKUP(i32 0)
%9 = call i32 @SEND_ACKUP(i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzFetchPush_ackdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKUP(i32 0)
%4 = tail call i32 @SEND_ACKUP(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int fchmodat(int /*<<< orphan*/, char const *, int /*<<< orphan*/,
             int /*<<< orphan*/);
int chmod(const char *path, mode_t mode) {
  return fchmodat(AT_FDCWD, path, mode, 0);
}


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

x86 assembly (clang, -O2):
<chmod>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
xor    %ecx,%ecx
jmp    1030 <fchmodat@plt>

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

LLVM IR (-O2):
@AT_FDCWD = global i32 0
define i32 @chmod(i8* %0, i32 %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = tail call i32 @fchmodat(i32 %3, i8* %0, i32 %1, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void hexprint(char *d, int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%02hhx ", (char)d[i]);
  }
}


x86 assembly (clang, -O0):
<hexprint>:
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    1158 <hexprint+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xebf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <hexprint+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexprint>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <hexprint+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <hexprint+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%02hhx \00"
define void @hexprint(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 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), 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):
@.str = [8 x i8] c"%02hhx \00"
define void @hexprint(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 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), 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*/ printf(char *);
void stdio_clear_and_home(int num_lines) {
  int i;
  printf("\n");
  for (i = 0; i < num_lines; i++) {
    printf("\x1b[1A\x1b[K");
  }
  printf("\x1b[u\x1b[K");
}


x86 assembly (clang, -O0):
<stdio_clear_and_home>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1154 <stdio_clear_and_home+0x44>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <stdio_clear_and_home+0x1e>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdio_clear_and_home>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
jle    114d <stdio_clear_and_home+0x2d>
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebx
jne    1140 <stdio_clear_and_home+0x20>
lea    0xeb4(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str.1 = [8 x i8] c"\1B[1A\1B[K\00"
@.str.2 = [7 x i8] c"\1B[u\1B[K\00"
define void @stdio_clear_and_home(i32 %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
%10 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncmp(char *, char *, int);
int determine_pixfmt(char *pixfmt_str) {
  if (!strncmp(pixfmt_str, "rgb24", 5)) {
    return 0x01;
  } else if (!strncmp(pixfmt_str, "yuyv", 3)) {
    return 0x02;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<determine_pixfmt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1146 <determine_pixfmt+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1177 <determine_pixfmt+0x67>
mov    -0x10(%rbp),%rdi
lea    0xeb5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1170 <determine_pixfmt+0x60>
movl   $0x2,-0x4(%rbp)
jmp    1177 <determine_pixfmt+0x67>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<determine_pixfmt>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1146 <determine_pixfmt+0x36>
lea    0xed6(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
neg    %eax
sbb    %eax,%eax
or     $0x2,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"rgb24\00"
@.str.1 = [5 x i8] c"yuyv\00"
define i32 @determine_pixfmt(i8* %0) {
%2 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 3)
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 2, i32 -1
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void checkHighPriorityTickees(unsigned long utcMicrosecondClock) {}


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

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

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

LLVM IR (-O2):
define void @checkHighPriorityTickees(i64 %0) {
ret void
}
void CANEnable(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000000))) =
      (*((volatile unsigned long *)(ulBase + 0x00000000))) & ~0x00000001;
}


x86 assembly (clang, -O0):
<CANEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<CANEnable>:
andq   $0xfffffffffffffffe,(%rdi)
ret

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

LLVM IR (-O2):
define void @CANEnable(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load volatile i64, i64* %2
%4 = and i64 %3, -2
store volatile i64 %4, i64* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int nondet();
int main() {
  int n = nondet();
  bar(n);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @nondet()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @bar(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nondet()
%2 = tail call i32 @bar(i32 %1)
ret i32 0
}
const char *ftg_correct_dirslash(char *path) {
  char bad_slash = '\\';
  char good_slash = '/';
  char *p = &path[0];
  while (*p) {
    if (*p == bad_slash)
      *p = good_slash;
    p++;
  }
  return path;
}


x86 assembly (clang, -O0):
<ftg_correct_dirslash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x5c,-0x9(%rbp)
movb   $0x2f,-0xa(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <ftg_correct_dirslash+0x52>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    1141 <ftg_correct_dirslash+0x41>
mov    -0xa(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <ftg_correct_dirslash+0x18>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftg_correct_dirslash>:
mov    %rdi,%rax
mov    %rdi,%rcx
jmp    1117 <ftg_correct_dirslash+0x17>
nopl   0x0(%rax,%rax,1)
movb   $0x2f,(%rcx)
add    $0x1,%rcx
movzbl (%rcx),%edx
cmp    $0x5c,%dl
je     1110 <ftg_correct_dirslash+0x10>
test   %dl,%dl
jne    1113 <ftg_correct_dirslash+0x13>
ret

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

LLVM IR (-O2):
define i8* @ftg_correct_dirslash(i8* returned %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 92, label %5
]
5: ; preds = %2
store i8 47, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret i8* %0
}
void I_UpdateSound(void) {}


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

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

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

LLVM IR (-O2):
define void @I_UpdateSound() {
ret void
}
int endstate(char *p) {
  while (*p)
    if (*p++ != '*')
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<endstate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1141 <endstate+0x41>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x2a,%eax
je     113c <endstate+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1148 <endstate+0x48>
jmp    1108 <endstate+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<endstate>:
movzbl (%rdi),%eax
test   %al,%al
je     1112 <endstate+0x12>
add    $0x1,%rdi
cmp    $0x2a,%al
je     1100 <endstate>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @endstate(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = icmp eq i8 %4, 42
br i1 %8, label %2, label %9
9: ; preds = %2, %6
%10 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xb2() {
  Assert_real((islower(178) == 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",
              895, ("islower should be 0 for 0xb2"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xb2>:
push   %rax
mov    $0xb2,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x37f,%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 0xb2\00"
define void @t_islower_0xb2() {
%1 = call i64 @islower(i32 178)
%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 895, 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 0xb2\00"
define void @t_islower_0xb2() {
%1 = tail call i64 @islower(i32 178)
%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 895, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(char *appname) {
  fprintf(stderr, "usage: %s -s server -p port\n", appname);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"usage: %s -s server -p port\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
double exp(double const);
double lognorm_mean(const double logmu, const double logsigma) {
  return exp(logmu + (logsigma * logsigma * 0.5));
}


x86 assembly (clang, -O0):
<lognorm_mean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lognorm_mean>:
mulsd  %xmm1,%xmm1
mulsd  0xee4(%rip),%xmm1
addsd  %xmm1,%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @lognorm_mean(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %4
%8 = fmul double %6, %7
%9 = call double @llvm.fmuladd.f64(double %8, double 5.000000e-01, double %5)
%10 = call double @exp(double %9)
ret double %10
}

LLVM IR (-O2):
define double @lognorm_mean(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %3, double 5.000000e-01, double %0)
%5 = tail call double @exp(double %4)
ret double %5
}
void foo_1_1_1_2_1_1_1_2_2() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ rte_mov16(int /*<<< orphan*/ *, int /*<<< orphan*/ const *);
void rte_mov32(uint8_t *dst, const uint8_t *src) {
  rte_mov16((uint8_t *)dst + 0 * 16, (const uint8_t *)src + 0 * 16);
  rte_mov16((uint8_t *)dst + 1 * 16, (const uint8_t *)src + 1 * 16);
}


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

x86 assembly (clang, -O2):
<rte_mov32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <rte_mov16@plt>
add    $0x40,%rbx
add    $0x40,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <rte_mov16@plt>

LLVM IR (-O0):
define void @rte_mov32(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = call i32 @rte_mov16(i32* %6, i32* %8)
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 16
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 16
%14 = call i32 @rte_mov16(i32* %11, i32* %13)
ret void
}

LLVM IR (-O2):
define void @rte_mov32(i32* %0, i32* %1) {
%3 = tail call i32 @rte_mov16(i32* %0, i32* %1)
%4 = getelementptr inbounds i32, i32* %0, i64 16
%5 = getelementptr inbounds i32, i32* %1, i64 16
%6 = tail call i32 @rte_mov16(i32* %4, i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ text_get_words(char *, unsigned int *);
unsigned int text_get_count_words(char text[]) {
  unsigned int length;
  text_get_words(text, &length);
  return length;
}


x86 assembly (clang, -O0):
<text_get_count_words>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <text_get_words@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<text_get_count_words>:
push   %rax
lea    0x4(%rsp),%rsi
call   1030 <text_get_words@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @text_get_count_words(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @text_get_words(i8* %0, i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
int test_imm_7Aint16_reg(short val) {
  return ((val) & (0x7A << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_7Aint16_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, 122
%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_7Aint16_reg(i16 signext %0) {
%2 = and i16 %0, 122
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x8d() {
  Assert_real((isbdigit(141) == 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_isbdigit.c",
              710, ("isbdigit should be 0 for 0x8d"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x8d\00"
define void @t_isbdigit_0x8d() {
%1 = tail call i64 @isbdigit(i32 141)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 710, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned char *hmac_blake256(unsigned char *, unsigned char const *, size_t,
                             unsigned char const *, size_t);
unsigned char *mac_hmac_blake256(unsigned char *out, const unsigned char *key,
                                 size_t key_len, const unsigned char *msg,
                                 size_t msg_len) {
  return hmac_blake256(out, key, key_len, msg, msg_len);
}


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

x86 assembly (clang, -O2):
<mac_hmac_blake256>:
jmp    1030 <hmac_blake256@plt>

LLVM IR (-O0):
define i8* @mac_hmac_blake256(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = load i8*, i8** %9
%15 = load i64, i64* %10
%16 = call i8* @hmac_blake256(i8* %11, i8* %12, i64 %13, i8* %14, i64 %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @mac_hmac_blake256(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i8* @hmac_blake256(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4)
ret i8* %6
}
int foo(int x) {}


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

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 undef
}
void _Jv_GetStringUTFLength() {}


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

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

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

LLVM IR (-O2):
define void @_Jv_GetStringUTFLength() {
ret void
}
void f1ias2_s3(int a[3] __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @f1ias2_s3(i32* nocapture %0) {
ret void
}
void LCD_ForceUpdate() {}


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

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

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

LLVM IR (-O2):
define void @LCD_ForceUpdate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void print_usage(char *argv0) {
  printf("%s: simulate a grid of bonded sliders\n"
         "webpage: https://github.com/anders-dc/slidergrid\n"
         "usage: %s [OPTION[S]]\n"
         "options:\n"
         "  -h, --help\t\tprint this information\n"
         "  -v, --version \tprint version information and exit\n"
         "  -V, --verbose \tshow status during simulation\n",
         argv0, argv0);
}


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

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

LLVM IR (-O0):
@.str = [255 x i8] c"%s: simulate a grid of bonded sliders\0Awebpage: https://github.com/anders-dc/slidergrid\0Ausage: %s [OPTION[S]]\0Aoptions:\0A -h, --help\09\09print this information\0A -v, --version \09print version information and exit\0A -V, --verbose \09show status during simulation\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [255 x i8] c"%s: simulate a grid of bonded sliders\0Awebpage: https://github.com/anders-dc/slidergrid\0Ausage: %s [OPTION[S]]\0Aoptions:\0A -h, --help\09\09print this information\0A -v, --version \09print version information and exit\0A -V, --verbose \09show status during simulation\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
int c094(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c094() {
ret i32 0
}
void trav_clbk(void *data, unsigned int pos) {
  pos++;
  char *new_ptr = (char *)data + pos;
  new_ptr++;
}


x86 assembly (clang, -O0):
<trav_clbk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @trav_clbk(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add i32 %6, 1
store i32 %7, i32* %4
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %5
ret void
}

LLVM IR (-O2):
define void @trav_clbk(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
double pre2dou(char *);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char *in;
  scanf("%s", in);
  double result;
  result = pre2dou(in);
  printf("%.10lf", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <pre2dou@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <scanf@plt>
call   1030 <pre2dou@plt>
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c"%.10lf\00"
define i32 @main() {
%1 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* undef)
%2 = tail call double @pre2dou(i8* undef)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %2)
ret i32 0
}
/* Type definitions */
struct _glist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ canvas_undo_disconnect(struct _glist *, void *, int);
void canvas_undo_connect(struct _glist *x, void *z, int action) {
  int myaction;
  if (action == 1)
    myaction = 2;
  else if (action == 2)
    myaction = 1;
  else
    myaction = action;
  canvas_undo_disconnect(x, z, myaction);
}


x86 assembly (clang, -O0):
<canvas_undo_connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1139 <canvas_undo_connect+0x29>
movl   $0x2,-0x18(%rbp)
jmp    115a <canvas_undo_connect+0x4a>
cmpl   $0x2,-0x14(%rbp)
jne    114f <canvas_undo_connect+0x3f>
movl   $0x1,-0x18(%rbp)
jmp    1155 <canvas_undo_connect+0x45>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    115a <canvas_undo_connect+0x4a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1030 <canvas_undo_disconnect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canvas_undo_connect>:
cmp    $0x1,%edx
je     1124 <canvas_undo_connect+0x14>
cmp    $0x2,%edx
jne    111f <canvas_undo_connect+0xf>
mov    $0x1,%edx
jmp    1030 <canvas_undo_disconnect@plt>
mov    $0x2,%edx
jmp    1030 <canvas_undo_disconnect@plt>

LLVM IR (-O0):
%struct._glist = type { i32 }
define void @canvas_undo_connect(%struct._glist* %0, i8* %1, i32 %2) {
%4 = alloca %struct._glist*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store %struct._glist* %0, %struct._glist** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %3
store i32 2, i32* %7
br label %18
11: ; preds = %3
%12 = load i32, i32* %6
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 1, i32* %7
br label %17
15: ; preds = %11
%16 = load i32, i32* %6
store i32 %16, i32* %7
br label %17
17: ; preds = %15, %14
br label %18
18: ; preds = %17, %10
%19 = load %struct._glist*, %struct._glist** %4
%20 = load i8*, i8** %5
%21 = load i32, i32* %7
%22 = call i32 @canvas_undo_disconnect(%struct._glist* %19, i8* %20, i32 %21)
ret void
}

LLVM IR (-O2):
%struct._glist = type { i32 }
define void @canvas_undo_connect(%struct._glist* %0, i8* %1, i32 %2) {
switch i32 %2, label %5 [
i32 1, label %6
i32 2, label %4
]
4: ; preds = %3
br label %6
5: ; preds = %3
br label %6
6: ; preds = %3, %4, %5
%7 = phi i32 [ 1, %4 ], [ %2, %5 ], [ 2, %3 ]
%8 = tail call i32 @canvas_undo_disconnect(%struct._glist* %0, i8* %1, i32 %7)
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
char *lastff(char *sss) {
  char *sx;
  sx = strrchr(sss, '/');
  if (sx == NULL)
    return sss;
  return sx + 1;
}


x86 assembly (clang, -O0):
<lastff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1146 <lastff+0x36>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <lastff+0x42>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lastff>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @lastff(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
int disable_setting(char *);
int disable_csum() {
  return disable_setting("/proc/sys/net/mptcp/mptcp_checksum");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"/proc/sys/net/mptcp/mptcp_checksum\00"
define i32 @disable_csum() {
%1 = call i32 @disable_setting(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [35 x i8] c"/proc/sys/net/mptcp/mptcp_checksum\00"
define i32 @disable_csum() {
%1 = tail call i32 @disable_setting(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fork();
t() { fork(); }


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

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

LLVM IR (-O0):
define i32 @t() {
%1 = alloca i32
%2 = call i32 (...) @fork()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @t() {
%1 = tail call i32 (...) @fork()
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ x;
typedef int __u32;

/* Variables and functions */
__u32 __swap32(__u32 x) {
  return (((__u32)(x)&0xFF) << 24) | (((__u32)(x)&0xFF00) << 8) |
         (((__u32)(x)&0xFF0000) >> 8) | (((__u32)(x)&0xFF000000) >> 24);
}


x86 assembly (clang, -O0):
<__swap32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @__swap32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = ashr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = lshr i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @__swap32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
void SobelRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @SobelRow_NEON() {
ret void
}
float raw_relu_function(float x) { return x > 0.0 ? x : 0.0; }


x86 assembly (clang, -O0):
<raw_relu_function>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1132 <raw_relu_function+0x32>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113f <raw_relu_function+0x3f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113f <raw_relu_function+0x3f>
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<raw_relu_function>:
xorps  %xmm1,%xmm1
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @raw_relu_function(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp ogt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %2
%8 = fpext float %7 to double
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %6
%11 = phi double [ %8, %6 ], [ 0.000000e+00, %9 ]
%12 = fptrunc double %11 to float
ret float %12
}

LLVM IR (-O2):
define float @raw_relu_function(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = select i1 %2, float %0, float 0.000000e+00
ret float %3
}