xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
char *mpfr_get_version();
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  const char *version = mpfr_get_version();
  char subversion[6];
  memcpy(subversion, version, 5);
  subversion[5] = '\0';
  if (strcmp(subversion, "3.1.6") <= 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <mpfr_get_version@plt>
mov    %rax,-0x18(%rbp)
lea    -0x1e(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x5,%edx
call   1040 <memcpy@plt>
movb   $0x0,-0x19(%rbp)
lea    -0x1e(%rbp),%rdi
lea    0xe8e(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jg     118d <main+0x5d>
movl   $0x0,-0x4(%rbp)
jmp    1194 <main+0x64>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1050 <mpfr_get_version@plt>
lea    0xa(%rsp),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0x5,%edx
call   1040 <memcpy@plt>
movb   $0x0,0xf(%rsp)
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"3.1.6\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [6 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i8* (...) @mpfr_get_version()
store i8* %8, i8** %6
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %6
%11 = call i32 @memcpy(i8* %9, i8* %10, i32 5)
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 5
store i8 0, i8* %12
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%15 = icmp sle i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 0, i32* %3
br label %18
17: ; preds = %2
store i32 1, i32* %3
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [6 x i8] c"3.1.6\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = tail call i8* (...) @mpfr_get_version()
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%6 = call i32 @memcpy(i8* %5, i8* %4, i32 5)
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 5
store i8 0, i8* %7
%8 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = icmp sgt i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xa3() {
  Assert_real((isbdigit(163) == 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",
              820, ("isbdigit should be 0 for 0xa3"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xa3>:
push   %rax
mov    $0xa3,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x334,%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 0xa3\00"
define void @t_isbdigit_0xa3() {
%1 = call i64 @isbdigit(i32 163)
%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 820, 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 0xa3\00"
define void @t_isbdigit_0xa3() {
%1 = tail call i64 @isbdigit(i32 163)
%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 820, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
void toUint8(uint8_t *s0, uint8_t *s1, uint8_t *s2, uint8_t *s3, uint32_t x) {
  *s0 = (uint8_t)(x >> 24);
  *s1 = (uint8_t)(x >> 16);
  *s2 = (uint8_t)(x >> 8);
  *s3 = (uint8_t)(x >> 0);
}


x86 assembly (clang, -O0):
<toUint8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x24(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x24(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x24(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x24(%rbp),%eax
sar    $0x0,%eax
movslq %eax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<toUint8>:
mov    %r8d,%eax
sar    $0x18,%eax
cltq
mov    %rax,(%rdi)
mov    %r8d,%eax
sar    $0x10,%eax
cltq
mov    %rax,(%rsi)
movslq %r8d,%rax
sar    $0x8,%r8d
movslq %r8d,%rsi
mov    %rsi,(%rdx)
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @toUint8(i64* %0, i64* %1, i64* %2, i64* %3, i32 %4) {
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i64*
%9 = alloca i64*
%10 = alloca i32
store i64* %0, i64** %6
store i64* %1, i64** %7
store i64* %2, i64** %8
store i64* %3, i64** %9
store i32 %4, i32* %10
%11 = load i32, i32* %10
%12 = ashr i32 %11, 24
%13 = sext i32 %12 to i64
%14 = load i64*, i64** %6
store i64 %13, i64* %14
%15 = load i32, i32* %10
%16 = ashr i32 %15, 16
%17 = sext i32 %16 to i64
%18 = load i64*, i64** %7
store i64 %17, i64* %18
%19 = load i32, i32* %10
%20 = ashr i32 %19, 8
%21 = sext i32 %20 to i64
%22 = load i64*, i64** %8
store i64 %21, i64* %22
%23 = load i32, i32* %10
%24 = ashr i32 %23, 0
%25 = sext i32 %24 to i64
%26 = load i64*, i64** %9
store i64 %25, i64* %26
ret void
}

LLVM IR (-O2):
define void @toUint8(i64* nocapture writeonly %0, i64* nocapture writeonly %1, i64* nocapture writeonly %2, i64* nocapture writeonly %3, i32 %4) {
%6 = ashr i32 %4, 24
%7 = sext i32 %6 to i64
store i64 %7, i64* %0
%8 = ashr i32 %4, 16
%9 = sext i32 %8 to i64
store i64 %9, i64* %1
%10 = ashr i32 %4, 8
%11 = sext i32 %10 to i64
store i64 %11, i64* %2
%12 = sext i32 %4 to i64
store i64 %12, i64* %3
ret void
}
char rust_dbg_extern_identity_u8(char u) { return u; }


x86 assembly (clang, -O0):
<rust_dbg_extern_identity_u8>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @rust_dbg_extern_identity_u8(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
ret i8 %3
}

LLVM IR (-O2):
define signext i8 @rust_dbg_extern_identity_u8(i8 returned signext %0) {
ret i8 %0
}
int test_imm_7Buint32_mem(unsigned int *val) {
  return ((*val) & (0x7B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_7Buint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 123
%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_7Buint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 123
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ rt_cpu;
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ SYS_gettid;
int sched_setaffinity(long, int, int /*<<< orphan*/ *);
long syscall(int /*<<< orphan*/);
int set_core_affinity(int core) {
  long tid = syscall(SYS_gettid);
  cpu_set_t rt_cpu;
  CPU_ZERO(&rt_cpu);
  CPU_SET(core, &rt_cpu);
  return sched_setaffinity(tid, sizeof(rt_cpu), &rt_cpu);
}


x86 assembly (clang, -O0):
<set_core_affinity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1040 <syscall@plt>
mov    %rax,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1050 <CPU_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
call   1060 <CPU_SET@plt>
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
lea    -0x14(%rbp),%rdx
call   1030 <sched_setaffinity@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_core_affinity>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%r14d
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1040 <syscall@plt>
mov    %rax,%rbx
lea    0xc(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <CPU_ZERO@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
call   1060 <CPU_SET@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %rbp,%rdx
call   1030 <sched_setaffinity@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SYS_gettid = global i32 0
define i32 @set_core_affinity(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* @SYS_gettid
%6 = call i64 @syscall(i32 %5)
store i64 %6, i64* %3
%7 = call i32 @CPU_ZERO(i32* %4)
%8 = load i32, i32* %2
%9 = call i32 @CPU_SET(i32 %8, i32* %4)
%10 = load i64, i64* %3
%11 = call i32 @sched_setaffinity(i64 %10, i32 4, i32* %4)
ret i32 %11
}

LLVM IR (-O2):
@SYS_gettid = global i32 0
define i32 @set_core_affinity(i32 %0) {
%2 = alloca i32
%3 = load i32, i32* @SYS_gettid
%4 = tail call i64 @syscall(i32 %3)
%5 = bitcast i32* %2 to i8*
%6 = call i32 @CPU_ZERO(i32* %2)
%7 = call i32 @CPU_SET(i32 %0, i32* %2)
%8 = call i32 @sched_setaffinity(i64 %4, i32 4, i32* %2)
ret i32 %8
}
void fc86(int n) {
  {
    typedef int(*b)[n];
  a : {
    typedef int(*c)[n];
    0;
  }
    {
      typedef int(*d)[n];
      0;
    }
    goto a;
    ;
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc86>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc86+0x7>

x86 assembly (clang, -O2):
<fc86>:
jmp    1100 <fc86>

LLVM IR (-O0):
define void @fc86(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
br label %5
5: ; preds = %5, %1
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
br label %5
10: ; No predecessors!
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc86(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
XGrabServer() {}


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

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

LLVM IR (-O0):
define i32 @XGrabServer() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XGrabServer() {
ret i32 undef
}
void XShapeQueryExtents() {}


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

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

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

LLVM IR (-O2):
define void @XShapeQueryExtents() {
ret void
}
/* Type definitions */
struct flock {
  int l_type;
  int l_whence;
  int l_start;
  int /*<<< orphan*/ l_len;
};
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int fcntl(int, int, struct flock *);
int lockReg(int fd, int cmd, int type, int whence, int start, off_t len) {
  struct flock fl;
  fl.l_type = type;
  fl.l_whence = whence;
  fl.l_start = start;
  fl.l_len = len;
  return fcntl(fd, cmd, &fl);
}


x86 assembly (clang, -O0):
<lockReg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x28(%rbp),%rdx
call   1030 <fcntl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lockReg>:
sub    $0x18,%rsp
mov    %edx,0x8(%rsp)
mov    %ecx,0xc(%rsp)
mov    %r8d,0x10(%rsp)
mov    %r9d,0x14(%rsp)
lea    0x8(%rsp),%rdx
call   1030 <fcntl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.flock = type { i32, i32, i32, i32 }
define i32 @lockReg(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca %struct.flock
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load i32, i32* %9
%15 = getelementptr inbounds %struct.flock, %struct.flock* %13, i32 0, i32 0
store i32 %14, i32* %15
%16 = load i32, i32* %10
%17 = getelementptr inbounds %struct.flock, %struct.flock* %13, i32 0, i32 1
store i32 %16, i32* %17
%18 = load i32, i32* %11
%19 = getelementptr inbounds %struct.flock, %struct.flock* %13, i32 0, i32 2
store i32 %18, i32* %19
%20 = load i32, i32* %12
%21 = getelementptr inbounds %struct.flock, %struct.flock* %13, i32 0, i32 3
store i32 %20, i32* %21
%22 = load i32, i32* %7
%23 = load i32, i32* %8
%24 = call i32 @fcntl(i32 %22, i32 %23, %struct.flock* %13)
ret i32 %24
}

LLVM IR (-O2):
%struct.flock = type { i32, i32, i32, i32 }
define i32 @lockReg(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca %struct.flock
%8 = bitcast %struct.flock* %7 to i8*
%9 = getelementptr inbounds %struct.flock, %struct.flock* %7, i64 0, i32 0
store i32 %2, i32* %9
%10 = getelementptr inbounds %struct.flock, %struct.flock* %7, i64 0, i32 1
store i32 %3, i32* %10
%11 = getelementptr inbounds %struct.flock, %struct.flock* %7, i64 0, i32 2
store i32 %4, i32* %11
%12 = getelementptr inbounds %struct.flock, %struct.flock* %7, i64 0, i32 3
store i32 %5, i32* %12
%13 = call i32 @fcntl(i32 %0, i32 %1, %struct.flock* %7)
ret i32 %13
}
void f1() { asm("ret" : : :); }


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

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

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

LLVM IR (-O2):
define void @f1() {
tail call void asm sideeffect "ret", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ matNf_print_to_string(char *, int, float const *, int const);
int /*<<< orphan*/ printf(char *, char *);
void matNf_print(const float m[], const int n) {
  char str[256];
  matNf_print_to_string(str, 256, m, n);
  printf("%s\n", str);
}


x86 assembly (clang, -O0):
<matNf_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    $0x100,%esi
call   1040 <matNf_print_to_string@plt>
lea    -0x110(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matNf_print>:
push   %rbx
sub    $0x100,%rsp
mov    %esi,%ecx
mov    %rdi,%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1040 <matNf_print_to_string@plt>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @matNf_print(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca [256 x i8]
store float* %0, float** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load float*, float** %3
%8 = load i32, i32* %4
%9 = call i32 @matNf_print_to_string(i8* %6, i32 256, float* %7, i32 %8)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @matNf_print(float* %0, i32 %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @matNf_print_to_string(i8* %4, i32 256, float* %0, i32 %1)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
int test_imm_FDuint8_mem(unsigned char *val) {
  return ((*val) & (-0xFD << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_FDuint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -253
%7 = icmp ne i32 %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_FDuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 3
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int _default_storage_lock_folder(char *folder) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_default_storage_lock_folder(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct iwl_priv {
  int dummy;
};

/* Variables and functions */
int iwl_is_ready(struct iwl_priv *);
scalar_t__ iwl_is_rfkill(struct iwl_priv *);
int iwl_is_ready_rf(struct iwl_priv *priv) {
  if (iwl_is_rfkill(priv))
    return 0;
  return iwl_is_ready(priv);
}


x86 assembly (clang, -O0):
<iwl_is_ready_rf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <iwl_is_rfkill@plt>
cmp    $0x0,%rax
je     114b <iwl_is_ready_rf+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1157 <iwl_is_ready_rf+0x37>
mov    -0x10(%rbp),%rdi
call   1040 <iwl_is_ready@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iwl_is_ready_rf>:
push   %rbx
mov    %rdi,%rbx
call   1030 <iwl_is_rfkill@plt>
test   %rax,%rax
je     1132 <iwl_is_ready_rf+0x12>
xor    %eax,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <iwl_is_ready@plt>

LLVM IR (-O0):
%struct.iwl_priv = type { i32 }
define i32 @iwl_is_ready_rf(%struct.iwl_priv* %0) {
%2 = alloca i32
%3 = alloca %struct.iwl_priv*
store %struct.iwl_priv* %0, %struct.iwl_priv** %3
%4 = load %struct.iwl_priv*, %struct.iwl_priv** %3
%5 = call i64 @iwl_is_rfkill(%struct.iwl_priv* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %11
8: ; preds = %1
%9 = load %struct.iwl_priv*, %struct.iwl_priv** %3
%10 = call i32 @iwl_is_ready(%struct.iwl_priv* %9)
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
%struct.iwl_priv = type { i32 }
define i32 @iwl_is_ready_rf(%struct.iwl_priv* %0) {
%2 = tail call i64 @iwl_is_rfkill(%struct.iwl_priv* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @iwl_is_ready(%struct.iwl_priv* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage() {
  printf(
      "\nUsage:\n   %s\n\n",
      "create_thumbs"
      " [-log <logfile>] [-quiet] [-verbose] [-size <size>]\n"
      "                 [-recursive] [-out-dir <dir>]\n"
      "                 [-L0 <stf|ceos|jaxa_L0>] [-output-format <tiff|jpeg>]\n"
      "                 [-scale <scale_factor>] [-browse] [-save-metadata] "
      "[-help]\n"
      "                 <files>");
}


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

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\0AUsage:\0A %s\0A\0A\00"
@.str.1 = [285 x i8] c"create_thumbs [-log <logfile>] [-quiet] [-verbose] [-size <size>]\0A [-recursive] [-out-dir <dir>]\0A [-L0 <stf|ceos|jaxa_L0>] [-output-format <tiff|jpeg>]\0A [-scale <scale_factor>] [-browse] [-save-metadata] [-help]\0A <files>\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([285 x i8], [285 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0AUsage:\0A %s\0A\0A\00"
@.str.1 = [285 x i8] c"create_thumbs [-log <logfile>] [-quiet] [-verbose] [-size <size>]\0A [-recursive] [-out-dir <dir>]\0A [-L0 <stf|ceos|jaxa_L0>] [-output-format <tiff|jpeg>]\0A [-scale <scale_factor>] [-browse] [-save-metadata] [-help]\0A <files>\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([285 x i8], [285 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int memcmp(void *, void *, size_t);
int __cmp_keys_default(void *k1, size_t kl1, void *k2, size_t kl2) {
  if (kl1 != kl2)
    return kl1 - kl2;
  return memcmp(k1, k2, kl1);
}


x86 assembly (clang, -O0):
<__cmp_keys_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x28(%rbp),%rax
je     1146 <__cmp_keys_default+0x36>
mov    -0x18(%rbp),%rax
sub    -0x28(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    115a <__cmp_keys_default+0x4a>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cmp_keys_default>:
mov    %rsi,%rax
cmp    %rcx,%rsi
jne    1123 <__cmp_keys_default+0x13>
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <memcmp@plt>
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @__cmp_keys_default(i8* nocapture %0, i64 %1, i8* nocapture %2, i64 %3) {
%5 = icmp eq i64 %1, %3
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = sub i64 %1, %3
%8 = trunc i64 %7 to i32
br label %11
9: ; preds = %4
%10 = tail call i32 @memcmp(i8* %0, i8* %2, i64 %1)
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}
const char *jac_chain_nm2_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  case 1:
    return "i1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<jac_chain_nm2_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <jac_chain_nm2_name_in+0x2b>
jmp    111a <jac_chain_nm2_name_in+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <jac_chain_nm2_name_in+0x3b>
jmp    114b <jac_chain_nm2_name_in+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <jac_chain_nm2_name_in+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <jac_chain_nm2_name_in+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm2_name_in>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @jac_chain_nm2_name_in(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
double asin(double);
int /*<<< orphan*/ getNumber(double *);
double aseno(double a) {
  getNumber(&a);
  return asin(a);
}


x86 assembly (clang, -O0):
<aseno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <getNumber@plt>
movsd  -0x8(%rbp),%xmm0
call   1030 <asin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aseno>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1040 <getNumber@plt>
movsd  (%rsp),%xmm0
call   1030 <asin@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @aseno(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @getNumber(double* %2)
%4 = load double, double* %2
%5 = call double @asin(double %4)
ret double %5
}

LLVM IR (-O2):
define double @aseno(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @getNumber(double* %2)
%4 = load double, double* %2
%5 = call double @asin(double %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xf3() {
  Assert_real((isspace(243) == 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_isspace.c",
              1220, ("isspace should be 0 for 0xf3"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xf3>:
push   %rax
mov    $0xf3,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4c4,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xf3\00"
define void @t_isspace_0xf3() {
%1 = call i64 @isspace(i32 243)
%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 1220, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xf3\00"
define void @t_isspace_0xf3() {
%1 = tail call i64 @isspace(i32 243)
%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 1220, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ft_strclr(char *s) {
  int i;
  if (!s)
    return;
  i = 0;
  while (s[i]) {
    s[i] = '\0';
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_strclr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1118 <ft_strclr+0x18>
jmp    114b <ft_strclr+0x4b>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     114b <ft_strclr+0x4b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <ft_strclr+0x1f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strclr>:
test   %rdi,%rdi
je     111d <ft_strclr+0x1d>
cmpb   $0x0,(%rdi)
je     111d <ft_strclr+0x1d>
add    $0x1,%rdi
xchg   %ax,%ax
movb   $0x0,-0x1(%rdi)
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <ft_strclr+0x10>
ret

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

LLVM IR (-O2):
define void @ft_strclr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
store i8 0, i8* %8
%9 = add nuw nsw i64 %7, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret void
}
unsigned int ret_0() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ret_0() {
ret i32 0
}
void _farpokew(unsigned short selector, unsigned long offset,
               unsigned short value) {
  __asm__ __volatile__("movw %w0,%%fs \n"
                       "	.byte 0x64 \n"
                       "	movw %w1,(%k2)"
                       :
                       : "rm"(selector), "ri"(value), "r"(offset));
}


x86 assembly (clang, -O0):
<_farpokew>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x12(%rbp),%ax
mov    -0x10(%rbp),%rcx
mov    %dx,-0x14(%rbp)
mov    -0x14(%rbp),%fs
mov    %ax,%fs:(%ecx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_farpokew>:
mov    %di,-0x2(%rsp)
mov    -0x2(%rsp),%fs
mov    %dx,%fs:(%esi)
ret

LLVM IR (-O0):
define void @_farpokew(i16 zeroext %0, i64 %1, i16 zeroext %2) {
%4 = alloca i16
%5 = alloca i64
%6 = alloca i16
store i16 %0, i16* %4
store i64 %1, i64* %5
store i16 %2, i16* %6
%7 = load i16, i16* %4
%8 = load i16, i16* %6
%9 = load i64, i64* %5
ret void
}

LLVM IR (-O2):
define void @_farpokew(i16 zeroext %0, i64 %1, i16 zeroext %2) {
tail call void asm sideeffect "movw ${0:w},%fs \0A\09.byte 0x64 \0A\09movw ${1:w},(${2:k})", "rm,ri,r,~{dirflag},~{fpsr},~{flags}"(i16 %0, i16 %2, i64 %1)
ret void
}
void __arch_atomic_dec(long int *pointer) {
  const long int inc_val = -1L;
  __sync_fetch_and_add(pointer, inc_val);
}


x86 assembly (clang, -O0):
<__arch_atomic_dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
mov    -0x8(%rbp),%rax
lock addq $0xffffffffffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__arch_atomic_dec>:
lock addq $0xffffffffffffffff,(%rdi)
ret

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

LLVM IR (-O2):
define void @__arch_atomic_dec(i64* nocapture %0) {
%2 = atomicrmw add i64* %0, i64 -1 seq_cst
ret void
}
/* Variables and functions */
bool is_high_priority(char input) {
  if (input == '*' || input == '/' || input == '%')
    return true;
  return false;
}


x86 assembly (clang, -O0):
<is_high_priority>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     1131 <is_high_priority+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
je     1131 <is_high_priority+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x25,%eax
jne    113d <is_high_priority+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <is_high_priority+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_high_priority>:
cmp    $0x2f,%dil
ja     1120 <is_high_priority+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x842000000000,%rdx
bt     %rcx,%rdx
jae    1120 <is_high_priority+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_high_priority(i8 signext %0) {
switch i8 %0, label %2 [
i8 47, label %3
i8 42, label %3
i8 37, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t rand64() {
  static uint64_t seed = 1070372ull;
  seed ^= seed >> 12;
  seed ^= seed << 25;
  seed ^= seed >> 27;
  return seed * 2685821657736338717ull;
}


x86 assembly (clang, -O0):
<rand64>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
sar    $0xc,%eax
xor    0x2f0d(%rip),%eax
mov    %eax,0x2f07(%rip)
mov    0x2f01(%rip),%eax
shl    $0x19,%eax
xor    0x2ef8(%rip),%eax
mov    %eax,0x2ef2(%rip)
mov    0x2eec(%rip),%eax
sar    $0x1b,%eax
xor    0x2ee3(%rip),%eax
mov    %eax,0x2edd(%rip)
movslq 0x2ed6(%rip),%rax
movabs $0x2545f4914f6cdd1d,%rcx
f4 45 25
imul   %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand64>:
mov    0x2f1a(%rip),%eax
mov    %eax,%ecx
sar    $0xc,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shl    $0x19,%eax
xor    %ecx,%eax
mov    %eax,%ecx
sar    $0x1b,%ecx
xor    %eax,%ecx
mov    %ecx,0x2eff(%rip)
imul   $0x4f6cdd1d,%ecx,%eax
ret

LLVM IR (-O0):
@rand64.seed = internal global i32 1070372
define i32 @rand64() {
%1 = load i32, i32* @rand64.seed
%2 = ashr i32 %1, 12
%3 = load i32, i32* @rand64.seed
%4 = xor i32 %3, %2
store i32 %4, i32* @rand64.seed
%5 = load i32, i32* @rand64.seed
%6 = shl i32 %5, 25
%7 = load i32, i32* @rand64.seed
%8 = xor i32 %7, %6
store i32 %8, i32* @rand64.seed
%9 = load i32, i32* @rand64.seed
%10 = ashr i32 %9, 27
%11 = load i32, i32* @rand64.seed
%12 = xor i32 %11, %10
store i32 %12, i32* @rand64.seed
%13 = load i32, i32* @rand64.seed
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 2685821657736338717
%16 = trunc i64 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
@rand64.seed = internal unnamed_addr global i32 1070372
define i32 @rand64() {
%1 = load i32, i32* @rand64.seed
%2 = ashr i32 %1, 12
%3 = xor i32 %2, %1
%4 = shl i32 %3, 25
%5 = xor i32 %4, %3
%6 = ashr i32 %5, 27
%7 = xor i32 %6, %5
store i32 %7, i32* @rand64.seed
%8 = mul i32 %7, 1332534557
ret i32 %8
}
int test_imm_7Cint64_lowword_mem(long long *val) {
  return ((*val) & (0x7C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_7Cint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 124
%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_7Cint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 124
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ dpotrf_(char *, int *, double *, int *, int *);
void clapack_dpotrf(char uplo, int n, double *a, int lda, int *info) {
  dpotrf_(&uplo, &n, a, &lda, info);
}


x86 assembly (clang, -O0):
<clapack_dpotrf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%r8
lea    -0x1(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x14(%rbp),%rcx
call   1030 <dpotrf_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clapack_dpotrf>:
sub    $0x18,%rsp
mov    %dil,0xf(%rsp)
mov    %esi,0x14(%rsp)
mov    %ecx,0x10(%rsp)
lea    0xf(%rsp),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rcx
call   1030 <dpotrf_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @clapack_dpotrf(i8 signext %0, i32 %1, double* %2, i32 %3, i32* %4) {
%6 = alloca i8
%7 = alloca i32
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32*
store i8 %0, i8* %6
store i32 %1, i32* %7
store double* %2, double** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%11 = load double*, double** %8
%12 = load i32*, i32** %10
%13 = call i32 @dpotrf_(i8* %6, i32* %7, double* %11, i32* %9, i32* %12)
ret void
}

LLVM IR (-O2):
define void @clapack_dpotrf(i8 signext %0, i32 %1, double* %2, i32 %3, i32* %4) {
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %6
store i32 %1, i32* %7
store i32 %3, i32* %8
%9 = call i32 @dpotrf_(i8* %6, i32* %7, double* %2, i32* %8, i32* %4)
ret void
}
const char *SCIPgetBuildFlags(void) {
  return " ARCH=Windows-10.0.16299_AMD64\n COMP=MSVC 19.13.26129.0\n "
         "BUILD=Release\n";
}


x86 assembly (clang, -O0):
<SCIPgetBuildFlags>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SCIPgetBuildFlags>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [72 x i8] c" ARCH=Windows-10.0.16299_AMD64\0A COMP=MSVC 19.13.26129.0\0A BUILD=Release\0A\00"
define i8* @SCIPgetBuildFlags() {
ret i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [72 x i8] c" ARCH=Windows-10.0.16299_AMD64\0A COMP=MSVC 19.13.26129.0\0A BUILD=Release\0A\00"
define i8* @SCIPgetBuildFlags() {
ret i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ cafudda();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ usleep(int);
void quitproc(int Sig) {
  cafudda();
  usleep(500000);
  fprintf(stderr, "\n");
  fflush(stdin);
  fflush(stdout);
  fclose(stdout);
  exit(1);
}


x86 assembly (clang, -O0):
<quitproc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <cafudda@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
lea    0xe74(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    0x2e2a(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<quitproc>:
push   %rbx
xor    %eax,%eax
call   1040 <cafudda@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
lea    0xe7e(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    0x2e34(%rip),%rbx
mov    (%rbx),%edi
call   1060 <fflush@plt>
mov    (%rbx),%edi
call   1030 <fclose@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
@stdin = global i32 0
@stdout = global i32 0
define void @quitproc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @cafudda()
%4 = call i32 @usleep(i32 500000)
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stdin
%8 = call i32 @fflush(i32 %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fflush(i32 %9)
%11 = load i32, i32* @stdout
%12 = call i32 @fclose(i32 %11)
%13 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
@stdin = global i32 0
@stdout = global i32 0
define void @quitproc(i32 %0) {
%2 = tail call i32 (...) @cafudda()
%3 = tail call i32 @usleep(i32 500000)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = tail call i32 @fflush(i32 %6)
%8 = load i32, i32* @stdout
%9 = tail call i32 @fflush(i32 %8)
%10 = load i32, i32* @stdout
%11 = tail call i32 @fclose(i32 %10)
%12 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
scalar_t__ strcmp(int /*<<< orphan*/, char *);
int filterdots(const struct dirent *d) {
  return (!(strcmp((d->d_name), (".")) == 0) &&
          !(strcmp((d->d_name), ("..")) == 0));
}


x86 assembly (clang, -O0):
<filterdots>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     115e <filterdots+0x4e>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filterdots>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
lea    0xee4(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1142 <filterdots+0x32>
mov    (%rbx),%edi
lea    0xed0(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
@.str = [2 x i8] c".\00"
@.str.1 = [3 x i8] c"..\00"
define i32 @filterdots(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i64 @strcmp(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %15, label %8
8: ; preds = %1
%9 = load %struct.dirent*, %struct.dirent** %2
%10 = getelementptr inbounds %struct.dirent, %struct.dirent* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @strcmp(i32 %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
%14 = xor i1 %13, true
br label %15
15: ; preds = %8, %1
%16 = phi i1 [ false, %1 ], [ %14, %8 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
@.str = [2 x i8] c".\00"
@.str.1 = [3 x i8] c"..\00"
define i32 @filterdots(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i64 @strcmp(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = tail call i64 @strcmp(i32 %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %6, %1
%12 = phi i32 [ 0, %1 ], [ %10, %6 ]
ret i32 %12
}