xunge/DecIR huggingface dataset:
/* Variables and functions */
int strcmp(char const *, char const *);
int typecmp(const void *e1, const void *e2) {
  const char *s1 = *(const char *const *)e1;
  const char *s2 = *(const char *const *)e2;
  return strcmp(s1, s2);
}


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

x86 assembly (clang, -O2):
<typecmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @typecmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
unsigned short inw(unsigned short port) {
  unsigned short _v;
  __asm__ __volatile__("in"
                       "w"
                       " %"
                       "w"
                       "1,%"
                       ""
                       "0"
                       : "=a"(_v)
                       : "Nd"(port));
  return _v;
}


x86 assembly (clang, -O0):
<inw>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%ax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw>:
mov    %edi,%edx
in     (%dx),%ax
ret

LLVM IR (-O0):
define zeroext i16 @inw(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i16 asm sideeffect "inw ${1:w},$0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i16 %5, i16* %3
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @inw(i16 zeroext %0) {
%2 = tail call i16 asm sideeffect "inw ${1:w},$0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i16 %2
}
int fastPower10(int power) {
  static int powers[10] = {1,      10,      100,      1000,      10000,
                           100000, 1000000, 10000000, 100000000, 1000000000};
  return powers[power];
}


x86 assembly (clang, -O0):
<fastPower10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
lea    0x2f1e(%rip),%rax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastPower10>:
movslq %edi,%rax
lea    0xef6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@fastPower10.powers = internal global [10 x i32] [i32 1, i32 10, i32 100, i32 1000, i32 10000, i32 100000, i32 1000000, i32 10000000, i32 100000000, i32 1000000000]
define i32 @fastPower10(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [10 x i32], [10 x i32]* @fastPower10.powers, i64 0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
@fastPower10.powers = internal unnamed_addr constant [10 x i32] [i32 1, i32 10, i32 100, i32 1000, i32 10000, i32 100000, i32 1000000, i32 10000000, i32 100000000, i32 1000000000]
define i32 @fastPower10(i32 %0) {
%2 = sext i32 %0 to i64
%3 = getelementptr inbounds [10 x i32], [10 x i32]* @fastPower10.powers, i64 0, i64 %2
%4 = load i32, i32* %3
ret i32 %4
}
void reportError(void *p, int i) {}


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

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

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

LLVM IR (-O2):
define void @reportError(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void A10(void) { printf("Test1\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"Test1\00"
define void @A10() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ assert(size_t);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *ptr;
  assert(size);
  ptr = malloc(size);
  if (!ptr)
    abort();
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1164 <xmalloc+0x34>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1148 <xmalloc+0x18>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @assert(i64 %4)
%6 = load i64, i64* %2
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i32 @assert(i64 %0)
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %1
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void codigoSentenciaSalida(int parte, FILE *f) {}


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

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

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

LLVM IR (-O2):
define void @codigoSentenciaSalida(i32 %0, i32* nocapture %1) {
ret void
}
unsigned addval_129(unsigned x) { return x + 3682916041U; }


x86 assembly (clang, -O0):
<addval_129>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xdb84d6c9,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @addval_129(i32 %0) {
%2 = add i32 %0, -612051255
ret i32 %2
}
int vcmp(const void *a, const void *b) { return *((int *)a) - *((int *)b); }


x86 assembly (clang, -O0):
<vcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @vcmp(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @vcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
char *strdup(char *);
char *String_copy(char *orig) { return strdup(orig); }


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

x86 assembly (clang, -O2):
<String_copy>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @String_copy(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
void reverse(unsigned int *a1, unsigned int *a2) {
  int t;
  for (;;) {
    t = *--a2;
    if (a2 <= a1)
      return;
    *a2 = *a1;
    *a1++ = t;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
mov    -0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
ja     1131 <reverse+0x31>
pop    %rbp
ret
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
jmp    110c <reverse+0xc>

x86 assembly (clang, -O2):
<reverse>:
add    $0xfffffffffffffffc,%rsi
cmp    %rdi,%rsi
jbe    112a <reverse+0x2a>
add    $0x4,%rdi
nopl   (%rax)
mov    (%rsi),%eax
mov    -0x4(%rdi),%ecx
mov    %ecx,(%rsi)
mov    %eax,-0x4(%rdi)
add    $0xfffffffffffffffc,%rsi
lea    0x4(%rdi),%rax
cmp    %rdi,%rsi
mov    %rax,%rdi
ja     1110 <reverse+0x10>
ret

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

LLVM IR (-O2):
define void @reverse(i32* %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 -1
%4 = icmp ugt i32* %3, %0
br i1 %4, label %6, label %5
5: ; preds = %6, %2
ret void
6: ; preds = %2, %6
%7 = phi i32* [ %12, %6 ], [ %3, %2 ]
%8 = phi i32* [ %11, %6 ], [ %0, %2 ]
%9 = load i32, i32* %7
%10 = load i32, i32* %8
store i32 %10, i32* %7
%11 = getelementptr inbounds i32, i32* %8, i64 1
store i32 %9, i32* %8
%12 = getelementptr inbounds i32, i32* %7, i64 -1
%13 = icmp ugt i32* %12, %11
br i1 %13, label %6, label %5
}
/* Variables and functions */
size_t rndgen_range(int);
int run_mut(void) {
  if (20 >= 100)
    return 1;
  if (20 <= 0)
    return 0;
  size_t p = rndgen_range(100);
  return p < 20;
}


x86 assembly (clang, -O0):
<run_mut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x64,%edi
call   1030 <rndgen_range@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x14,-0x8(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_mut>:
push   %rax
mov    $0x64,%edi
call   1030 <rndgen_range@plt>
xor    %ecx,%ecx
cmp    $0x14,%rax
setb   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @run_mut() {
%1 = alloca i64
%2 = call i64 @rndgen_range(i32 100)
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = icmp ult i64 %3, 20
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @run_mut() {
%1 = tail call i64 @rndgen_range(i32 100)
%2 = icmp ult i64 %1, 20
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int f91(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int N;
  scanf("%d", &N);
  while (N != 0) {
    printf("%d\n", f91(N));
    scanf("%d", &N);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
je     1184 <main+0x54>
mov    -0x8(%rbp),%edi
call   1030 <f91@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
lea    0xe8a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
jmp    114f <main+0x1f>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
test   %edi,%edi
je     1192 <main+0x62>
lea    0xeaa(%rip),%r14
lea    0xea0(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <f91@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
test   %edi,%edi
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_set_model() {
ret void
}
/* Type definitions */
typedef int int64_t;
typedef int int32_t;

/* Variables and functions */
int cosrk(int);
int64_t geoarea(int32_t x_min, int32_t y_min, int32_t x_max, int32_t y_max) {
  return (int64_t)(x_max - x_min) * (int64_t)(y_max - y_min) /
         cosrk((y_min + y_max) / 2);
}


x86 assembly (clang, -O0):
<geoarea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <cosrk@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cltd
idiv   %ecx
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geoarea>:
push   %rbx
sub    %edi,%edx
lea    (%rcx,%rsi,1),%eax
mov    %ecx,%ebx
sub    %esi,%ebx
imul   %edx,%ebx
mov    %eax,%edi
shr    $0x1f,%edi
add    %eax,%edi
sar    %edi
call   1030 <cosrk@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @geoarea(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
%12 = load i32, i32* %8
%13 = load i32, i32* %6
%14 = sub nsw i32 %12, %13
%15 = mul nsw i32 %11, %14
%16 = load i32, i32* %6
%17 = load i32, i32* %8
%18 = add nsw i32 %16, %17
%19 = sdiv i32 %18, 2
%20 = call i32 @cosrk(i32 %19)
%21 = sdiv i32 %15, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @geoarea(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %2, %0
%6 = sub nsw i32 %3, %1
%7 = mul nsw i32 %6, %5
%8 = add nsw i32 %3, %1
%9 = sdiv i32 %8, 2
%10 = tail call i32 @cosrk(i32 %9)
%11 = sdiv i32 %7, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int, int, int);
int killpg(int pgrp, int sig) {
  printf("%s(%d): killpg(pgrp=%d,sig=%d)\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/Bytewerk/uClinux-ipcam/refs/heads/master/"
         "diald/killpg.c",
         4, pgrp, sig);
  return (0);
}


x86 assembly (clang, -O0):
<killpg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
lea    0xed4(%rip),%rdi
lea    0xeed(%rip),%rsi
mov    $0x4,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<killpg>:
push   %rax
mov    %esi,%r8d
mov    %edi,%ecx
lea    0xee3(%rip),%rdi
lea    0xefc(%rip),%rsi
mov    $0x4,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"%s(%d): killpg(pgrp=%d,sig=%d)\0A\00"
@.str.1 = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Bytewerk/uClinux-ipcam/refs/heads/master/diald/killpg.c\00"
define i32 @killpg(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"%s(%d): killpg(pgrp=%d,sig=%d)\0A\00"
@.str.1 = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Bytewerk/uClinux-ipcam/refs/heads/master/diald/killpg.c\00"
define i32 @killpg(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 %0, i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void salida(char *mensaje) {
  fprintf(stderr, "%s\n", mensaje);
  exit(1);
}


x86 assembly (clang, -O0):
<salida>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<salida>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @salida(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @salida(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
char *realloc(char *, unsigned int);
char *changecore(char *ptr, unsigned int size) {
  char *retptr;
  retptr = realloc(ptr, size);
  if (!retptr)
    fatal("Out of memory");
  return retptr;
}


x86 assembly (clang, -O0):
<changecore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1156 <changecore+0x36>
lea    0xeaf(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<changecore>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <changecore+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
define i8* @changecore(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
%7 = load i32, i32* %4
%8 = call i8* @realloc(i8* %6, i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
define i8* @changecore(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ putc(char);
char getc(void) {
  char ret;
  while (((*(volatile unsigned long *)0x7F005018) & 0x7F) == 0)
    ;
  ret = (*(volatile unsigned char *)0x7F005024);
  if ((ret == 0x0d) || (ret == 0x0a)) {
    putc(0x0d);
    putc(0x0a);
  } else
    putc(ret);
  return ret;
}


x86 assembly (clang, -O0):
<getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x7f005018,%eax
mov    (%rax),%rax
and    $0x7f,%rax
cmp    $0x0,%rax
jne    1133 <getc+0x23>
jmp    1118 <getc+0x8>
mov    $0x7f005024,%eax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
je     1157 <getc+0x47>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1170 <getc+0x60>
mov    $0xd,%edi
call   1030 <putc@plt>
mov    $0xa,%edi
call   1030 <putc@plt>
jmp    1179 <getc+0x69>
movsbl -0x1(%rbp),%edi
call   1030 <putc@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getc>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
testq  $0x7f,0x7f005018
je     1120 <getc+0x10>
mov    0x7f005024,%bl
cmp    $0xd,%bl
je     1141 <getc+0x31>
mov    %ebx,%eax
cmp    $0xa,%bl
jne    114d <getc+0x3d>
mov    $0xd,%edi
call   1030 <putc@plt>
mov    $0xa,%al
movsbl %al,%edi
call   1030 <putc@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @getc() {
%1 = alloca i8
br label %2
2: ; preds = %6, %0
%3 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%4 = and i64 %3, 127
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
%8 = load volatile i8, i8* inttoptr (i64 2130726948 to i8*)
store i8 %8, i8* %1
%9 = load i8, i8* %1
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 13
br i1 %11, label %16, label %12
12: ; preds = %7
%13 = load i8, i8* %1
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 10
br i1 %15, label %16, label %19
16: ; preds = %12, %7
%17 = call i32 @putc(i8 signext 13)
%18 = call i32 @putc(i8 signext 10)
br label %22
19: ; preds = %12
%20 = load i8, i8* %1
%21 = call i32 @putc(i8 signext %20)
br label %22
22: ; preds = %19, %16
%23 = load i8, i8* %1
ret i8 %23
}

LLVM IR (-O2):
define signext i8 @getc() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%3 = and i64 %2, 127
%4 = icmp eq i64 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = load volatile i8, i8* inttoptr (i64 2130726948 to i8*)
switch i8 %6, label %9 [
i8 13, label %7
i8 10, label %7
]
7: ; preds = %5, %5
%8 = tail call i32 @putc(i8 signext 13)
br label %9
9: ; preds = %5, %7
%10 = phi i8 [ 10, %7 ], [ %6, %5 ]
%11 = tail call i32 @putc(i8 signext %10)
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int sum(int);
int main() {
  int n;
  scanf("%d", &n);
  printf("%d", sum(n));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <sum@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

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


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

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

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

LLVM IR (-O2):
define void @proc23() {
ret void
}
void main() {
  int i;
  i++;
  i++;
  i++;
}


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

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void bf_output(char *c) { putchar(*c); }


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

x86 assembly (clang, -O2):
<bf_output>:
movsbl (%rdi),%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @bf_output(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @putchar(i8 signext %2)
ret void
}
void _Unwind_SetGR() {}


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

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

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

LLVM IR (-O2):
define void @_Unwind_SetGR() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned int max_char_or_byte2;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_max_char_or_byte2(void *_p, unsigned _v) {
  ((XFontStruct *)_p)->max_char_or_byte2 = (unsigned)_v;
}


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

x86 assembly (clang, -O2):
<set_XFontStruct_max_char_or_byte2>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XFontStruct_max_char_or_byte2(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
struct activity {
  int dummy;
};

/* Variables and functions */
int get_iface_nr();
int wrap_get_iface_nr(struct activity *a) {
  int n = 0;
  if ((n = get_iface_nr()) > 0) {
    if (n > 65536)
      return 65536;
    else
      return n;
  }
  return 0;
}


x86 assembly (clang, -O0):
<wrap_get_iface_nr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <get_iface_nr@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jle    115a <wrap_get_iface_nr+0x4a>
cmpl   $0x10000,-0x14(%rbp)
jle    114f <wrap_get_iface_nr+0x3f>
movl   $0x10000,-0x4(%rbp)
jmp    1161 <wrap_get_iface_nr+0x51>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <wrap_get_iface_nr+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_get_iface_nr>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <get_iface_nr@plt>
cmp    $0x10000,%eax
mov    $0x10000,%ecx
cmovge %ecx,%eax
test   %eax,%eax
cmovs  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.activity = type { i32 }
define i32 @wrap_get_iface_nr(%struct.activity* %0) {
%2 = alloca i32
%3 = alloca %struct.activity*
%4 = alloca i32
store %struct.activity* %0, %struct.activity** %3
store i32 0, i32* %4
%5 = call i32 (...) @get_iface_nr()
store i32 %5, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 65536
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 65536, i32* %2
br label %14
11: ; preds = %7
%12 = load i32, i32* %4
store i32 %12, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %11, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.activity = type { i32 }
define i32 @wrap_get_iface_nr(%struct.activity* nocapture readnone %0) {
%2 = tail call i32 (...) @get_iface_nr()
%3 = icmp slt i32 %2, 65536
%4 = select i1 %3, i32 %2, i32 65536
%5 = icmp sgt i32 %4, 0
%6 = select i1 %5, i32 %4, i32 0
ret i32 %6
}
int test_imm_8Aint32_reg(int val) { return ((val) & (0x8A << 0)) ? -20 : -40; }


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Aint32_reg(i32 %0) {
%2 = and i32 %0, 138
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_put_y_mmx(int, int, int /*<<< orphan*/ *,
                                int /*<<< orphan*/ const *, int);
void MC_put_y_16_mmx(uint8_t *dest, const uint8_t *ref, int stride,
                     int height) {
  MC_put_y_mmx(16, height, dest, ref, stride);
}


x86 assembly (clang, -O0):
<MC_put_y_16_mmx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x10,%edi
call   1030 <MC_put_y_mmx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_put_y_16_mmx>:
mov    %edx,%r8d
mov    %rsi,%rax
mov    %rdi,%rdx
mov    $0x10,%edi
mov    %ecx,%esi
mov    %rax,%rcx
jmp    1030 <MC_put_y_mmx@plt>

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

LLVM IR (-O2):
define void @MC_put_y_16_mmx(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_put_y_mmx(i32 16, i32 %3, i32* %0, i32* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LocalSessionState(int, int *, int *, int);
void READCHANGE(int Stream) {
  int dummy;
  LocalSessionState(Stream, &dummy, &dummy, 1);
}


x86 assembly (clang, -O0):
<READCHANGE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rdx
mov    $0x1,%ecx
mov    %rdx,%rsi
call   1030 <LocalSessionState@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<READCHANGE>:
push   %rax
lea    0x4(%rsp),%rdx
mov    %rdx,%rsi
mov    $0x1,%ecx
call   1030 <LocalSessionState@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @READCHANGE(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @LocalSessionState(i32 %4, i32* %3, i32* %3, i32 1)
ret void
}

LLVM IR (-O2):
define void @READCHANGE(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @LocalSessionState(i32 %0, i32* %2, i32* %2, i32 1)
ret void
}
void SSMR3PutS8(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3PutS8() {
ret void
}
int test_imm_ABuint16_reg(unsigned short val) {
  return ((val) & (-0xAB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ABuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff55,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_ABuint16_reg>:
test   $0xff55,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_ABuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -171
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, long long *);
long long get_range_number(char *range) {
  long long d = 0;
  sscanf(range, "bytes=%lld-", &d);
  return d;
}


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

x86 assembly (clang, -O2):
<get_range_number>:
push   %rax
movq   $0x0,(%rsp)
lea    0xee0(%rip),%rsi
mov    %rsp,%rdx
call   1030 <sscanf@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"bytes=%lld-\00"
define i64 @get_range_number(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
%4 = load i8*, i8** %2
%5 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64* %3)
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
@.str = [12 x i8] c"bytes=%lld-\00"
define i64 @get_range_number(i8* nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64* %2)
%5 = load i64, i64* %2
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ mcs_lock_status(void *);
void mcs_lock(void *lock) { mcs_lock_status(lock); }


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

x86 assembly (clang, -O2):
<mcs_lock>:
jmp    1030 <mcs_lock_status@plt>

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

LLVM IR (-O2):
define void @mcs_lock(i8* %0) {
%2 = tail call i32 @mcs_lock_status(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
scalar_t__ _mm_extract_epi8(int /*<<< orphan*/, int);
long long int foo8(__m128i x) { return (char)_mm_extract_epi8(x, 4); }


x86 assembly (clang, -O0):
<foo8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1030 <_mm_extract_epi8@plt>
movsbq %al,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo8>:
push   %rax
mov    $0x4,%esi
call   1030 <_mm_extract_epi8@plt>
movsbq %al,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @foo8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @_mm_extract_epi8(i32 %3, i32 4)
%5 = trunc i64 %4 to i8
%6 = sext i8 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @foo8(i32 %0) {
%2 = tail call i64 @_mm_extract_epi8(i32 %0, i32 4)
%3 = shl i64 %2, 56
%4 = ashr exact i64 %3, 56
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void dbgprintkey(uint8_t *key, int len, char *name) {}


x86 assembly (clang, -O0):
<dbgprintkey>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @dbgprintkey(i32* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pin_unexport(int);
void unexport_P9() {
  pin_unexport(51);
  pin_unexport(60);
}


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

x86 assembly (clang, -O2):
<unexport_P9>:
push   %rax
mov    $0x33,%edi
call   1030 <pin_unexport@plt>
mov    $0x3c,%edi
pop    %rax
jmp    1030 <pin_unexport@plt>

LLVM IR (-O0):
define void @unexport_P9() {
%1 = call i32 @pin_unexport(i32 51)
%2 = call i32 @pin_unexport(i32 60)
ret void
}

LLVM IR (-O2):
define void @unexport_P9() {
%1 = tail call i32 @pin_unexport(i32 51)
%2 = tail call i32 @pin_unexport(i32 60)
ret void
}
int test_imm_C5uint8_reg(unsigned char val) {
  return ((val) & (-0xC5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C5uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff3b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_C5uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 59
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char *sp_pass(char *p) {
  while (*p == ' ' || *p == '\t')
    ++p;
  return (p);
}


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

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

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

LLVM IR (-O2):
define i8* @sp_pass(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
float obdConvert_34_3B(unsigned int A, unsigned int B, unsigned int C,
                       unsigned int D) {
  return ((float)A * 256.0f + (float)B) * 0.0000305f;
}


x86 assembly (clang, -O0):
<obdConvert_34_3B>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
mov    -0x8(%rbp),%eax
cvtsi2ss %rax,%xmm1
movss  0xedc(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xec8(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_34_3B>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
mov    %esi,%eax
cvtsi2ss %rax,%xmm1
mulss  0xeea(%rip),%xmm0
addss  %xmm1,%xmm0
mulss  0xee2(%rip),%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_34_3B(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = load i32, i32* %6
%12 = uitofp i32 %11 to float
%13 = call float @llvm.fmuladd.f32(float %10, float 2.560000e+02, float %12)
%14 = fmul float %13, 0x3EFFFB4800000000
ret float %14
}

LLVM IR (-O2):
define float @obdConvert_34_3B(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = uitofp i32 %1 to float
%7 = tail call float @llvm.fmuladd.f32(float %5, float 2.560000e+02, float %6)
%8 = fmul float %7, 0x3EFFFB4800000000
ret float %8
}
/* Variables and functions */
int MaxSubseqSumRecur(int *, int, int);
int MaxSubseqSum3(int a[], int n) {
  int left = 0;
  int right = n - 1;
  return MaxSubseqSumRecur(a, left, right);
}


x86 assembly (clang, -O0):
<MaxSubseqSum3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <MaxSubseqSumRecur@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MaxSubseqSum3>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <MaxSubseqSumRecur@plt>

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

LLVM IR (-O2):
define i32 @MaxSubseqSum3(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @MaxSubseqSumRecur(i32* %0, i32 0, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float a;
  scanf("%f", &a);
  printf("%.4f", a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [5 x i8] c"%.4f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %4)
ret i32 0
}