xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __cpu_to_le32(int /*<<< orphan*/);
void set32_le(uint32_t *p, uint32_t n) { *p = __cpu_to_le32(n); }


x86 assembly (clang, -O0):
<set32_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <__cpu_to_le32@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set32_le>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <__cpu_to_le32@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @set32_le(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @__cpu_to_le32(i32 %1)
store i32 %3, i32* %0
ret void
}
void fa50(int n) {
  {
    int b[n];
    {
      int c[n];
    a:
      goto a;
      0;
    }
    {
      int d[n];
      0;
    };
    int e[n];
    0;
  };
  {
    int f[n];
    {
      int g[n];
      0;
    };
    {
      int h[n];
      0;
    };
    ;
    int i[n];
    0;
  };
  ;
  int j[n];
  0;
}


x86 assembly (clang, -O0):
<fa50>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
jmp    112a <fa50+0x2a>

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

LLVM IR (-O0):
define void @fa50(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8*
%18 = alloca i64
store i32 %0, i32* %2
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %3
%22 = alloca i32, i64 %20
store i64 %20, i64* %4
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
%25 = call i8* @llvm.stacksave()
store i8* %25, i8** %5
%26 = alloca i32, i64 %24
store i64 %24, i64* %6
br label %27
27: ; preds = %27, %1
br label %27
28: ; No predecessors!
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
%31 = call i8* @llvm.stacksave()
store i8* %31, i8** %7
%32 = alloca i32, i64 %30
store i64 %30, i64* %8
%33 = load i8*, i8** %7
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
%36 = alloca i32, i64 %35
store i64 %35, i64* %9
%37 = load i8*, i8** %3
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
%40 = call i8* @llvm.stacksave()
store i8* %40, i8** %10
%41 = alloca i32, i64 %39
store i64 %39, i64* %11
%42 = load i32, i32* %2
%43 = zext i32 %42 to i64
%44 = call i8* @llvm.stacksave()
store i8* %44, i8** %12
%45 = alloca i32, i64 %43
store i64 %43, i64* %13
%46 = load i8*, i8** %12
%47 = load i32, i32* %2
%48 = zext i32 %47 to i64
%49 = call i8* @llvm.stacksave()
store i8* %49, i8** %14
%50 = alloca i32, i64 %48
store i64 %48, i64* %15
%51 = load i8*, i8** %14
%52 = load i32, i32* %2
%53 = zext i32 %52 to i64
%54 = alloca i32, i64 %53
store i64 %53, i64* %16
%55 = load i8*, i8** %10
%56 = load i32, i32* %2
%57 = zext i32 %56 to i64
%58 = call i8* @llvm.stacksave()
store i8* %58, i8** %17
%59 = alloca i32, i64 %57
store i64 %57, i64* %18
%60 = load i8*, i8** %17
ret void
}

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


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

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

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

LLVM IR (-O2):
define void @RTBase64Decode() {
ret void
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local2;
  unsigned int local1;
  {
    state[0UL] = (input[0UL] | 51238316UL) >> 3U;
    local1 = 0UL;
    while (local1 < 1UL) {
      local2 = 0UL;
      while (local2 < 1UL) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] | 458711886UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
or     $0x30dd5ac,%rax
shr    $0x3,%rax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    $0x1,%rax
jae    1165 <RandomFunc+0x65>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    $0x1,%rax
jae    1156 <RandomFunc+0x56>
mov    -0x18(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x18(%rbp)
jmp    113a <RandomFunc+0x3a>
mov    -0x1c(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x1c(%rbp)
jmp    1126 <RandomFunc+0x26>
mov    -0x14(%rbp),%eax
or     $0x1b57634e,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%eax
shr    $0x3,%eax
or     $0x1b77fbff,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = zext i32 %10 to i64
%12 = or i64 %11, 51238316
%13 = lshr i64 %12, 3
%14 = trunc i64 %13 to i32
%15 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %14, i32* %15
store i32 0, i32* %7
br label %16
16: ; preds = %30, %2
%17 = load i32, i32* %7
%18 = zext i32 %17 to i64
%19 = icmp ult i64 %18, 1
br i1 %19, label %20, label %35
20: ; preds = %16
store i32 0, i32* %6
br label %21
21: ; preds = %25, %20
%22 = load i32, i32* %6
%23 = zext i32 %22 to i64
%24 = icmp ult i64 %23, 1
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i32, i32* %6
%27 = zext i32 %26 to i64
%28 = add i64 %27, 2
%29 = trunc i64 %28 to i32
store i32 %29, i32* %6
br label %21
30: ; preds = %21
%31 = load i32, i32* %7
%32 = zext i32 %31 to i64
%33 = add i64 %32, 2
%34 = trunc i64 %33 to i32
store i32 %34, i32* %7
br label %16
35: ; preds = %16
%36 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%37 = load i32, i32* %36
%38 = zext i32 %37 to i64
%39 = or i64 %38, 458711886
%40 = trunc i64 %39 to i32
%41 = load i32*, i32** %4
%42 = getelementptr inbounds i32, i32* %41, i64 0
store i32 %40, i32* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = lshr i32 %3, 3
%5 = or i32 %4, 460848127
store i32 %5, i32* %1
ret void
}
/* Variables and functions */
void free(void *);
void os_free(void *ptr) { return free(ptr); }


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

x86 assembly (clang, -O2):
<os_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @os_free(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ A;

/* Variables and functions */
int /*<<< orphan*/ parse_expression(char *);
int main(void) {
  char A[9];
  unsigned long __cil_tmp2;
  unsigned long __cil_tmp3;
  unsigned long __cil_tmp4;
  unsigned long __cil_tmp5;
  char *__cil_tmp6;
  {
    {
      __cil_tmp2 = 8 * 1UL;
      __cil_tmp3 = (unsigned long)(A) + __cil_tmp2;
      *((char *)__cil_tmp3) = (char)0;
      __cil_tmp4 = 0 * 1UL;
      __cil_tmp5 = (unsigned long)(A) + __cil_tmp4;
      __cil_tmp6 = (char *)__cil_tmp5;
      parse_expression(__cil_tmp6);
    }
    return (0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x8,-0x18(%rbp)
lea    -0xd(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
movq   $0x0,-0x28(%rbp)
lea    -0xd(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <parse_expression@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x0,0x17(%rsp)
lea    0xf(%rsp),%rdi
call   1030 <parse_expression@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
store i32 0, i32* %1
store i64 8, i64* %3
%8 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%9 = ptrtoint i8* %8 to i64
%10 = load i64, i64* %3
%11 = add i64 %9, %10
store i64 %11, i64* %4
%12 = load i64, i64* %4
%13 = inttoptr i64 %12 to i8*
store i8 0, i8* %13
store i64 0, i64* %5
%14 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%15 = ptrtoint i8* %14 to i64
%16 = load i64, i64* %5
%17 = add i64 %15, %16
store i64 %17, i64* %6
%18 = load i64, i64* %6
%19 = inttoptr i64 %18 to i8*
store i8* %19, i8** %7
%20 = load i8*, i8** %7
%21 = call i32 @parse_expression(i8* %20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [9 x i8]
%2 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%3 = ptrtoint [9 x i8]* %1 to i64
%4 = add i64 %3, 8
%5 = inttoptr i64 %4 to i8*
store i8 0, i8* %5
%6 = call i32 @parse_expression(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ delay();
int /*<<< orphan*/ write_l(int, int);
void entrypoint(void) {
  while (1) {
    write_l(0xb0010548, (1 << 15));
    delay();
    write_l(0xb0010544, (1 << 15));
    delay();
  }
}


x86 assembly (clang, -O0):
<entrypoint>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <entrypoint+0x9>
mov    $0xb0010548,%edi
mov    $0x8000,%esi
call   1040 <write_l@plt>
mov    $0x0,%al
call   1030 <delay@plt>
mov    $0xb0010544,%edi
mov    $0x8000,%esi
call   1040 <write_l@plt>
mov    $0x0,%al
call   1030 <delay@plt>
jmp    1129 <entrypoint+0x9>

x86 assembly (clang, -O2):
<entrypoint>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xb0010548,%edi
mov    $0x8000,%esi
call   1040 <write_l@plt>
xor    %eax,%eax
call   1030 <delay@plt>
mov    $0xb0010544,%edi
mov    $0x8000,%esi
call   1040 <write_l@plt>
xor    %eax,%eax
call   1030 <delay@plt>
jmp    1130 <entrypoint+0x10>

LLVM IR (-O0):
define void @entrypoint() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @write_l(i32 -1342110392, i32 32768)
%3 = call i32 (...) @delay()
%4 = call i32 @write_l(i32 -1342110396, i32 32768)
%5 = call i32 (...) @delay()
br label %1
}

LLVM IR (-O2):
define void @entrypoint() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @write_l(i32 -1342110392, i32 32768)
%3 = tail call i32 (...) @delay()
%4 = tail call i32 @write_l(i32 -1342110396, i32 32768)
%5 = tail call i32 (...) @delay()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ restart(int);
void RST_10() { restart(0x10); }


x86 assembly (clang, -O0):
<RST_10>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%edi
call   1030 <restart@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RST_10>:
mov    $0x10,%edi
jmp    1030 <restart@plt>

LLVM IR (-O0):
define void @RST_10() {
%1 = call i32 @restart(i32 16)
ret void
}

LLVM IR (-O2):
define void @RST_10() {
%1 = tail call i32 @restart(i32 16)
ret void
}
int AtEoIT() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @AtEoIT() {
ret i32 0
}
/* Variables and functions */
long long truncf(float);
void trunc_l_s(float *source, long long *dest) { *dest = truncf(*source); }


x86 assembly (clang, -O0):
<trunc_l_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <truncf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trunc_l_s>:
push   %rbx
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <truncf@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @trunc_l_s(float* %0, i64* %1) {
%3 = alloca float*
%4 = alloca i64*
store float* %0, float** %3
store i64* %1, i64** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = call i64 @truncf(float %6)
%8 = load i64*, i64** %4
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @trunc_l_s(float* nocapture %0, i64* nocapture writeonly %1) {
%3 = load float, float* %0
%4 = tail call i64 @truncf(float %3)
store i64 %4, i64* %1
ret void
}
int example(int a, int b) { return a + b; }


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

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

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

LLVM IR (-O2):
define i32 @example(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int int8_t;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int snprintf(char *, int, char *, int /*<<< orphan*/);
int strlen(char *);
int8_t uint64t_strlen(uint64_t i) {
  char buf[20 + 1];
  int retval = snprintf(buf, sizeof(buf), "%llu", i);
  if (retval < 0)
    return -1;
  int8_t len = strlen(buf);
  return len;
}


x86 assembly (clang, -O0):
<uint64t_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%ecx
mov    $0x15,%esi
lea    0xec2(%rip),%rdx
call   1040 <snprintf@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    115c <uint64t_strlen+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <uint64t_strlen+0x4e>
lea    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint64t_strlen>:
sub    $0x18,%rsp
mov    %edi,%ecx
lea    0xed3(%rip),%rdx
mov    %rsp,%rdi
mov    $0x15,%esi
call   1040 <snprintf@plt>
test   %eax,%eax
js     114b <uint64t_strlen+0x2b>
mov    %rsp,%rdi
call   1030 <strlen@plt>
add    $0x18,%rsp
ret
mov    $0xffffffff,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
define i32 @uint64t_strlen(i32 %0) {
%2 = alloca [21 x i8]
%3 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = icmp slt i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @strlen(i8* %3)
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ %7, %6 ], [ -1, %1 ]
ret i32 %9
}
void swap(int *x, int *y) {
  int tmp = *x;
  if (*x % 2 == 1) {
    *y = *y + 1;
  }
  *x = *y;
  *y = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    113b <swap+0x3b>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
mov    %eax,%edx
sub    %ecx,%edx
xor    %ecx,%ecx
cmp    $0x1,%edx
sete   %cl
add    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = srem i32 %3, 2
%5 = icmp eq i32 %4, 1
%6 = load i32, i32* %1
%7 = zext i1 %5 to i32
%8 = add nsw i32 %6, %7
store i32 %8, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xac() {
  Assert_real((islower(172) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              865, ("islower should be 0 for 0xac"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xac>:
push   %rax
mov    $0xac,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x361,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xac\00"
define void @t_islower_0xac() {
%1 = call i64 @islower(i32 172)
%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 865, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xac\00"
define void @t_islower_0xac() {
%1 = tail call i64 @islower(i32 172)
%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 865, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ strcmp(char const *, char const *);
void test6(const char *ptr) {
  if (strcmp(ptr, ptr) != 0)
    abort();
}


x86 assembly (clang, -O0):
<test6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     114a <test6+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test6>:
push   %rax
mov    %rdi,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    1130 <test6+0x10>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @test6(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strcmp(i8* %3, i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @test6(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void exit1() {
  int returnVal = 123;
  exit(returnVal);
}


x86 assembly (clang, -O0):
<exit1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7b,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<exit1>:
push   %rax
mov    $0x7b,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @exit1() {
%1 = alloca i32
store i32 123, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
define void @exit1() {
%1 = tail call i32 @exit(i32 123)
unreachable
}
/* Type definitions */
struct user_regs_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exec_by_all_variants(int, int *);
void sys_mmap(int variant_count, int *child, struct user_regs_struct *regs) {
  exec_by_all_variants(variant_count, child);
}


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

x86 assembly (clang, -O2):
<sys_mmap>:
jmp    1030 <exec_by_all_variants@plt>

LLVM IR (-O0):
%struct.user_regs_struct = type { i32 }
define void @sys_mmap(i32 %0, i32* %1, %struct.user_regs_struct* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca %struct.user_regs_struct*
store i32 %0, i32* %4
store i32* %1, i32** %5
store %struct.user_regs_struct* %2, %struct.user_regs_struct** %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = call i32 @exec_by_all_variants(i32 %7, i32* %8)
ret void
}

LLVM IR (-O2):
%struct.user_regs_struct = type { i32 }
define void @sys_mmap(i32 %0, i32* %1, %struct.user_regs_struct* nocapture readnone %2) {
%4 = tail call i32 @exec_by_all_variants(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
double betapdf(double, double, double);
double ibetad(double x, double a, double b) {
  double oup;
  oup = betapdf(x, a, b);
  return oup;
}


x86 assembly (clang, -O0):
<ibetad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <betapdf@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibetad>:
jmp    1030 <betapdf@plt>

LLVM IR (-O0):
define double @ibetad(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = load double, double* %5
%10 = load double, double* %6
%11 = call double @betapdf(double %8, double %9, double %10)
store double %11, double* %7
%12 = load double, double* %7
ret double %12
}

LLVM IR (-O2):
define double @ibetad(double %0, double %1, double %2) {
%4 = tail call double @betapdf(double %0, double %1, double %2)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;

/* Variables and functions */
int /*<<< orphan*/ EVP_MD_CTX_md_data(int /*<<< orphan*/ *);
int SHA512_Init(int /*<<< orphan*/);
int init512(EVP_MD_CTX *ctx) { return SHA512_Init(EVP_MD_CTX_md_data(ctx)); }


x86 assembly (clang, -O0):
<init512>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <EVP_MD_CTX_md_data@plt>
mov    %eax,%edi
call   1040 <SHA512_Init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init512>:
push   %rax
call   1030 <EVP_MD_CTX_md_data@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <SHA512_Init@plt>

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

LLVM IR (-O2):
define i32 @init512(i32* %0) {
%2 = tail call i32 @EVP_MD_CTX_md_data(i32* %0)
%3 = tail call i32 @SHA512_Init(i32 %2)
ret i32 %3
}
/* Variables and functions */
size_t strlen(const char *str) {
  const char *p = str;
  while (*p != '\0') {
    p++;
  }
  return (size_t)(p - str);
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1131 <strlen+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
int multi_timer_check(int apic, int irq) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @multi_timer_check(i32 %0, i32 %1) {
ret i32 0
}
double gettimedouble(void) { return 0; }


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

x86 assembly (clang, -O2):
<gettimedouble>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @gettimedouble() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @gettimedouble() {
ret double 0.000000e+00
}
void c_pomp_on_() { (void)0; }


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

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

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

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

/* Variables and functions */
int isgraph(int /*<<< orphan*/);
int iswgraph(wint_t wc) { return isgraph(wc); }


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

x86 assembly (clang, -O2):
<iswgraph>:
jmp    1030 <isgraph@plt>

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

LLVM IR (-O2):
define i32 @iswgraph(i32 %0) {
%2 = tail call i32 @isgraph(i32 %0)
ret i32 %2
}
int is_hex(char ch) {
  return (ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f') ||
         (ch >= 'A' && ch <= 'F');
}


x86 assembly (clang, -O0):
<is_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1129 <is_hex+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    116d <is_hex+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1148 <is_hex+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x66,%ecx
mov    %al,-0x2(%rbp)
jle    116d <is_hex+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1167 <is_hex+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x46,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_hex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 97
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 102
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 65
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 70
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_hex(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
int modifier_times_multiplier(int modifier, int multiplier) {
  return modifier * multiplier;
}


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

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

LLVM IR (-O0):
define i32 @modifier_times_multiplier(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @modifier_times_multiplier(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
float clip_value(float, double, double);
float logsig_der(float value) {
  float temp2, df;
  temp2 = clip_value(value, 0.01, 0.99);
  df = temp2 * (1.0 - temp2);
  return df;
}


x86 assembly (clang, -O0):
<logsig_der>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
movsd  0xede(%rip),%xmm2
call   1030 <clip_value@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xeaa(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logsig_der>:
push   %rax
movsd  0xee7(%rip),%xmm1
movsd  0xee7(%rip),%xmm2
call   1030 <clip_value@plt>
cvtss2sd %xmm0,%xmm0
movsd  0xede(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @logsig_der(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = call float @clip_value(float %5, double 1.000000e-02, double 0x3FEFAE147AE147AE)
store float %6, float* %3
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fsub double 1.000000e+00, %10
%12 = fmul double %8, %11
%13 = fptrunc double %12 to float
store float %13, float* %4
%14 = load float, float* %4
ret float %14
}

LLVM IR (-O2):
define float @logsig_der(float %0) {
%2 = tail call float @clip_value(float %0, double 1.000000e-02, double 0x3FEFAE147AE147AE)
%3 = fpext float %2 to double
%4 = fsub double 1.000000e+00, %3
%5 = fmul double %4, %3
%6 = fptrunc double %5 to float
ret float %6
}
void IntVTableBaseSet(unsigned long ulVtableBase) {
  (*((volatile unsigned long *)(0xE000ED08))) = ulVtableBase;
}


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

x86 assembly (clang, -O2):
<IntVTableBaseSet>:
mov    $0xe000ed08,%eax
mov    %rdi,(%rax)
ret

LLVM IR (-O0):
define void @IntVTableBaseSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 3758157064 to i64*)
ret void
}

LLVM IR (-O2):
define void @IntVTableBaseSet(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 3758157064 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float remainingAngle(float, float);
int main(int argc, const char *argv[]) {
  float angleA = 30.0;
  float angleB = 60.0;
  float angleC = remainingAngle(angleA, angleB);
  printf("The third angle is %.1f.\n", angleC);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xec6(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
call   1030 <remainingAngle@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
movss  0xed3(%rip),%xmm1
call   1030 <remainingAngle@plt>
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"The third angle is %.1f.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 3.000000e+01, float* %6
store float 6.000000e+01, float* %7
%9 = load float, float* %6
%10 = load float, float* %7
%11 = call float @remainingAngle(float %9, float %10)
store float %11, float* %8
%12 = load float, float* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), float %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"The third angle is %.1f.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call float @remainingAngle(float 3.000000e+01, float 6.000000e+01)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), float %3)
ret i32 0
}
void RTVfsSymlinkRelease(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_and_si64(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test53(__m64 a, __m64 b) { return _mm_and_si64(a, b); }


x86 assembly (clang, -O0):
<test53>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_and_si64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test53>:
jmp    1030 <_mm_and_si64@plt>

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

LLVM IR (-O2):
define i32 @test53(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_and_si64(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int strcmp(char *, char *);
int compareStrings(void *value1, void *value2) {
  char *charPtr1, *charPtr2;
  charPtr1 = (char *)value1;
  charPtr2 = (char *)value2;
  return strcmp(charPtr1, charPtr2);
}


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

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

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

LLVM IR (-O2):
define i32 @compareStrings(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Type definitions */
typedef int x;
typedef int uint32_t;

/* Variables and functions */
uint32_t wswap_32(uint32_t x) {
  return ((((x)&0xffff0000) >> 16) | (((x)&0x0000ffff) << 16));
}


x86 assembly (clang, -O0):
<wswap_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff0000,%eax
shr    $0x10,%eax
mov    -0x4(%rbp),%ecx
and    $0xffff,%ecx
shl    $0x10,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wswap_32>:
mov    %edi,%eax
rol    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @wswap_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -65536
%5 = lshr i32 %4, 16
%6 = load i32, i32* %2
%7 = and i32 %6, 65535
%8 = shl i32 %7, 16
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @wswap_32(i32 %0) {
%2 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 16)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x89() {
  Assert_real((isupper(137) == 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_isupper.c",
              690, ("isupper should be 0 for 0x89"));
}


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

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

/* Variables and functions */
int cbmarch_close(int, int /*<<< orphan*/, int /*<<< orphan*/);
int cbm_close(int HandleDevice, __u_char DeviceAddress,
              __u_char SecondaryAddress) {
  ;
  return cbmarch_close(HandleDevice, DeviceAddress, SecondaryAddress);
}


x86 assembly (clang, -O0):
<cbm_close>:
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),%esi
mov    -0xc(%rbp),%edx
call   1030 <cbmarch_close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbm_close>:
jmp    1030 <cbmarch_close@plt>

LLVM IR (-O0):
define i32 @cbm_close(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 @cbmarch_close(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @cbm_close(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @cbmarch_close(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int fn_ii(int i) {
  abort();
  return i;
}


x86 assembly (clang, -O0):
<fn_ii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<fn_ii>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @fn_ii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @fn_ii(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
void __intel_new_proc_init_R(void) {}


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

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

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

LLVM IR (-O2):
define void @__intel_new_proc_init_R() {
ret void
}
unsigned int ELMErrLocBitAddrGet(unsigned int baseAddr, unsigned int errNum) {
  unsigned int bitAddr;
  bitAddr = ((*((volatile unsigned int *)(baseAddr + (0x880 + (errNum * 4))))) &
             (0x00001FFFu));
  return (bitAddr);
}


x86 assembly (clang, -O0):
<ELMErrLocBitAddrGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x2,%ecx
add    $0x880,%ecx
add    %ecx,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x1fff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ELMErrLocBitAddrGet>:
lea    (%rdi,%rsi,4),%ecx
add    $0x880,%ecx
mov    $0x1fff,%eax
and    (%rcx),%eax
ret

LLVM IR (-O0):
define i32 @ELMErrLocBitAddrGet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul i32 %7, 4
%9 = add i32 2176, %8
%10 = add i32 %6, %9
%11 = zext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
%14 = and i32 %13, 8191
store i32 %14, i32* %5
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @ELMErrLocBitAddrGet(i32 %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = add i32 %0, 2176
%5 = add i32 %4, %3
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, 8191
ret i32 %9
}
/* Variables and functions */
scalar_t__ isalnum(char);
int isSymbol(char c) { return isalnum(c) || c == '_'; }


x86 assembly (clang, -O0):
<isSymbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <isSymbol+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSymbol>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isSymbol(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalnum(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isSymbol(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct msghdr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ recvmsg(int, struct msghdr *, int);
ssize_t test(void) {
  int sockfd = 4;
  struct msghdr msg;
  int flags = 7;
  return recvmsg(sockfd, &msg, flags);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0x4(%rbp)
movl   $0x7,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%edx
lea    -0x8(%rbp),%rsi
call   1030 <recvmsg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x7,%edx
call   1030 <recvmsg@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.msghdr = type { i32 }
define i32 @test() {
%1 = alloca i32
%2 = alloca %struct.msghdr
%3 = alloca i32
store i32 4, i32* %1
store i32 7, i32* %3
%4 = load i32, i32* %1
%5 = load i32, i32* %3
%6 = call i32 @recvmsg(i32 %4, %struct.msghdr* %2, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.msghdr = type { i32 }
define i32 @test() {
%1 = alloca %struct.msghdr
%2 = bitcast %struct.msghdr* %1 to i8*
%3 = call i32 @recvmsg(i32 4, %struct.msghdr* %1, i32 7)
ret i32 %3
}
void recurser(x) int x;
{
  int local_x;
  if (x > 0)
    recurser(x - 1);
  local_x = x;
}


x86 assembly (clang, -O0):
<recurser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1130 <recurser+0x20>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <recurser@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @recurser(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %2
store i32 %10, i32* %3
ret void
}

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