xunge/DecIR huggingface dataset:
/* Variables and functions */
double ro(double, double, double);
double p(double t, double x, double y, double p_ro) {
  return p_ro * ro(t, x, y);
}


x86 assembly (clang, -O0):
<p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <ro@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p>:
push   %rax
movsd  %xmm3,(%rsp)
call   1030 <ro@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @p(double %0, double %1, double %2, double %3) {
%5 = tail call double @ro(double %0, double %1, double %2)
%6 = fmul double %5, %3
ret double %6
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ reverse_endian(int);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    puts("Give a number as argument!");
    return 0;
  }
  int num;
  num = atoi(argv[1]);
  reverse_endian(num);
  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)
cmpl   $0x2,-0x8(%rbp)
jge    1168 <main+0x38>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    1187 <main+0x57>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <reverse_endian@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1144 <main+0x14>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
jmp    1154 <main+0x24>
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <reverse_endian@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Give a number as argument!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %18
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @atoi(i8* %14)
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = call i32 @reverse_endian(i32 %16)
store i32 0, i32* %3
br label %18
18: ; preds = %11, %9
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [27 x i8] c"Give a number as argument!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %11
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @atoi(i8* %8)
%10 = tail call i32 @reverse_endian(i32 %9)
br label %11
11: ; preds = %6, %4
ret i32 0
}
/* Variables and functions */
int PMPI_Init(int *, char ***);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ pthread_self();
int MPI_Init(int *argc, char ***argv) {
  printf("%#lx: MPI_Init entry\n", pthread_self());
  int ret = PMPI_Init(argc, argv);
  printf("%#lx: MPI_Init exit\n", pthread_self());
  return ret;
}


x86 assembly (clang, -O0):
<MPI_Init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <PMPI_Init@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPI_Init>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xeb8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <PMPI_Init@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xeac(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [22 x i8] c"%#lx: MPI_Init entry\0A\00"
@.str.1 = [21 x i8] c"%#lx: MPI_Init exit\0A\00"
define i32 @MPI_Init(i32* %0, i8*** %1) {
%3 = alloca i32*
%4 = alloca i8***
%5 = alloca i32
store i32* %0, i32** %3
store i8*** %1, i8**** %4
%6 = call i32 (...) @pthread_self()
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %3
%9 = load i8***, i8**** %4
%10 = call i32 @PMPI_Init(i32* %8, i8*** %9)
store i32 %10, i32* %5
%11 = call i32 (...) @pthread_self()
%12 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
@.str = [22 x i8] c"%#lx: MPI_Init entry\0A\00"
@.str.1 = [21 x i8] c"%#lx: MPI_Init exit\0A\00"
define i32 @MPI_Init(i32* %0, i8*** %1) {
%3 = tail call i32 (...) @pthread_self()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @PMPI_Init(i32* %0, i8*** %1)
%6 = tail call i32 (...) @pthread_self()
%7 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 %5
}
int gi3(int j, unsigned short *b, int i) { return j + b[i]; }


x86 assembly (clang, -O0):
<gi3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movzwl (%rcx,%rdx,2),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gi3>:
movslq %edx,%rax
movzwl (%rsi,%rax,2),%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @gi3(i32 %0, i16* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i16*
%6 = alloca i32
store i32 %0, i32* %4
store i16* %1, i16** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i16*, i16** %5
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i16, i16* %8, i64 %10
%12 = load i16, i16* %11
%13 = zext i16 %12 to i32
%14 = add nsw i32 %7, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @gi3(i32 %0, i16* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i16, i16* %1, i64 %4
%6 = load i16, i16* %5
%7 = zext i16 %6 to i32
%8 = add nsw i32 %7, %0
ret i32 %8
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
void byteorder_htobebufs(uint8_t *buf, uint16_t val) {
  buf[0] = (uint8_t)(val >> 8);
  buf[1] = (uint8_t)(val & 0xff);
}


x86 assembly (clang, -O0):
<byteorder_htobebufs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<byteorder_htobebufs>:
movzbl %sil,%eax
sar    $0x8,%esi
movslq %esi,%rcx
mov    %rcx,(%rdi)
mov    %rax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @byteorder_htobebufs(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 8
%7 = sext i32 %6 to i64
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
store i64 %7, i64* %9
%10 = load i32, i32* %4
%11 = and i32 %10, 255
%12 = sext i32 %11 to i64
%13 = load i64*, i64** %3
%14 = getelementptr inbounds i64, i64* %13, i64 1
store i64 %12, i64* %14
ret void
}

LLVM IR (-O2):
define void @byteorder_htobebufs(i64* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 8
%4 = sext i32 %3 to i64
store i64 %4, i64* %0
%5 = and i32 %1, 255
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %6, i64* %7
ret void
}
__attribute__((always_)) void set_page_memtype(struct page *pg,
                                               unsigned long memtype) {}


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

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

LLVM IR (-O0):
%struct.page = type opaque
define void @set_page_memtype(%struct.page* %0, i64 %1) {
%3 = alloca %struct.page*
%4 = alloca i64
store %struct.page* %0, %struct.page** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
%struct.page = type opaque
define void @set_page_memtype(%struct.page* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
int connectsock(char const *, char const *, char *);
int connectTCP(const char *host, const char *service) {
  return connectsock(host, service, "tcp");
}


x86 assembly (clang, -O0):
<connectTCP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xed1(%rip),%rdx
call   1030 <connectsock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<connectTCP>:
lea    0xee9(%rip),%rdx
jmp    1030 <connectsock@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"tcp\00"
define i32 @connectTCP(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 = call i32 @connectsock(i8* %5, i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"tcp\00"
define i32 @connectTCP(i8* %0, i8* %1) {
%3 = tail call i32 @connectsock(i8* %0, i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
unsigned char calcZ(unsigned char *R, const unsigned char *C) {
  return *R ^ *C;
}


x86 assembly (clang, -O0):
<calcZ>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcZ>:
mov    (%rsi),%al
xor    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @calcZ(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* %5
%7 = zext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = xor i32 %7, %10
%12 = trunc i32 %11 to i8
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @calcZ(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = xor i8 %4, %3
ret i8 %5
}
/* Variables and functions */
int foo(int);
int main(void) { return foo(10); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 10)
ret i32 %1
}
int nextPrime(int currentPrime) {
  if (currentPrime == 2) {
    return 3;
  }
  int candidatePrime = currentPrime + 2;
  for (int i = 3; i < candidatePrime; i += 2) {
    if (candidatePrime % i == 0) {
      return nextPrime(candidatePrime);
    }
  }
  return candidatePrime;
}


x86 assembly (clang, -O0):
<nextPrime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1131 <nextPrime+0x21>
movl   $0x3,-0x4(%rbp)
jmp    1186 <nextPrime+0x76>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1180 <nextPrime+0x70>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    116d <nextPrime+0x5d>
mov    -0xc(%rbp),%edi
call   1030 <nextPrime@plt>
mov    %eax,-0x4(%rbp)
jmp    1186 <nextPrime+0x76>
jmp    1172 <nextPrime+0x62>
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
jmp    1141 <nextPrime+0x31>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextPrime>:
mov    $0x3,%ecx
cmp    $0x2,%edi
je     1140 <nextPrime+0x30>
lea    0x2(%rdi),%ecx
cmp    $0x2,%edi
jl     1140 <nextPrime+0x30>
mov    $0x1,%esi
nopw   0x0(%rax,%rax,1)
add    $0x2,%esi
mov    %ecx,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1143 <nextPrime+0x33>
cmp    %edi,%esi
jl     1130 <nextPrime+0x20>
mov    %ecx,%eax
ret
mov    %ecx,%edi
jmp    1030 <nextPrime@plt>

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

LLVM IR (-O2):
define i32 @nextPrime(i32 %0) {
%2 = icmp eq i32 %0, 2
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = add nsw i32 %0, 2
%5 = icmp sgt i32 %0, 1
br i1 %5, label %9, label %15
6: ; preds = %9
%7 = add nuw nsw i32 %10, 2
%8 = icmp slt i32 %10, %0
br i1 %8, label %9, label %15
9: ; preds = %3, %6
%10 = phi i32 [ %7, %6 ], [ 3, %3 ]
%11 = srem i32 %4, %10
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %9
%14 = tail call i32 @nextPrime(i32 %4)
br label %15
15: ; preds = %6, %3, %13, %1
%16 = phi i32 [ 3, %1 ], [ %14, %13 ], [ %4, %3 ], [ %4, %6 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
char *safe_malloc(size_t);
size_t strlen(char const *);
char *strmcpy(const char *str) {
  size_t len = strlen(str);
  char *result = safe_malloc(len + 1);
  memcpy(result, str, len);
  result[len] = 0;
  return result;
}


x86 assembly (clang, -O0):
<strmcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <safe_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strmcpy>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %rax,%r15
lea    0x1(%rax),%rdi
call   1030 <safe_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strmcpy(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = add i64 %7, 1
%9 = call i8* @safe_malloc(i64 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = load i64, i64* %3
%13 = call i32 @memcpy(i8* %10, i8* %11, i64 %12)
%14 = load i8*, i8** %4
%15 = load i64, i64* %3
%16 = getelementptr inbounds i8, i8* %14, i64 %15
store i8 0, i8* %16
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
define i8* @strmcpy(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @safe_malloc(i64 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %2)
%6 = getelementptr inbounds i8, i8* %4, i64 %2
store i8 0, i8* %6
ret i8* %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t usec2ntp(uint32_t usec) {
  uint32_t t = (usec * 1825) >> 5;
  return ((usec << 12) + (usec << 8) - t);
}


x86 assembly (clang, -O0):
<usec2ntp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x721,-0x4(%rbp),%eax
sar    $0x5,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xc,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usec2ntp>:
imul   $0x721,%edi,%ecx
sar    $0x5,%ecx
imul   $0x1100,%edi,%eax
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @usec2ntp(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 1825
%6 = ashr i32 %5, 5
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = shl i32 %7, 12
%9 = load i32, i32* %2
%10 = shl i32 %9, 8
%11 = add nsw i32 %8, %10
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @usec2ntp(i32 %0) {
%2 = mul nsw i32 %0, 1825
%3 = ashr i32 %2, 5
%4 = mul i32 %0, 4352
%5 = sub nsw i32 %4, %3
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ UINT64_MAX;
uint64_t tick_difference(uint64_t us1, uint64_t us2) {
  if (us1 > us2) {
    uint64_t td = UINT64_MAX - us1 + 1;
    return us2 + td;
  }
  return us2 - us1;
}


x86 assembly (clang, -O0):
<tick_difference>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1141 <tick_difference+0x41>
mov    0x2eb7(%rip),%rax
mov    (%rax),%rax
sub    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114d <tick_difference+0x4d>
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tick_difference>:
mov    %rsi,%rax
sub    %rdi,%rax
jge    111c <tick_difference+0x1c>
mov    0x2ec9(%rip),%rax
mov    (%rax),%rax
sub    %rdi,%rsi
add    %rsi,%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
@UINT64_MAX = global i64 0
define i64 @tick_difference(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = icmp sgt i64 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %2
%11 = load i64, i64* @UINT64_MAX
%12 = load i64, i64* %4
%13 = sub nsw i64 %11, %12
%14 = add nsw i64 %13, 1
store i64 %14, i64* %6
%15 = load i64, i64* %5
%16 = load i64, i64* %6
%17 = add nsw i64 %15, %16
store i64 %17, i64* %3
br label %22
18: ; preds = %2
%19 = load i64, i64* %5
%20 = load i64, i64* %4
%21 = sub nsw i64 %19, %20
store i64 %21, i64* %3
br label %22
22: ; preds = %18, %10
%23 = load i64, i64* %3
ret i64 %23
}

LLVM IR (-O2):
@UINT64_MAX = global i64 0
define i64 @tick_difference(i64 %0, i64 %1) {
%3 = icmp slt i64 %1, %0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i64, i64* @UINT64_MAX
%6 = sub i64 1, %0
%7 = add i64 %6, %1
%8 = add i64 %7, %5
br label %11
9: ; preds = %2
%10 = sub nsw i64 %1, %0
br label %11
11: ; preds = %9, %4
%12 = phi i64 [ %8, %4 ], [ %10, %9 ]
ret i64 %12
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ type;
};
typedef TYPE_1__ XPropertyEvent;

/* Variables and functions */
int get_XPropertyEvent_type(void *_p) {
  return (int)((XPropertyEvent *)_p)->type;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XPropertyEvent_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XPropertyEvent_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int main() {
  int n = 10;
  int fibs[10] = {1, 1};
  for (int i = 2; i < n; i++)
    fibs[i] = fibs[i - 1] + fibs[i - 2];
  return fibs[n - 1];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x2,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1185 <main+0x75>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%ecx
mov    -0x34(%rbp),%eax
sub    $0x2,%eax
cltq
add    -0x30(%rbp,%rax,4),%ecx
movslq -0x34(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    114b <main+0x3b>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%eax
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i32]
%4 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
%5 = bitcast [10 x i32]* %3 to i8*
%6 = bitcast i8* %5 to <{ i32, i32, [8 x i32] }>*
%7 = getelementptr inbounds <{ i32, i32, [8 x i32] }>, <{ i32, i32, [8 x i32] }>* %6, i32 0, i32 0
store i32 1, i32* %7
%8 = getelementptr inbounds <{ i32, i32, [8 x i32] }>, <{ i32, i32, [8 x i32] }>* %6, i32 0, i32 1
store i32 1, i32* %8
store i32 2, i32* %4
br label %9
9: ; preds = %28, %0
%10 = load i32, i32* %4
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %31
13: ; preds = %9
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = load i32, i32* %4
%20 = sub nsw i32 %19, 2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = add nsw i32 %18, %23
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %26
store i32 %24, i32* %27
br label %28
28: ; preds = %13
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %9
31: ; preds = %9
%32 = load i32, i32* %2
%33 = sub nsw i32 %32, 1
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %34
%36 = load i32, i32* %35
ret i32 %36
}

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

/* Variables and functions */
int /*<<< orphan*/ err_sys(char *);
int /*<<< orphan*/ readline(int, void *, size_t);
ssize_t Readline(int fd, void *ptr, size_t maxlen) {
  ssize_t n;
  if ((n = readline(fd, ptr, maxlen)) < 0)
    err_sys("readline error");
  return (n);
}


x86 assembly (clang, -O0):
<Readline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <readline@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    115b <Readline+0x3b>
lea    0xeaa(%rip),%rdi
call   1030 <err_sys@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Readline>:
push   %rbx
call   1040 <readline@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Readline+0x18>
lea    0xecd(%rip),%rdi
call   1030 <err_sys@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"readline error\00"
define i32 @Readline(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @readline(i32 %0, i8* %1, i64 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @err_sys(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int randT();
int randTexc(int i) {
  int x = randT();
  while (x == i)
    x = randT();
  return x;
}


x86 assembly (clang, -O0):
<randTexc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <randT@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    1140 <randTexc+0x30>
mov    $0x0,%al
call   1030 <randT@plt>
mov    %eax,-0x8(%rbp)
jmp    1125 <randTexc+0x15>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randTexc>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1030 <randT@plt>
cmp    %ebx,%eax
je     1120 <randTexc+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @randTexc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @randT()
store i32 %4, i32* %3
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 (...) @randT()
store i32 %10, i32* %3
br label %5
11: ; preds = %5
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @randTexc(i32 %0) {
%2 = tail call i32 (...) @randT()
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %7
4: ; preds = %1, %4
%5 = tail call i32 (...) @randT()
%6 = icmp eq i32 %5, %0
br i1 %6, label %4, label %7
7: ; preds = %4, %1
%8 = phi i32 [ %2, %1 ], [ %5, %4 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ strncasecmp(char *, char const *, int /*<<< orphan*/);
int _IsLengthHeader(char *key) {
  const char *len_header = "content-length";
  return !strncasecmp(key, len_header, strlen(len_header));
}


x86 assembly (clang, -O0):
<_IsLengthHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <strncasecmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_IsLengthHeader>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <strncasecmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"content-length\00"
define i32 @_IsLengthHeader(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %2
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = call i32 @strncasecmp(i8* %4, i8* %5, i32 %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [15 x i8] c"content-length\00"
define i32 @_IsLengthHeader(i8* nocapture %0) {
%2 = tail call i32 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @strncasecmp(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int write_quaddobl_target_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(770, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<write_quaddobl_target_Laurent_system>:
mov    $0x302,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @write_quaddobl_target_Laurent_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 770, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_quaddobl_target_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 770, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ set_colors(int);
int /*<<< orphan*/ set_normal_color();
int /*<<< orphan*/ use_default_colors();
void init_colors(int force) {
  use_default_colors();
  set_normal_color();
  set_colors(force);
}


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

x86 assembly (clang, -O2):
<init_colors>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <use_default_colors@plt>
xor    %eax,%eax
call   1050 <set_normal_color@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <set_colors@plt>

LLVM IR (-O0):
define void @init_colors(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @use_default_colors()
%4 = call i32 (...) @set_normal_color()
%5 = load i32, i32* %2
%6 = call i32 @set_colors(i32 %5)
ret void
}

LLVM IR (-O2):
define void @init_colors(i32 %0) {
%2 = tail call i32 (...) @use_default_colors()
%3 = tail call i32 (...) @set_normal_color()
%4 = tail call i32 @set_colors(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void funlockfile(FILE *filehandle) {}


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

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

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

LLVM IR (-O2):
define void @funlockfile(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int read32_le(int /*<<< orphan*/ const *);
uint64_t read64_le(const uint8_t buf[8]) {
  uint32_t hi = read32_le(buf + 4), lo = read32_le(buf);
  return ((uint64_t)hi) << 32 | lo;
}


x86 assembly (clang, -O0):
<read64_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
call   1030 <read32_le@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read32_le@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
or     -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read64_le>:
push   %rbx
mov    %rdi,%rbx
add    $0x10,%rdi
call   1030 <read32_le@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <read32_le@plt>

LLVM IR (-O0):
define i32 @read64_le(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 4
%7 = call i32 @read32_le(i32* %6)
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = call i32 @read32_le(i32* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = shl i32 %10, 32
%12 = load i32, i32* %4
%13 = or i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @read64_le(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = tail call i32 @read32_le(i32* %2)
%4 = tail call i32 @read32_le(i32* %0)
ret i32 poison
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ descent;
};
typedef TYPE_1__ XCharStruct;

/* Variables and functions */
short get_XCharStruct_descent(void *_p) {
  return (short)((XCharStruct *)_p)->descent;
}


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

x86 assembly (clang, -O2):
<get_XCharStruct_descent>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define signext i16 @get_XCharStruct_descent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define signext i16 @get_XCharStruct_descent(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Variables and functions */
int f260(int *);
int f261(int *p) { return f260(p); }


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

x86 assembly (clang, -O2):
<f261>:
jmp    1030 <f260@plt>

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

LLVM IR (-O2):
define i32 @f261(i32* %0) {
%2 = tail call i32 @f260(i32* %0)
ret i32 %2
}
/* Variables and functions */
bool check_freq(int freq) {
  bool retcode = false;
  if (freq >= 1340000 && freq <= 1740000) {
    retcode = true;
  }
  return (retcode);
}


x86 assembly (clang, -O0):
<check_freq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x147260,-0x4(%rbp)
jl     112f <check_freq+0x2f>
cmpl   $0x1a8ce0,-0x4(%rbp)
jg     112f <check_freq+0x2f>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_freq>:
add    $0xffeb8da0,%edi
xor    %eax,%eax
cmp    $0x61a81,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @check_freq(i32 %0) {
%2 = add i32 %0, -1340000
%3 = icmp ult i32 %2, 400001
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
float __ratn2d(float, float);
float intr_wrap_023(float p1, float p2) { return __ratn2d(p1, p2); }


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

x86 assembly (clang, -O2):
<intr_wrap_023>:
jmp    1030 <__ratn2d@plt>

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

LLVM IR (-O2):
define float @intr_wrap_023(float %0, float %1) {
%3 = tail call float @__ratn2d(float %0, float %1)
ret float %3
}
void hc05_exit_at(void) {
  (*(volatile unsigned int *)(0x7F008164)) &= ~0x100;
  return;
}


x86 assembly (clang, -O0):
<hc05_exit_at>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008164,%eax
mov    (%rax),%ecx
and    $0xfffffeff,%ecx
mov    $0x7f008164,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<hc05_exit_at>:
andl   $0xfffffeff,0x7f008164
ff fe ff ff
ret

LLVM IR (-O0):
define void @hc05_exit_at() {
%1 = load volatile i32, i32* inttoptr (i64 2130739556 to i32*)
%2 = and i32 %1, -257
store volatile i32 %2, i32* inttoptr (i64 2130739556 to i32*)
ret void
}

LLVM IR (-O2):
define void @hc05_exit_at() {
%1 = load volatile i32, i32* inttoptr (i64 2130739556 to i32*)
%2 = and i32 %1, -257
store volatile i32 %2, i32* inttoptr (i64 2130739556 to i32*)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ height;
};
typedef TYPE_1__ XResizeRequestEvent;

/* Variables and functions */
int get_XResizeRequestEvent_height(void *_p) {
  return (int)((XResizeRequestEvent *)_p)->height;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XResizeRequestEvent_height(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XResizeRequestEvent_height(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void foo23() {}


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

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

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

LLVM IR (-O2):
define void @foo23() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strlen(char *);
char *number_to_string(char *buffer, int number) {
  char *p = buffer;
  sprintf(p, "%d", number);
  p += strlen(buffer);
  return p;
}


x86 assembly (clang, -O0):
<number_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xebb(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_to_string>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xed3(%rip),%rsi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @number_to_string(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 i8*, i8** %5
%8 = load i32, i32* %4
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = load i8*, i8** %5
%13 = sext i32 %11 to i64
%14 = getelementptr inbounds i8, i8* %12, i64 %13
store i8* %14, i8** %5
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @number_to_string(i8* %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @strlen(i8* %0)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ dsfmt_gv_fill_array_close_open(double *, int);
void s_fill_array_close_open(double array[], int size) {
  dsfmt_gv_fill_array_close_open(array, size);
}


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

x86 assembly (clang, -O2):
<s_fill_array_close_open>:
jmp    1030 <dsfmt_gv_fill_array_close_open@plt>

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

LLVM IR (-O2):
define void @s_fill_array_close_open(double* %0, i32 %1) {
%3 = tail call i32 @dsfmt_gv_fill_array_close_open(double* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x26() {
  Assert_real((isxdigit(38) == 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_isxdigit.c",
              195, ("isxdigit should be 0 for &"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x26>:
push   %rax
mov    $0x26,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xc3,%edx
pop    %rax
jmp    1040 <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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for &\00"
define void @t_isxdigit_0x26() {
%1 = call i64 @isxdigit(i32 38)
%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 195, 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for &\00"
define void @t_isxdigit_0x26() {
%1 = tail call i64 @isxdigit(i32 38)
%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 195, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t SysExcIntStatus(bool bMasked) {
  if (bMasked) {
    return ((*((volatile unsigned long *)(0x400F9008))));
  } else {
    return ((*((volatile unsigned long *)(0x400F9000))));
  }
}


x86 assembly (clang, -O0):
<SysExcIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1122 <SysExcIntStatus+0x22>
mov    $0x400f9008,%eax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    112e <SysExcIntStatus+0x2e>
mov    $0x400f9000,%eax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysExcIntStatus>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
mov    0x400f9000(,%rax,8),%rax
40
ret

LLVM IR (-O0):
define i64 @SysExcIntStatus(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load volatile i64, i64* inttoptr (i64 1074761736 to i64*)
store i64 %7, i64* %2
br label %10
8: ; preds = %1
%9 = load volatile i64, i64* inttoptr (i64 1074761728 to i64*)
store i64 %9, i64* %2
br label %10
10: ; preds = %8, %6
%11 = load i64, i64* %2
ret i64 %11
}

LLVM IR (-O2):
define i64 @SysExcIntStatus(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i64* inttoptr (i64 1074761728 to i64*), i64* inttoptr (i64 1074761736 to i64*)
%4 = load volatile i64, i64* %3
ret i64 %4
}
/* Variables and functions */
char *GO_strchr(char *d, int c) {
  while (c != *d) {
    if ('\0' == *d++)
      return NULL;
  }
  return d;
}


x86 assembly (clang, -O0):
<GO_strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     114b <GO_strchr+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1146 <GO_strchr+0x46>
movq   $0x0,-0x8(%rbp)
jmp    1153 <GO_strchr+0x53>
jmp    110b <GO_strchr+0xb>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GO_strchr>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl (%rax),%ecx
cmp    %esi,%ecx
je     1121 <GO_strchr+0x21>
add    $0x1,%rax
test   %cl,%cl
jne    1110 <GO_strchr+0x10>
xor    %eax,%eax
ret

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

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