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

/* Variables and functions */
int /*<<< orphan*/ IntoGoAndBack();
int /*<<< orphan*/ SIGIO;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
void *sigthreadfunc(void *unused) {
  sigset_t mask;
  sigemptyset(&mask);
  sigaddset(&mask, SIGIO);
  sigprocmask(SIG_BLOCK, &mask, NULL);
  IntoGoAndBack();
  return NULL;
}


x86 assembly (clang, -O0):
<sigthreadfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdi
call   1060 <sigaddset@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
lea    -0xc(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
mov    $0x0,%al
call   1050 <IntoGoAndBack@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigthreadfunc>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1060 <sigaddset@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
xor    %eax,%eax
call   1050 <IntoGoAndBack@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGIO = global i32 0
@SIG_BLOCK = global i32 0
define i8* @sigthreadfunc(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @sigemptyset(i32* %3)
%5 = load i32, i32* @SIGIO
%6 = call i32 @sigaddset(i32* %3, i32 %5)
%7 = load i32, i32* @SIG_BLOCK
%8 = call i32 @sigprocmask(i32 %7, i32* %3, i32* null)
%9 = call i32 (...) @IntoGoAndBack()
ret i8* null
}

LLVM IR (-O2):
@SIGIO = global i32 0
@SIG_BLOCK = global i32 0
define noalias i8* @sigthreadfunc(i8* nocapture readnone %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sigemptyset(i32* %2)
%5 = load i32, i32* @SIGIO
%6 = call i32 @sigaddset(i32* %2, i32 %5)
%7 = load i32, i32* @SIG_BLOCK
%8 = call i32 @sigprocmask(i32 %7, i32* %2, i32* null)
%9 = call i32 (...) @IntoGoAndBack()
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ dymosimmessageSev_(int /*<<< orphan*/, char const *, int);
void dymosimmessage_(const char message[], int lstr) {
  dymosimmessageSev_(0, message, lstr);
}


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

x86 assembly (clang, -O2):
<dymosimmessage_>:
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <dymosimmessageSev_@plt>

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

LLVM IR (-O2):
define void @dymosimmessage_(i8* %0, i32 %1) {
%3 = tail call i32 @dymosimmessageSev_(i32 0, i8* %0, i32 %1)
ret void
}
void sprd_set_reboot_mode(const char *cmd) {}


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

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

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

LLVM IR (-O2):
define void @sprd_set_reboot_mode(i8* nocapture %0) {
ret void
}
long double test4l(long double a) { return __builtin_copysignl(a, -1.0); }


x86 assembly (clang, -O0):
<test4l>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fabs
fchs
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4l>:
fldt   0x8(%rsp)
fabs
fchs
ret

LLVM IR (-O0):
define x86_fp80 @test4l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @llvm.copysign.f80(x86_fp80 %3, x86_fp80 0xKBFFF8000000000000000)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @test4l(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.fabs.f80(x86_fp80 %0)
%3 = fneg x86_fp80 %2
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ ei();
void opcode_fb() { ei(); }


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

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

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

LLVM IR (-O2):
define void @opcode_fb() {
%1 = tail call i32 (...) @ei()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
struct tm *gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int /*<<< orphan*/, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int32_t get_http_timestamp(char *tbuf, uint32_t tbuf_len) {
  time_t now = time(0);
  struct tm tm = *gmtime(&now);
  return strftime(tbuf, tbuf_len, "%a, %d %b %Y %H:%M:%S %Z", &tm);
}


x86 assembly (clang, -O0):
<get_http_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1050 <gmtime@plt>
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe9b(%rip),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_http_timestamp>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1050 <gmtime@plt>
mov    (%rax),%eax
mov    %eax,(%rsp)
lea    0xea7(%rip),%rdx
mov    %rsp,%rcx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [25 x i8] c"%a, %d %b %Y %H:%M:%S %Z\00"
define i32 @get_http_timestamp(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.tm
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = call i32 @time(i32 0)
store i32 %7, i32* %5
%8 = call %struct.tm* @gmtime(i32* %5)
%9 = bitcast %struct.tm* %6 to i8*
%10 = bitcast %struct.tm* %8 to i8*
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = call i32 @strftime(i8* %11, i32 %12, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
ret i32 %13
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [25 x i8] c"%a, %d %b %Y %H:%M:%S %Z\00"
define i32 @get_http_timestamp(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.tm
%5 = bitcast i32* %3 to i8*
%6 = tail call i32 @time(i32 0)
store i32 %6, i32* %3
%7 = bitcast %struct.tm* %4 to i8*
%8 = call %struct.tm* @gmtime(i32* %3)
%9 = getelementptr %struct.tm, %struct.tm* %8, i64 0, i32 0
%10 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%11 = load i32, i32* %9
store i32 %11, i32* %10
%12 = call i32 @strftime(i8* %0, i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret i32 %12
}
unsigned long long __atomic_fetch_xor_8(volatile void *atom,
                                        unsigned long long value,
                                        int memorder) {
  unsigned long long xchg;
  unsigned long long cmp;
  __atomic_load((unsigned long long *)atom, (unsigned long long *)&cmp, 0);
  do {
    xchg = ((cmp ^ value));
  } while (!__atomic_compare_exchange((unsigned long long *)atom, &cmp, &xchg,
                                      1, 5, 5));
  return cmp;
}


x86 assembly (clang, -O0):
<__atomic_fetch_xor_8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
mov    %al,-0x39(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1154 <__atomic_fetch_xor_8+0x54>
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x39(%rbp),%al
and    $0x1,%al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
xor    $0xff,%al
test   $0x1,%al
jne    111a <__atomic_fetch_xor_8+0x1a>
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__atomic_fetch_xor_8>:
mov    (%rdi),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rax,%rcx
mov    %rax,%rdx
xor    %rsi,%rdx
lock cmpxchg %rdx,(%rdi)
jne    1110 <__atomic_fetch_xor_8+0x10>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @__atomic_fetch_xor_8(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load atomic i64, i64* %11 monotonic
store i64 %12, i64* %8
br label %13
13: ; preds = %26, %3
%14 = load i64, i64* %8
%15 = load i64, i64* %5
%16 = xor i64 %14, %15
store i64 %16, i64* %7
br label %17
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %8
%21 = load i64, i64* %7
%22 = cmpxchg weak i64* %19, i64 %20, i64 %21 seq_cst seq_cst
%23 = extractvalue { i64, i1 } %22, 0
%24 = extractvalue { i64, i1 } %22, 1
br i1 %24, label %26, label %25
25: ; preds = %17
store i64 %23, i64* %8
br label %26
26: ; preds = %25, %17
%27 = zext i1 %24 to i8
store i8 %27, i8* %9
%28 = load i8, i8* %9
%29 = trunc i8 %28 to i1
%30 = xor i1 %29, true
br i1 %30, label %13, label %31
31: ; preds = %26
%32 = load i64, i64* %8
ret i64 %32
}

LLVM IR (-O2):
define i64 @__atomic_fetch_xor_8(i8* nocapture %0, i64 %1, i32 %2) {
%4 = bitcast i8* %0 to i64*
%5 = load atomic i64, i64* %4 monotonic
br label %6
6: ; preds = %6, %3
%7 = phi i64 [ %5, %3 ], [ %11, %6 ]
%8 = xor i64 %7, %1
%9 = cmpxchg weak i64* %4, i64 %7, i64 %8 seq_cst seq_cst
%10 = extractvalue { i64, i1 } %9, 1
%11 = extractvalue { i64, i1 } %9, 0
br i1 %10, label %12, label %6
12: ; preds = %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ setpassent(int /*<<< orphan*/);
void setpwent(void) { (void)setpassent(0); }


x86 assembly (clang, -O0):
<setpwent>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <setpassent@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @setpwent() {
%1 = call i32 @setpassent(i32 0)
ret void
}

LLVM IR (-O2):
define void @setpwent() {
%1 = tail call i32 @setpassent(i32 0)
ret void
}
/* Variables and functions */
int printf(char *);
int main(void) {
  return printf("\e[0;32mGOES ✓\e[0m\n");
  ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\1B[0;32mGOES \E2\9C\93\1B[0m\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}

LLVM IR (-O2):
@.str = [21 x i8] c"\1B[0;32mGOES \E2\9C\93\1B[0m\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  unsigned int i = 10;
  int j = -10;
  printf("%d\n", j < i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0xfffffff6,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ line;

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int input(void) {
  char line[32];
  fgets(line, sizeof(line), stdin);
  return atoi(line);
}


x86 assembly (clang, -O0):
<input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
mov    $0x20,%esi
call   1030 <fgets@plt>
lea    -0x20(%rbp),%rdi
call   1040 <atoi@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<input>:
push   %rbx
sub    $0x20,%rsp
mov    0x2ebc(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <fgets@plt>
mov    %rbx,%rdi
call   1040 <atoi@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @input() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 32, i32 %3)
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%6 = call i32 @atoi(i8* %5)
ret i32 %6
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @input() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 32, i32 %3)
%5 = call i32 @atoi(i8* %2)
ret i32 %5
}
float gamma_none(float a) { return a; }


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

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

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

LLVM IR (-O2):
define float @gamma_none(float returned %0) {
ret float %0
}
/* Variables and functions */
int atoi(char *);
int partition(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int sum = atoi(argv[1]);
  int largestNumber = 1000000;
  printf("%d\n", partition(sum, largestNumber));
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
movl   $0xf4240,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <partition@plt>
mov    %eax,%esi
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
mov    $0xf4240,%esi
call   1030 <partition@plt>
lea    0xeb3(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @atoi(i8* %10)
store i32 %11, i32* %6
store i32 1000000, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = call i32 @partition(i32 %12, i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @partition(i32 %5, i32 1000000)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ABMON_10;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_abmon_10() { return nl_langinfo(ABMON_10); }


x86 assembly (clang, -O0):
<langinfo_abmon_10>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_abmon_10>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@ABMON_10 = global i32 0
define i8* @langinfo_abmon_10() {
%1 = load i32, i32* @ABMON_10
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@ABMON_10 = global i32 0
define i8* @langinfo_abmon_10() {
%1 = load i32, i32* @ABMON_10
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_broadcast32(void *target, const void *source, size_t nlong,
                              int PE_root, int PE_start, int logPE_stride,
                              int PE_size, long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_broadcast32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_broadcast32(i8* %0, i8* %1, i64 %2, i32 %3, i32 %4, i32 %5, i32 %6, i64* %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i64*
store i8* %0, i8** %9
store i8* %1, i8** %10
store i64 %2, i64* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i64* %7, i64** %16
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_broadcast32(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2, i32 %3, i32 %4, i32 %5, i32 %6, i64* nocapture readnone %7) {
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
int hash(char *str, int mod) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++)) {
    hash = ((hash << 5) + hash) + c;
  }
  return hash % mod;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x1505,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     114d <hash+0x4d>
mov    -0x18(%rbp),%rax
shl    $0x5,%rax
add    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1113 <hash+0x13>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112e <hash+0x2e>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
jmp    1133 <hash+0x33>
mov    $0x1505,%eax
movslq %esi,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     114b <hash+0x4b>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = phi i64 [ %12, %5 ], [ 5381, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i64 %8, 33
%11 = sext i8 %6 to i64
%12 = add i64 %10, %11
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i64 [ 5381, %2 ], [ %12, %5 ]
%17 = sext i32 %1 to i64
%18 = urem i64 %16, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ floor(int /*<<< orphan*/);
int /*<<< orphan*/ popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basFix() { pushNumber(floor(popNumber())); }


x86 assembly (clang, -O0):
<basFix>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,%edi
call   1030 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basFix>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <pushNumber@plt>

LLVM IR (-O0):
define void @basFix() {
%1 = call i32 (...) @popNumber()
%2 = call i32 @floor(i32 %1)
%3 = call i32 @pushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @basFix() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @floor(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Locate_My_IP();
int /*<<< orphan*/ Locate_This_IP(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  if (argc == 1) {
    Locate_My_IP();
  } else {
    printf("Locating %s...\n\n", argv[1]);
    Locate_This_IP(argv[1]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    115c <main+0x2c>
mov    $0x0,%al
call   1030 <Locate_My_IP@plt>
jmp    117d <main+0x4d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <Locate_This_IP@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jne    113f <main+0xf>
xor    %eax,%eax
call   1030 <Locate_My_IP@plt>
jmp    115b <main+0x2b>
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
call   1050 <Locate_This_IP@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"Locating %s...\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @Locate_My_IP()
br label %12
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %7
%11 = tail call i32 @Locate_This_IP(i8* %10)
br label %12
12: ; preds = %6, %4
ret i32 0
}
int max2(int a, int b) { return a ^ ((a ^ b) & -(a < b)); }


x86 assembly (clang, -O0):
<max2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%edx
cmp    -0x8(%rbp),%edx
setl   %dl
and    $0x1,%dl
movzbl %dl,%esi
xor    %edx,%edx
sub    %esi,%edx
and    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max2>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

LLVM IR (-O0):
define i32 @max2(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* %3
%7 = load i32, i32* %4
%8 = xor i32 %6, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
%12 = zext i1 %11 to i32
%13 = sub nsw i32 0, %12
%14 = and i32 %8, %13
%15 = xor i32 %5, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @max2(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ perror(char *);
void _fork() {
  pid_t pid = fork();
  if (pid < 0) {
    perror("fork");
    _exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<_fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1168 <_fork+0x38>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fork>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
js     113f <_fork+0xf>
pop    %rax
ret
lea    0xeba(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"fork\00"
@EXIT_FAILURE = global i32 0
define void @_fork() {
%1 = alloca i64
%2 = call i64 (...) @fork()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @_exit(i32 %7)
unreachable
9: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"fork\00"
@EXIT_FAILURE = global i32 0
define void @_fork() {
%1 = tail call i64 (...) @fork()
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @_exit(i32 %5)
unreachable
7: ; preds = %0
ret void
}
unsigned spd_to_dimm(unsigned device) { return (device - (0xa << 3)); }


x86 assembly (clang, -O0):
<spd_to_dimm>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x50,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spd_to_dimm>:
lea    -0x50(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @spd_to_dimm(i32 %0) {
%2 = add i32 %0, -80
ret i32 %2
}
/* Variables and functions */
int INT_MIN;
int /*<<< orphan*/ this_comparison_is_not_decidable();
void bla2ne(int var) {
  if (var + 10 != INT_MIN + 10)
    this_comparison_is_not_decidable();
}


x86 assembly (clang, -O0):
<bla2ne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
add    $0xa,%ecx
cmp    %ecx,%eax
je     113c <bla2ne+0x2c>
mov    $0x0,%al
call   1030 <this_comparison_is_not_decidable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla2ne>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    111c <bla2ne+0xc>
ret
xor    %eax,%eax
jmp    1030 <this_comparison_is_not_decidable@plt>

LLVM IR (-O0):
@INT_MIN = global i32 0
define void @bla2ne(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 10
%5 = load i32, i32* @INT_MIN
%6 = add nsw i32 %5, 10
%7 = icmp ne i32 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @this_comparison_is_not_decidable()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define void @bla2ne(i32 %0) {
%2 = load i32, i32* @INT_MIN
%3 = icmp eq i32 %2, %0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @this_comparison_is_not_decidable()
br label %6
6: ; preds = %4, %1
ret void
}
void mcu_atmel_atmega328p_Atmega328p_nop__E() { asm("nop"); }


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

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

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

LLVM IR (-O2):
define void @mcu_atmel_atmega328p_Atmega328p_nop__E() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
size_t aeron_frame_compute_max_message_length(size_t term_length) {
  return term_length < (16 * 1024 * 1024) ? term_length : (16 * 1024 * 1024);
}


x86 assembly (clang, -O0):
<aeron_frame_compute_max_message_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x1000000,-0x8(%rbp)
01
jae    1123 <aeron_frame_compute_max_message_length+0x23>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1131 <aeron_frame_compute_max_message_length+0x31>
mov    $0x1000000,%eax
mov    %rax,-0x10(%rbp)
jmp    1131 <aeron_frame_compute_max_message_length+0x31>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeron_frame_compute_max_message_length>:
cmp    $0x1000000,%rdi
mov    $0x1000000,%eax
cmovb  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @aeron_frame_compute_max_message_length(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ult i64 %3, 16777216
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i64, i64* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi i64 [ %6, %5 ], [ 16777216, %7 ]
ret i64 %9
}

LLVM IR (-O2):
define i64 @aeron_frame_compute_max_message_length(i64 %0) {
%2 = icmp ult i64 %0, 16777216
%3 = select i1 %2, i64 %0, i64 16777216
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xab() {
  Assert_real((isalnum(171) == 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_isalnum.c",
              860, ("isalnum should be 0 for 0xab"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xab>:
push   %rax
mov    $0xab,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x35c,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xab\00"
define void @t_isalnum_0xab() {
%1 = call i64 @isalnum(i32 171)
%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 860, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xab\00"
define void @t_isalnum_0xab() {
%1 = tail call i64 @isalnum(i32 171)
%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 860, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void pcp_def_net_dev_metrics(struct activity *a) {}


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

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

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

LLVM IR (-O2):
%struct.activity = type opaque
define void @pcp_def_net_dev_metrics(%struct.activity* nocapture %0) {
ret void
}
/* Variables and functions */
int null_string(char *);
int string_end(char *str) {
  char *buf_tmp;
  buf_tmp = str + 1;
  if (*buf_tmp == '\0') {
    return 1;
  } else {
    return null_string(buf_tmp);
  }
}


x86 assembly (clang, -O0):
<string_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1144 <string_end+0x34>
movl   $0x1,-0x4(%rbp)
jmp    1150 <string_end+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <null_string@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_end>:
cmpb   $0x0,0x1(%rdi)
je     111f <string_end+0xf>
add    $0x1,%rdi
jmp    1030 <null_string@plt>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @string_end(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @null_string(i8* %2)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ %6, %5 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Shakespeare();
int main() { Shakespeare(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @Shakespeare()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Shakespeare()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putc(int);
void putnegd(int i) {
  int j = i / 10;
  if (j) {
    putnegd(j);
  }
  putc('0' - i % 10);
}


x86 assembly (clang, -O0):
<putnegd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114b <putnegd+0x2b>
mov    -0x8(%rbp),%edi
call   1030 <putnegd@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0x30,%edi
sub    %edx,%edi
call   1040 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putnegd>:
push   %rbx
lea    0x9(%rdi),%eax
movslq %edi,%rbx
cmp    $0x13,%eax
jb     1145 <putnegd+0x25>
imul   $0x66666667,%rbx,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x22,%rdi
add    %eax,%edi
call   1030 <putnegd@plt>
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%edi
sub    %ebx,%edi
add    $0x30,%edi
pop    %rbx
jmp    1040 <putc@plt>

LLVM IR (-O0):
define void @putnegd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 10
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %3
br label %10
10: ; preds = %8, %1
%11 = load i32, i32* %2
%12 = srem i32 %11, 10
%13 = sub nsw i32 48, %12
%14 = call i32 @putc(i32 %13)
ret void
}

LLVM IR (-O2):
define void @putnegd(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = sdiv i32 %0, 10
tail call void @putnegd(i32 %5)
br label %6
6: ; preds = %4, %1
%7 = srem i32 %0, 10
%8 = sub nsw i32 48, %7
%9 = tail call i32 @putc(i32 %8)
ret void
}
void ASN1_mbstring_copy(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_mbstring_copy() {
ret void
}
void real_enc(void *buf, double val) { *((double *)buf) = val; }


x86 assembly (clang, -O0):
<real_enc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<real_enc>:
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @real_enc(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to double*
store double %5, double* %7
ret void
}

LLVM IR (-O2):
define void @real_enc(i8* nocapture writeonly %0, double %1) {
%3 = bitcast i8* %0 to double*
store double %1, double* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int suzerain_inorder_wavenumber_abs(const int N, const int i) {
  assert(0 <= i && i < N);
  return (i < N / 2 + 1) ? i : N - i;
}


x86 assembly (clang, -O0):
<suzerain_inorder_wavenumber_abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
xor    %ecx,%ecx
cmp    -0x8(%rbp),%ecx
mov    %al,-0x9(%rbp)
jg     113a <suzerain_inorder_wavenumber_abs+0x2a>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1173 <suzerain_inorder_wavenumber_abs+0x63>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    117c <suzerain_inorder_wavenumber_abs+0x6c>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suzerain_inorder_wavenumber_abs>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
test   %esi,%esi
setns  %al
mov    %edi,%ebp
sub    %esi,%ebp
setg   %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    %r14d,%eax
shr    $0x1f,%eax
add    %r14d,%eax
sar    %eax
cmp    %ebx,%eax
cmovge %ebx,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @suzerain_inorder_wavenumber_abs(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 = icmp sle i32 0, %5
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br label %11
11: ; preds = %7, %2
%12 = phi i1 [ false, %2 ], [ %10, %7 ]
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = sdiv i32 %16, 2
%18 = add nsw i32 %17, 1
%19 = icmp slt i32 %15, %18
br i1 %19, label %20, label %22
20: ; preds = %11
%21 = load i32, i32* %4
br label %26
22: ; preds = %11
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = sub nsw i32 %23, %24
br label %26
26: ; preds = %22, %20
%27 = phi i32 [ %21, %20 ], [ %25, %22 ]
ret i32 %27
}

LLVM IR (-O2):
define i32 @suzerain_inorder_wavenumber_abs(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
%4 = icmp sgt i32 %0, %1
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = sdiv i32 %0, 2
%9 = icmp slt i32 %8, %1
%10 = sub nsw i32 %0, %1
%11 = select i1 %9, i32 %10, i32 %1
ret i32 %11
}
unsigned int vrt_node_get_local_id(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @vrt_node_get_local_id() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int N;
  scanf("%d", &N);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
ret i32 0
}
/* Type definitions */
struct timeval {
  int /*<<< orphan*/ tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int main() {
  struct timeval tv;
  while (1) {
    gettimeofday(&tv, NULL);
    printf("%ld,%ld\n", tv.tv_sec, tv.tv_usec);
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsp,%r14
lea    0xec2(%rip),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    (%rsp),%edx
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@.str = [9 x i8] c"%ld,%ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
%10 = call i32 @sleep(i32 1)
br label %3
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@.str = [9 x i8] c"%ld,%ld\0A\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
br label %5
5: ; preds = %5, %0
%6 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = tail call i32 @sleep(i32 1)
br label %5
}
three2(a, b, c) { nop(); }


x86 assembly (clang, -O0):
<three2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <nop@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @three2(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @nop()
ret i32 undef
}