xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ u_int64_t;
struct timespec {
  void *tv_nsec;
  void *tv_sec;
};

/* Variables and functions */
void *ntoh64(int /*<<< orphan*/);
void gettimestamp_fnbo(struct timespec *ts, u_int64_t *vts) {
  ts->tv_sec = ntoh64(vts[0]);
  ts->tv_nsec = ntoh64(vts[1]);
}


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

x86 assembly (clang, -O2):
<gettimestamp_fnbo>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rsi),%edi
call   1030 <ntoh64@plt>
mov    %rax,0x8(%r14)
mov    0x4(%rbx),%edi
call   1030 <ntoh64@plt>
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.timespec = type { i8*, i8* }
define void @gettimestamp_fnbo(%struct.timespec* %0, i32* %1) {
%3 = alloca %struct.timespec*
%4 = alloca i32*
store %struct.timespec* %0, %struct.timespec** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = call i8* @ntoh64(i32 %7)
%9 = load %struct.timespec*, %struct.timespec** %3
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %9, i32 0, i32 1
store i8* %8, i8** %10
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = call i8* @ntoh64(i32 %13)
%15 = load %struct.timespec*, %struct.timespec** %3
%16 = getelementptr inbounds %struct.timespec, %struct.timespec* %15, i32 0, i32 0
store i8* %14, i8** %16
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i8*, i8* }
define void @gettimestamp_fnbo(%struct.timespec* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i8* @ntoh64(i32 %3)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
store i8* %4, i8** %5
%6 = getelementptr inbounds i32, i32* %1, i64 1
%7 = load i32, i32* %6
%8 = tail call i8* @ntoh64(i32 %7)
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
store i8* %8, i8** %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_exit;
int /*<<< orphan*/ syscall_0(int /*<<< orphan*/);
void exit(int arg1) { syscall_0(SYS_exit); }


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall_0@plt>

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

LLVM IR (-O0):
@SYS_exit = global i32 0
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SYS_exit
%4 = call i32 @syscall_0(i32 %3)
unreachable
}

LLVM IR (-O2):
@SYS_exit = global i32 0
define void @exit(i32 %0) {
%2 = load i32, i32* @SYS_exit
%3 = tail call i32 @syscall_0(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ bmy_sudirription_internal_call(char const *, int, int);
void bmy_sudirription_add(int usernum, int boardnum) {
  const char *sql =
      "INSERT INTO t_user_sudirriptions(usernum, boardnum) value(?, ?)";
  bmy_sudirription_internal_call(sql, usernum, boardnum);
}


x86 assembly (clang, -O0):
<bmy_sudirription_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <bmy_sudirription_internal_call@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmy_sudirription_add>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <bmy_sudirription_internal_call@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"INSERT INTO t_user_sudirriptions(usernum, boardnum) value(?, ?)\00"
define void @bmy_sudirription_add(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %5
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @bmy_sudirription_internal_call(i8* %6, i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [64 x i8] c"INSERT INTO t_user_sudirriptions(usernum, boardnum) value(?, ?)\00"
define void @bmy_sudirription_add(i32 %0, i32 %1) {
%3 = tail call i32 @bmy_sudirription_internal_call(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ptab(int tabulacao) {
  int i;
  for (i = 0; i < tabulacao; i++)
    printf("\t");
}


x86 assembly (clang, -O0):
<ptab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <ptab+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <ptab+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptab>:
push   %rbx
test   %edi,%edi
jle    112f <ptab+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <ptab+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ptab(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 9)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void outw(unsigned short data, unsigned short addr) {
  __asm__("outw %%ax,  %%dx" ::"a"(data), "d"(addr));
}


x86 assembly (clang, -O0):
<outw>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    -0x4(%rbp),%dx
out    %ax,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outw>:
mov    %esi,%edx
mov    %edi,%eax
out    %ax,(%dx)
ret

LLVM IR (-O0):
define void @outw(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @outw(i16 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outw %ax, %dx", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0, i16 %1)
ret void
}
void X509_REQ_get_attr_by_NID(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @fix_errno() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
main() {
  printf("size int=%d,short int=%d,long int=%d,float=%d,double=%d\n",
         sizeof(int), sizeof(short int), sizeof(long int), sizeof(float),
         sizeof(double));
  printf("hello, world!\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x4,%r8d
mov    $0x2,%edx
mov    $0x8,%r9d
mov    %r8,%rsi
mov    %r9,%rcx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
mov    $0x2,%edx
mov    $0x8,%ecx
mov    $0x4,%r8d
mov    $0x8,%r9d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [57 x i8] c"size int=%d,short int=%d,long int=%d,float=%d,double=%d\0A\00"
@.str.1 = [15 x i8] c"hello, world!\0A\00"
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i64 4, i64 2, i64 8, i64 4, i64 8)
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [57 x i8] c"size int=%d,short int=%d,long int=%d,float=%d,double=%d\0A\00"
@str = [14 x i8] c"hello, world!\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i64 4, i64 2, i64 8, i64 4, i64 8)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int test_imm_60int64_lowword_mem(long long *val) {
  return ((*val) & (0x60 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_60int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 96
%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_60int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 96
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ flob();
int main(void) {
  flob();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @flob()
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_length_current_standard_solution_string(int *cursor, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(525, cursor, n, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_length_current_standard_solution_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x20d,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_length_current_standard_solution_string>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x20d,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @solcon_length_current_standard_solution_string(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = load i32*, i32** %4
%9 = load double*, double** %6
%10 = call i32 @_ada_use_c2phc4c(i32 525, i32* %7, i32* %8, double* %9, i32 0)
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @solcon_length_current_standard_solution_string(i32* %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc4c(i32 525, i32* %0, i32* %1, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ATSFontGetName(char *);
int /*<<< orphan*/ ATSFontGetPostScriptName(int);
void test_10095131() {
  ATSFontGetName("Hello");
  ATSFontGetPostScriptName(100);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <ATSFontGetName@plt>
mov    $0x64,%edi
call   1040 <ATSFontGetPostScriptName@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <ATSFontGetName@plt>
mov    $0x64,%edi
pop    %rax
jmp    1040 <ATSFontGetPostScriptName@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
define void @test_10095131() {
%1 = call i32 @ATSFontGetName(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @ATSFontGetPostScriptName(i32 100)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define void @test_10095131() {
%1 = tail call i32 @ATSFontGetName(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @ATSFontGetPostScriptName(i32 100)
ret void
}
int pointer_equals(const void *key1, const void *key2) { return key1 == key2; }


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

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

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

LLVM IR (-O2):
define i32 @pointer_equals(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sendByte(char const);
void sendMesg(const char *str) {
  while (*str) {
    sendByte(*str);
    str++;
  }
}


x86 assembly (clang, -O0):
<sendMesg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <sendMesg+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <sendByte@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <sendMesg+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendMesg>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <sendMesg+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <sendByte@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <sendMesg+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @sendMesg(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 i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @sendByte(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void myStrcpy(char des[], char src[]) {
  int i;
  for (i = 0; src[i] != 0; i++)
    des[i] = src[i];
  des[i] = 0;
}


x86 assembly (clang, -O0):
<myStrcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114c <myStrcpy+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <myStrcpy+0x13>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<myStrcpy>:
mov    (%rsi),%al
test   %al,%al
je     1127 <myStrcpy+0x27>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rdi,%rcx,1)
movzbl 0x1(%rsi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <myStrcpy+0x10>
mov    %ecx,%eax
movb   $0x0,(%rdi,%rax,1)
ret
xor    %eax,%eax
movb   $0x0,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @myStrcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %24, %2
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %27
14: ; preds = %6
%15 = load i8*, i8** %4
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = load i8*, i8** %3
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
store i8 %19, i8* %23
br label %24
24: ; preds = %14
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %6
27: ; preds = %6
%28 = load i8*, i8** %3
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %28, i64 %30
store i8 0, i8* %31
ret void
}

LLVM IR (-O2):
define void @myStrcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = and i64 %9, 4294967295
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 0, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 0, i8* %17
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isspace(int);
void t_isspace_0x09() {
  Assert_real((isspace(9)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              50, ("isspace should be 1 for 0x09"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 1 for 0x09\00"
define void @t_isspace_0x09() {
%1 = tail call i32 @isspace(i32 9)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lt_fatal(char *, int, char *);
scalar_t__ malloc(size_t);
void *xmalloc(size_t num) {
  void *p = (void *)malloc(num);
  if (!p)
    lt_fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/sim9108/SDKS/refs/heads/master/"
             "LibFontConfig/src/fc-list/.libs/lt-fc-list.c",
             311, "memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <xmalloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x137,%esi
lea    0xf4f(%rip),%rdx
call   1030 <lt_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <xmalloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf6a(%rip),%rdx
mov    $0x137,%esi
call   1030 <lt_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sim9108/SDKS/refs/heads/master/LibFontConfig/src/fc-list/.libs/lt-fc-list.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @lt_fatal(i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sim9108/SDKS/refs/heads/master/LibFontConfig/src/fc-list/.libs/lt-fc-list.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @lt_fatal(i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ netuninit();
void uninitmultiplayers() { netuninit(); }


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

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

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

LLVM IR (-O2):
define void @uninitmultiplayers() {
%1 = tail call i32 (...) @netuninit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *sink_win32_unfixpath(const char *file) {
  fprintf(stderr, "TODO: sink_win32_sinkpath\n");
  abort();
  return NULL;
}


x86 assembly (clang, -O0):
<sink_win32_unfixpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<sink_win32_unfixpath>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"TODO: sink_win32_sinkpath\0A\00"
define i8* @sink_win32_unfixpath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"TODO: sink_win32_sinkpath\0A\00"
define noalias i8* @sink_win32_unfixpath(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int ungetch(int);
int wrap_ungetch(int ch) { return ungetch(ch); }


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

x86 assembly (clang, -O2):
<wrap_ungetch>:
jmp    1030 <ungetch@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ knapsack_0_1_OnW(int *, int *, int, int);
int main() {
  int value[] = {60, 100, 120};
  int weight[] = {10, 20, 30};
  int total = 50;
  int length = sizeof(value) / sizeof(value[0]);
  knapsack_0_1_OnW(value, weight, length, total);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xed2(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xed0(%rip),%eax
mov    %eax,-0x14(%rbp)
movl   $0x32,-0x20(%rbp)
movl   $0x3,-0x24(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1030 <knapsack_0_1_OnW@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xeee(%rip),%eax
mov    %eax,0x20(%rsp)
mov    0xedb(%rip),%rax
mov    %rax,0x18(%rsp)
mov    0xee4(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xed1(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x18(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x3,%edx
mov    $0x32,%ecx
call   1030 <knapsack_0_1_OnW@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.value = [3 x i32] [i32 60, i32 100, i32 120]
@__const.main.weight = [3 x i32] [i32 10, i32 20, i32 30]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca [3 x i32]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [3 x i32]* %2 to i8*
%7 = bitcast [3 x i32]* %3 to i8*
store i32 50, i32* %4
store i32 3, i32* %5
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = call i32 @knapsack_0_1_OnW(i32* %8, i32* %9, i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.value = [3 x i32] [i32 60, i32 100, i32 120]
@__const.main.weight = [3 x i32] [i32 10, i32 20, i32 30]
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = bitcast [3 x i32]* %1 to i8*
%4 = bitcast [3 x i32]* %2 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%7 = call i32 @knapsack_0_1_OnW(i32* %5, i32* %6, i32 3, i32 50)
ret i32 0
}
int main() {
  "";
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 0
}

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

/* Variables and functions */
int /*<<< orphan*/ comp128v1(int /*<<< orphan*/ const *,
                             int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *);
void comp128(const uint8_t *ki, const uint8_t *rand, uint8_t *sres,
             uint8_t *kc) {
  comp128v1(ki, rand, sres, kc);
}


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

x86 assembly (clang, -O2):
<comp128>:
jmp    1030 <comp128v1@plt>

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

LLVM IR (-O2):
define void @comp128(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i32 @comp128v1(i32* %0, i32* %1, i32* %2, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assign();
void fn_call(void) { assign(); }


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

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

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

LLVM IR (-O2):
define void @fn_call() {
%1 = tail call i32 (...) @assign()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clearScreen();
int /*<<< orphan*/ isr_install();
int /*<<< orphan*/ launch_shell(int /*<<< orphan*/);
int /*<<< orphan*/ print(char *);
kmain() {
  isr_install();
  clearScreen();
  print("PDOS: Type: help for help\n");
  launch_shell(0);
}


x86 assembly (clang, -O0):
<kmain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <isr_install@plt>
mov    $0x0,%al
call   1050 <clearScreen@plt>
lea    0xea3(%rip),%rdi
call   1030 <print@plt>
xor    %edi,%edi
call   1040 <launch_shell@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmain>:
push   %rax
xor    %eax,%eax
call   1060 <isr_install@plt>
xor    %eax,%eax
call   1050 <clearScreen@plt>
lea    0xeaa(%rip),%rdi
call   1030 <print@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <launch_shell@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"PDOS: Type: help for help\0A\00"
define i32 @kmain() {
%1 = alloca i32
%2 = call i32 (...) @isr_install()
%3 = call i32 (...) @clearScreen()
%4 = call i32 @print(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @launch_shell(i32 0)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [27 x i8] c"PDOS: Type: help for help\0A\00"
define i32 @kmain() {
%1 = tail call i32 (...) @isr_install()
%2 = tail call i32 (...) @clearScreen()
%3 = tail call i32 @print(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @launch_shell(i32 0)
ret i32 undef
}
void glEndQuery(int target) {}


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

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

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

LLVM IR (-O2):
define void @glEndQuery(i32 %0) {
ret void
}
/* Variables and functions */
int inb(int);
int CRT_test(void) { return ((inb(0x64) & 0x01) != 0); }


x86 assembly (clang, -O0):
<CRT_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x64,%edi
call   1030 <inb@plt>
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRT_test>:
push   %rax
mov    $0x64,%edi
call   1030 <inb@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CRT_test() {
%1 = call i32 @inb(i32 100)
%2 = and i32 %1, 1
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @CRT_test() {
%1 = tail call i32 @inb(i32 100)
%2 = and i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ searchIsPrime(unsigned long);
unsigned searchNextPrime(unsigned long seed) {
  seed |= 1;
  while (!searchIsPrime(seed))
    seed += 2;
  return seed;
}


x86 assembly (clang, -O0):
<searchNextPrime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <searchIsPrime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1146 <searchNextPrime+0x36>
jmp    1157 <searchNextPrime+0x47>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    1128 <searchNextPrime+0x18>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<searchNextPrime>:
push   %rbx
mov    %rdi,%rbx
or     $0x1,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <searchIsPrime@plt>
add    $0x2,%rbx
test   %eax,%eax
je     1120 <searchNextPrime+0x10>
add    $0xfffffffe,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @searchNextPrime(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = or i64 %3, 1
store i64 %4, i64* %2
br label %5
5: ; preds = %10, %1
%6 = load i64, i64* %2
%7 = call i32 @searchIsPrime(i64 %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = load i64, i64* %2
%12 = add i64 %11, 2
store i64 %12, i64* %2
br label %5
13: ; preds = %5
%14 = load i64, i64* %2
%15 = trunc i64 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @searchNextPrime(i64 %0) {
%2 = or i64 %0, 1
br label %3
3: ; preds = %3, %1
%4 = phi i64 [ %2, %1 ], [ %7, %3 ]
%5 = tail call i32 @searchIsPrime(i64 %4)
%6 = icmp eq i32 %5, 0
%7 = add i64 %4, 2
br i1 %6, label %3, label %8
8: ; preds = %3
%9 = trunc i64 %4 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void largeAdjustmentGE(unsigned a) {
  if (a - 2 >= (~0U) - 1)
    clang_analyzer_eval(a == 1 || a == 0);
  else
    clang_analyzer_eval(a > 1);
}


x86 assembly (clang, -O0):
<largeAdjustmentGE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
cmp    $0xfffffffe,%eax
jb     1155 <largeAdjustmentGE+0x45>
mov    $0x1,%al
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1143 <largeAdjustmentGE+0x33>
cmpl   $0x0,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
jmp    1166 <largeAdjustmentGE+0x56>
cmpl   $0x1,-0x4(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @largeAdjustmentGE(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub i32 %3, 2
%5 = icmp uge i32 %4, -2
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 0
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ true, %6 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
%15 = call i32 @clang_analyzer_eval(i32 %14)
br label %21
16: ; preds = %1
%17 = load i32, i32* %2
%18 = icmp ugt i32 %17, 1
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
br label %21
21: ; preds = %16, %12
ret void
}

LLVM IR (-O2):
define void @largeAdjustmentGE(i32 %0) {
%2 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}
/* Variables and functions */
int chdir(char *);
int /*<<< orphan*/ err(int, char *);
int /*<<< orphan*/ printf(char *);
void do_chdirup(void) {
  if (chdir("..") == -1) {
    err(1, "chdir: ..");
  }
  printf("chdir ..\n");
}


x86 assembly (clang, -O0):
<do_chdirup>:
push   %rbp
mov    %rsp,%rbp
lea    0xecc(%rip),%rdi
call   1030 <chdir@plt>
cmp    $0xffffffff,%eax
jne    115a <do_chdirup+0x2a>
mov    $0x1,%edi
lea    0xeab(%rip),%rsi
call   1050 <err@plt>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_chdirup>:
push   %rax
lea    0xecf(%rip),%rdi
call   1040 <chdir@plt>
cmp    $0xffffffff,%eax
jne    1153 <do_chdirup+0x23>
lea    0xeb7(%rip),%rsi
mov    $0x1,%edi
call   1050 <err@plt>
lea    0xeb0(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"..\00"
@.str.1 = [10 x i8] c"chdir: ..\00"
@.str.2 = [10 x i8] c"chdir ..\0A\00"
define void @do_chdirup() {
%1 = call i32 @chdir(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"..\00"
@.str.1 = [10 x i8] c"chdir: ..\00"
@str = [9 x i8] c"chdir ..\00"
define void @do_chdirup() {
%1 = tail call i32 @chdir(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int, ...);
int main(void) {
  int feet, fathoms;
  fathoms = 2;
  feet = 6 * fathoms;
  printf("Here are %d feet in %d fathoms!\n", feet, fathoms);
  printf("Yes, I said %d feet!\n", 6 * fathoms);
  getchar();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"Here are %d feet in %d fathoms!\0A\00"
@.str.1 = [22 x i8] c"Yes, I said %d feet!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %3
%4 = load i32, i32* %3
%5 = mul nsw i32 6, %4
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %3
%10 = mul nsw i32 6, %9
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Here are %d feet in %d fathoms!\0A\00"
@.str.1 = [22 x i8] c"Yes, I said %d feet!\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 12, i32 2)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 12)
%3 = tail call i32 (...) @getchar()
ret i32 0
}
void INT_Excep_SCI4_ERI4(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI4_ERI4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __no_gpio_code_for_this_architecture__();
void gpio_set(int gpio, int value) { __no_gpio_code_for_this_architecture__(); }


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

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

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

LLVM IR (-O2):
define void @gpio_set(i32 %0, i32 %1) {
%3 = tail call i32 (...) @__no_gpio_code_for_this_architecture__()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ strcmp(char *, char *);
int main() {
  if (strcmp("", "hello")) {
    printf("not equal\n");
  } else {
    printf("equal\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     115d <main+0x3d>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    1169 <main+0x49>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee7(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
lea    0xecc(%rip),%rax
lea    0xec1(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [6 x i8] c"hello\00"
@str = [6 x i8] c"equal\00"
@str.4 = [10 x i8] c"not equal\00"
define i32 @main() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ decode(char *);
int /*<<< orphan*/ reverse(char *);
int main() {
  char text[100] = "xrrJfvuGrgveJhbLqvQfznetbeClanZjbU";
  reverse(text);
  decode(text);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x64,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x70(%rbp),%rdi
call   1050 <decode@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
movaps 0xf24(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf08(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeec(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe98(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %rbx,%rdi
call   1040 <decode@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.text = [100 x i8] c"xrrJfvuGrgveJhbLqvQfznetbeClanZjbU\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = bitcast [100 x i8]* %2 to i8*
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @reverse(i8* %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 @decode(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.text = [100 x i8] c"xrrJfvuGrgveJhbLqvQfznetbeClanZjbU\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @reverse(i8* %2)
%4 = call i32 @decode(i8* %2)
ret i32 0
}
void le_uint24_write(void *ptr, unsigned v) {
  unsigned char *ptr8 = (unsigned char *)ptr;
  ptr8[0] = v & 0xFF;
  ptr8[1] = (v >> 8) & 0xFF;
  ptr8[2] = (v >> 16) & 0xFF;
}


x86 assembly (clang, -O0):
<le_uint24_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<le_uint24_write>:
mov    %esi,%eax
mov    %al,(%rdi)
mov    %ah,0x1(%rdi)
shr    $0x10,%eax
mov    %al,0x2(%rdi)
ret

LLVM IR (-O0):
define void @le_uint24_write(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i32, i32* %4
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i32, i32* %4
%13 = lshr i32 %12, 8
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
%18 = load i32, i32* %4
%19 = lshr i32 %18, 16
%20 = and i32 %19, 255
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i64 2
store i8 %21, i8* %23
ret void
}

LLVM IR (-O2):
define void @le_uint24_write(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
ret void
}