xunge/DecIR huggingface dataset:
void BGRAToUVRow_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @BGRAToUVRow_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_cpx();
int /*<<< orphan*/ e_zp();
void e_cpx_zp() {
  e_zp();
  e_cpx();
}


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

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

LLVM IR (-O0):
define void @e_cpx_zp() {
%1 = call i32 (...) @e_zp()
%2 = call i32 (...) @e_cpx()
ret void
}

LLVM IR (-O2):
define void @e_cpx_zp() {
%1 = tail call i32 (...) @e_zp()
%2 = tail call i32 (...) @e_cpx()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int x;
  srand(time(NULL));
  x = rand() % 6 + 1;
  printf("Congratulations, you rolled a %d", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Congratulations, you rolled a %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 6
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Congratulations, you rolled a %d\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 6
%5 = add nsw i32 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndirectIndexedLong(int);
int /*<<< orphan*/ STA8(int /*<<< orphan*/);
void Op97M1(void) { STA8(DirectIndirectIndexedLong(2)); }


x86 assembly (clang, -O0):
<Op97M1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <DirectIndirectIndexedLong@plt>
mov    %eax,%edi
call   1030 <STA8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op97M1>:
push   %rax
mov    $0x2,%edi
call   1040 <DirectIndirectIndexedLong@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <STA8@plt>

LLVM IR (-O0):
define void @Op97M1() {
%1 = call i32 @DirectIndirectIndexedLong(i32 2)
%2 = call i32 @STA8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op97M1() {
%1 = tail call i32 @DirectIndirectIndexedLong(i32 2)
%2 = tail call i32 @STA8(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ osflush();
void xlflush(void) { osflush(); }


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

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

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

LLVM IR (-O2):
define void @xlflush() {
%1 = tail call i32 (...) @osflush()
ret void
}
/* Variables and functions */
int *hsort(int *, int);
int /*<<< orphan*/ print_array(int *, int);
int test_heapsort(int argc, char *argv[]) {
  int array[12] = {-1888, -1,  120312, 33,   1,     -30,
                   30,    102, 2,      4021, 31023, -1238};
  int *array_sorted = hsort(array, 11);
  print_array(array_sorted, 11);
  return 0;
}


x86 assembly (clang, -O0):
<test_heapsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x30,%edx
call   1050 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    $0xb,%esi
call   1030 <hsort@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
mov    $0xb,%esi
call   1040 <print_array@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_heapsort>:
sub    $0x38,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xb,%esi
call   1030 <hsort@plt>
mov    %rax,%rdi
mov    $0xb,%esi
call   1040 <print_array@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.test_heapsort.array = [12 x i32] [i32 -1888, i32 -1, i32 120312, i32 33, i32 1, i32 -30, i32 30, i32 102, i32 2, i32 4021, i32 31023, i32 -1238]
define i32 @test_heapsort(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [12 x i32]
%6 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = bitcast [12 x i32]* %5 to i8*
%8 = getelementptr inbounds [12 x i32], [12 x i32]* %5, i64 0, i64 0
%9 = call i32* @hsort(i32* %8, i32 11)
store i32* %9, i32** %6
%10 = load i32*, i32** %6
%11 = call i32 @print_array(i32* %10, i32 11)
ret i32 0
}

LLVM IR (-O2):
@__const.test_heapsort.array = [12 x i32] [i32 -1888, i32 -1, i32 120312, i32 33, i32 1, i32 -30, i32 30, i32 102, i32 2, i32 4021, i32 31023, i32 -1238]
define i32 @test_heapsort(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [12 x i32]
%4 = bitcast [12 x i32]* %3 to i8*
%5 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%6 = call i32* @hsort(i32* %5, i32 11)
%7 = call i32 @print_array(i32* %6, i32 11)
ret i32 0
}
char *getwd(char *__buf) {
  char *return_value___getwd_chk$1;
  char *return_value___getwd_warn$2;
  return_value___getwd_warn$2 = __getwd_warn(__buf);
  return return_value___getwd_warn$2;
}


x86 assembly (clang, -O0):
<getwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <__getwd_warn@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @getwd(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @__getwd_warn to i32 (i8*, ...)*)(i8* %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %4
%9 = load i8*, i8** %4
ret i8* %9
}

LLVM IR (-O2):
define i8* @getwd(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @__getwd_warn to i32 (i8*, ...)*)(i8* %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
int adis16130_configure_ring(struct iio_dev *indio_dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define i32 @adis16130_configure_ring(%struct.iio_dev* nocapture readnone %0) {
ret i32 0
}
unsigned int mus_char_to_ubint(const unsigned char *inp) {
  unsigned int o;
  unsigned char *outp;
  outp = (unsigned char *)&o;
  outp[0] = inp[0];
  outp[1] = inp[1];
  outp[2] = inp[2];
  outp[3] = inp[3];
  return (o);
}


x86 assembly (clang, -O0):
<mus_char_to_ubint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mus_char_to_ubint(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl nuw i32 %9, 24
%11 = zext i8 %6 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = zext i8 %4 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = zext i8 %2 to i32
%16 = or i32 %14, %15
%17 = or i32 %16, %12
%18 = or i32 %17, %10
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ calc_fan();
int /*<<< orphan*/ read_sensors();
int /*<<< orphan*/ set_fan();
void adjust() {
  read_sensors();
  calc_fan();
  set_fan();
}


x86 assembly (clang, -O0):
<adjust>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <read_sensors@plt>
mov    $0x0,%al
call   1030 <calc_fan@plt>
mov    $0x0,%al
call   1040 <set_fan@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjust>:
push   %rax
xor    %eax,%eax
call   1050 <read_sensors@plt>
xor    %eax,%eax
call   1030 <calc_fan@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <set_fan@plt>

LLVM IR (-O0):
define void @adjust() {
%1 = call i32 (...) @read_sensors()
%2 = call i32 (...) @calc_fan()
%3 = call i32 (...) @set_fan()
ret void
}

LLVM IR (-O2):
define void @adjust() {
%1 = tail call i32 (...) @read_sensors()
%2 = tail call i32 (...) @calc_fan()
%3 = tail call i32 (...) @set_fan()
ret void
}
void docell4(void *c, float modulator) {}


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

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

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

LLVM IR (-O2):
define void @docell4(i8* nocapture %0, float %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
char *xmalloc(size_t);
char *xmemdup0(const char *p_, size_t length) {
  char *p = xmalloc(length + 1);
  memcpy(p, p_, length);
  p[length] = '\0';
  return p;
}


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

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

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

LLVM IR (-O2):
define i8* @xmemdup0(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %1)
%6 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %6
ret i8* %4
}
void clr(volatile unsigned char *reg, unsigned char flag) {
  unsigned char tmp = *reg;
  *reg = tmp & ~flag;
}


x86 assembly (clang, -O0):
<clr>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr>:
not    %sil
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @clr(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8*, i8** %3
%7 = load volatile i8, i8* %6
store i8 %7, i8* %5
%8 = load i8, i8* %5
%9 = zext i8 %8 to i32
%10 = load i8, i8* %4
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = and i32 %9, %12
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
store volatile i8 %14, i8* %15
ret void
}

LLVM IR (-O2):
define void @clr(i8* %0, i8 zeroext %1) {
%3 = load volatile i8, i8* %0
%4 = xor i8 %1, -1
%5 = and i8 %3, %4
store volatile i8 %5, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glutWireCube(double);
void drawCube(void) {
  glColor3f(0.0, 0.0, 1.0);
  glutWireCube(7.0);
}


x86 assembly (clang, -O0):
<drawCube>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm1,%xmm1
movsd  0xed9(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glColor3f@plt>
movsd  0xec1(%rip),%xmm0
call   1040 <glutWireCube@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawCube>:
push   %rax
movsd  0xed7(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1030 <glColor3f@plt>
movsd  0xecc(%rip),%xmm0
pop    %rax
jmp    1040 <glutWireCube@plt>

LLVM IR (-O0):
define void @drawCube() {
%1 = call i32 @glColor3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%2 = call i32 @glutWireCube(double 7.000000e+00)
ret void
}

LLVM IR (-O2):
define void @drawCube() {
%1 = tail call i32 @glColor3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%2 = tail call i32 @glutWireCube(double 7.000000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_send(unsigned int);
void _putchar(unsigned int c) {
  switch (c) {
  case '\n':
    uart_send(0x0D);
    uart_send(0x0A);
    break;
  default:
    uart_send(c);
    break;
  }
}


x86 assembly (clang, -O0):
<_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
jne    1145 <_putchar+0x35>
jmp    112c <_putchar+0x1c>
mov    $0xd,%edi
call   1030 <uart_send@plt>
mov    $0xa,%edi
call   1030 <uart_send@plt>
jmp    114d <_putchar+0x3d>
mov    -0x4(%rbp),%edi
call   1030 <uart_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_putchar>:
cmp    $0xa,%edi
jne    1129 <_putchar+0x19>
push   %rax
mov    $0xd,%edi
call   1030 <uart_send@plt>
mov    $0xa,%edi
add    $0x8,%rsp
jmp    1030 <uart_send@plt>

LLVM IR (-O0):
define void @_putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %7 [
i32 10, label %4
]
4: ; preds = %1
%5 = call i32 @uart_send(i32 13)
%6 = call i32 @uart_send(i32 10)
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i32 @uart_send(i32 %8)
br label %10
10: ; preds = %7, %4
ret void
}

LLVM IR (-O2):
define void @_putchar(i32 %0) {
%2 = icmp eq i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @uart_send(i32 13)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 10, %3 ], [ %0, %1 ]
%7 = tail call i32 @uart_send(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_arch_prctl;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int main() {
  syscall(SYS_arch_prctl, 0, 0);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <syscall@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SYS_arch_prctl = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SYS_arch_prctl
%3 = call i32 @syscall(i32 %2, i32 0, i32 0)
ret i32 0
}

LLVM IR (-O2):
@SYS_arch_prctl = global i32 0
define i32 @main() {
%1 = load i32, i32* @SYS_arch_prctl
%2 = tail call i32 @syscall(i32 %1, i32 0, i32 0)
ret i32 0
}
int test_imm_85int8_mem(signed char *val) {
  return ((*val) & (0x85 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_85int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -123
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void test() { printf("%d", 233); }


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

x86 assembly (clang, -O2):
<test>:
lea    0xee9(%rip),%rdi
mov    $0xe9,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @test() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 233)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ loop();
int /*<<< orphan*/ setup();
int main() {
  setup();
  while (1)
    loop();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <setup@plt>
mov    $0x0,%al
call   1030 <loop@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <setup@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <loop@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @setup()
br label %3
3: ; preds = %0, %3
%4 = call i32 (...) @loop()
br label %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setup()
br label %2
2: ; preds = %0, %2
%3 = tail call i32 (...) @loop()
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
void print_array(char s[], int len) {
  while (len--)
    putchar(*s++);
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     114f <print_array+0x3f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    111f <print_array+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1143 <print_array+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <print_array+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @print_array(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i8* [ %8, %4 ], [ %0, %2 ]
%7 = add nsw i32 %5, -1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %6
%10 = sext i8 %9 to i32
%11 = tail call i32 @putchar(i32 %10)
%12 = icmp eq i32 %7, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int int_log2(int u) {
  int i = 1;
  int r = 1;
  while ((i <= 32) && (r < u)) {
    r = 2 * r + 1;
    i = i + 1;
  }
  assert(i <= 32);
  return i;
}


x86 assembly (clang, -O0):
<int_log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jg     1144 <int_log2+0x34>
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1154 <int_log2+0x44>
jmp    116e <int_log2+0x5e>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <int_log2+0x19>
cmpl   $0x20,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_log2>:
push   %rbx
mov    $0x1,%ebx
mov    $0x1,%eax
cmp    $0x2,%edi
jl     114b <int_log2+0x3b>
mov    $0x1,%eax
mov    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%ecx
lea    0x1(%rcx),%ebx
cmp    $0x1f,%ecx
ja     1143 <int_log2+0x33>
add    %eax,%eax
add    $0x1,%eax
cmp    %edi,%eax
jl     1130 <int_log2+0x20>
xor    %eax,%eax
cmp    $0x20,%ecx
setb   %al
mov    %eax,%edi
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @int_log2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 32
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %4
%10 = load i32, i32* %2
%11 = icmp slt i32 %9, %10
br label %12
12: ; preds = %8, %5
%13 = phi i1 [ false, %5 ], [ %11, %8 ]
br i1 %13, label %14, label %20
14: ; preds = %12
%15 = load i32, i32* %4
%16 = mul nsw i32 2, %15
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %5
20: ; preds = %12
%21 = load i32, i32* %3
%22 = icmp sle i32 %21, 32
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @int_log2(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %14
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i32 [ %8, %3 ], [ 1, %1 ]
%6 = shl nsw i32 %4, 1
%7 = or i32 %6, 1
%8 = add nuw nsw i32 %5, 1
%9 = icmp ult i32 %5, 32
%10 = icmp slt i32 %7, %0
%11 = select i1 %9, i1 %10, i1 false
br i1 %11, label %3, label %12
12: ; preds = %3
%13 = zext i1 %9 to i32
br label %14
14: ; preds = %12, %1
%15 = phi i32 [ 1, %1 ], [ %8, %12 ]
%16 = phi i32 [ 1, %1 ], [ %13, %12 ]
%17 = tail call i32 @assert(i32 %16)
ret i32 %15
}
/* Variables and functions */
int search0a(int, unsigned char *, unsigned char *, int const, int *, int *);
int search(unsigned char *buf, unsigned char *buf0, const int max0, int *p) {
  static int table[10] = {
      -8,          -512,        -32 * 1024,  -2 * 1024 * 1024, -0x7fffffff,
      -0x7fffffff, -0x7fffffff, -0x7fffffff, -0x7fffffff,      -0x7fffffff};
  return search0a(12, buf, buf0, max0, p, table);
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    $0xc,%edi
lea    0x2eee(%rip),%r9
call   1030 <search0a@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0x2f0e(%rip),%r9
mov    $0xc,%edi
jmp    1030 <search0a@plt>

LLVM IR (-O0):
@search.table = internal global [10 x i32] [i32 -8, i32 -512, i32 -32768, i32 -2097152, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647]
define i32 @search(i8* %0, i8* %1, i32 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = call i32 @search0a(i32 12, i8* %9, i8* %10, i32 %11, i32* %12, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @search.table, i64 0, i64 0))
ret i32 %13
}

LLVM IR (-O2):
@search.table = internal global [10 x i32] [i32 -8, i32 -512, i32 -32768, i32 -2097152, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647]
define i32 @search(i8* %0, i8* %1, i32 %2, i32* %3) {
%5 = tail call i32 @search0a(i32 12, i8* %0, i8* %1, i32 %2, i32* %3, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @search.table, i64 0, i64 0))
ret i32 %5
}
int test_sub_ok(int x, int y) {
  long long llx = (long long)x;
  long long lly = (long long)y;
  long long lldiff = llx - lly;
  int diff = (int)lldiff;
  return (lldiff == diff);
}


x86 assembly (clang, -O0):
<test_sub_ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sub_ok>:
movslq %edi,%rcx
movslq %esi,%rax
sub    %rax,%rcx
sub    $0xffffffff80000000,%rcx
xor    %eax,%eax
shr    $0x20,%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @test_sub_ok(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
store i64 %10, i64* %5
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = sub nsw i64 %13, %14
store i64 %15, i64* %7
%16 = load i64, i64* %7
%17 = trunc i64 %16 to i32
store i32 %17, i32* %8
%18 = load i64, i64* %7
%19 = load i32, i32* %8
%20 = sext i32 %19 to i64
%21 = icmp eq i64 %18, %20
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @test_sub_ok(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = sext i32 %1 to i64
%5 = add nsw i64 %3, 2147483648
%6 = sub nsw i64 %5, %4
%7 = icmp ult i64 %6, 4294967296
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_THREAD_CPUTIME_ID;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
double _time_as_double() {
  struct timespec t;
  clock_gettime(CLOCK_THREAD_CPUTIME_ID, &t);
  return ((double)t.tv_sec) + (((double)t.tv_nsec) * 1e-9);
}


x86 assembly (clang, -O0):
<_time_as_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_time_as_double>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xec3(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_THREAD_CPUTIME_ID = global i32 0
define double @_time_as_double() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 1.000000e-09, double %6)
ret double %10
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_THREAD_CPUTIME_ID = global i32 0
define double @_time_as_double() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = call double @llvm.fmuladd.f64(double %10, double 1.000000e-09, double %7)
ret double %11
}
/* Variables and functions */
char getchar();
char get_first(void) {
  int ch;
  ch = getchar();
  while (getchar() != '\n')
    continue;
  return ch;
}


x86 assembly (clang, -O0):
<get_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     113d <get_first+0x2d>
jmp    1125 <get_first+0x15>
mov    -0x4(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_first>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <get_first+0x10>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @get_first() {
%1 = alloca i32
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
store i32 %3, i32* %1
br label %4
4: ; preds = %8, %0
%5 = call signext i8 (...) @getchar()
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
%10 = load i32, i32* %1
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @get_first() {
%1 = tail call signext i8 (...) @getchar()
br label %2
2: ; preds = %2, %0
%3 = tail call signext i8 (...) @getchar()
%4 = icmp eq i8 %3, 10
br i1 %4, label %5, label %2
5: ; preds = %2
ret i8 %1
}
/* Variables and functions */
double sqrt(double);
double varianza(double *, int);
double desvio(double arreglo[], int size) {
  double var = varianza(arreglo, size);
  double des = sqrt(var);
  return des;
}


x86 assembly (clang, -O0):
<desvio>:
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 <varianza@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<desvio>:
push   %rax
call   1030 <varianza@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1136 <desvio+0x16>
sqrtsd %xmm0,%xmm0
pop    %rax
ret
pop    %rax
jmp    1040 <sqrt@plt>

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

LLVM IR (-O2):
define double @desvio(double* %0, i32 %1) {
%3 = tail call double @varianza(double* %0, i32 %1)
%4 = tail call double @sqrt(double %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ check_keyports(unsigned char *);
int /*<<< orphan*/ keyboard_init();
int /*<<< orphan*/ keyboard_keypress(int);
void test_keyboard_keypress_key_not_found() {
  unsigned char expected_keyports[8] = {0xff, 0xff, 0xff, 0xff,
                                        0xff, 0xff, 0xff, 0xff};
  keyboard_init();
  keyboard_keypress(0xff);
  check_keyports(expected_keyports);
}


x86 assembly (clang, -O0):
<test_keyboard_keypress_key_not_found>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <keyboard_init@plt>
mov    $0xff,%edi
call   1040 <keyboard_keypress@plt>
lea    -0x8(%rbp),%rdi
call   1030 <check_keyports@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_keyboard_keypress_key_not_found>:
push   %rax
movq   $0xffffffffffffffff,(%rsp)
ff
xor    %eax,%eax
call   1050 <keyboard_init@plt>
mov    $0xff,%edi
call   1040 <keyboard_keypress@plt>
mov    %rsp,%rdi
call   1030 <check_keyports@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.test_keyboard_keypress_key_not_found.expected_keyports = [8 x i8] c"\FF\FF\FF\FF\FF\FF\FF\FF"
define void @test_keyboard_keypress_key_not_found() {
%1 = alloca [8 x i8]
%2 = bitcast [8 x i8]* %1 to i8*
%3 = call i32 (...) @keyboard_init()
%4 = call i32 @keyboard_keypress(i32 255)
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%6 = call i32 @check_keyports(i8* %5)
ret void
}

LLVM IR (-O2):
define void @test_keyboard_keypress_key_not_found() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 -1, i64* %1
%3 = tail call i32 (...) @keyboard_init()
%4 = tail call i32 @keyboard_keypress(i32 255)
%5 = call i32 @check_keyports(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cm_print_error(char *, char const *const, char const *const);
scalar_t__ strcmp(char const *const, char const *const);
int string_equal_display_error(const char *const left,
                               const char *const right) {
  if (strcmp(left, right) == 0) {
    return 1;
  }
  cm_print_error("\"%s\" != \"%s\"\n", left, right);
  return 0;
}


x86 assembly (clang, -O0):
<string_equal_display_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1153 <string_equal_display_error+0x33>
movl   $0x1,-0x4(%rbp)
jmp    116e <string_equal_display_error+0x4e>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xe9e(%rip),%rdi
call   1030 <cm_print_error@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_equal_display_error>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strcmp@plt>
test   %rax,%rax
je     114a <string_equal_display_error+0x2a>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <cm_print_error@plt>
xor    %eax,%eax
jmp    114f <string_equal_display_error+0x2f>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"\22%s\22 != \22%s\22\0A\00"
define i32 @string_equal_display_error(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @cm_print_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main(void) {
  foo(2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 2)
ret i32 0
}
cpumin(t) double *t;
{ xcpumin_(t); }


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

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

LLVM IR (-O0):
define i32 @cpumin(double* %0) {
%2 = alloca i32
%3 = alloca double*
store double* %0, double** %3
%4 = load double*, double** %3
%5 = call i32 (double*, ...) bitcast (i32 (...)* @xcpumin_ to i32 (double*, ...)*)(double* %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @cpumin(double* %0) {
%2 = tail call i32 (double*, ...) bitcast (i32 (...)* @xcpumin_ to i32 (double*, ...)*)(double* %0)
ret i32 undef
}
void Act_Dir(void) { ; }


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

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

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

LLVM IR (-O2):
define void @Act_Dir() {
ret void
}
dis(x1, y1, x2, y2) { return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2); }


x86 assembly (clang, -O0):
<dis>:
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
sub    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    -0xc(%rbp),%ecx
imul   %ecx,%eax
mov    -0x8(%rbp),%ecx
sub    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%edx
sub    -0x10(%rbp),%edx
imul   %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dis>:
sub    %edx,%edi
imul   %edi,%edi
sub    %ecx,%esi
imul   %esi,%esi
lea    (%rsi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @dis(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %0, %2
%6 = mul nsw i32 %5, %5
%7 = sub nsw i32 %1, %3
%8 = mul nsw i32 %7, %7
%9 = add nuw nsw i32 %8, %6
ret i32 %9
}
int main(int z) {}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
void init() {
  freopen("meal.in", "r", stdin);
  freopen("meal.out", "w+", stdout);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edx
lea    0xedc(%rip),%rdi
lea    0xedd(%rip),%rsi
call   1030 <freopen@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
lea    0xeca(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1030 <freopen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edx
lea    0xedf(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1030 <freopen@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
lea    0xecd(%rip),%rdi
lea    0xecf(%rip),%rsi
pop    %rax
jmp    1030 <freopen@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"meal.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [9 x i8] c"meal.out\00"
@.str.3 = [3 x i8] c"w+\00"
@stdout = global i32 0
define void @init() {
%1 = load i32, i32* @stdin
%2 = call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stdout
%4 = call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"meal.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [9 x i8] c"meal.out\00"
@.str.3 = [3 x i8] c"w+\00"
@stdout = global i32 0
define void @init() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %3)
ret void
}
void deallocate_ReplyHeader(struct ReplyHeader *v) {}


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

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

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

LLVM IR (-O2):
%struct.ReplyHeader = type opaque
define void @deallocate_ReplyHeader(%struct.ReplyHeader* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __attribute__((no, noreturn)) vec_assert_fail(void) { abort(); }


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

x86 assembly (clang, -O2):
<vec_assert_fail>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @vec_assert_fail() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @vec_assert_fail() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ m_world();
void main() { m_world(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @m_world()
ret void
}
/* Variables and functions */
int __builtin_mips_cabs_sf_s(float, float);
int test8(float a, float b) { return __builtin_mips_cabs_sf_s(a, b); }


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

x86 assembly (clang, -O2):
<test8>:
jmp    1030 <__builtin_mips_cabs_sf_s@plt>

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

LLVM IR (-O2):
define i32 @test8(float %0, float %1) {
%3 = tail call i32 @__builtin_mips_cabs_sf_s(float %0, float %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ htobe64(int /*<<< orphan*/);
uint64_t cpu_to_be64(uint64_t x) { return htobe64(x); }


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

x86 assembly (clang, -O2):
<cpu_to_be64>:
jmp    1030 <htobe64@plt>

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

LLVM IR (-O2):
define i32 @cpu_to_be64(i32 %0) {
%2 = tail call i32 @htobe64(i32 %0)
ret i32 %2
}
int f_le_rr1(float a1, float a2) { return (((a1) <= (a2))); }


x86 assembly (clang, -O0):
<f_le_rr1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_le_rr1>:
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @f_le_rr1(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ole float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @f_le_rr1(float %0, float %1) {
%3 = fcmp ole float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}