xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sleep(int);
void *does_not() {
  int i;
  for (i = 0; i < 5; i++) {
    sleep(1);
    puts("Does not");
  }
  return NULL;
}


x86 assembly (clang, -O0):
<does_not>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    115d <does_not+0x3d>
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <does_not+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<does_not>:
push   %rbx
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"Does not\00"
define noalias i8* @does_not() {
%1 = tail call i32 @sleep(i32 1)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @sleep(i32 1)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @sleep(i32 1)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
int mkstemp(char *);
__attribute__((__weak__, __always___)) int
softboundmpx_mkstemp(char *template) {
  return mkstemp(template);
}


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

x86 assembly (clang, -O2):
<softboundmpx_mkstemp>:
jmp    1030 <mkstemp@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_mkstemp(i8* %0) {
%2 = tail call i32 @mkstemp(i8* %0)
ret i32 %2
}
ISR(INT5_vect) {
  DEBUG("ISR "
        "INT5"
        " occured");
}


x86 assembly (clang, -O0):
<ISR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <DEBUG@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISR>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <DEBUG@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"ISR INT5 occured\00"
define i32 @ISR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [17 x i8] c"ISR INT5 occured\00"
define i32 @ISR(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *, char const *);
void abort_if_null(void *ptr, const char str[]) {
  if (ptr == NULL) {
    printf("%s", str);
    abort();
  }
}


x86 assembly (clang, -O0):
<abort_if_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1152 <abort_if_null+0x32>
mov    -0x10(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abort_if_null>:
test   %rdi,%rdi
je     1126 <abort_if_null+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @abort_if_null(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 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @abort_if_null(i8* readnone %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret void
}
/* Variables and functions */
double fabs(double);
double rnormal(double, double);
double rpnormal(double m, double sd) {
  double x, pm, psd;
  pm = fabs(m);
  psd = fabs(sd);
  for (;;)
    if ((x = rnormal(pm, psd)) > 0.0)
      return x;
}


x86 assembly (clang, -O0):
<rpnormal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xed2(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movaps 0xebd(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1030 <rnormal@plt>
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1178 <rpnormal+0x68>
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret
jmp    114c <rpnormal+0x3c>

x86 assembly (clang, -O2):
<rpnormal>:
sub    $0x28,%rsp
movapd 0xee4(%rip),%xmm2
andpd  %xmm2,%xmm0
movapd %xmm0,(%rsp)
andpd  %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
nop
movapd (%rsp),%xmm0
movapd 0x10(%rsp),%xmm1
call   1030 <rnormal@plt>
ucomisd 0xec8(%rip),%xmm0
jbe    1130 <rpnormal+0x20>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @rpnormal(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
%8 = load double, double* %3
%9 = call double @llvm.fabs.f64(double %8)
store double %9, double* %6
%10 = load double, double* %4
%11 = call double @llvm.fabs.f64(double %10)
store double %11, double* %7
br label %12
12: ; preds = %19, %2
%13 = load double, double* %6
%14 = load double, double* %7
%15 = call double @rnormal(double %13, double %14)
store double %15, double* %5
%16 = fcmp ogt double %15, 0.000000e+00
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = load double, double* %5
ret double %18
19: ; preds = %12
br label %12
}

LLVM IR (-O2):
define double @rpnormal(double %0, double %1) {
%3 = tail call double @llvm.fabs.f64(double %0)
%4 = tail call double @llvm.fabs.f64(double %1)
br label %5
5: ; preds = %5, %2
%6 = tail call double @rnormal(double %3, double %4)
%7 = fcmp ogt double %6, 0.000000e+00
br i1 %7, label %8, label %5
8: ; preds = %5
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ rv;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
const char *validname(int a) {
  static char rv[32];
  snprintf(rv, sizeof(rv), "valid-%d", a);
  return rv;
}


x86 assembly (clang, -O0):
<validname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0x2f1b(%rip),%rdi
mov    $0x20,%esi
lea    0xecf(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2f03(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validname>:
push   %rbx
mov    %edi,%ecx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@validname.rv = internal global [32 x i8] zeroinitializer
@.str = [9 x i8] c"valid-%d\00"
define i8* @validname(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @validname.rv, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @validname.rv, i64 0, i64 0)
}

LLVM IR (-O2):
@validname.rv = internal global [32 x i8] zeroinitializer
@.str = [9 x i8] c"valid-%d\00"
define i8* @validname(i32 %0) {
%2 = tail call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @validname.rv, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @validname.rv, i64 0, i64 0)
}
/* Variables and functions */
int strlen(char *);
void blPadterm(char *string, int length) {
  int i;
  for (i = strlen(string); i < length; i++)
    string[i] = ' ';
  string[length] = '\0';
}


x86 assembly (clang, -O0):
<blPadterm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <blPadterm+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112b <blPadterm+0x1b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blPadterm>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    %ebp,%eax
jge    114c <blPadterm+0x2c>
movslq %eax,%rdi
add    %rbx,%rdi
not    %eax
add    %ebp,%eax
add    $0x1,%rax
mov    $0x20,%esi
mov    %rax,%rdx
call   1040 <memset@plt>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @blPadterm(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp slt i32 %3, %1
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = sext i32 %3 to i64
%7 = getelementptr i8, i8* %0, i64 %6
%8 = xor i32 %3, -1
%9 = add i32 %8, %1
%10 = zext i32 %9 to i64
%11 = add nuw nsw i64 %10, 1
br label %12
12: ; preds = %5, %2
%13 = sext i32 %1 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 %13
store i8 0, i8* %14
ret void
}
int ummap_finit(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @ummap_finit() {
ret i32 0
}

LLVM IR (-O2):
define i32 @ummap_finit() {
ret i32 0
}
double abs_double(double x) {
  if (x < 0) {
    return -x;
  }
  return x;
}


x86 assembly (clang, -O0):
<abs_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    113d <abs_double+0x3d>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1147 <abs_double+0x47>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_double>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @abs_double(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fneg double %7
store double %8, double* %2
br label %11
9: ; preds = %1
%10 = load double, double* %3
store double %10, double* %2
br label %11
11: ; preds = %9, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @abs_double(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x43() {
  Assert_real((isalnum(67)),
              "/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_isalnum.c",
              340, ("isalnum should be 1 for C"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for C\00"
define void @t_isalnum_0x43() {
%1 = tail call i32 @isalnum(i32 67)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 340, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ decode_rle_sample16(void *, int /*<<< orphan*/,
                                       int /*<<< orphan*/, void *,
                                       int /*<<< orphan*/, int /*<<< orphan*/);
void exported_decode_rle_sample16(void *sampleBuffer, uint32_t sampleBufferSize,
                                  uint32_t isKeyFrame, void *frameBuffer,
                                  uint32_t frameBufferWidth,
                                  uint32_t frameBufferHeight) {
  decode_rle_sample16(sampleBuffer, sampleBufferSize, isKeyFrame, frameBuffer,
                      frameBufferWidth, frameBufferHeight);
}


x86 assembly (clang, -O0):
<exported_decode_rle_sample16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
call   1030 <decode_rle_sample16@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exported_decode_rle_sample16>:
jmp    1030 <decode_rle_sample16@plt>

LLVM IR (-O0):
define void @exported_decode_rle_sample16(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i8*, i8** %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @decode_rle_sample16(i8* %13, i32 %14, i32 %15, i8* %16, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @exported_decode_rle_sample16(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4, i32 %5) {
%7 = tail call i32 @decode_rle_sample16(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void changeIntValues(int value1, int value2) {
  int aux;
  aux = value1;
  value1 = value2;
  value2 = aux;
  printf("\nValor 1 = %d\nValor 2 = %d", value1, value2);
}


x86 assembly (clang, -O0):
<changeIntValues>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<changeIntValues>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"\0AValor 1 = %d\0AValor 2 = %d\00"
define void @changeIntValues(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %4
store i32 %7, i32* %3
%8 = load i32, i32* %5
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0AValor 1 = %d\0AValor 2 = %d\00"
define void @changeIntValues(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int cnt_childs(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("%d\n", cnt_childs(atoi(argv[1])) + 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <cnt_childs@plt>
mov    %eax,%esi
add    $0x1,%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <cnt_childs@plt>
lea    0x1(%rax),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = call i32 @atoi(i8* %7)
%9 = call i32 @cnt_childs(i32 %8)
%10 = add nsw i32 %9, 1
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @cnt_childs(i32 %5)
%7 = add nsw i32 %6, 1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int *always_null();
void foo(void) {
  int *p = always_null();
  *p = 42;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <always_null@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2a,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
call   1030 <always_null@plt>
movl   $0x2a,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32*
%2 = call i32* (...) @always_null()
store i32* %2, i32** %1
%3 = load i32*, i32** %1
store i32 42, i32* %3
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32* (...) @always_null()
store i32 42, i32* %1
ret void
}
unsigned addval_273(unsigned x) { return x + 3284633928U; }


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

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

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

LLVM IR (-O2):
define i32 @addval_273(i32 %0) {
%2 = add i32 %0, -1010333368
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int __syscall(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
int posix_fallocate(int fd, off_t base, off_t len) {
  return -__syscall(285, fd, (base), (len));
}


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

x86 assembly (clang, -O2):
<posix_fallocate>:
push   %rax
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x11d,%edi
call   1030 <__syscall@plt>
neg    %eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @posix_fallocate(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @__syscall(i32 285, i32 %0, i32 %1, i32 %2)
%5 = sub nsw i32 0, %4
ret i32 %5
}
double dbl_cmp_ge(double a, double b, double c, double d) {
  return (a >= b) ? c : d;
}


x86 assembly (clang, -O0):
<dbl_cmp_ge>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1137 <dbl_cmp_ge+0x37>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1141 <dbl_cmp_ge+0x41>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbl_cmp_ge>:
cmplesd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm3,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dbl_cmp_ge(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* %5
%10 = load double, double* %6
%11 = fcmp oge double %9, %10
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = load double, double* %7
br label %16
14: ; preds = %4
%15 = load double, double* %8
br label %16
16: ; preds = %14, %12
%17 = phi double [ %13, %12 ], [ %15, %14 ]
ret double %17
}

LLVM IR (-O2):
define double @dbl_cmp_ge(double %0, double %1, double %2, double %3) {
%5 = fcmp oge double %0, %1
%6 = select i1 %5, double %2, double %3
ret double %6
}
int test_1(int x, int n) {
  x &= ~(0x01 << n);
  return x;
}


x86 assembly (clang, -O0):
<test_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_1>:
mov    %edi,%eax
btr    %esi,%eax
ret

LLVM IR (-O0):
define i32 @test_1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 1, %5
%7 = xor i32 %6, -1
%8 = load i32, i32* %3
%9 = and i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @test_1(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
void iotransmitstop(struct audioio *audioio) {}


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

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

LLVM IR (-O0):
%struct.audioio = type opaque
define void @iotransmitstop(%struct.audioio* %0) {
%2 = alloca %struct.audioio*
store %struct.audioio* %0, %struct.audioio** %2
ret void
}

LLVM IR (-O2):
%struct.audioio = type opaque
define void @iotransmitstop(%struct.audioio* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ArgItem();
int UserOf(int /*<<< orphan*/);
int Cnd_IsUser(void) { return (UserOf(ArgItem()) != -1); }


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

x86 assembly (clang, -O2):
<Cnd_IsUser>:
push   %rax
xor    %eax,%eax
call   1040 <ArgItem@plt>
mov    %eax,%edi
call   1030 <UserOf@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Cnd_IsUser() {
%1 = call i32 (...) @ArgItem()
%2 = call i32 @UserOf(i32 %1)
%3 = icmp ne i32 %2, -1
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @Cnd_IsUser() {
%1 = tail call i32 (...) @ArgItem()
%2 = tail call i32 @UserOf(i32 %1)
%3 = icmp ne i32 %2, -1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *string(char *str) {
  char *ret = NULL;
  int len = strlen(str);
  do {
    ret = (char *)malloc(len + 1);
  } while (0);
  memset(ret, 0, len + 1);
  strncpy(ret, str, len);
  ret[len] = '\0';
  return ret;
}


x86 assembly (clang, -O0):
<string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
add    $0x1,%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %eax,%ebx
lea    0x1(%rbx),%r15d
mov    %r15d,%edi
call   1060 <malloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
xor    %esi,%esi
mov    %r15d,%edx
call   1050 <memset@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
movslq %ebx,%rax
movb   $0x0,0x0(%rbp,%rax,1)
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
store i8* null, i8** %3
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %4
br label %7
7: ; preds = %1
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %3
br label %12
12: ; preds = %7
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
%16 = call i32 @memset(i8* %13, i32 0, i32 %15)
%17 = load i8*, i8** %3
%18 = load i8*, i8** %2
%19 = load i32, i32* %4
%20 = call i32 @strncpy(i8* %17, i8* %18, i32 %19)
%21 = load i8*, i8** %3
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
store i8 0, i8* %24
%25 = load i8*, i8** %3
ret i8* %25
}

LLVM IR (-O2):
define i8* @string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memset(i8* %5, i32 0, i32 %3)
%7 = tail call i32 @strncpy(i8* %5, i8* %0, i32 %2)
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
store i8 0, i8* %9
ret i8* %5
}
unsigned int f90(unsigned int x, unsigned long int y) {
  return (x << (8 * sizeof(unsigned int) - y)) + (x >> y);
}


x86 assembly (clang, -O0):
<f90>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sub    -0x10(%rbp),%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
shr    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f90>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f90(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = sub i64 32, %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %5, %8
%10 = load i32, i32* %3
%11 = load i64, i64* %4
%12 = trunc i64 %11 to i32
%13 = lshr i32 %10, %12
%14 = add i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @f90(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = sub i32 32, %3
%5 = shl i32 %0, %4
%6 = lshr i32 %0, %3
%7 = add i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ do_input();
int main(int argc, char **argv) {
  do_input();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @do_input()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @do_input()
ret i32 0
}
__attribute__((warning("call to default close_r"))) int
_undef_close_r(struct _reent *r, int fd) {
  return -1;
}


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

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

LLVM IR (-O0):
%struct._reent = type opaque
define i32 @_undef_close_r(%struct._reent* %0, i32 %1) {
%3 = alloca %struct._reent*
%4 = alloca i32
store %struct._reent* %0, %struct._reent** %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_undef_close_r(%struct._reent* nocapture readnone %0, i32 %1) {
ret i32 -1
}
void outl(unsigned int value, unsigned short port) {
  asm("outl %0, %w1" : : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outl>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x6(%rbp),%dx
out    %eax,(%dx)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @outl(i32 %0, i16 zeroext %1) {
tail call void asm sideeffect "outl $0, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i16 %1)
ret void
}
double step(double x, double threshold) { return x >= threshold ? 1 : 0; }


x86 assembly (clang, -O0):
<step>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
xor    %eax,%eax
mov    $0x1,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<step>:
cmplesd %xmm0,%xmm1
movsd  0xef3(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @step(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oge double %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
%10 = sitofp i32 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @step(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ pr_mask(char *);
void sig_int(int signo) {
  pr_mask("\nin sig_int: ");
  return;
}


x86 assembly (clang, -O0):
<sig_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <pr_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"\0Ain sig_int: \00"
define void @sig_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @pr_mask(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"\0Ain sig_int: \00"
define void @sig_int(i32 %0) {
%2 = tail call i32 @pr_mask(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long kr_hash(const char *str) {
  unsigned int hash;
  unsigned int c;
  hash = 0;
  while ((c = (unsigned char)*str++))
    hash += c;
  return hash;
}


x86 assembly (clang, -O0):
<kr_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     113b <kr_hash+0x3b>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <kr_hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kr_hash>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1122 <kr_hash+0x22>
add    $0x1,%rdi
nopl   0x0(%rax)
movzbl %cl,%ecx
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <kr_hash+0x10>
mov    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @kr_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = zext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = add i32 %7, %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = zext i32 %10 to i64
br label %15
15: ; preds = %13, %1
%16 = phi i64 [ 0, %1 ], [ %14, %13 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ ulog_exec_helper(int, char const *const *);
void ulog_login_pseudo(int fd, const char *host) {
  char const *const args[4] = {"ulog-helper", "login", host, NULL};
  ulog_exec_helper(fd, args);
}


x86 assembly (clang, -O0):
<ulog_login_pseudo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xedb(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
call   1030 <ulog_exec_helper@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulog_login_pseudo>:
sub    $0x28,%rsp
lea    0xee5(%rip),%rax
mov    %rax,(%rsp)
lea    0xee6(%rip),%rax
mov    %rax,0x8(%rsp)
mov    %rsi,0x10(%rsp)
movq   $0x0,0x18(%rsp)
mov    %rsp,%rsi
call   1030 <ulog_exec_helper@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"ulog-helper\00"
@.str.1 = [6 x i8] c"login\00"
define void @ulog_login_pseudo(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [4 x i8*]
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %5, i64 0, i64 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds i8*, i8** %6, i64 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %4
store i8* %9, i8** %8
%10 = getelementptr inbounds i8*, i8** %8, i64 1
store i8* null, i8** %10
%11 = load i32, i32* %3
%12 = getelementptr inbounds [4 x i8*], [4 x i8*]* %5, i64 0, i64 0
%13 = call i32 @ulog_exec_helper(i32 %11, i8** %12)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"ulog-helper\00"
@.str.1 = [6 x i8] c"login\00"
define void @ulog_login_pseudo(i32 %0, i8* %1) {
%3 = alloca [4 x i8*]
%4 = bitcast [4 x i8*]* %3 to i8*
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 2
store i8* %1, i8** %7
%8 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 3
store i8* null, i8** %8
%9 = call i32 @ulog_exec_helper(i32 %0, i8** %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x;
  x = 25 + 40 / 2 - 9 * 5;
  printf("value of x: %d", x);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"value of x: %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("[INFO] Starting OmnoxtopusTV Linux Client"); }


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"[INFO] Starting OmnoxtopusTV Linux Client\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"[INFO] Starting OmnoxtopusTV Linux Client\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ showbug(unsigned short *, unsigned short *);
int main() {
  unsigned short int x = 0;
  unsigned short int y = 10;
  if (showbug(&x, &y) != 0)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x0,-0x6(%rbp)
movw   $0xa,-0x8(%rbp)
lea    -0x6(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <showbug@plt>
cmp    $0x0,%rax
je     1169 <main+0x39>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x0,0x6(%rsp)
movw   $0xa,0x4(%rsp)
lea    0x6(%rsp),%rdi
lea    0x4(%rsp),%rsi
call   1040 <showbug@plt>
test   %rax,%rax
jne    115a <main+0x2a>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i16
store i32 0, i32* %1
store i16 0, i16* %2
store i16 10, i16* %3
%4 = call i64 @showbug(i16* %2, i16* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i16
%2 = alloca i16
%3 = bitcast i16* %1 to i8*
store i16 0, i16* %1
%4 = bitcast i16* %2 to i8*
store i16 10, i16* %2
%5 = call i64 @showbug(i16* %1, i16* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
%10 = call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ kotlinclib_print_short(short);
int /*<<< orphan*/ kotlinclib_println();
void kotlinclib_println_short(short message) {
  kotlinclib_print_short(message);
  kotlinclib_println();
}


x86 assembly (clang, -O0):
<kotlinclib_println_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1030 <kotlinclib_print_short@plt>
mov    $0x0,%al
call   1040 <kotlinclib_println@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @kotlinclib_println_short(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @kotlinclib_print_short(i16 signext %3)
%5 = call i32 (...) @kotlinclib_println()
ret void
}

LLVM IR (-O2):
define void @kotlinclib_println_short(i16 signext %0) {
%2 = tail call i32 @kotlinclib_print_short(i16 signext %0)
%3 = tail call i32 (...) @kotlinclib_println()
ret void
}
int main() {
  int real = 0;
  int *pointer = &real;
  *pointer = 9;
  return real;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 9
}
void av_opt_set_defaults2() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_set_defaults2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void console_puts(char *s) { uart_puts(s); }


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

x86 assembly (clang, -O2):
<console_puts>:
jmp    1030 <uart_puts@plt>

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

LLVM IR (-O2):
define void @console_puts(i8* %0) {
%2 = tail call i32 @uart_puts(i8* %0)
ret void
}
/* Variables and functions */
unsigned int f31(unsigned int);
unsigned int f32(unsigned int a) { return f31(f31(a)); }


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

x86 assembly (clang, -O2):
<f32>:
push   %rax
call   1030 <f31@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f31@plt>

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

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

/* Variables and functions */
unsigned int EOF;
int /*<<< orphan*/ error(char *);
unsigned int fgetc(int /*<<< orphan*/ *);
unsigned int read_byte(FILE *stream) {
  unsigned int c = fgetc(stream);
  if (c == EOF)
    error("premature end of file");
  return c;
}


x86 assembly (clang, -O0):
<read_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2ea6(%rip),%rcx
cmp    (%rcx),%eax
jne    1156 <read_byte+0x36>
lea    0xeaf(%rip),%rdi
call   1040 <error@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_byte>:
push   %rbx
call   1030 <fgetc@plt>
mov    %eax,%ebx
mov    0x2eb9(%rip),%rax
cmp    (%rax),%ebx
jne    113f <read_byte+0x1f>
lea    0xec6(%rip),%rdi
call   1040 <error@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [22 x i8] c"premature end of file\00"
define i32 @read_byte(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fgetc(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* @EOF
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @error(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [22 x i8] c"premature end of file\00"
define i32 @read_byte(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @error(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i32 %2
}