xunge/DecIR huggingface dataset:
int DUMMY_getline(unsigned char *a, int b, long c, int d) { return (0); }


x86 assembly (clang, -O0):
<DUMMY_getline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @DUMMY_getline(i8* nocapture readnone %0, i32 %1, i64 %2, i32 %3) {
ret i32 0
}
/* Variables and functions */
int wiggle_leds_tir(unsigned char, unsigned char);
bool turn_led_on_tir(unsigned char leds) {
  leds &= 0xf0;
  return wiggle_leds_tir(leds, leds);
}


x86 assembly (clang, -O0):
<turn_led_on_tir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf0,%eax
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzbl -0x1(%rbp),%esi
call   1030 <wiggle_leds_tir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turn_led_on_tir>:
and    $0xfffffff0,%edi
mov    %edi,%esi
jmp    1030 <wiggle_leds_tir@plt>

LLVM IR (-O0):
define i32 @turn_led_on_tir(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 240
%6 = trunc i32 %5 to i8
store i8 %6, i8* %2
%7 = load i8, i8* %2
%8 = load i8, i8* %2
%9 = call i32 @wiggle_leds_tir(i8 zeroext %7, i8 zeroext %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @turn_led_on_tir(i8 zeroext %0) {
%2 = and i8 %0, -16
%3 = tail call i32 @wiggle_leds_tir(i8 zeroext %2, i8 zeroext %2)
ret i32 %3
}
int my_strlen(const char *str) {
  int size = 0;
  while (*str++ != '\0')
    size++;
  return size;
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1138 <my_strlen+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <my_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
cmpb   $0x0,(%rdi)
je     111c <my_strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <my_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ qprintf(char *, void *);
int q_give_semaphore(void *sem) {
  qprintf("*** give_semaphore(%x)\n", sem);
  return 0;
}


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

x86 assembly (clang, -O2):
<q_give_semaphore>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <qprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"*** give_semaphore(%x)\0A\00"
define i32 @q_give_semaphore(i8* %0) {
%2 = tail call i32 @qprintf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fpurge(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, float *);
int /*<<< orphan*/ stdin;
int main() {
  float temp;
  for (;;)
    printf("What is the temperature outside?");
  scanf("%f", &temp);
  if (temp >= 24 && temp <= 32) {
    puts("Cu o adiere usoara e vremea perfecta!");
  } else {
    puts("E prea... Nasoala vreme ...");
  }
  fpurge(stdin);
  return (0);
}


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>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <printf@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [33 x i8] c"What is the temperature outside?\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
br label %3
3: ; preds = %3, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %3
}

LLVM IR (-O2):
@.str = [33 x i8] c"What is the temperature outside?\00"
@stdin = global i32 0
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %1
}
void read_pipe_data(pd, data, size) int *pd;
char *data;
int size;
{ read(pd[0], data, size); }


x86 assembly (clang, -O0):
<read_pipe_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_pipe_data>:
mov    (%rdi),%edi
xor    %eax,%eax
jmp    1030 <read@plt>

LLVM IR (-O0):
define void @read_pipe_data(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %9, i8* %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @read_pipe_data(i32* nocapture %0, i8* %1, i32 %2) {
%4 = load i32, i32* %0
%5 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %4, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
#define EALREADY 131
#define EINPROGRESS 130
#define EINTR 129
#define EWOULDBLOCK 128
int plm_comm_ignore(int err) {
  int n;
  switch (err) {
  case EWOULDBLOCK:
  case EINTR:
  case EALREADY:
  case EINPROGRESS:
    n = 1;
  default:
    n = 0;
  }
  return (n);
}


x86 assembly (clang, -O0):
<plm_comm_ignore>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff80,%eax
sub    $0x3,%eax
ja     1122 <plm_comm_ignore+0x22>
jmp    111b <plm_comm_ignore+0x1b>
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @plm_comm_ignore(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %6 [
i32 128, label %5
i32 129, label %5
i32 131, label %5
i32 130, label %5
]
5: ; preds = %1, %1, %1, %1
store i32 1, i32* %3
br label %6
6: ; preds = %1, %5
store i32 0, i32* %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @plm_comm_ignore(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ naFree(void *);
void dirGhostDestroy(void *g) {
  DIR **d = (DIR **)g;
  if (*d)
    closedir(*d);
  naFree(g);
}


x86 assembly (clang, -O0):
<dirGhostDestroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114e <dirGhostDestroy+0x2e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <closedir@plt>
mov    -0x8(%rbp),%rdi
call   1030 <naFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dirGhostDestroy>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1131 <dirGhostDestroy+0x11>
call   1040 <closedir@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <naFree@plt>

LLVM IR (-O0):
define void @dirGhostDestroy(i8* %0) {
%2 = alloca i8*
%3 = alloca i32**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32**
store i32** %5, i32*** %3
%6 = load i32**, i32*** %3
%7 = load i32*, i32** %6
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32**, i32*** %3
%11 = load i32*, i32** %10
%12 = call i32 @closedir(i32* %11)
br label %13
13: ; preds = %9, %1
%14 = load i8*, i8** %2
%15 = call i32 @naFree(i8* %14)
ret void
}

LLVM IR (-O2):
define void @dirGhostDestroy(i8* %0) {
%2 = bitcast i8* %0 to i32**
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @closedir(i32* %3)
br label %7
7: ; preds = %5, %1
%8 = tail call i32 @naFree(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
char *ttyname(int fd) {
  errno = ENOSYS;
  return NULL;
}


x86 assembly (clang, -O0):
<ttyname>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttyname>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i8* @ttyname(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i8* null
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define noalias i8* @ttyname(i32 %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i8* null
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t fgetxattr(int __fd, const char *__name, void *__value, size_t __size) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<fgetxattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetxattr>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @fgetxattr(i32 %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i32, i32* @ENOSYS
%10 = call i32 @__set_errno(i32 %9)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @fgetxattr(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3) {
%5 = load i32, i32* @ENOSYS
%6 = tail call i32 @__set_errno(i32 %5)
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int read(int, char *, int);
int /*<<< orphan*/ write(int, char *, int);
void echo(int fd) {
  int str_len;
  char buf[1024];
  while ((str_len = read(fd, buf, sizeof(buf))) > 0)
    write(fd, buf, str_len);
}


x86 assembly (clang, -O0):
<echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x410(%rbp),%rsi
mov    $0x400,%edx
call   1040 <read@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1165 <echo+0x45>
mov    -0x4(%rbp),%edi
lea    -0x410(%rbp),%rsi
mov    -0x8(%rbp),%edx
call   1030 <write@plt>
jmp    112e <echo+0xe>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %edi,%ebx
mov    %rsp,%rsi
mov    $0x400,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    115f <echo+0x3f>
mov    %rsp,%r14
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x400,%edx
call   1040 <read@plt>
test   %eax,%eax
jg     1140 <echo+0x20>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @echo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1024 x i8]
store i32 %0, i32* %2
br label %5
5: ; preds = %10, %1
%6 = load i32, i32* %2
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%8 = call i32 @read(i32 %6, i8* %7, i32 1024)
store i32 %8, i32* %3
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load i32, i32* %2
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%13 = load i32, i32* %3
%14 = call i32 @write(i32 %11, i8* %12, i32 %13)
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @echo(i32 %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @read(i32 %0, i8* %3, i32 1024)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ %4, %1 ]
%8 = call i32 @write(i32 %0, i8* %3, i32 %7)
%9 = call i32 @read(i32 %0, i8* %3, i32 1024)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %6, label %11
11: ; preds = %6, %1
ret void
}
long double test_sqrtl(long double x) { return __builtin_sqrtl(x); }


x86 assembly (clang, -O0):
<test_sqrtl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sqrtl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sqrtl>:
jmp    1030 <sqrtl@plt>

LLVM IR (-O0):
define x86_fp80 @test_sqrtl(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 @sqrtl(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @test_sqrtl(x86_fp80 %0) {
%2 = tail call x86_fp80 @sqrtl(x86_fp80 %0)
ret x86_fp80 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void fat_uint24(uint8_t *dest, uint32_t value) {
  dest[0] = value;
  dest[1] = value >> 8;
  dest[2] = value >> 16;
}


x86 assembly (clang, -O0):
<fat_uint24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fat_uint24>:
mov    %esi,(%rdi)
mov    %esi,%eax
sar    $0x8,%eax
mov    %eax,0x4(%rdi)
sar    $0x10,%esi
mov    %esi,0x8(%rdi)
ret

LLVM IR (-O0):
define void @fat_uint24(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 = getelementptr inbounds i32, i32* %6, i64 0
store i32 %5, i32* %7
%8 = load i32, i32* %4
%9 = ashr i32 %8, 8
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32 %9, i32* %11
%12 = load i32, i32* %4
%13 = ashr i32 %12, 16
%14 = load i32*, i32** %3
%15 = getelementptr inbounds i32, i32* %14, i64 2
store i32 %13, i32* %15
ret void
}

LLVM IR (-O2):
define void @fat_uint24(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
%3 = ashr i32 %1, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %4
%5 = ashr i32 %1, 16
%6 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %5, i32* %6
ret void
}
/* Variables and functions */
int EOF;
int fputc(char, int /*<<< orphan*/);
int fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int puts(const char *s) {
  int n = fputs(s, stdout), m = fputc('\n', stdout);
  return n < 0 || m < 0 ? EOF : n + m;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    %eax,-0xc(%rbp)
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     116b <puts+0x4b>
cmpl   $0x0,-0x10(%rbp)
jge    117c <puts+0x5c>
mov    0x2e76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1185 <puts+0x65>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %r14
push   %rbx
push   %rax
mov    0x2ead(%rip),%r14
mov    (%r14),%esi
call   1030 <fputs@plt>
mov    %eax,%ebx
mov    (%r14),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    %ebx,%ecx
or     %eax,%ecx
jns    1153 <puts+0x33>
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
jmp    1155 <puts+0x35>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
@EOF = global i32 0
define i32 @puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* %5, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* @stdout
%9 = call i32 @fputc(i8 signext 10, i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %1
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12, %1
%16 = load i32, i32* @EOF
br label %21
17: ; preds = %12
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = add nsw i32 %18, %19
br label %21
21: ; preds = %17, %15
%22 = phi i32 [ %16, %15 ], [ %20, %17 ]
ret i32 %22
}

LLVM IR (-O2):
@stdout = global i32 0
@EOF = global i32 0
define i32 @puts(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputc(i8 signext 10, i32 %4)
%6 = icmp slt i32 %3, 0
%7 = icmp slt i32 %5, 0
%8 = select i1 %6, i1 true, i1 %7
%9 = load i32, i32* @EOF
%10 = add nsw i32 %5, %3
%11 = select i1 %8, i32 %9, i32 %10
ret i32 %11
}
void ascend(void *a, void *b) {
  int *first = (int *)a;
  int *second = (int *)b;
  int tmp = 0;
  if (*first > *second) {
    tmp = *first;
    *first = *second;
    *second = tmp;
  }
}


x86 assembly (clang, -O0):
<ascend>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jle    1153 <ascend+0x53>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascend>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
cmp    %ecx,%eax
jle    110c <ascend+0xc>
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @ascend(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 %6, i32* %3
store i32 %5, i32* %4
br label %9
9: ; preds = %8, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ prints(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  prints(stderr, "Usage: ed [-[x]] [+cmopsv] [file]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <prints@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <prints@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: ed [-[x]] [+cmopsv] [file]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @prints(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: ed [-[x]] [+cmopsv] [file]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @prints(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void RTSemXRoadsEWEnter(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemXRoadsEWEnter() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_8382() {
  Assert_real((isqrt(8382) == 91),
              "/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/stdlib/isqrt.c",
              1450, ("Integer square root of 8382 should be 91"));
}


x86 assembly (clang, -O0):
<t_sqrt_8382>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20be,%edi
call   1030 <isqrt@plt>
cmp    $0x5b,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x5aa,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_8382>:
push   %rax
mov    $0x20be,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x5b,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x5aa,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 8382 should be 91\00"
define void @t_sqrt_8382() {
%1 = call i32 @isqrt(i32 8382)
%2 = icmp eq i32 %1, 91
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1450, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 8382 should be 91\00"
define void @t_sqrt_8382() {
%1 = tail call i32 @isqrt(i32 8382)
%2 = icmp eq i32 %1, 91
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1450, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *getenv(char const *);
char *Parrot_getenv(const char *name, int *free_it) {
  *free_it = 0;
  return getenv(name);
}


x86 assembly (clang, -O0):
<Parrot_getenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <getenv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Parrot_getenv>:
movl   $0x0,(%rsi)
jmp    1030 <getenv@plt>

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

LLVM IR (-O2):
define i8* @Parrot_getenv(i8* nocapture %0, i32* nocapture writeonly %1) {
store i32 0, i32* %1
%3 = tail call i8* @getenv(i8* %0)
ret i8* %3
}
void swap_c(char *a, char *b) {
  char tmp = *a;
  *a = *b;
  *b = tmp;
}


x86 assembly (clang, -O0):
<swap_c>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_c>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap_c(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ frexp(unsigned int, int *);
unsigned int floorPow2(unsigned int x) {
  int exp;
  frexp(x, &exp);
  return 1 << (exp - 1);
}


x86 assembly (clang, -O0):
<floorPow2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1030 <frexp@plt>
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floorPow2>:
push   %rax
lea    0x4(%rsp),%rsi
call   1030 <frexp@plt>
mov    0x4(%rsp),%cl
add    $0xff,%cl
mov    $0x1,%eax
shl    %cl,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @floorPow2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @frexp(i32 %4, i32* %3)
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 1
%8 = shl i32 1, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @floorPow2(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @frexp(i32 %0, i32* %2)
%5 = load i32, i32* %2
%6 = add nsw i32 %5, -1
%7 = shl nuw i32 1, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ val;
typedef int /*<<< orphan*/ uint32_t;
struct pkt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int /*<<< orphan*/ pkt_put(struct pkt *, int);
uint32_t pkt_put_extract_u32(struct pkt *p) {
  uint32_t val;
  memcpy(&val, pkt_put(p, sizeof(val)), sizeof(val));
  return val;
}


x86 assembly (clang, -O0):
<pkt_put_extract_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1040 <pkt_put@plt>
mov    %eax,%esi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pkt_put_extract_u32>:
push   %rax
mov    $0x4,%esi
call   1040 <pkt_put@plt>
lea    0x4(%rsp),%rdi
mov    %eax,%esi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pkt = type { i32 }
define i32 @pkt_put_extract_u32(%struct.pkt* %0) {
%2 = alloca %struct.pkt*
%3 = alloca i32
store %struct.pkt* %0, %struct.pkt** %2
%4 = load %struct.pkt*, %struct.pkt** %2
%5 = call i32 @pkt_put(%struct.pkt* %4, i32 4)
%6 = call i32 @memcpy(i32* %3, i32 %5, i32 4)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
%struct.pkt = type { i32 }
define i32 @pkt_put_extract_u32(%struct.pkt* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @pkt_put(%struct.pkt* %0, i32 4)
%5 = call i32 @memcpy(i32* %2, i32 %4, i32 4)
%6 = load i32, i32* %2
ret i32 %6
}
/* Variables and functions */
char *CSlim_BuyBuf(char const *, int);
scalar_t__ strlen(char const *);
char *CSlim_BuyString(char const *string) {
  if (string == NULL)
    return NULL;
  return CSlim_BuyBuf(string, (int)strlen(string));
}


x86 assembly (clang, -O0):
<CSlim_BuyString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <CSlim_BuyString+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1164 <CSlim_BuyString+0x44>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <CSlim_BuyBuf@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CSlim_BuyString>:
test   %rdi,%rdi
je     1139 <CSlim_BuyString+0x19>
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <CSlim_BuyBuf@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @CSlim_BuyString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* null, i8** %2
br label %13
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
%11 = trunc i64 %10 to i32
%12 = call i8* @CSlim_BuyBuf(i8* %8, i32 %11)
store i8* %12, i8** %2
br label %13
13: ; preds = %7, %6
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
define i8* @CSlim_BuyString(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = trunc i64 %4 to i32
%6 = tail call i8* @CSlim_BuyBuf(i8* %0, i32 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x46() {
  Assert_real((isodigit(70) == 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_isodigit.c",
              355, ("isodigit should be 0 for F"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for F\00"
define void @t_isodigit_0x46() {
%1 = call i64 @isodigit(i32 70)
%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 355, i8* getelementptr inbounds ([27 x i8], [27 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for F\00"
define void @t_isodigit_0x46() {
%1 = tail call i64 @isodigit(i32 70)
%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 355, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ppuSetNameTblSingleLower();
int /*<<< orphan*/ ppuSetNameTblSingleUpper();
void m71_setParams9000(uint16_t addr, uint8_t val) {
  (void)addr;
  if ((val & 0x10) != 0)
    ppuSetNameTblSingleLower();
  else if (val == 0)
    ppuSetNameTblSingleUpper();
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1149 <m71_setParams9000+0x29>
mov    $0x0,%al
call   1040 <ppuSetNameTblSingleLower@plt>
jmp    115f <m71_setParams9000+0x3f>
cmpl   $0x0,-0x8(%rbp)
jne    115a <m71_setParams9000+0x3a>
mov    $0x0,%al
call   1030 <ppuSetNameTblSingleUpper@plt>
jmp    115f <m71_setParams9000+0x3f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
test   $0x10,%sil
jne    112b <m71_setParams9000+0xb>
test   %esi,%esi
je     1132 <m71_setParams9000+0x12>
ret
xor    %eax,%eax
jmp    1040 <ppuSetNameTblSingleLower@plt>
xor    %eax,%eax
jmp    1030 <ppuSetNameTblSingleUpper@plt>

LLVM IR (-O0):
define void @m71_setParams9000(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %6, 16
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @ppuSetNameTblSingleLower()
br label %17
11: ; preds = %2
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @ppuSetNameTblSingleUpper()
br label %16
16: ; preds = %14, %11
br label %17
17: ; preds = %16, %9
ret void
}

LLVM IR (-O2):
define void @m71_setParams9000(i32 %0, i32 %1) {
%3 = and i32 %1, 16
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @ppuSetNameTblSingleLower()
br label %11
7: ; preds = %2
%8 = icmp eq i32 %1, 0
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 (...) @ppuSetNameTblSingleUpper()
br label %11
11: ; preds = %7, %9, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M134_f(char *s) {
  debug("M134_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M134_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M134_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M134_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M134_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M134_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M134_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
void ve_nfs_data_get(void) {}


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

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

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

LLVM IR (-O2):
define void @ve_nfs_data_get() {
ret void
}
int atoi(char *s) {
  int n;
  n = 0;
  while (*s >= '0' && *s <= '9')
    n = 10 * n + (*(s++) - '0');
  return n;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0xd(%rbp)
jl     1134 <atoi+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1144 <atoi+0x44>
jmp    1167 <atoi+0x67>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <atoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <atoi+0x20>
ret

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %13, %5 ], [ 0, %1 ]
%8 = phi i8* [ %11, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = add i32 %10, -48
%13 = add i32 %12, %9
%14 = load i8, i8* %11
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %13, %5 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void list_free_aux(void *x, void *pfreelist) { free(x); }


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

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

LLVM IR (-O0):
define void @list_free_aux(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 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @list_free_aux(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tty_cleanup();
void cleanup(void) { tty_cleanup(); }


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

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

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

LLVM IR (-O2):
define void @cleanup() {
%1 = tail call i32 (...) @tty_cleanup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AddMessage(int, char *);
void Save() { AddMessage(1, "Player Saved"); }


x86 assembly (clang, -O0):
<Save>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <AddMessage@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Save>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <AddMessage@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Player Saved\00"
define void @Save() {
%1 = call i32 @AddMessage(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Player Saved\00"
define void @Save() {
%1 = tail call i32 @AddMessage(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
char mytoupper(char ch) {
  if (ch >= 'a' && ch <= 'z') {
    return ch - 'a' + 'A';
  }
  return ch;
}


x86 assembly (clang, -O0):
<mytoupper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     1136 <mytoupper+0x36>
movsbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     1136 <mytoupper+0x36>
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    113c <mytoupper+0x3c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mytoupper>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @mytoupper(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 97
%15 = add nsw i32 %14, 65
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %19
17: ; preds = %7, %1
%18 = load i8, i8* %3
store i8 %18, i8* %2
br label %19
19: ; preds = %17, %11
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @mytoupper(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
void gtk_calendar_mark_day() {}


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

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

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

LLVM IR (-O2):
define void @gtk_calendar_mark_day() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snoopy_log_syscall_exec(char *, char const *, char *const *,
                                           char **);
void snoopy_log_syscall_execv(const char *filename, char *const argv[]) {
  char *envp[] = {NULL};
  snoopy_log_syscall_exec("execv", filename, argv, envp);
}


x86 assembly (clang, -O0):
<snoopy_log_syscall_execv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rcx
lea    0xead(%rip),%rdi
call   1030 <snoopy_log_syscall_exec@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snoopy_log_syscall_execv>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
movq   $0x0,(%rsp)
lea    0xeda(%rip),%rdi
mov    %rsp,%rcx
call   1030 <snoopy_log_syscall_exec@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"execv\00"
define void @snoopy_log_syscall_execv(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca [1 x i8*]
store i8* %0, i8** %3
store i8** %1, i8*** %4
%6 = bitcast [1 x i8*]* %5 to i8*
%7 = load i8*, i8** %3
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds [1 x i8*], [1 x i8*]* %5, i64 0, i64 0
%10 = call i32 @snoopy_log_syscall_exec(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7, i8** %8, i8** %9)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"execv\00"
define void @snoopy_log_syscall_execv(i8* %0, i8** %1) {
%3 = alloca [1 x i8*]
%4 = bitcast [1 x i8*]* %3 to i8*
%5 = bitcast [1 x i8*]* %3 to i64*
store i64 0, i64* %5
%6 = getelementptr inbounds [1 x i8*], [1 x i8*]* %3, i64 0, i64 0
%7 = call i32 @snoopy_log_syscall_exec(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8** %1, i8** %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void rec_start(uint16_t sampling_frequency, uint16_t gain) {}


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

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

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

LLVM IR (-O2):
define void @rec_start(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int f495(int *);
int f496(int *p) { return f495(p); }


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

x86 assembly (clang, -O2):
<f496>:
jmp    1030 <f495@plt>

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

LLVM IR (-O2):
define i32 @f496(i32* %0) {
%2 = tail call i32 @f495(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int64_t cfs_basic_fchown(int fd, int64_t uid, int64_t gid) { return 0; }


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

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

LLVM IR (-O0):
define i32 @cfs_basic_fchown(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @cfs_basic_fchown(i32 %0, i32 %1, i32 %2) {
ret i32 0
}