xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void h2() { printf("H2\n"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"H2\0A\00"
define void @h2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [3 x i8] c"H2\00"
define void @h2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x9d() {
  Assert_real((isxdigit(157) == 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_isxdigit.c",
              790, ("isxdigit should be 0 for 0x9d"));
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_printf_string_upper_bound() {
ret void
}
char *key_ident() { return "$Id: key_reciva.c 230 2007-10-23 17:42:49Z  $"; }


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"$Id: key_reciva.c 230 2007-10-23 17:42:49Z $\00"
define i8* @key_ident() {
ret i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [46 x i8] c"$Id: key_reciva.c 230 2007-10-23 17:42:49Z $\00"
define i8* @key_ident() {
ret i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0)
}
int f() {
  int c = 0;
  while (c < 10) {
    if (c % 2 == 0)
      c++;
    if (c % 3 == 0) {
      c++;
    } else {
      c = c + 2;
    }
  }
  return c;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1162 <f+0x62>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1132 <f+0x32>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1154 <f+0x54>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115d <f+0x5d>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <f+0xb>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    $0xa,%eax
ret

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

LLVM IR (-O2):
define i32 @f() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d", 1 + 2 + 2 * 7);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 17)
ret i32 0
}
void Formike128x128x16Flush(void *pvDisplayData) {}


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

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

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

LLVM IR (-O2):
define void @Formike128x128x16Flush(i8* nocapture %0) {
ret void
}
int _() { return 42; }


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

x86 assembly (clang, -O2):
<_>:
mov    $0x2a,%eax
ret

LLVM IR (-O0):
define i32 @_() {
ret i32 42
}

LLVM IR (-O2):
define i32 @_() {
ret i32 42
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
__attribute__((__nonnull__)) bool streq(const char *a, const char *b) {
  return strcmp(a, b) == 0;
}


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @streq(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t ReadUInt16(uint8_t *buffer) {
  uint16_t num = (uint16_t)buffer[0] << 8 | (uint16_t)buffer[1];
  return num;
}


x86 assembly (clang, -O0):
<ReadUInt16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadUInt16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ReadUInt16(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = getelementptr inbounds i64, i64* %4, i64 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = load i64*, i64** %2
%10 = getelementptr inbounds i64, i64* %9, i64 1
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = or i32 %8, %12
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @ReadUInt16(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
void resize(int width, int height, void *context) {
  (void)width;
  (void)height;
  (void)context;
}


x86 assembly (clang, -O0):
<resize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @resize(i32 %0, i32 %1, i8* nocapture %2) {
ret void
}
int SDL_imageFilterBitAndMMX(unsigned char *Src1, unsigned char *Src2,
                             unsigned char *Dest, unsigned int SrcLength) {
  return (-1);
}


x86 assembly (clang, -O0):
<SDL_imageFilterBitAndMMX>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDL_imageFilterBitAndMMX>:
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @SDL_imageFilterBitAndMMX(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @SDL_imageFilterBitAndMMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ banktitle(char *);
void obank2() {
  banktitle("Welcome to the 8th-level branch office of the First National Bank "
            "of Ularn.");
}


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

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

LLVM IR (-O0):
@.str = [76 x i8] c"Welcome to the 8th-level branch office of the First National Bank of Ularn.\00"
define void @obank2() {
%1 = call i32 @banktitle(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [76 x i8] c"Welcome to the 8th-level branch office of the First National Bank of Ularn.\00"
define void @obank2() {
%1 = tail call i32 @banktitle(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *unmark_entry(void *p) {
  return (void *)(((uintptr_t)p) & ~((uintptr_t)0x3));
}


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

x86 assembly (clang, -O2):
<unmark_entry>:
mov    %rdi,%rax
and    $0xfffffffffffffffc,%rax
ret

LLVM IR (-O0):
define i8* @unmark_entry(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = and i64 %4, -4
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @unmark_entry(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, -4
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
unsigned int XXH32_getIntermediateResult_SSE2(void *);
int /*<<< orphan*/ free(void *);
unsigned int XXH32_result_SSE2(void *state_in) {
  unsigned int h32 = XXH32_getIntermediateResult_SSE2(state_in);
  free(state_in);
  return h32;
}


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

x86 assembly (clang, -O2):
<XXH32_result_SSE2>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <XXH32_getIntermediateResult_SSE2@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @XXH32_result_SSE2(i8* %0) {
%2 = tail call i32 @XXH32_getIntermediateResult_SSE2(i8* %0)
%3 = tail call i32 @free(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void wake_print(pthread_t thread) {
  sigset_t set;
  sigemptyset(&set);
}


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

x86 assembly (clang, -O2):
<wake_print>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <sigemptyset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @wake_print(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sigemptyset(i32* %2)
ret void
}
/* Variables and functions */
int write(int, char *, int);
int pipeHelperWriteChar(int fd, char c) { return write(fd, &c, 1); }


x86 assembly (clang, -O0):
<pipeHelperWriteChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipeHelperWriteChar>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @pipeHelperWriteChar(i32 %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @write(i32 %0, i8* %3, i32 1)
ret i32 %4
}
/* Variables and functions */
double floorf(double);
int natural(double x) { return (floorf(x) == x); }


x86 assembly (clang, -O0):
<natural>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <floorf@plt>
ucomisd -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<natural>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <floorf@plt>
cmpeqsd (%rsp),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @natural(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @floorf(double %3)
%5 = load double, double* %2
%6 = fcmp oeq double %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @natural(double %0) {
%2 = tail call double @floorf(double %0)
%3 = fcmp oeq double %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
double ls_costN_nm8_twice(double x) { return x + x; }


x86 assembly (clang, -O0):
<ls_costN_nm8_twice>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_costN_nm8_twice>:
addsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @ls_costN_nm8_twice(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fadd double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @ls_costN_nm8_twice(double %0) {
%2 = fadd double %0, %0
ret double %2
}
/* Type definitions */
struct RPC_Node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _free_rpc_node(struct RPC_Node *);
int /*<<< orphan*/ free(struct RPC_Node *);
void rpc_delete_node(struct RPC_Node *node) {
  if (!node)
    return;
  _free_rpc_node(node);
  free(node);
}


x86 assembly (clang, -O0):
<rpc_delete_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <rpc_delete_node+0x1c>
jmp    114e <rpc_delete_node+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <_free_rpc_node@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpc_delete_node>:
test   %rdi,%rdi
je     1137 <rpc_delete_node+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <_free_rpc_node@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.RPC_Node = type { i32 }
define void @rpc_delete_node(%struct.RPC_Node* %0) {
%2 = alloca %struct.RPC_Node*
store %struct.RPC_Node* %0, %struct.RPC_Node** %2
%3 = load %struct.RPC_Node*, %struct.RPC_Node** %2
%4 = icmp ne %struct.RPC_Node* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load %struct.RPC_Node*, %struct.RPC_Node** %2
%8 = call i32 @_free_rpc_node(%struct.RPC_Node* %7)
%9 = load %struct.RPC_Node*, %struct.RPC_Node** %2
%10 = call i32 @free(%struct.RPC_Node* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.RPC_Node = type { i32 }
define void @rpc_delete_node(%struct.RPC_Node* %0) {
%2 = icmp eq %struct.RPC_Node* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @_free_rpc_node(%struct.RPC_Node* %0)
%5 = tail call i32 @free(%struct.RPC_Node* %0)
br label %6
6: ; preds = %1, %3
ret void
}
unsigned long gen_gcd(unsigned long a, unsigned long b, unsigned long res) {}


x86 assembly (clang, -O0):
<gen_gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @gen_gcd(i64 %0, i64 %1, i64 %2) {
ret i64 undef
}
A0AR1(r0, r1, x0, x1, p0, p1) unsigned char r0, r1;
unsigned char *p0, *p1;
{
  if ((*((unsigned char *)10000000)) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<A0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0x989680,%eax
movzbl (%rax),%eax
mov    -0x20(%rbp),%rcx
movzbl 0x43d11(%rcx),%ecx
cmp    %ecx,%eax
jg     1145 <A0AR1+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <A0AR1+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<A0AR1>:
mov    0x989680,%cl
xor    %eax,%eax
cmp    0x43d11(%r9),%cl
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @A0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = load i8, i8* inttoptr (i64 10000000 to i8*)
%8 = getelementptr inbounds i8, i8* %5, i64 277777
%9 = load i8, i8* %8
%10 = icmp ule i8 %7, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ ArgItem();
int /*<<< orphan*/ ArgNum();
void Act_Distance(void) {
  ArgItem();
  ArgItem();
  ArgNum();
}


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

x86 assembly (clang, -O2):
<Act_Distance>:
push   %rax
xor    %eax,%eax
call   1040 <ArgItem@plt>
xor    %eax,%eax
call   1040 <ArgItem@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ArgNum@plt>

LLVM IR (-O0):
define void @Act_Distance() {
%1 = call i32 (...) @ArgItem()
%2 = call i32 (...) @ArgItem()
%3 = call i32 (...) @ArgNum()
ret void
}

LLVM IR (-O2):
define void @Act_Distance() {
%1 = tail call i32 (...) @ArgItem()
%2 = tail call i32 (...) @ArgItem()
%3 = tail call i32 (...) @ArgNum()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ccc(int);
void bbb(int arg) { ccc(789); }


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

x86 assembly (clang, -O2):
<bbb>:
mov    $0x315,%edi
jmp    1030 <ccc@plt>

LLVM IR (-O0):
define void @bbb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ccc(i32 789)
ret void
}

LLVM IR (-O2):
define void @bbb(i32 %0) {
%2 = tail call i32 @ccc(i32 789)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ proutn(char *);
void clearscreen(void) { proutn("\033[2J\033[0;0H"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[2J\1B[0;0H\00"
define void @clearscreen() {
%1 = call i32 @proutn(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[2J\1B[0;0H\00"
define void @clearscreen() {
%1 = tail call i32 @proutn(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct name {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct name *);
void name_free(struct name *name) { free(name); }


x86 assembly (clang, -O0):
<name_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):
<name_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.name = type { i32 }
define void @name_free(%struct.name* %0) {
%2 = alloca %struct.name*
store %struct.name* %0, %struct.name** %2
%3 = load %struct.name*, %struct.name** %2
%4 = call i32 @free(%struct.name* %3)
ret void
}

LLVM IR (-O2):
%struct.name = type { i32 }
define void @name_free(%struct.name* nocapture %0) {
%2 = tail call i32 @free(%struct.name* %0)
ret void
}
int test_imm_7Cuint8_mem(unsigned char *val) {
  return ((*val) & (0x7C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_7Cuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 124
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned long long getticks(void) {
  unsigned int __a, __d;
  __asm__ __volatile__("rdtsc" : "=a"(__a), "=d"(__d));
  return ((long long)__a) | (((long long)__d) << 32);
}


x86 assembly (clang, -O0):
<getticks>:
push   %rbp
mov    %rsp,%rbp
rdtsc
mov    %eax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getticks>:
rdtsc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @getticks() {
%1 = alloca i32
%2 = alloca i32
%3 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = shl i64 %9, 32
%11 = or i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @getticks() {
%1 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ strtol(char const *, char **, int /*<<< orphan*/);
int isanumber(const char *s) {
  char *end;
  (void)strtol(s, &end, 0);
  return end != s && *end == 0;
}


x86 assembly (clang, -O0):
<isanumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x11(%rbp)
je     114e <isanumber+0x3e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isanumber>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsp,%rsi
xor    %ebx,%ebx
xor    %edx,%edx
call   1030 <strtol@plt>
mov    (%rsp),%rax
cmp    %r14,%rax
je     1134 <isanumber+0x24>
xor    %ebx,%ebx
cmpb   $0x0,(%rax)
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @isanumber(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strtol(i8* %4, i8** %3, i32 0)
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = icmp ne i8* %6, %7
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 0
br label %14
14: ; preds = %9, %1
%15 = phi i1 [ false, %1 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isanumber(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @strtol(i8* %0, i8** %2, i32 0)
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, %0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %5
%9 = icmp eq i8 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %1
%12 = phi i32 [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printline(char *line) { printf("%s", line); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @printline(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @printline(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_write_next_solution_to_defined_output_file(int *k, int n, int m,
                                                      double *sol) {
  int b[2], fail;
  b[0] = n;
  b[1] = m;
  fail = _ada_use_c2phc(141, k, b, sol);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_write_next_solution_to_defined_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x8d,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_write_next_solution_to_defined_output_file>:
push   %rax
mov    %rdi,%rax
mov    %esi,(%rsp)
mov    %edx,0x4(%rsp)
mov    %rsp,%rdx
mov    $0x8d,%edi
mov    %rax,%rsi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_write_next_solution_to_defined_output_file(i32* %0, i32 %1, i32 %2, double* %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca [2 x i32]
%10 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double* %3, double** %8
%11 = load i32, i32* %6
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
store i32 %11, i32* %12
%13 = load i32, i32* %7
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %13, i32* %14
%15 = load i32*, i32** %5
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%17 = load double*, double** %8
%18 = call i32 @_ada_use_c2phc(i32 141, i32* %15, i32* %16, double* %17)
store i32 %18, i32* %10
%19 = load i32, i32* %10
ret i32 %19
}

LLVM IR (-O2):
define i32 @solcon_write_next_solution_to_defined_output_file(i32* %0, i32 %1, i32 %2, double* %3) {
%5 = alloca [2 x i32]
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %1, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %2, i32* %8
%9 = call i32 @_ada_use_c2phc(i32 141, i32* %0, i32* %7, double* %3)
ret i32 %9
}
void RTProcDaemonize(void) {}


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

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

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

LLVM IR (-O2):
define void @RTProcDaemonize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xc0() {
  Assert_real((isgraph(192) == 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_isgraph.c",
              965, ("isgraph should be 0 for 0xc0"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xc0>:
push   %rax
mov    $0xc0,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3c5,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc0\00"
define void @t_isgraph_0xc0() {
%1 = call i64 @isgraph(i32 192)
%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 965, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc0\00"
define void @t_isgraph_0xc0() {
%1 = tail call i64 @isgraph(i32 192)
%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 965, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void sysfs_remove_dir(struct kobject *kobj) {}


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

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

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

LLVM IR (-O2):
%struct.kobject = type opaque
define void @sysfs_remove_dir(%struct.kobject* nocapture %0) {
ret void
}
int gdb_remove_event(struct gdb_event *event) {
  if (!event)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<gdb_remove_event>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <gdb_remove_event+0x1f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1126 <gdb_remove_event+0x26>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdb_remove_event>:
cmp    $0x1,%rdi
sbb    %eax,%eax
ret

LLVM IR (-O0):
%struct.gdb_event = type opaque
define i32 @gdb_remove_event(%struct.gdb_event* %0) {
%2 = alloca i32
%3 = alloca %struct.gdb_event*
store %struct.gdb_event* %0, %struct.gdb_event** %3
%4 = load %struct.gdb_event*, %struct.gdb_event** %3
%5 = icmp ne %struct.gdb_event* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 -1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
%struct.gdb_event = type opaque
define i32 @gdb_remove_event(%struct.gdb_event* readnone %0) {
%2 = icmp eq %struct.gdb_event* %0, null
%3 = sext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void midnam_footer(FILE *f) {
  fprintf(f, "  </MasterDeviceNames>\n"
             "</MIDINameDocument>");
}


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

x86 assembly (clang, -O2):
<midnam_footer>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x2a,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [43 x i8] c" </MasterDeviceNames>\0A</MIDINameDocument>\00"
define void @midnam_footer(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c" </MasterDeviceNames>\0A</MIDINameDocument>\00"
define void @midnam_footer(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i64 42, i64 1, i32* %0)
ret void
}
void init_uart(void) {
  (*((volatile unsigned short *)0x7F008000)) &= ~0xff;
  (*((volatile unsigned short *)0x7F008000)) |= 0x22;
  (*((volatile unsigned long *)0x7F005000)) = 0x3;
  (*((volatile unsigned long *)0x7F005004)) = 0x5;
  (*((volatile unsigned long *)0x7F005008)) = 0x07;
  (*((volatile unsigned long *)0x7F00500C)) = 0;
  (*((volatile unsigned short *)0x7F005028)) = 35;
  (*((volatile unsigned short *)0x7F00502C)) = 0x1;
}


x86 assembly (clang, -O0):
<init_uart>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008000,%eax
mov    (%rax),%ax
movzwl %ax,%eax
and    $0xffffff00,%eax
mov    %ax,%cx
mov    $0x7f008000,%eax
mov    %cx,(%rax)
mov    $0x7f008000,%eax
mov    (%rax),%ax
movzwl %ax,%eax
or     $0x22,%eax
mov    %ax,%cx
mov    $0x7f008000,%eax
mov    %cx,(%rax)
mov    $0x7f005000,%eax
movq   $0x3,(%rax)
mov    $0x7f005004,%eax
movq   $0x5,(%rax)
mov    $0x7f005008,%eax
movq   $0x7,(%rax)
mov    $0x7f00500c,%eax
movq   $0x0,(%rax)
mov    $0x7f005028,%eax
movw   $0x23,(%rax)
mov    $0x7f00502c,%eax
movw   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_uart>:
andw   $0xff00,0x7f008000
orw    $0x22,0x7f008000
7f 22
movq   $0x3,0x7f005000
movq   $0x5,0x7f005004
movq   $0x7,0x7f005008
movq   $0x0,0x7f00500c
movw   $0x23,0x7f005028
movw   $0x1,0x7f00502c
ret

LLVM IR (-O0):
define void @init_uart() {
%1 = load volatile i16, i16* inttoptr (i64 2130739200 to i16*)
%2 = zext i16 %1 to i32
%3 = and i32 %2, -256
%4 = trunc i32 %3 to i16
store volatile i16 %4, i16* inttoptr (i64 2130739200 to i16*)
%5 = load volatile i16, i16* inttoptr (i64 2130739200 to i16*)
%6 = zext i16 %5 to i32
%7 = or i32 %6, 34
%8 = trunc i32 %7 to i16
store volatile i16 %8, i16* inttoptr (i64 2130739200 to i16*)
store volatile i64 3, i64* inttoptr (i64 2130726912 to i64*)
store volatile i64 5, i64* inttoptr (i64 2130726916 to i64*)
store volatile i64 7, i64* inttoptr (i64 2130726920 to i64*)
store volatile i64 0, i64* inttoptr (i64 2130726924 to i64*)
store volatile i16 35, i16* inttoptr (i64 2130726952 to i16*)
store volatile i16 1, i16* inttoptr (i64 2130726956 to i16*)
ret void
}

LLVM IR (-O2):
define void @init_uart() {
%1 = load volatile i16, i16* inttoptr (i64 2130739200 to i16*)
%2 = and i16 %1, -256
store volatile i16 %2, i16* inttoptr (i64 2130739200 to i16*)
%3 = load volatile i16, i16* inttoptr (i64 2130739200 to i16*)
%4 = or i16 %3, 34
store volatile i16 %4, i16* inttoptr (i64 2130739200 to i16*)
store volatile i64 3, i64* inttoptr (i64 2130726912 to i64*)
store volatile i64 5, i64* inttoptr (i64 2130726916 to i64*)
store volatile i64 7, i64* inttoptr (i64 2130726920 to i64*)
store volatile i64 0, i64* inttoptr (i64 2130726924 to i64*)
store volatile i16 35, i16* inttoptr (i64 2130726952 to i16*)
store volatile i16 1, i16* inttoptr (i64 2130726956 to i16*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_blk_avail(int);
void do_set_oemdbg_blk_avail(int dbg_region) { set_blk_avail(dbg_region); }


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

x86 assembly (clang, -O2):
<do_set_oemdbg_blk_avail>:
jmp    1030 <set_blk_avail@plt>

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

LLVM IR (-O2):
define void @do_set_oemdbg_blk_avail(i32 %0) {
%2 = tail call i32 @set_blk_avail(i32 %0)
ret void
}
int get_rw_offset(int r) {
  switch (r) {
  case 0:
    return 16;
  case 1:
    return 20;
  case 2:
    return 24;
  case 3:
    return 28;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<get_rw_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x3,%rax
ja     115c <get_rw_offset+0x5c>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x10,-0x4(%rbp)
jmp    1163 <get_rw_offset+0x63>
movl   $0x14,-0x4(%rbp)
jmp    1163 <get_rw_offset+0x63>
movl   $0x18,-0x4(%rbp)
jmp    1163 <get_rw_offset+0x63>
movl   $0x1c,-0x4(%rbp)
jmp    1163 <get_rw_offset+0x63>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rw_offset>:
cmp    $0x4,%edi
lea    0x10(,%rdi,4),%ecx
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @get_rw_offset(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
]
5: ; preds = %1
store i32 16, i32* %2
br label %10
6: ; preds = %1
store i32 20, i32* %2
br label %10
7: ; preds = %1
store i32 24, i32* %2
br label %10
8: ; preds = %1
store i32 28, i32* %2
br label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @get_rw_offset(i32 %0) {
%2 = icmp ult i32 %0, 4
%3 = shl i32 %0, 2
%4 = add i32 %3, 16
%5 = select i1 %2, i32 %4, i32 -1
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_cancel(int /*<<< orphan*/);
int /*<<< orphan*/ pthread_join(int /*<<< orphan*/, int /*<<< orphan*/ *);
void ptdestroy(pthread_t *t) {
  pthread_cancel(*t);
  pthread_join(*t, NULL);
}


x86 assembly (clang, -O0):
<ptdestroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <pthread_cancel@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pthread_join@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptdestroy>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1040 <pthread_cancel@plt>
mov    (%rbx),%edi
xor    %esi,%esi
pop    %rbx
jmp    1030 <pthread_join@plt>

LLVM IR (-O0):
define void @ptdestroy(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @pthread_cancel(i32 %4)
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = call i32 @pthread_join(i32 %7, i32* null)
ret void
}

LLVM IR (-O2):
define void @ptdestroy(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @pthread_cancel(i32 %2)
%4 = load i32, i32* %0
%5 = tail call i32 @pthread_join(i32 %4, i32* null)
ret void
}
/* Variables and functions */
short htons(short);
int /*<<< orphan*/ memcpy(void *, short *, int);
void setLength(void *line, short length) {
  length = htons(length);
  memcpy(line, &length, 2);
}


x86 assembly (clang, -O0):
<setLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%edi
call   1030 <htons@plt>
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xa(%rbp),%rsi
mov    $0x2,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setLength>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htons@plt>
mov    %ax,0xe(%rsp)
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @setLength(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = call signext i16 @htons(i16 signext %5)
store i16 %6, i16* %4
%7 = load i8*, i8** %3
%8 = call i32 @memcpy(i8* %7, i16* %4, i32 2)
ret void
}

LLVM IR (-O2):
define void @setLength(i8* %0, i16 signext %1) {
%3 = alloca i16
%4 = tail call signext i16 @htons(i16 signext %1)
store i16 %4, i16* %3
%5 = call i32 @memcpy(i8* %0, i16* %3, i32 2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int putc(unsigned int, int /*<<< orphan*/ *);
int write_dword(FILE *fp, unsigned int dw) {
  putc(dw, fp);
  putc(dw >> 8, fp);
  putc(dw >> 16, fp);
  return (putc(dw >> 24, fp));
}


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

x86 assembly (clang, -O2):
<write_dword>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %ebx,%edi
shr    $0x8,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %ebx,%edi
shr    $0x10,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
shr    $0x18,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putc@plt>

LLVM IR (-O0):
define i32 @write_dword(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 = load i32*, i32** %3
%7 = call i32 @putc(i32 %5, i32* %6)
%8 = load i32, i32* %4
%9 = lshr i32 %8, 8
%10 = load i32*, i32** %3
%11 = call i32 @putc(i32 %9, i32* %10)
%12 = load i32, i32* %4
%13 = lshr i32 %12, 16
%14 = load i32*, i32** %3
%15 = call i32 @putc(i32 %13, i32* %14)
%16 = load i32, i32* %4
%17 = lshr i32 %16, 24
%18 = load i32*, i32** %3
%19 = call i32 @putc(i32 %17, i32* %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @write_dword(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @putc(i32 %1, i32* %0)
%4 = lshr i32 %1, 8
%5 = tail call i32 @putc(i32 %4, i32* %0)
%6 = lshr i32 %1, 16
%7 = tail call i32 @putc(i32 %6, i32* %0)
%8 = lshr i32 %1, 24
%9 = tail call i32 @putc(i32 %8, i32* %0)
ret i32 %9
}
int jac_chain_nm6_alloc(void **mem, const int *idata, const double *rdata) {
  if (mem)
    *mem = 0;
  (void)idata;
  (void)rdata;
  return 0;
}


x86 assembly (clang, -O0):
<jac_chain_nm6_alloc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1126 <jac_chain_nm6_alloc+0x26>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm6_alloc>:
test   %rdi,%rdi
je     110c <jac_chain_nm6_alloc+0xc>
movq   $0x0,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @jac_chain_nm6_alloc(i8** %0, i32* %1, double* %2) {
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca double*
store i8** %0, i8*** %4
store i32* %1, i32** %5
store double* %2, double** %6
%7 = load i8**, i8*** %4
%8 = icmp ne i8** %7, null
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = load i8**, i8*** %4
store i8* null, i8** %10
br label %11
11: ; preds = %9, %3
%12 = load i32*, i32** %5
%13 = load double*, double** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @jac_chain_nm6_alloc(i8** writeonly %0, i32* nocapture readnone %1, double* nocapture readnone %2) {
%4 = icmp eq i8** %0, null
br i1 %4, label %6, label %5
5: ; preds = %3
store i8* null, i8** %0
br label %6
6: ; preds = %5, %3
ret i32 0
}