xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(unsigned long);
int /*<<< orphan*/ printf(char *, int, unsigned long);
__attribute__((__noreturn__)) void exitfunc24(int status, void *arg) {
  printf("Executing exitfunc"
         "24"
         " (status=%d, arg=%lu)\n",
         status, (unsigned long)arg);
  exit((unsigned long)arg);
}


x86 assembly (clang, -O0):
<exitfunc24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc24>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Executing exitfunc24 (status=%d, arg=%lu)\0A\00"
define void @exitfunc24(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i64
%8 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i64
%11 = call i32 @exit(i64 %10)
unreachable
}

LLVM IR (-O2):
@.str = [43 x i8] c"Executing exitfunc24 (status=%d, arg=%lu)\0A\00"
define void @exitfunc24(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0, i64 %3)
%5 = tail call i32 @exit(i64 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ READ_STRING(int, char *);
int /*<<< orphan*/ strcmp(char *, char *);
int READ_BOOL() {
  char i[6];
  READ_STRING(6, i);
  if (!strcmp(i, "true") || !strcmp(i, "1")) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<READ_BOOL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xa(%rbp),%rsi
mov    $0x6,%edi
call   1040 <READ_STRING@plt>
lea    -0xa(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
je     1168 <READ_BOOL+0x48>
lea    -0xa(%rbp),%rdi
lea    0xeab(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1174 <READ_BOOL+0x54>
movl   $0x1,-0x4(%rbp)
jmp    117b <READ_BOOL+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<READ_BOOL>:
push   %rax
lea    0x2(%rsp),%rsi
mov    $0x6,%edi
call   1030 <READ_STRING@plt>
mov    $0x65757274,%eax
xor    0x2(%rsp),%eax
movzbl 0x6(%rsp),%ecx
or     %eax,%ecx
je     113f <READ_BOOL+0x2f>
xor    %eax,%eax
cmpw   $0x31,0x2(%rsp)
sete   %al
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [2 x i8] c"1\00"
define i32 @READ_BOOL() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @READ_STRING(i32 6, i8* %2)
%4 = call i32 @bcmp(i8* dereferenceable(5) %2, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5)
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %0
%7 = call i32 @bcmp(i8* dereferenceable(2) %2, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i64 2)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %0
%11 = phi i32 [ 1, %0 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteIndexedXX0(int);
int /*<<< orphan*/ INC8(int /*<<< orphan*/);
void OpFEM1X0(void) { INC8(AbsoluteIndexedXX0(3)); }


x86 assembly (clang, -O0):
<OpFEM1X0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <AbsoluteIndexedXX0@plt>
mov    %eax,%edi
call   1040 <INC8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpFEM1X0>:
push   %rax
mov    $0x3,%edi
call   1030 <AbsoluteIndexedXX0@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <INC8@plt>

LLVM IR (-O0):
define void @OpFEM1X0() {
%1 = call i32 @AbsoluteIndexedXX0(i32 3)
%2 = call i32 @INC8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpFEM1X0() {
%1 = tail call i32 @AbsoluteIndexedXX0(i32 3)
%2 = tail call i32 @INC8(i32 %1)
ret void
}
int test_imm_C4uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xC4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C4uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0xc4,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C4uint64_highword_reg>:
movabs $0xc400000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C4uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 841813590016
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int size(const char *s) {
  int i = 0;
  while (*s != '\0') {
    ++s;
    ++i;
  }
  return i;
}


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

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

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

LLVM IR (-O2):
define i32 @size(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
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ SYS_lseek;
int /*<<< orphan*/ syscall_3(int /*<<< orphan*/, long, int /*<<< orphan*/,
                             int /*<<< orphan*/);
void rewind(FILE *stream) {
  syscall_3(SYS_lseek, (long int)stream, 0, SEEK_SET);
}


x86 assembly (clang, -O0):
<rewind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    0x2ea8(%rip),%rax
mov    (%rax),%ecx
xor    %edx,%edx
call   1030 <syscall_3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rewind>:
mov    %rdi,%rsi
mov    0x2ed6(%rip),%rax
mov    (%rax),%edi
mov    0x2eb5(%rip),%rax
mov    (%rax),%ecx
xor    %edx,%edx
jmp    1030 <syscall_3@plt>

LLVM IR (-O0):
@SYS_lseek = global i32 0
@SEEK_SET = global i32 0
define void @rewind(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @SYS_lseek
%4 = load i32*, i32** %2
%5 = ptrtoint i32* %4 to i64
%6 = load i32, i32* @SEEK_SET
%7 = call i32 @syscall_3(i32 %3, i64 %5, i32 0, i32 %6)
ret void
}

LLVM IR (-O2):
@SYS_lseek = global i32 0
@SEEK_SET = global i32 0
define void @rewind(i32* %0) {
%2 = load i32, i32* @SYS_lseek
%3 = ptrtoint i32* %0 to i64
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @syscall_3(i32 %2, i64 %3, i32 0, i32 %4)
ret void
}
/* Type definitions */
struct colog_response {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ liberate(struct colog_response *);
struct colog_response *liberate_response(struct colog_response *rptr) {
  if (rptr) {
    liberate(rptr);
  }
  return ((struct colog_response *)0);
}


x86 assembly (clang, -O0):
<liberate_response>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <liberate_response+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <liberate@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<liberate_response>:
test   %rdi,%rdi
je     111f <liberate_response+0xf>
push   %rax
call   1030 <liberate@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
%struct.colog_response = type { i32 }
define noalias %struct.colog_response* @liberate_response(%struct.colog_response* %0) {
%2 = icmp eq %struct.colog_response* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @liberate(%struct.colog_response* %0)
br label %5
5: ; preds = %3, %1
ret %struct.colog_response* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  if (a == b) {
    printf("yes\n");
  } else {
    printf("no\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1160 <main+0x40>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
jmp    116c <main+0x4c>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    (%rsp),%eax
lea    0xec5(%rip),%rax
lea    0xebb(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [5 x i8] c"yes\0A\00"
@.str.2 = [4 x i8] c"no\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@str = [3 x i8] c"no\00"
@str.3 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %6, %7
%9 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}
/* Variables and functions */
int socknonblock(int);
int udpnonblock(int sock) { return socknonblock(sock); }


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

x86 assembly (clang, -O2):
<udpnonblock>:
jmp    1030 <socknonblock@plt>

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

LLVM IR (-O2):
define i32 @udpnonblock(i32 %0) {
%2 = tail call i32 @socknonblock(i32 %0)
ret i32 %2
}
int tukar(int a[], int b[]) {
  int t;
  t = *a;
  *a = *b;
  *b = t;
}


x86 assembly (clang, -O0):
<tukar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tukar>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @tukar(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret i32 undef
}
void avio_open_dyn_buf() {}


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

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

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

LLVM IR (-O2):
define void @avio_open_dyn_buf() {
ret void
}
long long unsigned int lsll_reg(long long unsigned longval1, int intval1) {
  return (longval1 << intval1);
}


x86 assembly (clang, -O0):
<lsll_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsll_reg>:
mov    %esi,%ecx
mov    %rdi,%rax
shl    %cl,%rax
ret

LLVM IR (-O0):
define i64 @lsll_reg(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 = zext i32 %6 to i64
%8 = shl i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @lsll_reg(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = shl i64 %0, %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ asm_setdisppage(char);
void setdisppage(char num) { asm_setdisppage(num); }


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

x86 assembly (clang, -O2):
<setdisppage>:
jmp    1030 <asm_setdisppage@plt>

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

LLVM IR (-O2):
define void @setdisppage(i8 signext %0) {
%2 = tail call i32 @asm_setdisppage(i8 signext %0)
ret void
}
int ts_count(unsigned char *a) { return a[7]; }


x86 assembly (clang, -O0):
<ts_count>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x7(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_count>:
movzbl 0x7(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ts_count(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 7
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ts_count(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 7
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
ret i32 %4
}
int main(void) {
  puts("Tasks linked list:\n");
  __asm__("int $0x82" ::"a"(0x05));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5,%eax
int    $0x82
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"Tasks linked list:\0A\00"
define i32 @main() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Tasks linked list:\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
tail call void asm sideeffect "int $$0x82", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ asprintf(char **, char *, ...);
const char *integerPointerStringify(int *payload) {
  char *retVal;
  if (payload != NULL) {
    asprintf(&retVal, "%d", *payload);
  } else {
    asprintf(&retVal, "NULL");
  }
  return retVal;
}


x86 assembly (clang, -O0):
<integerPointerStringify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1144 <integerPointerStringify+0x34>
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    -0x10(%rbp),%rdi
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <asprintf@plt>
jmp    1156 <integerPointerStringify+0x46>
lea    -0x10(%rbp),%rdi
lea    0xeb4(%rip),%rsi
mov    $0x0,%al
call   1030 <asprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integerPointerStringify>:
push   %rax
test   %rdi,%rdi
je     112b <integerPointerStringify+0x1b>
mov    (%rdi),%edx
lea    0xee1(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <asprintf@plt>
jmp    113c <integerPointerStringify+0x2c>
lea    0xed1(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <asprintf@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"NULL\00"
define i8* @integerPointerStringify(i32* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = icmp eq i32* %0, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %0
%7 = call i32 (i8**, i8*, ...) @asprintf(i8** %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %10
8: ; preds = %1
%9 = call i32 (i8**, i8*, ...) @asprintf(i8** %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = load i8*, i8** %2
ret i8* %11
}
int sw_sync_timeline_inc(int fd, unsigned count) { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ readFile(char *, int /*<<< orphan*/ *);
int main(void) {
  FILE *fp = fopen("/tmp/abc.xxx", "w");
  if (fp == 0) {
    perror("fopen");
    return 1;
  }
  readFile("abc", fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1179 <main+0x49>
lea    0xea7(%rip),%rdi
call   1040 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1190 <main+0x60>
mov    -0x10(%rbp),%rsi
lea    0xe91(%rip),%rdi
call   1050 <readFile@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xece(%rip),%rsi
call   1030 <fopen@plt>
test   %rax,%rax
je     115c <main+0x2c>
lea    0xec5(%rip),%rdi
mov    %rax,%rsi
call   1050 <readFile@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeac(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/tmp/abc.xxx\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [6 x i8] c"fopen\00"
@.str.3 = [4 x i8] c"abc\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %1
br label %11
8: ; preds = %0
%9 = load i32*, i32** %2
%10 = call i32 @readFile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %9)
store i32 0, i32* %1
br label %11
11: ; preds = %8, %6
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [13 x i8] c"/tmp/abc.xxx\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [6 x i8] c"fopen\00"
@.str.3 = [4 x i8] c"abc\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @readFile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* %1)
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ 1, %3 ], [ 0, %5 ]
ret i32 %8
}
double thrust(double *motor, double time) {
  int index;
  int max_index = 20;
  double ret;
  double motor_delta_t = 0.1;
  index = (int)(time / motor_delta_t);
  if (index < max_index) {
    ret = motor[index];
  } else {
    ret = 0;
  }
  return ret;
}


x86 assembly (clang, -O0):
<thrust>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movl   $0x14,-0x18(%rbp)
movsd  0xee4(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1155 <thrust+0x55>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    115d <thrust+0x5d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<thrust>:
divsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%eax
xorpd  %xmm0,%xmm0
cmp    $0x13,%eax
jg     111c <thrust+0x1c>
cltq
movsd  (%rdi,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @thrust(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca double
store double* %0, double** %3
store double %1, double* %4
store i32 20, i32* %6
store double 1.000000e-01, double* %8
%9 = load double, double* %4
%10 = load double, double* %8
%11 = fdiv double %9, %10
%12 = fptosi double %11 to i32
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %22
16: ; preds = %2
%17 = load double*, double** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %17, i64 %19
%21 = load double, double* %20
store double %21, double* %7
br label %23
22: ; preds = %2
store double 0.000000e+00, double* %7
br label %23
23: ; preds = %22, %16
%24 = load double, double* %7
ret double %24
}

LLVM IR (-O2):
define double @thrust(double* nocapture %0, double %1) {
%3 = fdiv double %1, 1.000000e-01
%4 = fptosi double %3 to i32
%5 = icmp slt i32 %4, 20
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds double, double* %0, i64 %7
%9 = load double, double* %8
br label %10
10: ; preds = %2, %6
%11 = phi double [ %9, %6 ], [ 0.000000e+00, %2 ]
ret double %11
}
__attribute__((no, noclone)) unsigned __int128 t151_5add(unsigned __int128 x) {
  unsigned __int128 r;
  if (__builtin_add_overflow(x, (unsigned __int128)(-1), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t151_5add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
add    $0xffffffffffffffff,%rdx
adc    $0xffffffffffffffff,%rcx
setb   %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1158 <t151_5add+0x48>
jmp    115f <t151_5add+0x4f>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t151_5add>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
adc    $0xffffffffffffffff,%r14
jae    112b <t151_5add+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t151_5add(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.uadd.with.overflow.i128(i128 %11, i128 -1)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t151_5add(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.uadd.with.overflow.i128(i128 %6, i128 -1)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char const *);
int argv_contains(char **argv, const char *s) {
  while (*argv) {
    if (!strcmp(*argv, s))
      return 1;
    argv++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<argv_contains>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1164 <argv_contains+0x54>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1153 <argv_contains+0x43>
movl   $0x1,-0x4(%rbp)
jmp    116b <argv_contains+0x5b>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <argv_contains+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<argv_contains>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbp
mov    (%rdi),%rdi
xor    %r14d,%r14d
test   %rdi,%rdi
je     1151 <argv_contains+0x41>
mov    %rsi,%rbx
add    $0x8,%rbp
nopl   0x0(%rax)
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     114b <argv_contains+0x3b>
mov    0x0(%rbp),%rdi
add    $0x8,%rbp
test   %rdi,%rdi
jne    1130 <argv_contains+0x20>
jmp    1151 <argv_contains+0x41>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @argv_contains(i8** nocapture %0, i8* nocapture %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %14, label %8
5: ; preds = %8
%6 = load i8*, i8** %13
%7 = icmp eq i8* %6, null
br i1 %7, label %14, label %8
8: ; preds = %2, %5
%9 = phi i8* [ %6, %5 ], [ %3, %2 ]
%10 = phi i8** [ %13, %5 ], [ %0, %2 ]
%11 = tail call i32 @strcmp(i8* %9, i8* dereferenceable(1) %1)
%12 = icmp eq i32 %11, 0
%13 = getelementptr inbounds i8*, i8** %10, i64 1
br i1 %12, label %14, label %5
14: ; preds = %8, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ _assert_string_equal(char const *, char const *, char *,
                                        int);
scalar_t__ disemvowel(char *);
void test_punctuation(void) {
  _assert_string_equal(
      (const char *)"n (nxplnd) lphnt!",
      (const char *)disemvowel("An (Unexplained) Elephant!"),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/"
      "master/disemvowel/disemvowel_test.c",
      26);
}


x86 assembly (clang, -O0):
<test_punctuation>:
push   %rbp
mov    %rsp,%rbp
lea    0xee7(%rip),%rdi
call   1030 <disemvowel@plt>
mov    %rax,%rsi
lea    0xec6(%rip),%rdi
lea    0xeec(%rip),%rdx
mov    $0x1a,%ecx
call   1040 <_assert_string_equal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_punctuation>:
push   %rax
lea    0xeea(%rip),%rdi
call   1030 <disemvowel@plt>
lea    0xecc(%rip),%rdi
lea    0xef2(%rip),%rdx
mov    %rax,%rsi
mov    $0x1a,%ecx
pop    %rax
jmp    1040 <_assert_string_equal@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"n (nxplnd) lphnt!\00"
@.str.1 = [27 x i8] c"An (Unexplained) Elephant!\00"
@.str.2 = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/master/disemvowel/disemvowel_test.c\00"
define void @test_punctuation() {
%1 = call i64 @disemvowel(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%2 = inttoptr i64 %1 to i8*
%3 = call i32 @_assert_string_equal(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.2, i64 0, i64 0), i32 26)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"n (nxplnd) lphnt!\00"
@.str.1 = [27 x i8] c"An (Unexplained) Elephant!\00"
@.str.2 = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/master/disemvowel/disemvowel_test.c\00"
define void @test_punctuation() {
%1 = tail call i64 @disemvowel(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @_assert_string_equal(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.2, i64 0, i64 0), i32 26)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
long O_NONBLOCK;
long fcntl(int, int /*<<< orphan*/, long);
void os_set_sock_blocking_mode(int sock) {
  long arg = fcntl(sock, F_GETFL, NULL);
  arg &= ~O_NONBLOCK;
  fcntl(sock, F_SETFL, arg);
}


x86 assembly (clang, -O0):
<os_set_sock_blocking_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <fcntl@plt>
mov    %rax,-0x10(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%rax
xor    $0xffffffffffffffff,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_set_sock_blocking_mode>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    0x2ebe(%rip),%rcx
mov    (%rcx),%rdx
not    %rdx
and    %rax,%rdx
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
pop    %rbx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@O_NONBLOCK = global i64 0
@F_SETFL = global i32 0
define void @os_set_sock_blocking_mode(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFL
%6 = call i64 @fcntl(i32 %4, i32 %5, i64 0)
store i64 %6, i64* %3
%7 = load i64, i64* @O_NONBLOCK
%8 = xor i64 %7, -1
%9 = load i64, i64* %3
%10 = and i64 %9, %8
store i64 %10, i64* %3
%11 = load i32, i32* %2
%12 = load i32, i32* @F_SETFL
%13 = load i64, i64* %3
%14 = call i64 @fcntl(i32 %11, i32 %12, i64 %13)
ret void
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@O_NONBLOCK = global i64 0
@F_SETFL = global i32 0
define void @os_set_sock_blocking_mode(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i64 @fcntl(i32 %0, i32 %2, i64 0)
%4 = load i64, i64* @O_NONBLOCK
%5 = xor i64 %4, -1
%6 = and i64 %3, %5
%7 = load i32, i32* @F_SETFL
%8 = tail call i64 @fcntl(i32 %0, i32 %7, i64 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void extra_types() {
  printf("    mod extra {\n");
  printf("    }\n");
}


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

x86 assembly (clang, -O2):
<extra_types>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeec(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [16 x i8] c" mod extra {\00"
@str.2 = [6 x i8] c" }\00"
define void @extra_types() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
ret void
}
unsigned int conf_hash_func1(const char *key) {
  unsigned int seed = 131;
  unsigned int hash = 0;
  while (*key) {
    hash = hash * seed + *key;
    ++key;
  }
  return hash & 0x7FFFFFFF;
}


x86 assembly (clang, -O0):
<conf_hash_func1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x83,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <conf_hash_func1+0x47>
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1116 <conf_hash_func1+0x16>
mov    -0x10(%rbp),%eax
and    $0x7fffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_hash_func1>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <conf_hash_func1+0x2c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
imul   $0x83,%eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <conf_hash_func1+0x10>
and    $0x7fffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @conf_hash_func1(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 131
%9 = sext i8 %5 to i32
%10 = add i32 %8, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = and i32 %10, 2147483647
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int puts(char *);
int main() {
  int x;
  x = puts("Hello world.");
  printf("%d\n", x);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world.\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
double ln_get_saturn_earth_dist(double);
double ln_get_saturn_equ_sdiam(double JD) {
  double So = 82.73;
  double dist;
  dist = ln_get_saturn_earth_dist(JD);
  return So / dist;
}


x86 assembly (clang, -O0):
<ln_get_saturn_equ_sdiam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ln_get_saturn_earth_dist@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_saturn_equ_sdiam>:
push   %rax
call   1030 <ln_get_saturn_earth_dist@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ln_get_saturn_equ_sdiam(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 8.273000e+01, double* %3
%5 = load double, double* %2
%6 = call double @ln_get_saturn_earth_dist(double %5)
store double %6, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fdiv double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @ln_get_saturn_equ_sdiam(double %0) {
%2 = tail call double @ln_get_saturn_earth_dist(double %0)
%3 = fdiv double 8.273000e+01, %2
ret double %3
}
char *strerror(n)
int n;
{
  extern int sys_nerr;
  extern char *sys_errlist[];
  if (n > 0 && n < sys_nerr)
    return (sys_errlist[n]);
  else
    return ("Unknown error");
}


x86 assembly (clang, -O0):
<strerror>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    113b <strerror+0x3b>
mov    -0xc(%rbp),%eax
mov    0x2ecd(%rip),%rcx
cmp    (%rcx),%eax
jge    113b <strerror+0x3b>
movslq -0xc(%rbp),%rcx
mov    0x2eca(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <strerror+0x46>
lea    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strerror>:
lea    0xef9(%rip),%rax
test   %edi,%edi
jle    1123 <strerror+0x23>
mov    0x2ed6(%rip),%rcx
cmp    %edi,(%rcx)
jle    1123 <strerror+0x23>
mov    %edi,%eax
mov    0x2ed9(%rip),%rcx
mov    (%rcx,%rax,8),%rax
ret

LLVM IR (-O0):
@sys_nerr = external global i32
@sys_errlist = external global [0 x i8*]
@.str = [14 x i8] c"Unknown error\00"
define i8* @strerror(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i32, i32* %3
%8 = load i32, i32* @sys_nerr
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [0 x i8*], [0 x i8*]* @sys_errlist, i64 0, i64 %12
%14 = load i8*, i8** %13
store i8* %14, i8** %2
br label %16
15: ; preds = %6, %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
br label %16
16: ; preds = %15, %10
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@sys_nerr = external global i32
@sys_errlist = external global [0 x i8*]
@.str = [14 x i8] c"Unknown error\00"
define i8* @strerror(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = load i32, i32* @sys_nerr
%4 = icmp sgt i32 %3, %0
%5 = select i1 %2, i1 %4, i1 false
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = zext i32 %0 to i64
%8 = getelementptr inbounds [0 x i8*], [0 x i8*]* @sys_errlist, i64 0, i64 %7
%9 = load i8*, i8** %8
br label %10
10: ; preds = %1, %6
%11 = phi i8* [ %9, %6 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %11
}
int do_406() { return 406; }


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

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

LLVM IR (-O0):
define i32 @do_406() {
ret i32 406
}

LLVM IR (-O2):
define i32 @do_406() {
ret i32 406
}
void SVCall_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<SVCall_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SVCall_Handler+0x9>
jmp    1109 <SVCall_Handler+0x9>

x86 assembly (clang, -O2):
<SVCall_Handler>:
jmp    1100 <SVCall_Handler>

LLVM IR (-O0):
define void @SVCall_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @SVCall_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ RB_XMLDB_Generate_String(int /*<<< orphan*/ *, char *);
void RB_XMLDB_Generate_False_Link(FILE *dest_doc, char *name) {
  RB_XMLDB_Generate_String(dest_doc, name);
}


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

x86 assembly (clang, -O2):
<RB_XMLDB_Generate_False_Link>:
jmp    1030 <RB_XMLDB_Generate_String@plt>

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

LLVM IR (-O2):
define void @RB_XMLDB_Generate_False_Link(i32* %0, i8* %1) {
%3 = tail call i32 @RB_XMLDB_Generate_String(i32* %0, i8* %1)
ret void
}