xunge/DecIR huggingface dataset:
unsigned long addi(unsigned char rd, unsigned char ra, unsigned short simm) {
  return (14 << 26) | (rd << 21) | (ra << 16) | (simm << 0);
}


x86 assembly (clang, -O0):
<addi>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x15,%eax
or     $0x38000000,%eax
movzbl -0x2(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movzwl -0x4(%rbp),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<addi>:
mov    %edi,%eax
shl    $0x15,%rax
mov    %esi,%ecx
shl    $0x10,%rcx
or     %rax,%rcx
mov    %edx,%eax
or     %rcx,%rax
or     $0x38000000,%rax
ret

LLVM IR (-O0):
define i64 @addi(i8 zeroext %0, i8 zeroext %1, i16 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i16
store i8 %0, i8* %4
store i8 %1, i8* %5
store i16 %2, i16* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 21
%10 = or i32 939524096, %9
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 16
%14 = or i32 %10, %13
%15 = load i16, i16* %6
%16 = zext i16 %15 to i32
%17 = shl i32 %16, 0
%18 = or i32 %14, %17
%19 = sext i32 %18 to i64
ret i64 %19
}

LLVM IR (-O2):
define i64 @addi(i8 zeroext %0, i8 zeroext %1, i16 zeroext %2) {
%4 = zext i8 %0 to i64
%5 = shl nuw nsw i64 %4, 21
%6 = zext i8 %1 to i64
%7 = shl nuw nsw i64 %6, 16
%8 = zext i16 %2 to i64
%9 = or i64 %5, %7
%10 = or i64 %9, %8
%11 = or i64 %10, 939524096
ret i64 %11
}
void ff_hevc_put_hevc_uni_qpel_v16_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v16_10_avx2() {
ret void
}
char **invalidTransactions(char **transactions, int transactionsSize,
                           int *returnSize) {}


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

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

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

LLVM IR (-O2):
define noalias i8** @invalidTransactions(i8** nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
ret i8** undef
}
/* Type definitions */
struct RTPPeer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct RTPPeer *);
void RTPPeerDestroy(struct RTPPeer *peer) { free(peer); }


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

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

LLVM IR (-O2):
%struct.RTPPeer = type { i32 }
define void @RTPPeerDestroy(%struct.RTPPeer* nocapture %0) {
%2 = tail call i32 @free(%struct.RTPPeer* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *);
int imodVersion(char *pname) {
  if (pname)
    printf("%s Version %s %s %s\n", pname, "4.0.6", "Mar 17 2022", "13:32:14");
  return (406);
}


x86 assembly (clang, -O0):
<imodVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114c <imodVersion+0x3c>
mov    -0x8(%rbp),%rsi
lea    0xece(%rip),%rdi
lea    0xedc(%rip),%rdx
lea    0xedb(%rip),%rcx
lea    0xee0(%rip),%r8
call   1030 <printf@plt>
mov    $0x196,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imodVersion>:
test   %rdi,%rdi
je     113e <imodVersion+0x2e>
push   %rax
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
lea    0xeee(%rip),%rdx
lea    0xeed(%rip),%rcx
lea    0xef2(%rip),%r8
call   1030 <printf@plt>
add    $0x8,%rsp
mov    $0x196,%eax
ret

LLVM IR (-O0):
@.str = [21 x i8] c"%s Version %s %s %s\0A\00"
@.str.1 = [6 x i8] c"4.0.6\00"
@.str.2 = [12 x i8] c"Mar 17 2022\00"
@.str.3 = [9 x i8] c"13:32:14\00"
define i32 @imodVersion(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %8
8: ; preds = %5, %1
ret i32 406
}

LLVM IR (-O2):
@.str = [21 x i8] c"%s Version %s %s %s\0A\00"
@.str.1 = [6 x i8] c"4.0.6\00"
@.str.2 = [12 x i8] c"Mar 17 2022\00"
@.str.3 = [9 x i8] c"13:32:14\00"
define i32 @imodVersion(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret i32 406
}
void GP_break01(void) {}


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

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

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

LLVM IR (-O2):
define void @GP_break01() {
ret void
}
/* Variables and functions */
double __nv_dsub_rd(double, double);
double __dsub_rd(double __a, double __b) { return __nv_dsub_rd(__a, __b); }


x86 assembly (clang, -O0):
<__dsub_rd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__nv_dsub_rd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__dsub_rd>:
jmp    1030 <__nv_dsub_rd@plt>

LLVM IR (-O0):
define double @__dsub_rd(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @__nv_dsub_rd(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @__dsub_rd(double %0, double %1) {
%3 = tail call double @__nv_dsub_rd(double %0, double %1)
ret double %3
}
char *xTrimLeft(char *buffer) {
  while (*buffer == ' ' || *buffer == '\t')
    buffer++;
  return (buffer);
}


x86 assembly (clang, -O0):
<xTrimLeft>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <xTrimLeft+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <xTrimLeft+0x3d>
jmp    114e <xTrimLeft+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <xTrimLeft+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xTrimLeft>:
mov    %rdi,%rax
jmp    1114 <xTrimLeft+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <xTrimLeft+0x10>
cmp    $0x9,%cl
je     1110 <xTrimLeft+0x10>
ret

LLVM IR (-O0):
define i8* @xTrimLeft(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 9
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ true, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @xTrimLeft(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
int test_imm_ACuint32_reg(unsigned int val) {
  return ((val) & (0xAC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ACuint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xac,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_ACuint32_reg>:
test   $0xac,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_ACuint32_reg(i32 %0) {
%2 = and i32 %0, 172
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void shift(int *i) { *i = (*i + 1) % 3; }


x86 assembly (clang, -O0):
<shift>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift>:
mov    (%rdi),%eax
mov    %eax,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x55555556,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @shift(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
%6 = srem i32 %5, 3
%7 = load i32*, i32** %2
store i32 %6, i32* %7
ret void
}

LLVM IR (-O2):
define void @shift(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
%4 = srem i32 %3, 3
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ insertionsort_sort(long *, int, int);
void insertionsort(long *array, int length) {
  insertionsort_sort(array, length, 1);
}


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

x86 assembly (clang, -O2):
<insertionsort>:
mov    $0x1,%edx
jmp    1030 <insertionsort_sort@plt>

LLVM IR (-O0):
define void @insertionsort(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 @insertionsort_sort(i64* %5, i32 %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @insertionsort(i64* %0, i32 %1) {
%3 = tail call i32 @insertionsort_sort(i64* %0, i32 %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
scalar_t__ showdir(char *);
int main(int argc, char **argv) {
  if (showdir("/"))
    return 1;
  if (showdir("/var/"))
    return 1;
  puts("Test was successful");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec7(%rip),%rdi
call   1040 <showdir@plt>
cmp    $0x0,%rax
je     1158 <main+0x38>
movl   $0x1,-0x4(%rbp)
jmp    118d <main+0x6d>
lea    0xea1(%rip),%rdi
call   1040 <showdir@plt>
cmp    $0x0,%rax
je     117a <main+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    118d <main+0x6d>
lea    0xe85(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedc(%rip),%rdi
call   1040 <showdir@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    1156 <main+0x36>
lea    0xec2(%rip),%rdi
call   1040 <showdir@plt>
test   %rax,%rax
jne    1156 <main+0x36>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
@.str.1 = [6 x i8] c"/var/\00"
@.str.2 = [20 x i8] c"Test was successful\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 @showdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %15
9: ; preds = %2
%10 = call i64 @showdir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %3
br label %15
13: ; preds = %9
%14 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %15
15: ; preds = %13, %12, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
@.str.1 = [6 x i8] c"/var/\00"
@.str.2 = [20 x i8] c"Test was successful\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @showdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i64 @showdir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %5, %2, %8
%11 = phi i32 [ 0, %8 ], [ 1, %2 ], [ 1, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ console_tx_char(unsigned char);
void print_debug_char(unsigned char byte) { console_tx_char(byte); }


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

x86 assembly (clang, -O2):
<print_debug_char>:
jmp    1030 <console_tx_char@plt>

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

LLVM IR (-O2):
define void @print_debug_char(i8 zeroext %0) {
%2 = tail call i32 @console_tx_char(i8 zeroext %0)
ret void
}
int test_imm_0Bint8_mem(signed char *val) {
  return ((*val) & (0x0B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Bint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 11
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int seri_quit() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @seri_quit() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Course: E G 13 02 A -                  Spring 2014 \n");
  printf("Name:                                 Miles Lilly \n");
  printf("Date Cre         ated: %d/%d/%d \n", 1, 28, 2014);
  printf("Assignment: Which assignment is this? \n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf27(%rip),%rdi
mov    $0x1,%esi
mov    $0x1c,%edx
mov    $0x7de,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf22(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x1,%esi
mov    $0x1c,%edx
mov    $0x7de,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf2c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"Course: E G 13 02 A - Spring 2014 \0A\00"
@.str.1 = [52 x i8] c"Name: Miles Lilly \0A\00"
@.str.2 = [34 x i8] c"Date Cre ated: %d/%d/%d \0A\00"
@.str.3 = [40 x i8] c"Assignment: Which assignment is this? \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 28, i32 2014)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [34 x i8] c"Date Cre ated: %d/%d/%d \0A\00"
@str = [52 x i8] c"Course: E G 13 02 A - Spring 2014 \00"
@str.4 = [51 x i8] c"Name: Miles Lilly \00"
@str.5 = [39 x i8] c"Assignment: Which assignment is this? \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 28, i32 2014)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}
int try_to_freeze(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @try_to_freeze() {
ret i32 0
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, int /*<<< orphan*/, int);
int wave_send_repeat(int pi, unsigned wave_id) {
  return pigpio_command(pi, 52, wave_id, 0, 1);
}


x86 assembly (clang, -O0):
<wave_send_repeat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x34,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wave_send_repeat>:
mov    %esi,%edx
mov    $0x34,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @wave_send_repeat(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 = call i32 @pigpio_command(i32 %5, i32 52, i32 %6, i32 0, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @wave_send_repeat(i32 %0, i32 %1) {
%3 = tail call i32 @pigpio_command(i32 %0, i32 52, i32 %1, i32 0, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ instance1(int /*<<< orphan*/);
int /*<<< orphan*/ instance2(int /*<<< orphan*/);
int /*<<< orphan*/ instance3(int /*<<< orphan*/);
int /*<<< orphan*/ instance4(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  instance1(0);
__CPROVER_ASYNC_1:
  instance2(0);
__CPROVER_ASYNC_2:
  instance3(0);
__CPROVER_ASYNC_3:
  instance4(0);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <instance1@plt>
xor    %edi,%edi
call   1040 <instance2@plt>
xor    %edi,%edi
call   1050 <instance3@plt>
xor    %edi,%edi
call   1030 <instance4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @instance1(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @instance2(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @instance3(i32 0)
br label %8
8: ; preds = %6
%9 = call i32 @instance4(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @instance1(i32 0)
%2 = tail call i32 @instance2(i32 0)
%3 = tail call i32 @instance3(i32 0)
%4 = tail call i32 @instance4(i32 0)
ret i32 0
}
int rsock_scm_optname_to_int(const char *str, long len, int *valp) {
  switch (len) {
  case 5:
    return -1;
  case 6:
    return -1;
  case 7:
    return -1;
  case 9:
    return -1;
  case 10:
    return -1;
  case 11:
    return -1;
  case 12:
    return -1;
  case 13:
    return -1;
  case 15:
    return -1;
  case 16:
    return -1;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<rsock_scm_optname_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0xfffffffffffffffb,%rax
mov    %rax,-0x28(%rbp)
sub    $0xb,%rax
ja     11b2 <rsock_scm_optname_to_int+0xb2>
mov    -0x28(%rbp),%rax
lea    0xecf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xffffffff,-0x4(%rbp)
jmp    11b9 <rsock_scm_optname_to_int+0xb9>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b9 <rsock_scm_optname_to_int+0xb9>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b9 <rsock_scm_optname_to_int+0xb9>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b9 <rsock_scm_optname_to_int+0xb9>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b9 <rsock_scm_optname_to_int+0xb9>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b9 <rsock_scm_optname_to_int+0xb9>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b9 <rsock_scm_optname_to_int+0xb9>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b9 <rsock_scm_optname_to_int+0xb9>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b9 <rsock_scm_optname_to_int+0xb9>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b9 <rsock_scm_optname_to_int+0xb9>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rsock_scm_optname_to_int(i8* %0, i64 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i32* %2, i32** %7
%8 = load i64, i64* %6
switch i64 %8, label %19 [
i64 5, label %9
i64 6, label %10
i64 7, label %11
i64 9, label %12
i64 10, label %13
i64 11, label %14
i64 12, label %15
i64 13, label %16
i64 15, label %17
i64 16, label %18
]
9: ; preds = %3
store i32 -1, i32* %4
br label %20
10: ; preds = %3
store i32 -1, i32* %4
br label %20
11: ; preds = %3
store i32 -1, i32* %4
br label %20
12: ; preds = %3
store i32 -1, i32* %4
br label %20
13: ; preds = %3
store i32 -1, i32* %4
br label %20
14: ; preds = %3
store i32 -1, i32* %4
br label %20
15: ; preds = %3
store i32 -1, i32* %4
br label %20
16: ; preds = %3
store i32 -1, i32* %4
br label %20
17: ; preds = %3
store i32 -1, i32* %4
br label %20
18: ; preds = %3
store i32 -1, i32* %4
br label %20
19: ; preds = %3
store i32 -1, i32* %4
br label %20
20: ; preds = %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @rsock_scm_optname_to_int(i8* nocapture readnone %0, i64 %1, i32* nocapture readnone %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Content-type: text/html\n\n");
  printf("<html><head><title>Hello CGI</title></head>");
  printf("<body><h1>Hello CGI</h1></body></html>");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Content-type: text/html\0A\0A\00"
@.str.1 = [44 x i8] c"<html><head><title>Hello CGI</title></head>\00"
@.str.2 = [39 x i8] c"<body><h1>Hello CGI</h1></body></html>\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [44 x i8] c"<html><head><title>Hello CGI</title></head>\00"
@.str.2 = [39 x i8] c"<body><h1>Hello CGI</h1></body></html>\00"
@str = [25 x i8] c"Content-type: text/html\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ max_value(int *, int, int *);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int array[5] = {-1, 2, 1, 3, 0}, max = 0;
  max_value(array, 5, &max);
  printf("%d ", max);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
lea    -0x24(%rbp),%rdx
call   1040 <max_value@plt>
mov    -0x24(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rdx
mov    $0x5,%esi
call   1040 <max_value@plt>
mov    0xc(%rsp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [5 x i32] [i32 -1, i32 2, i32 1, i32 3, i32 0]
@.str = [4 x i8] c"%d \00"
define void @main() {
%1 = alloca [5 x i32]
%2 = alloca i32
%3 = bitcast [5 x i32]* %1 to i8*
store i32 0, i32* %2
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%5 = call i32 @max_value(i32* %4, i32 5, i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@__const.main.array = [5 x i32] [i32 -1, i32 2, i32 1, i32 3, i32 0]
@.str = [4 x i8] c"%d \00"
define void @main() {
%1 = alloca [5 x i32]
%2 = alloca i32
%3 = bitcast [5 x i32]* %1 to i8*
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%6 = call i32 @max_value(i32* %5, i32 5, i32* %2)
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int printCPUtype() {
  printf("\n\n-- CPU type and model:\n");
  system("cat /proc/cpuinfo | grep model");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"\0A\0A-- CPU type and model:\0A\00"
@.str.1 = [31 x i8] c"cat /proc/cpuinfo | grep model\00"
define i32 @printCPUtype() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [31 x i8] c"cat /proc/cpuinfo | grep model\00"
@str = [25 x i8] c"\0A\0A-- CPU type and model:\00"
define i32 @printCPUtype() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int execute_preadv() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_preadv() {
ret i32 0
}
/* Variables and functions */
char toupper(char const);
void SLib_toupper(char *output, const char *input) {
  for (; *input != 0; input++, output++) {
    *output = toupper(*input);
  }
}


x86 assembly (clang, -O0):
<SLib_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1161 <SLib_toupper+0x51>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <SLib_toupper+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SLib_toupper>:
push   %r15
push   %r14
push   %rbx
mov    (%rsi),%al
test   %al,%al
je     114a <SLib_toupper+0x3a>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,(%r14,%rbx,1)
movzbl 0x1(%r15,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <SLib_toupper+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @SLib_toupper(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %12, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %1, %2 ]
%8 = phi i8* [ %11, %5 ], [ %0, %2 ]
%9 = tail call signext i8 @toupper(i8 signext %6)
store i8 %9, i8* %8
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x3f() {
  Assert_real((islower(63) == 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_islower.c",
              320, ("islower should be 0 for ?"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x3f>:
push   %rax
mov    $0x3f,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x140,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for ?\00"
define void @t_islower_0x3f() {
%1 = call i64 @islower(i32 63)
%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 320, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for ?\00"
define void @t_islower_0x3f() {
%1 = tail call i64 @islower(i32 63)
%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 320, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isupper(int);
void t_isupper_0x56() {
  Assert_real((isupper(86)),
              "/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",
              435, ("isupper should be 1 for V"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x56>:
push   %rax
mov    $0x56,%edi
call   1030 <isupper@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1b3,%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 1 for V\00"
define void @t_isupper_0x56() {
%1 = call i32 @isupper(i32 86)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 435, 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 1 for V\00"
define void @t_isupper_0x56() {
%1 = tail call i32 @isupper(i32 86)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 435, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mempool_clean();
void sigclean(int num) { mempool_clean(); }


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

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

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

LLVM IR (-O2):
define void @sigclean(i32 %0) {
%2 = tail call i32 (...) @mempool_clean()
ret void
}
long __ocl_convert_long_int_sat(int src) { return src; }


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

x86 assembly (clang, -O2):
<__ocl_convert_long_int_sat>:
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @__ocl_convert_long_int_sat(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @__ocl_convert_long_int_sat(i32 %0) {
%2 = sext i32 %0 to i64
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ test_f(float);
void floats(float x) {
  test_f(x * 1.0);
  test_f(x * 1.0F);
}


x86 assembly (clang, -O0):
<floats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeda(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <test_f@plt>
movss  0xebd(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <test_f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floats>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <test_f@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1030 <test_f@plt>

LLVM IR (-O0):
define void @floats(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double %4, 1.000000e+00
%6 = fptrunc double %5 to float
%7 = call i32 @test_f(float %6)
%8 = load float, float* %2
%9 = fmul float %8, 1.000000e+00
%10 = call i32 @test_f(float %9)
ret void
}

LLVM IR (-O2):
define void @floats(float %0) {
%2 = tail call i32 @test_f(float %0)
%3 = tail call i32 @test_f(float %0)
ret void
}
int lt_dladdsearchdir(const char *search_dir) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @lt_dladdsearchdir(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SerialWriteChar(int);
void iRobot_SpotClean() { SerialWriteChar(134); }


x86 assembly (clang, -O0):
<iRobot_SpotClean>:
push   %rbp
mov    %rsp,%rbp
mov    $0x86,%edi
call   1030 <SerialWriteChar@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @iRobot_SpotClean() {
%1 = call i32 @SerialWriteChar(i32 134)
ret void
}

LLVM IR (-O2):
define void @iRobot_SpotClean() {
%1 = tail call i32 @SerialWriteChar(i32 134)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ eeprom_read_dword(int /*<<< orphan*/ *);
uint32_t eeconfig_read_haptic(void) {
  return eeprom_read_dword((uint32_t *)24);
}


x86 assembly (clang, -O0):
<eeconfig_read_haptic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18,%edi
call   1030 <eeprom_read_dword@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeconfig_read_haptic>:
mov    $0x18,%edi
jmp    1030 <eeprom_read_dword@plt>

LLVM IR (-O0):
define i32 @eeconfig_read_haptic() {
%1 = call i32 @eeprom_read_dword(i32* inttoptr (i64 24 to i32*))
ret i32 %1
}

LLVM IR (-O2):
define i32 @eeconfig_read_haptic() {
%1 = tail call i32 @eeprom_read_dword(i32* inttoptr (i64 24 to i32*))
ret i32 %1
}
void swr_set_compensation() {}


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

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

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

LLVM IR (-O2):
define void @swr_set_compensation() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main(int argc, char *argv[]) { f(10); }


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @f(i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @f(i32 10)
ret i32 0
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
char *copy_string(int /*<<< orphan*/);
struct dirent *readdir(int /*<<< orphan*/ *);
char *get_next_file_name(DIR *dir_p) {
  struct dirent *entity;
  if (entity = readdir(dir_p)) {
    return copy_string(entity->d_name);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<get_next_file_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <readdir@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1157 <get_next_file_name+0x37>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1030 <copy_string@plt>
mov    %rax,-0x8(%rbp)
jmp    115f <get_next_file_name+0x3f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_next_file_name>:
push   %rax
call   1040 <readdir@plt>
test   %rax,%rax
je     1133 <get_next_file_name+0x13>
mov    (%rax),%edi
pop    %rax
jmp    1030 <copy_string@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
define i8* @get_next_file_name(i32* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca %struct.dirent*
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = call %struct.dirent* @readdir(i32* %5)
store %struct.dirent* %6, %struct.dirent** %4
%7 = icmp ne %struct.dirent* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load %struct.dirent*, %struct.dirent** %4
%10 = getelementptr inbounds %struct.dirent, %struct.dirent* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i8* @copy_string(i32 %11)
store i8* %12, i8** %2
br label %14
13: ; preds = %1
store i8* null, i8** %2
br label %14
14: ; preds = %13, %8
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i8* @get_next_file_name(i32* %0) {
%2 = tail call %struct.dirent* @readdir(i32* %0)
%3 = icmp eq %struct.dirent* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = getelementptr inbounds %struct.dirent, %struct.dirent* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i8* @copy_string(i32 %6)
br label %8
8: ; preds = %1, %4
%9 = phi i8* [ %7, %4 ], [ null, %1 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ compare_class_pages();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ make_hfsplus_class_pages();
main() {
  make_hfsplus_class_pages();
  compare_class_pages();
  exit(0);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @make_hfsplus_class_pages()
%3 = call i32 (...) @compare_class_pages()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @make_hfsplus_class_pages()
%2 = tail call i32 (...) @compare_class_pages()
%3 = tail call i32 @exit(i32 0)
unreachable
}
int test_07(unsigned short *a) { return a[0] < 32768; }


x86 assembly (clang, -O0):
<test_07>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
cmp    $0x8000,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_07>:
movzwl (%rdi),%eax
xor    $0xffff,%eax
shr    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @test_07(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = getelementptr inbounds i16, i16* %3, i64 0
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = icmp slt i32 %6, 32768
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_07(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = xor i16 %2, -1
%4 = lshr i16 %3, 15
%5 = zext i16 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, unsigned char);
void zraiseUnknownTypeNumber(const char *caller, unsigned char tnum) {
  printf("Error: Unknown type number in %s(): %u.\n", caller, tnum);
}


x86 assembly (clang, -O0):
<zraiseUnknownTypeNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed3(%rip),%rdi
movzbl -0x9(%rbp),%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zraiseUnknownTypeNumber>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Error: Unknown type number in %s(): %u.\0A\00"
define void @zraiseUnknownTypeNumber(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %5, i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"Error: Unknown type number in %s(): %u.\0A\00"
define void @zraiseUnknownTypeNumber(i8* %0, i8 zeroext %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0, i8 zeroext %1)
ret void
}
int raise(sig)
int sig;
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @raise(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void main() {
  int32_t a;
  a = 1 == 2;
}


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

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

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

LLVM IR (-O2):
define void @main() {
ret void
}