xunge/DecIR huggingface dataset:
_intswap(i1, i2) int *i1, *i2;
{
  int i3;
  i3 = *i1;
  *i1 = *i2;
  *i2 = i3;
}


x86 assembly (clang, -O0):
<_intswap>:
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):
<_intswap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define i32 @_intswap(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 @_intswap(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
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int isOR(const char *comm) { return strcmp(comm, "or") == 0; }


x86 assembly (clang, -O0):
<isOR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOR>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"or\00"
define i32 @isOR(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"or\00"
define i32 @isOR(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ test_set_status_message();
int main(void) {
  setvbuf(stdout, NULL, _IONBF, 0);
  test_set_status_message();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
call   1030 <setvbuf@plt>
mov    $0x0,%al
call   1040 <test_set_status_message@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1030 <setvbuf@plt>
xor    %eax,%eax
call   1040 <test_set_status_message@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@_IONBF = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdout
%3 = load i32, i32* @_IONBF
%4 = call i32 @setvbuf(i32 %2, i32* null, i32 %3, i32 0)
%5 = call i32 (...) @test_set_status_message()
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@_IONBF = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = load i32, i32* @_IONBF
%3 = tail call i32 @setvbuf(i32 %1, i32* null, i32 %2, i32 0)
%4 = tail call i32 (...) @test_set_status_message()
ret i32 0
}
setargsize(size) int size;
{
  debug_ol("; setargsize");
  ot("ldab	#");
  outdec(size);
  nl();
}


x86 assembly (clang, -O0):
<setargsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1060 <debug_ol@plt>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1050 <ot@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <outdec@plt>
mov    $0x0,%al
call   1030 <nl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setargsize>:
push   %rbx
mov    %edi,%ebx
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1060 <debug_ol@plt>
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1050 <ot@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <outdec@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <nl@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"; setargsize\00"
@.str.1 = [7 x i8] c"ldab\09#\00"
define i32 @setargsize(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = call i32 (i32, ...) bitcast (i32 (...)* @outdec to i32 (i32, ...)*)(i32 %6)
%8 = call i32 (...) @nl()
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@.str = [13 x i8] c"; setargsize\00"
@.str.1 = [7 x i8] c"ldab\09#\00"
define i32 @setargsize(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @outdec to i32 (i32, ...)*)(i32 %0)
%5 = tail call i32 (...) @nl()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int topla(int, int);
int main() {
  int a, b;
  printf("Toplamak istediginiz degerleri giriniz.\n");
  scanf("%d%d", &a, &b);
  printf("%d\n", topla(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <topla@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <topla@plt>
lea    0xe91(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Toplamak istediginiz degerleri giriniz.\0A\00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @topla(i32 %6, i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@str = [40 x i8] c"Toplamak istediginiz degerleri giriniz.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @topla(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}
void *UA_atomic_cmpxchg(void *volatile *addr, void *expected, void *newptr) {
  void *old = *addr;
  if (old == expected) {
    *addr = newptr;
  }
  return old;
}


x86 assembly (clang, -O0):
<UA_atomic_cmpxchg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1134 <UA_atomic_cmpxchg+0x34>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UA_atomic_cmpxchg>:
mov    (%rdi),%rax
cmp    %rsi,%rax
je     1109 <UA_atomic_cmpxchg+0x9>
ret
mov    %rdx,(%rdi)
ret

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

LLVM IR (-O2):
define i8* @UA_atomic_cmpxchg(i8** %0, i8* readnone %1, i8* %2) {
%4 = load volatile i8*, i8** %0
%5 = icmp eq i8* %4, %1
br i1 %5, label %6, label %7
6: ; preds = %3
store volatile i8* %2, i8** %0
br label %7
7: ; preds = %6, %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ dioSend(int, int, int, int);
int dioOn(int pin, int sender, int interruptor) {
  dioSend(pin, sender, interruptor, (1 == 1));
}


x86 assembly (clang, -O0):
<dioOn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x1,%ecx
call   1030 <dioSend@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dioOn>:
mov    $0x1,%ecx
jmp    1030 <dioSend@plt>

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

LLVM IR (-O2):
define i32 @dioOn(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @dioSend(i32 %0, i32 %1, i32 %2, i32 1)
ret i32 undef
}
void foo297() {}


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

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

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

LLVM IR (-O2):
define void @foo297() {
ret void
}
/* Variables and functions */
double log10(double);
double Dlog10(double x) { return log10(x); }


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

x86 assembly (clang, -O2):
<Dlog10>:
jmp    1030 <log10@plt>

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

LLVM IR (-O2):
define double @Dlog10(double %0) {
%2 = tail call double @log10(double %0)
ret double %2
}
/* Type definitions */
typedef int wchar_t;

/* Variables and functions */
size_t wcslen(const wchar_t *s) {
  size_t n = 0;
  for (;;) {
    wchar_t wc = s[n];
    if (wc == L'\0')
      return n;
    n++;
  }
}


x86 assembly (clang, -O0):
<wcslen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    112e <wcslen+0x2e>
mov    -0x10(%rbp),%rax
pop    %rbp
ret
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <wcslen+0x10>

x86 assembly (clang, -O2):
<wcslen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,0x4(%rdi,%rax,4)
lea    0x1(%rax),%rax
jne    1110 <wcslen+0x10>
ret

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

LLVM IR (-O2):
define i64 @wcslen(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
int isdigit(int c) {
  if (c >= 48 && c <= 57)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1127 <isdigit+0x27>
cmpl   $0x39,-0x8(%rbp)
jg     1127 <isdigit+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <isdigit+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %11
10: ; preds = %6, %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteWord(unsigned char, unsigned short);
void SensorSetReg_MT9V112(unsigned char uAddr, unsigned short uVal) {
  VIM_SIF_I2cWriteWord((unsigned char)uAddr, (unsigned short)uVal);
}


x86 assembly (clang, -O0):
<SensorSetReg_MT9V112>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzwl -0x4(%rbp),%esi
call   1030 <VIM_SIF_I2cWriteWord@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetReg_MT9V112>:
jmp    1030 <VIM_SIF_I2cWriteWord@plt>

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

LLVM IR (-O2):
define void @SensorSetReg_MT9V112(i8 zeroext %0, i16 zeroext %1) {
%3 = tail call i32 @VIM_SIF_I2cWriteWord(i8 zeroext %0, i16 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
void badsfmt() { errx(1, "%%s: requires a precision or a byte count"); }


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"%%s: requires a precision or a byte count\00"
define void @badsfmt() {
%1 = call i32 @errx(i32 1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"%%s: requires a precision or a byte count\00"
define void @badsfmt() {
%1 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char iupacComplementBaseLower(char);
void iupacComplementLower(char *iupac, int iuSize) {
  int i;
  for (i = 0; i < iuSize; ++i)
    iupac[i] = iupacComplementBaseLower(iupac[i]);
}


x86 assembly (clang, -O0):
<iupacComplementLower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115e <iupacComplementLower+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <iupacComplementBaseLower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <iupacComplementLower+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupacComplementLower>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1147 <iupacComplementLower+0x37>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1030 <iupacComplementBaseLower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <iupacComplementLower+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @iupacComplementLower(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call signext i8 @iupacComplementBaseLower(i8 signext %9)
store i8 %10, i8* %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
void jac_chain_nm7_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @jac_chain_nm7_incref() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x54() {
  Assert_real((isodigit(84) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              425, ("isodigit should be 0 for T"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x54>:
push   %rax
mov    $0x54,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x1a9,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for T\00"
define void @t_isodigit_0x54() {
%1 = call i64 @isodigit(i32 84)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for T\00"
define void @t_isodigit_0x54() {
%1 = tail call i64 @isodigit(i32 84)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int do_082() { return 82; }


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

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

LLVM IR (-O0):
define i32 @do_082() {
ret i32 82
}

LLVM IR (-O2):
define i32 @do_082() {
ret i32 82
}
/* Variables and functions */
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ perror(char *);
int main(void) {
  char *argv[] = {"ls", "-al", NULL};
  execvp("ls", argv);
  perror("execvp");
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2cca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cc7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cc4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1040 <execvp@plt>
lea    0xea0(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2ce5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cc9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xebe(%rip),%rdi
mov    %rsp,%rsi
call   1040 <execvp@plt>
lea    0xeb6(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"ls\00"
@.str.1 = [4 x i8] c"-al\00"
@__const.main.argv = [3 x i8*] [i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* null]
@.str.2 = [7 x i8] c"execvp\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i8*]
store i32 0, i32* %1
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%5 = call i32 @execvp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %4)
%6 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [3 x i8] c"ls\00"
@.str.1 = [4 x i8] c"-al\00"
@__const.main.argv = [3 x i8*] [i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* null]
@.str.2 = [7 x i8] c"execvp\00"
define i32 @main() {
%1 = alloca [3 x i8*]
%2 = bitcast [3 x i8*]* %1 to i8*
%3 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%4 = call i32 @execvp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by_ptr(int /*<<< orphan*/);
int /*<<< orphan*/ shl();
void shl_by_ptr(uint32_t x) {
  by_ptr(x);
  shl();
}


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

x86 assembly (clang, -O2):
<shl_by_ptr>:
push   %rax
call   1030 <by_ptr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <shl@plt>

LLVM IR (-O0):
define void @shl_by_ptr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @by_ptr(i32 %3)
%5 = call i32 (...) @shl()
ret void
}

LLVM IR (-O2):
define void @shl_by_ptr(i32 %0) {
%2 = tail call i32 @by_ptr(i32 %0)
%3 = tail call i32 (...) @shl()
ret void
}
void close_file(void *arg) {}


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

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

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

LLVM IR (-O2):
define void @close_file(i8* nocapture %0) {
ret void
}
unsigned char ascii_index(unsigned char c) { return c - 32; }


x86 assembly (clang, -O0):
<ascii_index>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sub    $0x20,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii_index>:
lea    -0x20(%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i8 @ascii_index(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = sub nsw i32 %4, 32
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @ascii_index(i8 zeroext %0) {
%2 = add i8 %0, -32
ret i8 %2
}
char *get_array_message(unsigned int offset, unsigned int offset_max,
                        const char *const string_array[]) {
  if (offset > offset_max)
    return ("unknown");
  return ((char *)string_array[offset]);
}


x86 assembly (clang, -O0):
<get_array_message>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jbe    112a <get_array_message+0x2a>
lea    0xedf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1139 <get_array_message+0x39>
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_array_message>:
cmp    %esi,%edi
jbe    110c <get_array_message+0xc>
lea    0xef5(%rip),%rax
ret
mov    %edi,%eax
mov    (%rdx,%rax,8),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"unknown\00"
define i8* @get_array_message(i32 %0, i32 %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp ugt i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %4
br label %18
12: ; preds = %3
%13 = load i8**, i8*** %7
%14 = load i32, i32* %5
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
store i8* %17, i8** %4
br label %18
18: ; preds = %12, %11
%19 = load i8*, i8** %4
ret i8* %19
}

LLVM IR (-O2):
@.str = [8 x i8] c"unknown\00"
define i8* @get_array_message(i32 %0, i32 %1, i8** nocapture %2) {
%4 = icmp ugt i32 %0, %1
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = zext i32 %0 to i64
%7 = getelementptr inbounds i8*, i8** %2, i64 %6
%8 = load i8*, i8** %7
br label %9
9: ; preds = %3, %5
%10 = phi i8* [ %8, %5 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %3 ]
ret i8* %10
}
/* Type definitions */
struct pppoat_conf {
  int dummy;
};

/* Variables and functions */
int pppoat_conf_insert(struct pppoat_conf *, char const *, char const *);
int pppoat_conf_update(struct pppoat_conf *conf, const char *key,
                       const char *obj) {
  return pppoat_conf_insert(conf, key, obj);
}


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

x86 assembly (clang, -O2):
<pppoat_conf_update>:
jmp    1030 <pppoat_conf_insert@plt>

LLVM IR (-O0):
%struct.pppoat_conf = type { i32 }
define i32 @pppoat_conf_update(%struct.pppoat_conf* %0, i8* %1, i8* %2) {
%4 = alloca %struct.pppoat_conf*
%5 = alloca i8*
%6 = alloca i8*
store %struct.pppoat_conf* %0, %struct.pppoat_conf** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.pppoat_conf*, %struct.pppoat_conf** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @pppoat_conf_insert(%struct.pppoat_conf* %7, i8* %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.pppoat_conf = type { i32 }
define i32 @pppoat_conf_update(%struct.pppoat_conf* %0, i8* %1, i8* %2) {
%4 = tail call i32 @pppoat_conf_insert(%struct.pppoat_conf* %0, i8* %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void trc_1() { fprintf(stderr, "trc_1\n"); }


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"trc_1\0A\00"
define void @trc_1() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x2d() {
  Assert_real((isascii(45)),
              "/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_isascii.c",
              230, ("isascii should be 1 for -"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x2d>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xe6,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for -\00"
define void @t_isascii_0x2d() {
%1 = call i32 @isascii(i32 45)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 230, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for -\00"
define void @t_isascii_0x2d() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 230, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *get_nondet_char_ptr() {
  char *a;
  return a;
}


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

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

LLVM IR (-O0):
define i8* @get_nondet_char_ptr() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @get_nondet_char_ptr() {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ __dcache_writeback_all();
int /*<<< orphan*/ __icache_invalidate_all();
void rt_hw_cache_init(void) {
  __dcache_writeback_all();
  __icache_invalidate_all();
}


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

x86 assembly (clang, -O2):
<rt_hw_cache_init>:
push   %rax
xor    %eax,%eax
call   1030 <__dcache_writeback_all@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__icache_invalidate_all@plt>

LLVM IR (-O0):
define void @rt_hw_cache_init() {
%1 = call i32 (...) @__dcache_writeback_all()
%2 = call i32 (...) @__icache_invalidate_all()
ret void
}

LLVM IR (-O2):
define void @rt_hw_cache_init() {
%1 = tail call i32 (...) @__dcache_writeback_all()
%2 = tail call i32 (...) @__icache_invalidate_all()
ret void
}
/* Variables and functions */
int epoll_start(int);
int /*<<< orphan*/ fork_processes(int);
int /*<<< orphan*/ io_loop(int, int);
int open_non_blocking_socket(int);
int main(int argc, char **argv) {
  int listen_sock = open_non_blocking_socket(9090);
  fork_processes(2);
  int epoll_fd = epoll_start(listen_sock);
  io_loop(listen_sock, epoll_fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2382,%edi
call   1050 <open_non_blocking_socket@plt>
mov    %eax,-0x14(%rbp)
mov    $0x2,%edi
call   1030 <fork_processes@plt>
mov    -0x14(%rbp),%edi
call   1060 <epoll_start@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <io_loop@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2382,%edi
call   1050 <open_non_blocking_socket@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1030 <fork_processes@plt>
mov    %ebx,%edi
call   1060 <epoll_start@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <io_loop@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @open_non_blocking_socket(i32 9090)
store i32 %8, i32* %6
%9 = call i32 @fork_processes(i32 2)
%10 = load i32, i32* %6
%11 = call i32 @epoll_start(i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = call i32 @io_loop(i32 %12, i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @open_non_blocking_socket(i32 9090)
%4 = tail call i32 @fork_processes(i32 2)
%5 = tail call i32 @epoll_start(i32 %3)
%6 = tail call i32 @io_loop(i32 %3, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void idt_int3(void) { print("!! Breakpoint "); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"!! Breakpoint \00"
define void @idt_int3() {
%1 = call i32 @print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"!! Breakpoint \00"
define void @idt_int3() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_hex32(int, unsigned int);
void print_info_hex32(unsigned int value) { __console_tx_hex32(6, value); }


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

x86 assembly (clang, -O2):
<print_info_hex32>:
mov    %edi,%esi
mov    $0x6,%edi
jmp    1030 <__console_tx_hex32@plt>

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

LLVM IR (-O2):
define void @print_info_hex32(i32 %0) {
%2 = tail call i32 @__console_tx_hex32(i32 6, i32 %0)
ret void
}
void av_format_get_probe_score() {}


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

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

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

LLVM IR (-O2):
define void @av_format_get_probe_score() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void vec_dump(const char *s, const uint32_t *vec, unsigned len) {
  ((void)s);
  ((void)vec);
  ((void)len);
}


x86 assembly (clang, -O0):
<vec_dump>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @vec_dump(i8* nocapture %0, i32* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FIONBIO;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, unsigned long *);
void http_block_socket(int sk) {
  unsigned long fc = 0;
  ioctl(sk, FIONBIO, &fc);
}


x86 assembly (clang, -O0):
<http_block_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_block_socket>:
push   %rax
movq   $0x0,(%rsp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
pop    %rax
ret

LLVM IR (-O0):
@FIONBIO = global i32 0
define void @http_block_socket(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
store i64 0, i64* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @FIONBIO
%6 = call i32 @ioctl(i32 %4, i32 %5, i64* %3)
ret void
}

LLVM IR (-O2):
@FIONBIO = global i32 0
define void @http_block_socket(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%4 = load i32, i32* @FIONBIO
%5 = call i32 @ioctl(i32 %0, i32 %4, i64* %2)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dsumors(int, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dsumors(N, x, stride);
  printf("sum: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%edx
call   1050 <stdlib_strided_dsumors@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_dsumors@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [10 x i8] c"sum: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dsumors(i32 %6, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [10 x i8] c"sum: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dsumors(i32 4, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popcomplex32array_(char *x, unsigned int *n) { popNarray(x, (*n * 32)); }


x86 assembly (clang, -O0):
<popcomplex32array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x5,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popcomplex32array_>:
mov    (%rsi),%esi
shl    $0x5,%esi
jmp    1030 <popNarray@plt>

LLVM IR (-O0):
define void @popcomplex32array_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 32
%9 = call i32 @popNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @popcomplex32array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 5
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _SC_OPEN_MAX;
int sysconf(int /*<<< orphan*/);
int machdep_sys_getdtablesize() { return sysconf(_SC_OPEN_MAX); }


x86 assembly (clang, -O0):
<machdep_sys_getdtablesize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<machdep_sys_getdtablesize>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sysconf@plt>

LLVM IR (-O0):
@_SC_OPEN_MAX = global i32 0
define i32 @machdep_sys_getdtablesize() {
%1 = load i32, i32* @_SC_OPEN_MAX
%2 = call i32 @sysconf(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@_SC_OPEN_MAX = global i32 0
define i32 @machdep_sys_getdtablesize() {
%1 = load i32, i32* @_SC_OPEN_MAX
%2 = tail call i32 @sysconf(i32 %1)
ret i32 %2
}
void set_phys_to_machine(unsigned long pfn, unsigned long mfn) {}


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

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

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

LLVM IR (-O2):
define void @set_phys_to_machine(i64 %0, i64 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
void out(const char *str) {
  while (*str)
    putchar(*str++);
}


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

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

LLVM IR (-O0):
define void @out(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 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i32 @putchar(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @out(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
void vy86pid_analyse(void) {}


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

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

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

LLVM IR (-O2):
define void @vy86pid_analyse() {
ret void
}
void WriteString(int colour, const char *string) {
  char *video = (char *)0xB8000;
  while (*string != 0) {
    *video++ = *string++;
    *video++ = colour;
  }
}


x86 assembly (clang, -O0):
<WriteString>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xb8000,%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1161 <WriteString+0x61>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1114 <WriteString+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteString>:
mov    (%rsi),%al
test   %al,%al
je     112c <WriteString+0x2c>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,0xb8000(%rcx,%rcx,1)
mov    %dil,0xb8001(%rcx,%rcx,1)
movzbl 0x1(%rsi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <WriteString+0x10>
ret

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

LLVM IR (-O2):
define void @WriteString(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2
%6 = trunc i32 %0 to i8
br label %7
7: ; preds = %5, %7
%8 = phi i8 [ %3, %5 ], [ %14, %7 ]
%9 = phi i8* [ inttoptr (i64 753664 to i8*), %5 ], [ %13, %7 ]
%10 = phi i8* [ %1, %5 ], [ %11, %7 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %8, i8* %9
%13 = getelementptr inbounds i8, i8* %9, i64 2
store i8 %6, i8* %12
%14 = load i8, i8* %11
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %2
ret void
}