xunge/DecIR huggingface dataset:
void libMat(char **mat) {
  int i;
  for (i = 0; i < 10; i++)
    free(mat[i]);
  free(mat);
}


x86 assembly (clang, -O0):
<libMat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    114c <libMat+0x3c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <libMat+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libMat>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    0x8(%rbx),%rdi
call   1030 <free@plt>
mov    0x10(%rbx),%rdi
call   1030 <free@plt>
mov    0x18(%rbx),%rdi
call   1030 <free@plt>
mov    0x20(%rbx),%rdi
call   1030 <free@plt>
mov    0x28(%rbx),%rdi
call   1030 <free@plt>
mov    0x30(%rbx),%rdi
call   1030 <free@plt>
mov    0x38(%rbx),%rdi
call   1030 <free@plt>
mov    0x40(%rbx),%rdi
call   1030 <free@plt>
mov    0x48(%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @libMat(i8** nocapture %0) {
%2 = load i8*, i8** %0
tail call void @free(i8* %2)
%3 = getelementptr inbounds i8*, i8** %0, i64 1
%4 = load i8*, i8** %3
tail call void @free(i8* %4)
%5 = getelementptr inbounds i8*, i8** %0, i64 2
%6 = load i8*, i8** %5
tail call void @free(i8* %6)
%7 = getelementptr inbounds i8*, i8** %0, i64 3
%8 = load i8*, i8** %7
tail call void @free(i8* %8)
%9 = getelementptr inbounds i8*, i8** %0, i64 4
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = getelementptr inbounds i8*, i8** %0, i64 5
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = getelementptr inbounds i8*, i8** %0, i64 6
%14 = load i8*, i8** %13
tail call void @free(i8* %14)
%15 = getelementptr inbounds i8*, i8** %0, i64 7
%16 = load i8*, i8** %15
tail call void @free(i8* %16)
%17 = getelementptr inbounds i8*, i8** %0, i64 8
%18 = load i8*, i8** %17
tail call void @free(i8* %18)
%19 = getelementptr inbounds i8*, i8** %0, i64 9
%20 = load i8*, i8** %19
tail call void @free(i8* %20)
%21 = bitcast i8** %0 to i8*
tail call void @free(i8* %21)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_HT();
int main() {
  test_HT();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_HT()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ c_hecmw2fstr_connect_conv(int, int *, int *, int *);
void hecmw2fstr_connect_conv_(int *n_elem, int elem_type[],
                              int elem_node_index[], int elem_node_item[]) {
  c_hecmw2fstr_connect_conv(*n_elem, elem_type, elem_node_index,
                            elem_node_item);
}


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

x86 assembly (clang, -O2):
<hecmw2fstr_connect_conv_>:
mov    (%rdi),%edi
jmp    1030 <c_hecmw2fstr_connect_conv@plt>

LLVM IR (-O0):
define void @hecmw2fstr_connect_conv_(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32*, i32** %8
%14 = call i32 @c_hecmw2fstr_connect_conv(i32 %10, i32* %11, i32* %12, i32* %13)
ret void
}

LLVM IR (-O2):
define void @hecmw2fstr_connect_conv_(i32* nocapture %0, i32* %1, i32* %2, i32* %3) {
%5 = load i32, i32* %0
%6 = tail call i32 @c_hecmw2fstr_connect_conv(i32 %5, i32* %1, i32* %2, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FinishATTList();
int /*<<< orphan*/ InitATTList();
int /*<<< orphan*/ SetUp_address();
void SetUpMemBanks(void) {
  InitATTList();
  SetUp_address();
  FinishATTList();
}


x86 assembly (clang, -O0):
<SetUpMemBanks>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <InitATTList@plt>
mov    $0x0,%al
call   1030 <SetUp_address@plt>
mov    $0x0,%al
call   1040 <FinishATTList@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetUpMemBanks>:
push   %rax
xor    %eax,%eax
call   1050 <InitATTList@plt>
xor    %eax,%eax
call   1030 <SetUp_address@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <FinishATTList@plt>

LLVM IR (-O0):
define void @SetUpMemBanks() {
%1 = call i32 (...) @InitATTList()
%2 = call i32 (...) @SetUp_address()
%3 = call i32 (...) @FinishATTList()
ret void
}

LLVM IR (-O2):
define void @SetUpMemBanks() {
%1 = tail call i32 (...) @InitATTList()
%2 = tail call i32 (...) @SetUp_address()
%3 = tail call i32 (...) @FinishATTList()
ret void
}
void test_sort() {
  char *base;
  register char c, *i, *hi;
  for (i = base; i < hi; i++)
    *i++ = c;
}


x86 assembly (clang, -O0):
<test_sort>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    113f <test_sort+0x3f>
mov    -0x9(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <test_sort+0xc>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_sort() {
ret void
}
int func(int a, int b, int c) {
  int x, y;
  x = a + b + c;
  y = x * 5;
  return y;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
imul   $0x5,-0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
add    %esi,%edi
add    %edx,%edi
lea    (%rdi,%rdi,4),%eax
ret

LLVM IR (-O0):
define i32 @func(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %6
%13 = add nsw i32 %11, %12
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = mul nsw i32 %14, 5
store i32 %15, i32* %8
%16 = load i32, i32* %8
ret i32 %16
}

LLVM IR (-O2):
define i32 @func(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
%6 = mul nsw i32 %5, 5
ret i32 %6
}
const char *MSG_log_version() { return "2015/10/15-1.3-libmsglog-mfilter"; }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"2015/10/15-1.3-libmsglog-mfilter\00"
define i8* @MSG_log_version() {
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [33 x i8] c"2015/10/15-1.3-libmsglog-mfilter\00"
define i8* @MSG_log_version() {
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ jwObj_raw(char *, char *);
void jwObj_bool(char *key, int oneOrZero) {
  jwObj_raw(key, (oneOrZero) ? "true" : "false");
}


x86 assembly (clang, -O0):
<jwObj_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
lea    0xed8(%rip),%rsi
lea    0xecc(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
call   1030 <jwObj_raw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jwObj_bool>:
test   %esi,%esi
lea    0xeec(%rip),%rax
lea    0xee0(%rip),%rsi
cmove  %rax,%rsi
jmp    1030 <jwObj_raw@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define void @jwObj_bool(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%10 = call i32 @jwObj_raw(i8* %5, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define void @jwObj_bool(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @jwObj_raw(i8* %0, i8* %4)
ret void
}
/* Variables and functions */
scalar_t__ IsFalse(char *);
scalar_t__ IsTrue(char *);
signed char SetBooleanSignedChar(signed char *boolptr, char *str) {
  if (IsTrue(str)) {
    (*boolptr) = 1;
    return (0);
  } else if (IsFalse(str)) {
    (*boolptr) = 0;
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<SetBooleanSignedChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <IsTrue@plt>
cmp    $0x0,%rax
je     1153 <SetBooleanSignedChar+0x33>
mov    -0x10(%rbp),%rax
movb   $0x1,(%rax)
movb   $0x0,-0x1(%rbp)
jmp    117f <SetBooleanSignedChar+0x5f>
mov    -0x18(%rbp),%rdi
call   1040 <IsFalse@plt>
cmp    $0x0,%rax
je     1176 <SetBooleanSignedChar+0x56>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
movb   $0x0,-0x1(%rbp)
jmp    117f <SetBooleanSignedChar+0x5f>
jmp    117b <SetBooleanSignedChar+0x5b>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetBooleanSignedChar>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <IsTrue@plt>
mov    $0x1,%cl
test   %rax,%rax
jne    1148 <SetBooleanSignedChar+0x28>
mov    %rbx,%rdi
call   1040 <IsFalse@plt>
test   %rax,%rax
je     1155 <SetBooleanSignedChar+0x35>
xor    %ecx,%ecx
mov    %cl,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%al
jmp    114d <SetBooleanSignedChar+0x2d>

LLVM IR (-O0):
define signext i8 @SetBooleanSignedChar(i8* %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = call i64 @IsTrue(i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i8*, i8** %4
store i8 1, i8* %10
store i8 0, i8* %3
br label %19
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = call i64 @IsFalse(i8* %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i8*, i8** %4
store i8 0, i8* %16
store i8 0, i8* %3
br label %19
17: ; preds = %11
br label %18
18: ; preds = %17
store i8 1, i8* %3
br label %19
19: ; preds = %18, %15, %9
%20 = load i8, i8* %3
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @SetBooleanSignedChar(i8* nocapture writeonly %0, i8* %1) {
%3 = tail call i64 @IsTrue(i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i64 @IsFalse(i8* %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5, %2
%9 = phi i8 [ 1, %2 ], [ 0, %5 ]
store i8 %9, i8* %0
br label %10
10: ; preds = %8, %5
%11 = phi i8 [ 1, %5 ], [ 0, %8 ]
ret i8 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ i2c_stop();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ rpi_close();
void sighandler(int signum) {
  printf("\nsighandler invoked %d, exiting ...\n", signum);
  i2c_stop();
  puts("closing rpi ...");
  rpi_close();
  exit(1);
}


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <i2c_stop@plt>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1050 <rpi_close@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<sighandler>:
push   %rax
mov    %edi,%esi
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <i2c_stop@plt>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <rpi_close@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\0Asighandler invoked %d, exiting ...\0A\00"
@.str.1 = [16 x i8] c"closing rpi ...\00"
define void @sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @i2c_stop()
%6 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (...) @rpi_close()
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [37 x i8] c"\0Asighandler invoked %d, exiting ...\0A\00"
@.str.1 = [16 x i8] c"closing rpi ...\00"
define void @sighandler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 (...) @i2c_stop()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (...) @rpi_close()
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x03() {
  Assert_real((isupper(3) == 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",
              20, ("isupper should be 0 for 0x03"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x03\00"
define void @t_isupper_0x03() {
%1 = tail call i64 @isupper(i32 3)
%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 20, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void do_little() {
  int i;
  i = 0;
  i = i + 2;
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<do_little>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<do_little>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @do_little() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 2
store i32 %3, i32* %1
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @do_little() {
%1 = load i32, i32* @EXIT_SUCCESS
%2 = tail call i32 @exit(i32 %1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
const char *timeToStr(const time_t time) { return "incomplete"; }


x86 assembly (clang, -O0):
<timeToStr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"incomplete\00"
define i8* @timeToStr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [11 x i8] c"incomplete\00"
define i8* @timeToStr(i32 %0) {
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
}
void uart1_set_rts() { (*((volatile unsigned long *)0xE002800C)) = 1 << 10; }


x86 assembly (clang, -O0):
<uart1_set_rts>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe002800c,%eax
movq   $0x400,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart1_set_rts>:
mov    $0xe002800c,%eax
movq   $0x400,(%rax)
ret

LLVM IR (-O0):
define void @uart1_set_rts() {
store volatile i64 1024, i64* inttoptr (i64 3758260236 to i64*)
ret void
}

LLVM IR (-O2):
define void @uart1_set_rts() {
store volatile i64 1024, i64* inttoptr (i64 3758260236 to i64*)
ret void
}
/* Variables and functions */
scalar_t__ atoi(char const *);
char *miget_cfg_str(int);
int miget_cfg_bool(int id) {
  const char *_var = miget_cfg_str(id);
  return atoi(_var) != 0;
}


x86 assembly (clang, -O0):
<miget_cfg_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <miget_cfg_str@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <atoi@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<miget_cfg_bool>:
push   %rax
call   1030 <miget_cfg_str@plt>
mov    %rax,%rdi
call   1040 <atoi@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @miget_cfg_bool(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @miget_cfg_str(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i64 @atoi(i8* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @miget_cfg_bool(i32 %0) {
%2 = tail call i8* @miget_cfg_str(i32 %0)
%3 = tail call i64 @atoi(i8* %2)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
char CaesarEn1(char c) {
  if (c != '\0' && c != '\n' && c != '\r') {
    char out = c + 3;
    return out;
  } else {
    return '\0';
  }
}


x86 assembly (clang, -O0):
<CaesarEn1>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x0,%eax
je     1146 <CaesarEn1+0x46>
movsbl -0x2(%rbp),%eax
cmp    $0xa,%eax
je     1146 <CaesarEn1+0x46>
movsbl -0x2(%rbp),%eax
cmp    $0xd,%eax
je     1146 <CaesarEn1+0x46>
movsbl -0x2(%rbp),%eax
add    $0x3,%eax
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    114a <CaesarEn1+0x4a>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CaesarEn1>:
cmp    $0xd,%dil
ja     1118 <CaesarEn1+0x18>
movzbl %dil,%eax
mov    $0x2401,%ecx
bt     %rax,%rcx
jae    1118 <CaesarEn1+0x18>
xor    %eax,%eax
ret
lea    0x3(%rdi),%eax
ret

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

LLVM IR (-O2):
define signext i8 @CaesarEn1(i8 signext %0) {
switch i8 %0, label %2 [
i8 13, label %4
i8 10, label %4
i8 0, label %4
]
2: ; preds = %1
%3 = add i8 %0, 3
br label %4
4: ; preds = %1, %1, %1, %2
%5 = phi i8 [ %3, %2 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ]
ret i8 %5
}
void _sig_ign(int s) { return; }


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

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

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

LLVM IR (-O2):
define void @_sig_ign(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_text(char *);
void NMI_Handler(void) { send_text("NMI Fault.\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"NMI Fault.\0A\00"
define void @NMI_Handler() {
%1 = call i32 @send_text(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"NMI Fault.\0A\00"
define void @NMI_Handler() {
%1 = tail call i32 @send_text(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
int pthread_cond_broadcast() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_cond_broadcast() {
ret i32 0
}
unsigned int ELMRevisionGet(unsigned int baseAddr) {
  unsigned int ipRev;
  ipRev = ((*((volatile unsigned int *)(baseAddr + (0x0)))) & (0xFFFFFFFFu));
  return (ipRev);
}


x86 assembly (clang, -O0):
<ELMRevisionGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x0,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ELMRevisionGet>:
mov    %edi,%eax
mov    (%rax),%eax
ret

LLVM IR (-O0):
define i32 @ELMRevisionGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 0
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, -1
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @ELMRevisionGet(i32 %0) {
%2 = zext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load volatile i32, i32* %3
ret i32 %4
}
void finn_root_set_text_rgb(float r, float g, float b) {
  r /= 255.0f;
  g /= 255.0f;
  b /= 255.0f;
}


x86 assembly (clang, -O0):
<finn_root_set_text_rgb>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xee0(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xeca(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xeb4(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @finn_root_set_text_rgb(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = fdiv float %7, 2.550000e+02
store float %8, float* %4
%9 = load float, float* %5
%10 = fdiv float %9, 2.550000e+02
store float %10, float* %5
%11 = load float, float* %6
%12 = fdiv float %11, 2.550000e+02
store float %12, float* %6
ret void
}

LLVM IR (-O2):
define void @finn_root_set_text_rgb(float %0, float %1, float %2) {
ret void
}
unsigned long djb2a_hash(unsigned char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++))
    hash = hash * 33 ^ c;
  return hash;
}


x86 assembly (clang, -O0):
<djb2a_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1143 <djb2a_hash+0x43>
imul   $0x21,-0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
xor    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <djb2a_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2a_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <djb2a_hash+0x2c>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movzbl %cl,%eax
xor    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <djb2a_hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @djb2a_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = zext i8 %5 to i64
%11 = xor i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int func1() { printf("func1\n"); }


x86 assembly (clang, -O0):
<func1>:
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):
<func1>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [6 x i8] c"func1\00"
define i32 @func1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
void usage(void) {
  errx(1, "Usage: lguest [--verbose] "
          "[--tunnet=(<ipaddr>:<macaddr>|bridge:<bridgename>:<macaddr>)\n"
          "|--block=<filename>|--initrd=<filename>]...\n"
          "<mem-in-mb> vmlinux [args...]\n"
          "[--snapshot snapshot_path]\n"
          "[--clean]\n"
          "[--memfile]");
}


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

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

LLVM IR (-O0):
@.str = [210 x i8] c"Usage: lguest [--verbose] [--tunnet=(<ipaddr>:<macaddr>|bridge:<bridgename>:<macaddr>)\0A|--block=<filename>|--initrd=<filename>]...\0A<mem-in-mb> vmlinux [args...]\0A[--snapshot snapshot_path]\0A[--clean]\0A[--memfile]\00"
define void @usage() {
%1 = call i32 @errx(i32 1, i8* getelementptr inbounds ([210 x i8], [210 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [210 x i8] c"Usage: lguest [--verbose] [--tunnet=(<ipaddr>:<macaddr>|bridge:<bridgename>:<macaddr>)\0A|--block=<filename>|--initrd=<filename>]...\0A<mem-in-mb> vmlinux [args...]\0A[--snapshot snapshot_path]\0A[--clean]\0A[--memfile]\00"
define void @usage() {
%1 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([210 x i8], [210 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *get_enclosed_string(char *, char, char);
char *get_string_in_brackets(char *string) {
  return get_enclosed_string(string, '(', ')');
}


x86 assembly (clang, -O0):
<get_string_in_brackets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x28,%esi
mov    $0x29,%edx
call   1030 <get_enclosed_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_string_in_brackets>:
mov    $0x28,%esi
mov    $0x29,%edx
jmp    1030 <get_enclosed_string@plt>

LLVM IR (-O0):
define i8* @get_string_in_brackets(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @get_enclosed_string(i8* %3, i8 signext 40, i8 signext 41)
ret i8* %4
}

LLVM IR (-O2):
define i8* @get_string_in_brackets(i8* %0) {
%2 = tail call i8* @get_enclosed_string(i8* %0, i8 signext 40, i8 signext 41)
ret i8* %2
}
unsigned xrop3_33_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ T;
  stk1 = S | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_33_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_33_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
mov    %eax,%edx
xor    $0xff,%edx
or     %ecx,%eax
or     %edx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_33_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %6
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = and i32 %37, %38
%40 = or i32 %36, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %7
%43 = and i32 %41, %42
%44 = or i32 %40, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_33_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, 255
%8 = or i32 %6, %4
%9 = or i32 %8, %7
%10 = xor i32 %9, -1
%11 = or i8 %1, %0
%12 = zext i8 %11 to i32
%13 = or i32 %12, %10
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, size_t);
void *realloc(void *, size_t);
void *srealloc(void *ptr, size_t size) {
  void *new_ptr = NULL;
  if ((new_ptr = realloc(ptr, size)) == NULL) {
    printf("Reallocation of %i bytes failed\n", size);
    exit(255);
  }
  return new_ptr;
}


x86 assembly (clang, -O0):
<srealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    117d <srealloc+0x4d>
mov    -0x10(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    $0xff,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<srealloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <realloc@plt>
test   %rax,%rax
je     1140 <srealloc+0x10>
pop    %rbx
ret
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0xff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Reallocation of %i bytes failed\0A\00"
define i8* @srealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
store i8* null, i8** %5
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i64, i64* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = call i32 @exit(i32 255)
unreachable
14: ; preds = %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [33 x i8] c"Reallocation of %i bytes failed\0A\00"
define noalias i8* @srealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 %1)
%7 = tail call i32 @exit(i32 255)
unreachable
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xcb() {
  Assert_real((isdigit(203) == 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_isdigit.c",
              1020, ("isdigit should be 0 for 0xcb"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xcb>:
push   %rax
mov    $0xcb,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3fc,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xcb\00"
define void @t_isdigit_0xcb() {
%1 = call i64 @isdigit(i32 203)
%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 1020, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xcb\00"
define void @t_isdigit_0xcb() {
%1 = tail call i64 @isdigit(i32 203)
%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 1020, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void welcome_message(void) { fprintf(stderr, "Welcome to the calculator\n"); }


x86 assembly (clang, -O0):
<welcome_message>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<welcome_message>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Welcome to the calculator\0A\00"
define void @welcome_message() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Welcome to the calculator\0A\00"
define void @welcome_message() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
double julian_increment_hours(double julian, int hours) {
  double julian_increment;
  julian_increment = (double)hours / 24.0;
  return julian + julian_increment;
}


x86 assembly (clang, -O0):
<julian_increment_hours>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xee7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<julian_increment_hours>:
cvtsi2sd %edi,%xmm1
divsd  0xef4(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @julian_increment_hours(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sitofp i32 %6 to double
%8 = fdiv double %7, 2.400000e+01
store double %8, double* %5
%9 = load double, double* %3
%10 = load double, double* %5
%11 = fadd double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @julian_increment_hours(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = fdiv double %3, 2.400000e+01
%5 = fadd double %4, %0
ret double %5
}
void RTTestISubV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTestISubV() {
ret void
}
int dontgenerate1(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @dontgenerate1() {
ret i32 1
}

LLVM IR (-O2):
define i32 @dontgenerate1() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *uwsgi_concat2(char *, char *);
int uwsgi_connect_do(char *, int, int);
int uwsgi_connect(char *socket_name, int timeout, int async) {
  char *zeroed_socket_name = uwsgi_concat2(socket_name, (char *)"");
  int fd = uwsgi_connect_do(zeroed_socket_name, timeout, async);
  free(zeroed_socket_name);
  return fd;
}


x86 assembly (clang, -O0):
<uwsgi_connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1050 <uwsgi_concat2@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <uwsgi_connect_do@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_connect>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
lea    0xec0(%rip),%rsi
call   1050 <uwsgi_concat2@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <uwsgi_connect_do@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @uwsgi_connect(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i8*, i8** %4
%10 = call i8* @uwsgi_concat2(i8* %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = call i32 @uwsgi_connect_do(i8* %11, i32 %12, i32 %13)
store i32 %14, i32* %8
%15 = load i8*, i8** %7
%16 = call i32 @free(i8* %15)
%17 = load i32, i32* %8
ret i32 %17
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @uwsgi_connect(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @uwsgi_concat2(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @uwsgi_connect_do(i8* %4, i32 %1, i32 %2)
%6 = tail call i32 @free(i8* %4)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
size_t fwrite(void const *, size_t, size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void fwrite_f(const void *ptr, size_t size, size_t nmemb, FILE *stream) {
  if (fwrite(ptr, size, nmemb, stream) != nmemb) {
    fprintf(stderr, "Error writing to output file \n");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<fwrite_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1050 <fwrite@plt>
cmp    -0x18(%rbp),%rax
je     118a <fwrite_f+0x5a>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
lea    0xe89(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fwrite_f>:
push   %rbx
mov    %rdx,%rbx
call   1050 <fwrite@plt>
cmp    %rbx,%rax
jne    1140 <fwrite_f+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Error writing to output file \0A\00"
@EXIT_FAILURE = global i32 0
define void @fwrite_f(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i64 @fwrite(i8* %9, i64 %10, i64 %11, i32* %12)
%14 = load i64, i64* %7
%15 = icmp ne i64 %13, %14
br i1 %15, label %16, label %21
16: ; preds = %4
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* @EXIT_FAILURE
%20 = call i32 @exit(i32 %19)
unreachable
21: ; preds = %4
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Error writing to output file \0A\00"
@EXIT_FAILURE = global i32 0
define void @fwrite_f(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
%5 = tail call i64 @fwrite(i8* %0, i64 %1, i64 %2, i32* %3)
%6 = icmp eq i64 %5, %2
br i1 %6, label %12, label %7
7: ; preds = %4
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @exit(i32 %10)
unreachable
12: ; preds = %4
ret void
}
int los(char str[]) {
  char *s = str;
  int i = 0;
  while (*s++)
    i++;
  return i;
}


x86 assembly (clang, -O0):
<los>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     113d <los+0x3d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <los+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @los(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
}