xunge/DecIR huggingface dataset:
void freeDoubleMatrix(double **M, unsigned int ROWS) {
  unsigned int i;
  for (i = 0; i < ROWS; i++)
    free(M[i]);
  free(M);
}


x86 assembly (clang, -O0):
<freeDoubleMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1150 <freeDoubleMatrix+0x40>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <freeDoubleMatrix+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeDoubleMatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
je     1142 <freeDoubleMatrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeDoubleMatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeDoubleMatrix(double** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds double*, double** %0, i64 %7
%9 = bitcast double** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast double** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_pstream_send_simple_ack() {
  printf("NOT IMPLEMENTED:"
         "pa_pstream_send_simple_ack"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"NOT IMPLEMENTED:pa_pstream_send_simple_ack\0A\00"
define i32 @pa_pstream_send_simple_ack() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [43 x i8] c"NOT IMPLEMENTED:pa_pstream_send_simple_ack\00"
define i32 @pa_pstream_send_simple_ack() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
scalar_t__ sin8_C(scalar_t__);
uint8_t cos8(uint8_t theta) { return sin8_C(theta + 64); }


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

x86 assembly (clang, -O2):
<cos8>:
add    $0x40,%rdi
jmp    1030 <sin8_C@plt>

LLVM IR (-O0):
define i64 @cos8(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 64
%5 = call i64 @sin8_C(i64 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @cos8(i64 %0) {
%2 = add nsw i64 %0, 64
%3 = tail call i64 @sin8_C(i64 %2)
ret i64 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr1setBank0(int);
int /*<<< orphan*/ chr1setBank1(int);
void m80setParams7EF0(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank0((val & 0xFE) << 10);
  chr1setBank1((val | 0x01) << 10);
}


x86 assembly (clang, -O0):
<m80setParams7EF0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0xfe,%edi
shl    $0xa,%edi
call   1030 <chr1setBank0@plt>
mov    -0x8(%rbp),%edi
or     $0x1,%edi
shl    $0xa,%edi
call   1040 <chr1setBank1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m80setParams7EF0>:
push   %rbx
mov    %esi,%ebx
shl    $0xa,%ebx
mov    %ebx,%edi
and    $0x3f800,%edi
call   1030 <chr1setBank0@plt>
or     $0x400,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <chr1setBank1@plt>

LLVM IR (-O0):
define void @m80setParams7EF0(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, 254
%8 = shl i32 %7, 10
%9 = call i32 @chr1setBank0(i32 %8)
%10 = load i32, i32* %4
%11 = or i32 %10, 1
%12 = shl i32 %11, 10
%13 = call i32 @chr1setBank1(i32 %12)
ret void
}

LLVM IR (-O2):
define void @m80setParams7EF0(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = and i32 %3, 260096
%5 = tail call i32 @chr1setBank0(i32 %4)
%6 = or i32 %3, 1024
%7 = tail call i32 @chr1setBank1(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void str_destroy(char *src) { free(src); }


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

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

LLVM IR (-O2):
define void @str_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int equals(char const *const, char *);
int is_true(const char *const val) { return equals(val, "true"); }


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

x86 assembly (clang, -O2):
<is_true>:
lea    0xee9(%rip),%rsi
jmp    1030 <equals@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
define i32 @is_true(i8* %0) {
%2 = tail call i32 @equals(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void freestrarray(char **list, int size) {
  int i;
  for (i = 0; i < size; i++) {
    free(list[i]);
  }
  free(list);
}


x86 assembly (clang, -O0):
<freestrarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <freestrarray+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <freestrarray+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freestrarray>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <freestrarray+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freestrarray+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freestrarray(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ *popen(char const *, char const *);
int /*<<< orphan*/ stderr;
FILE *Popen(const char *command, const char *mode) {
  FILE *fp;
  if ((fp = popen(command, mode)) == NULL)
    fprintf(stderr, "popen error");
  return (fp);
}


x86 assembly (clang, -O0):
<Popen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <popen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1160 <Popen+0x40>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Popen>:
push   %rbx
call   1040 <popen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <Popen+0x23>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"popen error\00"
define noalias i32* @Popen(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @popen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %2
ret i32* %3
}
void get_sb_single(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<get_sb_single>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sb_single>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.get_sb_single = [14 x i8] c"get_sb_single\00"
define void @get_sb_single() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.get_sb_single, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.get_sb_single = [14 x i8] c"get_sb_single\00"
define void @get_sb_single() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.get_sb_single, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
int shm_unlink(char const *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int delete_shm(const char *path) {
  int r;
  r = shm_unlink(path);
  if (r)
    fprintf(stderr, "delete_shm(%s)::shm_unlink: %s\n", path, strerror(errno));
  return r;
}


x86 assembly (clang, -O0):
<delete_shm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <shm_unlink@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     118a <delete_shm+0x5a>
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
lea    0xe7b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_shm>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1050 <shm_unlink@plt>
mov    %eax,%ebx
test   %eax,%eax
je     116d <delete_shm+0x3d>
mov    0x2e97(%rip),%rax
mov    (%rax),%ebp
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xea0(%rip),%rsi
mov    %ebp,%edi
mov    %r14,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"delete_shm(%s)::shm_unlink: %s\0A\00"
@errno = global i32 0
define i32 @delete_shm(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @shm_unlink(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = load i32, i32* @errno
%12 = call i8* @strerror(i32 %11)
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %12)
br label %14
14: ; preds = %8, %1
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"delete_shm(%s)::shm_unlink: %s\0A\00"
@errno = global i32 0
define i32 @delete_shm(i8* %0) {
%2 = tail call i32 @shm_unlink(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = tail call i8* @strerror(i32 %6)
%8 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %7)
br label %9
9: ; preds = %4, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x84() {
  Assert_real((isspace(132) == 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_isspace.c",
              665, ("isspace should be 0 for 0x84"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x84\00"
define void @t_isspace_0x84() {
%1 = call i64 @isspace(i32 132)
%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 665, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x84\00"
define void @t_isspace_0x84() {
%1 = tail call i64 @isspace(i32 132)
%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 665, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void f2(void) {
#pragma STDC FP_CONTRACT OFF
#pragma STDC FP_CONTRACT ON
}


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

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

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

LLVM IR (-O2):
define void @f2() {
ret void
}
/* Type definitions */
struct internal {
  int dummy;
};

/* Variables and functions */
uintptr_t tag_node(struct internal *n) { return (uintptr_t)n + 1; }


x86 assembly (clang, -O0):
<tag_node>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tag_node>:
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
%struct.internal = type { i32 }
define i64 @tag_node(%struct.internal* %0) {
%2 = alloca %struct.internal*
store %struct.internal* %0, %struct.internal** %2
%3 = load %struct.internal*, %struct.internal** %2
%4 = ptrtoint %struct.internal* %3 to i64
%5 = add i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
%struct.internal = type { i32 }
define i64 @tag_node(%struct.internal* %0) {
%2 = ptrtoint %struct.internal* %0 to i64
%3 = add i64 %2, 1
ret i64 %3
}
unsigned inv_recenter(const unsigned r, const unsigned v) {
  if (v > (r << 1))
    return v;
  else if ((v & 1) == 0)
    return (v >> 1) + r;
  else
    return r - ((v + 1) >> 1);
}


x86 assembly (clang, -O0):
<inv_recenter>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jbe    1126 <inv_recenter+0x26>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <inv_recenter+0x57>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1146 <inv_recenter+0x46>
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <inv_recenter+0x57>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
shr    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_recenter>:
mov    %esi,%eax
lea    (%rdi,%rdi,1),%ecx
cmp    %esi,%ecx
jb     111b <inv_recenter+0x1b>
test   $0x1,%al
jne    1112 <inv_recenter+0x12>
shr    %eax
add    %edi,%eax
ret
add    $0x1,%eax
shr    %eax
sub    %eax,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @inv_recenter(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = load i32, i32* %4
%8 = shl i32 %7, 1
%9 = icmp ugt i32 %6, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* %5
store i32 %11, i32* %3
br label %27
12: ; preds = %2
%13 = load i32, i32* %5
%14 = and i32 %13, 1
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i32, i32* %5
%18 = lshr i32 %17, 1
%19 = load i32, i32* %4
%20 = add i32 %18, %19
store i32 %20, i32* %3
br label %27
21: ; preds = %12
%22 = load i32, i32* %4
%23 = load i32, i32* %5
%24 = add i32 %23, 1
%25 = lshr i32 %24, 1
%26 = sub i32 %22, %25
store i32 %26, i32* %3
br label %27
27: ; preds = %21, %16, %10
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @inv_recenter(i32 %0, i32 %1) {
%3 = shl i32 %0, 1
%4 = icmp ult i32 %3, %1
br i1 %4, label %15, label %5
5: ; preds = %2
%6 = and i32 %1, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = lshr i32 %1, 1
%10 = add i32 %9, %0
br label %15
11: ; preds = %5
%12 = add i32 %1, 1
%13 = lshr i32 %12, 1
%14 = sub i32 %0, %13
br label %15
15: ; preds = %2, %11, %8
%16 = phi i32 [ %10, %8 ], [ %14, %11 ], [ %1, %2 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_mcalign_free() {
  printf("NOT IMPLEMENTED:"
         "pa_mcalign_free"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"NOT IMPLEMENTED:pa_mcalign_free\0A\00"
define i32 @pa_mcalign_free() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_mcalign_free\00"
define i32 @pa_mcalign_free() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned char const *, int, size_t,
                          int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int test_yajl_string(void *ctx, const unsigned char *stringVal,
                     size_t stringLen) {
  printf("string: '");
  fwrite(stringVal, 1, stringLen, stdout);
  printf("'\n");
  return 1;
}


x86 assembly (clang, -O0):
<test_yajl_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    0x2e91(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1040 <fwrite@plt>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_yajl_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %r14,%rdx
call   1050 <fwrite@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"string: '\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"'\0A\00"
define i32 @test_yajl_string(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = load i32, i32* @stdout
%11 = call i32 @fwrite(i8* %8, i32 1, i64 %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [10 x i8] c"string: '\00"
@stdout = global i32 0
@str = [2 x i8] c"'\00"
define i32 @test_yajl_string(i8* nocapture readnone %0, i8* %1, i64 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fwrite(i8* %1, i32 1, i64 %2, i32 %5)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 1
}
int lg2(int x) {
  int ret = -1;
  if (x == 0 || ((x - 1) & x))
    return -1;
  while (x) {
    x >>= 1;
    ret++;
  }
  return ret;
}


x86 assembly (clang, -O0):
<lg2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112a <lg2+0x2a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
je     1136 <lg2+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <lg2+0x62>
jmp    113b <lg2+0x3b>
cmpl   $0x0,-0x8(%rbp)
je     115c <lg2+0x5c>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <lg2+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lg2>:
lea    -0x1(%rdi),%eax
test   %eax,%edi
setne  %al
test   %edi,%edi
sete   %cl
or     %al,%cl
mov    $0xffffffff,%eax
jne    113c <lg2+0x3c>
test   %edi,%edi
je     113c <lg2+0x3c>
mov    $0xffffffff,%eax
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1130 <lg2+0x30>
ret

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

LLVM IR (-O2):
define i32 @lg2(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
%3 = icmp ne i32 %2, 1
%4 = icmp eq i32 %0, 0
%5 = or i1 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %1, %6
%7 = phi i32 [ %10, %6 ], [ -1, %1 ]
%8 = phi i32 [ %9, %6 ], [ %0, %1 ]
%9 = ashr i32 %8, 1
%10 = add nsw i32 %7, 1
%11 = icmp ult i32 %8, 2
br i1 %11, label %12, label %6
12: ; preds = %6, %1
%13 = phi i32 [ -1, %1 ], [ %10, %6 ]
ret i32 %13
}
int cmp_eq(long arg1, long arg2) { return arg1 != arg2; }


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

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

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

LLVM IR (-O2):
define i32 @cmp_eq(i64 %0, i64 %1) {
%3 = icmp ne i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ foo(long *, int);
__attribute__((no)) void bar(long *sa, int n) { foo(sa, n); }


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

x86 assembly (clang, -O2):
<bar>:
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define void @bar(i64* %0, i32 %1) {
%3 = tail call i32 @foo(i64* %0, i32 %1)
ret void
}
int test_imm_4Aint64_midword_reg(long long val) {
  return ((val >> 16) & (0x4A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Aint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x4a,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Aint64_midword_reg>:
test   $0x4a0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Aint64_midword_reg(i64 %0) {
%2 = and i64 %0, 4849664
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ SHA256(unsigned char const *, size_t, unsigned char *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
void shabuf(const unsigned char *buf, size_t l, unsigned char *sha) {
  unsigned char tmp[32];
  SHA256(buf, l, tmp);
  memcpy(sha, tmp, 20);
}


x86 assembly (clang, -O0):
<shabuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1030 <SHA256@plt>
mov    -0x18(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x14,%edx
call   1040 <memcpy@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shabuf>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%rbx
mov    %rsp,%r14
mov    %r14,%rdx
call   1030 <SHA256@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x14,%edx
call   1040 <memcpy@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @shabuf(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca [32 x i8]
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%11 = call i32 @SHA256(i8* %8, i64 %9, i8* %10)
%12 = load i8*, i8** %6
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%14 = call i32 @memcpy(i8* %12, i8* %13, i32 20)
ret void
}

LLVM IR (-O2):
define void @shabuf(i8* %0, i64 %1, i8* %2) {
%4 = alloca [32 x i8]
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%6 = call i32 @SHA256(i8* %0, i64 %1, i8* %5)
%7 = call i32 @memcpy(i8* %2, i8* %5, i32 20)
ret void
}
void ble_rsp_gap_set_adv_parameters(
    const struct ble_msg_gap_set_adv_parameters_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_gap_set_adv_parameters_rsp_t = type opaque
define void @ble_rsp_gap_set_adv_parameters(%struct.ble_msg_gap_set_adv_parameters_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ srand48_r;
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  (void)srand48_r;
  exit(0);
}


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

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

LLVM IR (-O0):
@srand48_r = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = load i32, i32* @srand48_r
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@srand48_r = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int tcdrain(int /*<<< orphan*/);
int main(void) { return tcdrain(0); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @tcdrain(i32 0)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @tcdrain(i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x2e() {
  Assert_real((ispunct(46)),
              "/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_ispunct.c",
              235, ("ispunct should be 1 for ."));
}


x86 assembly (clang, -O0):
<t_ispunct_0x2e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2e,%edi
call   1030 <ispunct@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xeb,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x2e>:
push   %rax
mov    $0x2e,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xeb,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for .\00"
define void @t_ispunct_0x2e() {
%1 = call i32 @ispunct(i32 46)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 235, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for .\00"
define void @t_ispunct_0x2e() {
%1 = tail call i32 @ispunct(i32 46)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 235, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func_4(int /*<<< orphan*/);
int main(void) {
  func_4(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <func_4@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @func_4(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @func_4(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void OutOfMemoryError(char *context) {
  printf("ERROR: out of memory allocating %s.\n", context);
  exit(1);
}


x86 assembly (clang, -O0):
<OutOfMemoryError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<OutOfMemoryError>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"ERROR: out of memory allocating %s.\0A\00"
define void @OutOfMemoryError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [37 x i8] c"ERROR: out of memory allocating %s.\0A\00"
define void @OutOfMemoryError(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int fn20(void) {
  int f = 6;
  return f;
}


x86 assembly (clang, -O0):
<fn20>:
push   %rbp
mov    %rsp,%rbp
movl   $0x6,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn20() {
%1 = alloca i32
store i32 6, i32* %1
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @fn20() {
ret i32 6
}
OP(dd, cd) { op_cd(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_cd()
ret i32 undef
}
void foo60() {}


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

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

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

LLVM IR (-O2):
define void @foo60() {
ret void
}
/* Type definitions */
struct cec_msg {
  int *msg;
};
typedef int __u16;

/* Variables and functions */
void cec_ops_active_source(const struct cec_msg *msg, __u16 *phys_addr) {
  *phys_addr = (msg->msg[2] << 8) | msg->msg[3];
}


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

x86 assembly (clang, -O2):
<cec_ops_active_source>:
mov    (%rdi),%rax
mov    0x8(%rax),%ecx
shl    $0x8,%ecx
or     0xc(%rax),%ecx
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32* }
define void @cec_ops_active_source(%struct.cec_msg* %0, i32* %1) {
%3 = alloca %struct.cec_msg*
%4 = alloca i32*
store %struct.cec_msg* %0, %struct.cec_msg** %3
store i32* %1, i32** %4
%5 = load %struct.cec_msg*, %struct.cec_msg** %3
%6 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %5, i32 0, i32 0
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = load %struct.cec_msg*, %struct.cec_msg** %3
%12 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %11, i32 0, i32 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 3
%15 = load i32, i32* %14
%16 = or i32 %10, %15
%17 = load i32*, i32** %4
store i32 %16, i32* %17
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32* }
define void @cec_ops_active_source(%struct.cec_msg* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i64 2
%6 = load i32, i32* %5
%7 = shl i32 %6, 8
%8 = getelementptr inbounds i32, i32* %4, i64 3
%9 = load i32, i32* %8
%10 = or i32 %7, %9
store i32 %10, i32* %1
ret void
}
void intinit(void) {}


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

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

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

LLVM IR (-O2):
define void @intinit() {
ret void
}
/* Type definitions */
typedef int uint16_t;
typedef int /*<<< orphan*/ int16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int16_t fr_ReadS16(FILE *input) {
  uint16_t result;
  result = fgetc(input);
  result |= fgetc(input) << 8;
  return (int16_t)result;
}


x86 assembly (clang, -O0):
<fr_ReadS16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fr_ReadS16>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fgetc@plt>
shl    $0x8,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fr_ReadS16(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fgetc(i32* %4)
store i32 %5, i32* %3
%6 = load i32*, i32** %2
%7 = call i32 @fgetc(i32* %6)
%8 = shl i32 %7, 8
%9 = load i32, i32* %3
%10 = or i32 %9, %8
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @fr_ReadS16(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @fgetc(i32* %0)
%4 = shl i32 %3, 8
%5 = or i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x6a() {
  Assert_real((isupper(106) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              535, ("isupper should be 0 for j"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for j\00"
define void @t_isupper_0x6a() {
%1 = tail call i64 @isupper(i32 106)
%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 535, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main2() {
  printf("Hello2!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"Hello2!\00"
define i32 @main2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
f(int x) { int a[x]; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %4
%9 = alloca i32, i64 %7
store i64 %7, i64* %5
%10 = load i8*, i8** %4
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 undef
}
unsigned getval_260() { return 2464188744U; }


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

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

LLVM IR (-O0):
define i32 @getval_260() {
ret i32 -1830778552
}

LLVM IR (-O2):
define i32 @getval_260() {
ret i32 -1830778552
}
/* Type definitions */
struct reb_simulation {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ reb_integrator_ias15_step(struct reb_simulation *);
void reb_integrator_ias15_part2(struct reb_simulation *r) {
  while (!reb_integrator_ias15_step(r))
    ;
}


x86 assembly (clang, -O0):
<reb_integrator_ias15_part2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <reb_integrator_ias15_step@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    113a <reb_integrator_ias15_part2+0x2a>
jmp    113f <reb_integrator_ias15_part2+0x2f>
jmp    111c <reb_integrator_ias15_part2+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reb_integrator_ias15_part2>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <reb_integrator_ias15_step@plt>
test   %eax,%eax
je     1120 <reb_integrator_ias15_part2+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.reb_simulation = type { i32 }
define void @reb_integrator_ias15_part2(%struct.reb_simulation* %0) {
%2 = alloca %struct.reb_simulation*
store %struct.reb_simulation* %0, %struct.reb_simulation** %2
br label %3
3: ; preds = %8, %1
%4 = load %struct.reb_simulation*, %struct.reb_simulation** %2
%5 = call i32 @reb_integrator_ias15_step(%struct.reb_simulation* %4)
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.reb_simulation = type { i32 }
define void @reb_integrator_ias15_part2(%struct.reb_simulation* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @reb_integrator_ias15_step(%struct.reb_simulation* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %2, label %5
5: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fortchartoc(char *);
int /*<<< orphan*/ gmvwrite_flag_fromfile(int /*<<< orphan*/);
void fgmvwrite_flag_fromfile_(char filnam[]) {
  gmvwrite_flag_fromfile(fortchartoc(filnam));
}


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

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

LLVM IR (-O0):
define void @fgmvwrite_flag_fromfile_(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fortchartoc(i8* %3)
%5 = call i32 @gmvwrite_flag_fromfile(i32 %4)
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_flag_fromfile_(i8* %0) {
%2 = tail call i32 @fortchartoc(i8* %0)
%3 = tail call i32 @gmvwrite_flag_fromfile(i32 %2)
ret void
}