xunge/DecIR huggingface dataset:
char *ArchInfo_getArchStr(void) { return "amd64"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"amd64\00"
define i8* @ArchInfo_getArchStr() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"amd64\00"
define i8* @ArchInfo_getArchStr() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
int test_imm_D5uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xD5 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D5uint64_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, 213
%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_D5uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 914828034048
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ process(int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, b;
  printf("a = ");
  scanf("%d", &a);
  printf("b = ");
  scanf("%d", &b);
  process(a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
lea    0xe97(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <process@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xebd(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1040 <process@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"a = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"b = \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = call i32 @process(i32 %9, i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ printf(char *, char const *, char const *);
int /*<<< orphan*/ shutdown();
void die(const char *fname, const char *msg) {
  if (msg == NULL)
    perror(fname);
  else
    printf("%s: %s\n", fname, msg);
  shutdown();
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1159 <die+0x29>
mov    -0x8(%rbp),%rdi
call   1050 <perror@plt>
jmp    116d <die+0x3d>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <shutdown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
test   %rdx,%rdx
je     1150 <die+0x20>
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <shutdown@plt>
mov    %rsi,%rdi
call   1050 <perror@plt>
jmp    1148 <die+0x18>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
define void @die(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @perror(i8* %0)
br label %8
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 (...) @shutdown()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Gamma_Fire3(int value) {
  if (value) {
    cpc_key_press(0x76);
  } else {
    cpc_key_unpress(0x76);
  };
}


x86 assembly (clang, -O0):
<Joy_Gamma_Fire3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <Joy_Gamma_Fire3+0x24>
mov    $0x76,%edi
call   1030 <cpc_key_press@plt>
jmp    114e <Joy_Gamma_Fire3+0x2e>
mov    $0x76,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Gamma_Fire3>:
test   %edi,%edi
je     112e <Joy_Gamma_Fire3+0xe>
mov    $0x76,%edi
jmp    1030 <cpc_key_press@plt>
mov    $0x76,%edi
jmp    1040 <cpc_key_unpress@plt>

LLVM IR (-O0):
define void @Joy_Gamma_Fire3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @cpc_key_press(i32 118)
br label %9
7: ; preds = %1
%8 = call i32 @cpc_key_unpress(i32 118)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @Joy_Gamma_Fire3(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 118)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 118)
br label %7
7: ; preds = %5, %3
ret void
}
cant(name) char *name;
{
  std_err("mv: can't move ");
  std_err(name);
  std_err("\n");
  exit(1);
}


x86 assembly (clang, -O0):
<cant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <std_err@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <std_err@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1040 <std_err@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<cant>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <std_err@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <std_err@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1040 <std_err@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"mv: can't move \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @cant(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %4)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@.str = [16 x i8] c"mv: can't move \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @cant(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
tail call void @exit(i32 1)
unreachable
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_uint32_t(uint32_t const k1,
                                          uint32_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_LESS_THAN_uint32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_LESS_THAN_uint32_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_uint32_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_uint32_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int pm8xxx_mpp_cfg(unsigned int, int /*<<< orphan*/, unsigned int,
                   unsigned int);
int pm8xxx_mpp_config_digital_in(unsigned mpp, unsigned level,
                                 unsigned control) {
  return pm8xxx_mpp_cfg(mpp, 0, level, control);
}


x86 assembly (clang, -O0):
<pm8xxx_mpp_config_digital_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %esi,%esi
call   1030 <pm8xxx_mpp_cfg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm8xxx_mpp_config_digital_in>:
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <pm8xxx_mpp_cfg@plt>

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

LLVM IR (-O2):
define i32 @pm8xxx_mpp_config_digital_in(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pm8xxx_mpp_cfg(i32 %0, i32 0, i32 %1, i32 %2)
ret i32 %4
}
void fd180(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  p02B:
    goto p02B;
    goto a;
  a : {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


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

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

LLVM IR (-O0):
define void @fd180(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd180(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void proc_quit() { exit(0); }


x86 assembly (clang, -O0):
<proc_quit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<proc_quit>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @proc_quit() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int fls64(int /*<<< orphan*/);
__attribute__((const)) int __ilog2_u64(uint64_t n) { return fls64(n) - 1; }


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

x86 assembly (clang, -O2):
<__ilog2_u64>:
push   %rax
call   1030 <fls64@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__ilog2_u64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @fls64(i32 %3)
%5 = sub nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @__ilog2_u64(i32 %0) {
%2 = tail call i32 @fls64(i32 %0)
%3 = add nsw i32 %2, -1
ret i32 %3
}
/* Variables and functions */
long double expm1(double);
long double expm1l(long double x) { return expm1((double)x); }


x86 assembly (clang, -O0):
<expm1l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <expm1@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expm1l>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <expm1@plt>

LLVM IR (-O0):
define x86_fp80 @expm1l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call x86_fp80 @expm1(double %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @expm1l(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @expm1(double %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int iscntrl(int);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int ls_iscntrl(int c) {
  int ret;
  setlocale(LC_ALL, "");
  ret = iscntrl(c);
  setlocale(LC_ALL, "C");
  return ret;
}


x86 assembly (clang, -O0):
<ls_iscntrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x4(%rbp),%edi
call   1030 <iscntrl@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_iscntrl>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eb3(%rip),%r14
mov    (%r14),%edi
lea    0xeca(%rip),%rsi
call   1040 <setlocale@plt>
mov    %ebx,%edi
call   1030 <iscntrl@plt>
mov    %eax,%ebx
mov    (%r14),%edi
lea    0xeb1(%rip),%rsi
call   1040 <setlocale@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"C\00"
define i32 @ls_iscntrl(i32 %0) {
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @iscntrl(i32 %0)
%5 = load i32, i32* @LC_ALL
%6 = tail call i32 @setlocale(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %4
}
/* Variables and functions */
scalar_t__ islower(char);
scalar_t__ isupper(char);
char tolower(char);
char toupper(char);
char swapcase(char c) {
  if (isupper(c))
    return tolower(c);
  if (islower(c))
    return toupper(c);
  return c;
}


x86 assembly (clang, -O0):
<swapcase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1060 <isupper@plt>
cmp    $0x0,%rax
je     1172 <swapcase+0x32>
movsbl -0x2(%rbp),%edi
call   1050 <tolower@plt>
mov    %al,-0x1(%rbp)
jmp    119c <swapcase+0x5c>
movsbl -0x2(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1196 <swapcase+0x56>
movsbl -0x2(%rbp),%edi
call   1040 <toupper@plt>
mov    %al,-0x1(%rbp)
jmp    119c <swapcase+0x5c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapcase>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1060 <isupper@plt>
test   %rax,%rax
je     115d <swapcase+0x1d>
movsbl %bl,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <tolower@plt>
movsbl %bl,%ebp
mov    %ebp,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1179 <swapcase+0x39>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <toupper@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define signext i8 @swapcase(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isupper(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8, i8* %3
%9 = call signext i8 @tolower(i8 signext %8)
store i8 %9, i8* %2
br label %19
10: ; preds = %1
%11 = load i8, i8* %3
%12 = call i64 @islower(i8 signext %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i8, i8* %3
%16 = call signext i8 @toupper(i8 signext %15)
store i8 %16, i8* %2
br label %19
17: ; preds = %10
%18 = load i8, i8* %3
store i8 %18, i8* %2
br label %19
19: ; preds = %17, %14, %7
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @swapcase(i8 signext %0) {
%2 = tail call i64 @isupper(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call signext i8 @tolower(i8 signext %0)
br label %11
6: ; preds = %1
%7 = tail call i64 @islower(i8 signext %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call signext i8 @toupper(i8 signext %0)
br label %11
11: ; preds = %6, %9, %4
%12 = phi i8 [ %5, %4 ], [ %10, %9 ], [ %0, %6 ]
ret i8 %12
}
int __tprintf_flush_skip(char *buf, int i) {
  int val = buf[i];
  if (val == ' ' || val == ',')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<__tprintf_flush_skip>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x20,-0x18(%rbp)
je     112e <__tprintf_flush_skip+0x2e>
cmpl   $0x2c,-0x18(%rbp)
jne    113a <__tprintf_flush_skip+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1141 <__tprintf_flush_skip+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__tprintf_flush_skip>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%al
cmp    $0x2c,%al
sete   %cl
cmp    $0x20,%al
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @__tprintf_flush_skip(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 44
%7 = icmp eq i8 %5, 32
%8 = or i1 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x33() {
  Assert_real((isalpha(51) == 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_isalpha.c",
              260, ("isalpha should be 0 for 3"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x33>:
push   %rax
mov    $0x33,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x104,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 3\00"
define void @t_isalpha_0x33() {
%1 = call i64 @isalpha(i32 51)
%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 260, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 3\00"
define void @t_isalpha_0x33() {
%1 = tail call i64 @isalpha(i32 51)
%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 260, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct struct_parts {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ scan(char *, struct struct_parts *);
int urlp_parse(char *url, struct struct_parts *uobj) {
  scan(url, uobj);
  return 0;
}


x86 assembly (clang, -O0):
<urlp_parse>:
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 <scan@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.struct_parts = type { i32 }
define i32 @urlp_parse(i8* %0, %struct.struct_parts* %1) {
%3 = alloca i8*
%4 = alloca %struct.struct_parts*
store i8* %0, i8** %3
store %struct.struct_parts* %1, %struct.struct_parts** %4
%5 = load i8*, i8** %3
%6 = load %struct.struct_parts*, %struct.struct_parts** %4
%7 = call i32 @scan(i8* %5, %struct.struct_parts* %6)
ret i32 0
}

LLVM IR (-O2):
%struct.struct_parts = type { i32 }
define i32 @urlp_parse(i8* %0, %struct.struct_parts* %1) {
%3 = tail call i32 @scan(i8* %0, %struct.struct_parts* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pciconfig_read(unsigned char, unsigned char, unsigned int,
                                  int, unsigned long *);
long pci_config_read_word(unsigned char bus, unsigned char dev, int func,
                          unsigned cmd) {
  unsigned long retval;
  pciconfig_read(bus, dev << 3, cmd, 2, &retval);
  return retval;
}


x86 assembly (clang, -O0):
<pci_config_read_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %edx,-0x8(%rbp)
mov    %ecx,-0xc(%rbp)
mov    -0x1(%rbp),%sil
movzbl -0x2(%rbp),%eax
shl    $0x3,%eax
mov    -0xc(%rbp),%edx
mov    $0x2,%ecx
lea    -0x18(%rbp),%r8
movzbl %sil,%edi
movzbl %al,%esi
call   1030 <pciconfig_read@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pci_config_read_word>:
push   %rax
shl    $0x3,%sil
movzbl %sil,%esi
mov    %rsp,%r8
mov    %ecx,%edx
mov    $0x2,%ecx
call   1030 <pciconfig_read@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @pci_config_read_word(i8 zeroext %0, i8 zeroext %1, i32 %2, i32 %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
store i8 %0, i8* %5
store i8 %1, i8* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i8, i8* %5
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 3
%14 = trunc i32 %13 to i8
%15 = load i32, i32* %8
%16 = call i32 @pciconfig_read(i8 zeroext %10, i8 zeroext %14, i32 %15, i32 2, i64* %9)
%17 = load i64, i64* %9
ret i64 %17
}

LLVM IR (-O2):
define i64 @pci_config_read_word(i8 zeroext %0, i8 zeroext %1, i32 %2, i32 %3) {
%5 = alloca i64
%6 = bitcast i64* %5 to i8*
%7 = shl i8 %1, 3
%8 = call i32 @pciconfig_read(i8 zeroext %0, i8 zeroext %7, i32 %3, i32 2, i64* %5)
%9 = load i64, i64* %5
ret i64 %9
}
/* Variables and functions */
scalar_t__ doubleToRawLongBits(double);
__attribute__((always_)) const int xisnegzero(double x) {
  return doubleToRawLongBits(x) == doubleToRawLongBits(-0.0);
}


x86 assembly (clang, -O0):
<xisnegzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <doubleToRawLongBits@plt>
mov    %rax,-0x10(%rbp)
movsd  0xecd(%rip),%xmm0
call   1030 <doubleToRawLongBits@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisnegzero>:
push   %rbx
call   1030 <doubleToRawLongBits@plt>
mov    %rax,%rbx
movsd  0xedf(%rip),%xmm0
call   1030 <doubleToRawLongBits@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @xisnegzero(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @doubleToRawLongBits(double %3)
%5 = call i64 @doubleToRawLongBits(double -0.000000e+00)
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @xisnegzero(double %0) {
%2 = tail call i64 @doubleToRawLongBits(double %0)
%3 = tail call i64 @doubleToRawLongBits(double -0.000000e+00)
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int mi_atoi(char *StringToInteger) {
  unsigned int v = 0;
  for (;;) {
    int c = *StringToInteger++ - '0';
    if (c < 0 || c > 9)
      break;
    v *= 10;
    v += c;
  }
  return (int)v;
}


x86 assembly (clang, -O0):
<mi_atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
sub    $0x30,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     113b <mi_atoi+0x3b>
cmpl   $0x9,-0x10(%rbp)
jle    1140 <mi_atoi+0x40>
jmp    1155 <mi_atoi+0x55>
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <mi_atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mi_atoi>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,%eax
movsbl (%rdi),%ecx
add    $0x1,%rdi
lea    -0x3a(%rcx),%edx
lea    (%rax,%rax,4),%esi
lea    (%rcx,%rsi,2),%ecx
add    $0xffffffd0,%ecx
cmp    $0xf5,%dl
ja     1110 <mi_atoi+0x10>
ret

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

LLVM IR (-O2):
define i32 @mi_atoi(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %12, %2 ]
%4 = phi i8* [ %0, %1 ], [ %5, %2 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = add i8 %6, -58
%8 = icmp ult i8 %7, -10
%9 = sext i8 %6 to i32
%10 = mul i32 %3, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
br i1 %8, label %13, label %2
13: ; preds = %2
ret i32 %3
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void FPUNaNModeSet(uint32_t ui32Mode) {
  (*((volatile unsigned long *)(0xE000EF3C))) =
      ((*((volatile unsigned long *)(0xE000EF3C))) & ~(0x02000000)) | ui32Mode;
}


x86 assembly (clang, -O0):
<FPUNaNModeSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0xe000ef3c,%eax
mov    (%rax),%rcx
and    $0xfffffffffdffffff,%rcx
mov    -0x8(%rbp),%rax
or     %rax,%rcx
mov    $0xe000ef3c,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FPUNaNModeSet>:
mov    %rdi,-0x8(%rsp)
mov    $0xe000ef3c,%eax
mov    $0xfffffffffdffffff,%rcx
and    (%rax),%rcx
or     -0x8(%rsp),%rcx
mov    %rcx,(%rax)
ret

LLVM IR (-O0):
define void @FPUNaNModeSet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 3758157628 to i64*)
%4 = and i64 %3, -33554433
%5 = load volatile i64, i64* %2
%6 = or i64 %4, %5
store volatile i64 %6, i64* inttoptr (i64 3758157628 to i64*)
ret void
}

LLVM IR (-O2):
define void @FPUNaNModeSet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 3758157628 to i64*)
%4 = and i64 %3, -33554433
%5 = load volatile i64, i64* %2
%6 = or i64 %4, %5
store volatile i64 %6, i64* inttoptr (i64 3758157628 to i64*)
ret void
}
/* Variables and functions */
int strlen(char const *);
int unsigned hash(const char *s) {
  int unsigned h = 0;
  for (int i = 0; i < strlen(s); i++) {
    h = (h * 3 + s[i]) % 1024;
  }
  return h;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jge    116e <hash+0x5e>
imul   $0x3,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
and    $0x3ff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112a <hash+0x1a>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1155 <hash+0x45>
xor    %r15d,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
lea    (%rbx,%rbx,2),%eax
movsbl (%r14,%r15,1),%ebx
add    %eax,%ebx
and    $0x3ff,%ebx
add    $0x1,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%r15
jl     1130 <hash+0x20>
jmp    1157 <hash+0x47>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @hash(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %6, %1
%5 = phi i32 [ 0, %1 ], [ %14, %6 ]
ret i32 %5
6: ; preds = %1, %6
%7 = phi i64 [ %15, %6 ], [ 0, %1 ]
%8 = phi i32 [ %14, %6 ], [ 0, %1 ]
%9 = mul nuw nsw i32 %8, 3
%10 = getelementptr inbounds i8, i8* %0, i64 %7
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = add nsw i32 %9, %12
%14 = and i32 %13, 1023
%15 = add nuw nsw i64 %7, 1
%16 = tail call i32 @strlen(i8* %0)
%17 = sext i32 %16 to i64
%18 = icmp slt i64 %15, %17
br i1 %18, label %6, label %4
}
/* Type definitions */
struct node_operations {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
void looking_enter(void *node, void *object, struct node_operations *ops) {
  printf("looking_enter %p\n", node);
}


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

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

LLVM IR (-O0):
%struct.node_operations = type { i32 }
@.str = [18 x i8] c"looking_enter %p\0A\00"
define void @looking_enter(i8* %0, i8* %1, %struct.node_operations* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.node_operations*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.node_operations* %2, %struct.node_operations** %6
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
%struct.node_operations = type { i32 }
@.str = [18 x i8] c"looking_enter %p\0A\00"
define void @looking_enter(i8* %0, i8* nocapture readnone %1, %struct.node_operations* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int varname_cmp(const char *n1, const char *n2) { return strcmp(n1, n2); }


x86 assembly (clang, -O0):
<varname_cmp>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<varname_cmp>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @varname_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void dt_device_parm_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @dt_device_parm_setup() {
ret void
}
__attribute__((always_)) void destroy_timer_on_stack(struct timer_list *timer) {
}


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

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

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

LLVM IR (-O2):
%struct.timer_list = type opaque
define void @destroy_timer_on_stack(%struct.timer_list* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IF_execFct(char *);
int /*<<< orphan*/ free(void *);
char *getString();
int /*<<< orphan*/ messErr(int);
int /*<<< orphan*/ printf(char *, char *);
void IF_execCS(void) {
  char *f;
  f = getString();
  if (f != NULL) {
    if (!IF_execFct(f)) {
      printf("%s - ", f);
      messErr(21);
    }
    free((void *)f);
  }
}


x86 assembly (clang, -O0):
<IF_execCS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getString@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11a3 <IF_execCS+0x53>
mov    -0x8(%rbp),%rdi
call   1050 <IF_execFct@plt>
cmp    $0x0,%eax
jne    119a <IF_execCS+0x4a>
mov    -0x8(%rbp),%rsi
lea    0xe75(%rip),%rdi
call   1070 <printf@plt>
mov    $0x15,%edi
call   1060 <messErr@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_execCS>:
push   %rbx
xor    %eax,%eax
call   1030 <getString@plt>
test   %rax,%rax
je     118e <IF_execCS+0x3e>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <IF_execFct@plt>
test   %eax,%eax
jne    1185 <IF_execCS+0x35>
lea    0xe8d(%rip),%rdi
mov    %rbx,%rsi
call   1070 <printf@plt>
mov    $0x15,%edi
call   1060 <messErr@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s - \00"
define void @IF_execCS() {
%1 = alloca i8*
%2 = call i8* (...) @getString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %16
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = call i32 @IF_execFct(i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = load i8*, i8** %1
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 @messErr(i32 21)
br label %13
13: ; preds = %9, %5
%14 = load i8*, i8** %1
%15 = call i32 @free(i8* %14)
br label %16
16: ; preds = %13, %0
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s - \00"
define void @IF_execCS() {
%1 = tail call i8* (...) @getString()
%2 = icmp eq i8* %1, null
br i1 %2, label %11, label %3
3: ; preds = %0
%4 = tail call i32 @IF_execFct(i8* %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = tail call i32 @messErr(i32 21)
br label %9
9: ; preds = %6, %3
%10 = tail call i32 @free(i8* %1)
br label %11
11: ; preds = %9, %0
ret void
}
/* Type definitions */
struct libjte_env {
  int dummy;
};

/* Variables and functions */
int jte_add_exclude(struct libjte_env *, char *);
int libjte_add_exclude(struct libjte_env *o, char *pattern) {
  int ret;
  ret = jte_add_exclude(o, pattern);
  return !ret;
}


x86 assembly (clang, -O0):
<libjte_add_exclude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <jte_add_exclude@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libjte_add_exclude>:
push   %rax
call   1030 <jte_add_exclude@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.libjte_env = type { i32 }
define i32 @libjte_add_exclude(%struct.libjte_env* %0, i8* %1) {
%3 = alloca %struct.libjte_env*
%4 = alloca i8*
%5 = alloca i32
store %struct.libjte_env* %0, %struct.libjte_env** %3
store i8* %1, i8** %4
%6 = load %struct.libjte_env*, %struct.libjte_env** %3
%7 = load i8*, i8** %4
%8 = call i32 @jte_add_exclude(%struct.libjte_env* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.libjte_env = type { i32 }
define i32 @libjte_add_exclude(%struct.libjte_env* %0, i8* %1) {
%3 = tail call i32 @jte_add_exclude(%struct.libjte_env* %0, i8* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef double int_least32_t;

/* Variables and functions */
double c5(float x, int_least32_t y, int z) { return z ? x + x : y; }


x86 assembly (clang, -O0):
<c5>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1133 <c5+0x33>
movss  -0x4(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    113d <c5+0x3d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<c5>:
test   %edi,%edi
je     110f <c5+0xf>
addss  %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @c5(float %0, double %1, i32 %2) {
%4 = alloca float
%5 = alloca double
%6 = alloca i32
store float %0, float* %4
store double %1, double* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load float, float* %4
%11 = load float, float* %4
%12 = fadd float %10, %11
%13 = fpext float %12 to double
br label %16
14: ; preds = %3
%15 = load double, double* %5
br label %16
16: ; preds = %14, %9
%17 = phi double [ %13, %9 ], [ %15, %14 ]
ret double %17
}

LLVM IR (-O2):
define double @c5(float %0, double %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = fadd float %0, %0
%6 = fpext float %5 to double
%7 = select i1 %4, double %1, double %6
ret double %7
}
char *mgmtPassword() { return "pass"; }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"pass\00"
define i8* @mgmtPassword() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"pass\00"
define i8* @mgmtPassword() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ prune_arrblk_ne_CAT(int *);
void call_prune_arrblk_ne_Ok() {
  int *x = (int *)malloc(sizeof(int) * 10);
  prune_arrblk_ne_CAT(x);
}


x86 assembly (clang, -O0):
<call_prune_arrblk_ne_Ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <prune_arrblk_ne_CAT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_prune_arrblk_ne_Ok>:
push   %rax
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <prune_arrblk_ne_CAT@plt>

LLVM IR (-O0):
define void @call_prune_arrblk_ne_Ok() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 40)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @prune_arrblk_ne_CAT(i32* %4)
ret void
}

LLVM IR (-O2):
define void @call_prune_arrblk_ne_Ok() {
%1 = tail call i64 @malloc(i32 40)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @prune_arrblk_ne_CAT(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _in_range(char const, int, int);
char const *_is_digit(char const *la) {
  if (!_in_range(*la, 0x30, 0x39))
    return NULL;
  return la + 1;
}


x86 assembly (clang, -O0):
<_is_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x30,%esi
mov    $0x39,%edx
movsbl (%rax),%edi
call   1030 <_in_range@plt>
cmp    $0x0,%eax
jne    1148 <_is_digit+0x38>
movq   $0x0,-0x8(%rbp)
jmp    1154 <_is_digit+0x44>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_digit>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
mov    $0x30,%esi
mov    $0x39,%edx
call   1030 <_in_range@plt>
add    $0x1,%rbx
xor    %ecx,%ecx
test   %eax,%eax
cmovne %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_is_digit(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = call i32 @_in_range(i8 signext %5, i32 48, i32 57)
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %1
store i8* null, i8** %2
br label %12
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %11, i8** %2
br label %12
12: ; preds = %9, %8
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
define i8* @_is_digit(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @_in_range(i8 signext %2, i32 48, i32 57)
%4 = icmp eq i32 %3, 0
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = select i1 %4, i8* null, i8* %5
ret i8* %6
}
/* Variables and functions */
float expf(float);
float TH_sigmoidf(float value) { return 1.0f / (1.0f + expf(-value)); }


x86 assembly (clang, -O0):
<TH_sigmoidf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <expf@plt>
movss  0xec4(%rip),%xmm1
addss  %xmm0,%xmm1
movss  0xeb8(%rip),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TH_sigmoidf>:
push   %rax
xorps  0xee8(%rip),%xmm0
call   1030 <expf@plt>
movss  0xeeb(%rip),%xmm1
addss  %xmm1,%xmm0
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @TH_sigmoidf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fneg float %3
%5 = call float @expf(float %4)
%6 = fadd float 1.000000e+00, %5
%7 = fdiv float 1.000000e+00, %6
ret float %7
}

LLVM IR (-O2):
define float @TH_sigmoidf(float %0) {
%2 = fneg float %0
%3 = tail call float @expf(float %2)
%4 = fadd float %3, 1.000000e+00
%5 = fdiv float 1.000000e+00, %4
ret float %5
}