xunge/DecIR huggingface dataset:
double iter_fcn(double lambda, double x) { return lambda * x * (1 - x); }


x86 assembly (clang, -O0):
<iter_fcn>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<iter_fcn>:
mulsd  %xmm1,%xmm0
movsd  0xef4(%rip),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @iter_fcn(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 = fmul double %5, %6
%8 = load double, double* %4
%9 = fsub double 1.000000e+00, %8
%10 = fmul double %7, %9
ret double %10
}

LLVM IR (-O2):
define double @iter_fcn(double %0, double %1) {
%3 = fmul double %0, %1
%4 = fsub double 1.000000e+00, %1
%5 = fmul double %3, %4
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ m5_addsymbol(int /*<<< orphan*/, char *);
int /*<<< orphan*/ strtoul(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ usage();
void do_addsymbol(int argc, char *argv[]) {
  if (argc != 2)
    usage();
  uint64_t addr = strtoul(argv[0], NULL, 0);
  char *symbol = argv[1];
  m5_addsymbol(addr, symbol);
}


x86 assembly (clang, -O0):
<do_addsymbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     1150 <do_addsymbol+0x20>
mov    $0x0,%al
call   1030 <usage@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <strtoul@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1050 <m5_addsymbol@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_addsymbol>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
je     1140 <do_addsymbol+0x10>
xor    %eax,%eax
call   1030 <usage@plt>
mov    (%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <strtoul@plt>
mov    0x8(%rbx),%rsi
mov    %eax,%edi
pop    %rbx
jmp    1050 <m5_addsymbol@plt>

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

LLVM IR (-O2):
define void @do_addsymbol(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = load i8*, i8** %1
%8 = tail call i32 @strtoul(i8* nocapture %7, i32* null, i32 0)
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @m5_addsymbol(i32 %8, i8* %10)
ret void
}
/* Variables and functions */
void *shmat(int, int /*<<< orphan*/, int /*<<< orphan*/);
void *attach_shmem(int id) { return shmat(id, 0, 0); }


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

x86 assembly (clang, -O2):
<attach_shmem>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <shmat@plt>

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

LLVM IR (-O2):
define i8* @attach_shmem(i32 %0) {
%2 = tail call i8* @shmat(i32 %0, i32 0, i32 0)
ret i8* %2
}
/* Variables and functions */
char *_strchr(const char *s, int c) {
  while (*s != (char)c)
    if (*s++ == '\0')
      return NULL;
  return (char *)s;
}


x86 assembly (clang, -O0):
<_strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x14(%rbp),%ecx
movsbl %cl,%ecx
cmp    %ecx,%eax
je     114d <_strchr+0x4d>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1148 <_strchr+0x48>
movq   $0x0,-0x8(%rbp)
jmp    1155 <_strchr+0x55>
jmp    110b <_strchr+0xb>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @av_memdup() {
ret void
}
void av_parse_video_rate() {}


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

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

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

LLVM IR (-O2):
define void @av_parse_video_rate() {
ret void
}
/* Variables and functions */
scalar_t__ strcasecmp(char const *, char const *);
int acase_ge(const char *pat, const char *text) {
  return (strcasecmp(text, pat) >= 0);
}


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

x86 assembly (clang, -O2):
<acase_ge>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <strcasecmp@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @acase_ge(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strcasecmp(i8* %5, i8* %6)
%8 = icmp sge i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @acase_ge(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strcasecmp(i8* %1, i8* %0)
%4 = lshr i64 %3, 63
%5 = trunc i64 %4 to i32
%6 = xor i32 %5, 1
ret i32 %6
}
void XQueryTextExtents16() {}


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

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

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

LLVM IR (-O2):
define void @XQueryTextExtents16() {
ret void
}
int get_int(int a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @get_int(i32 returned %0) {
ret i32 %0
}
unsigned unsigned_max(unsigned x, unsigned y) {
  if (x >= y) {
    return x;
  } else {
    return y;
  }
}


x86 assembly (clang, -O0):
<unsigned_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jb     1121 <unsigned_max+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <unsigned_max+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_max>:
mov    %edi,%eax
cmp    %esi,%edi
cmovb  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @unsigned_max(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void debug_checkwx(void) {}


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

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

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

LLVM IR (-O2):
define void @debug_checkwx() {
ret void
}
int verify(int row[], int col[], int no_of_mat) {
  int i;
  for (i = 0; i < no_of_mat - 1; i++)
    if (col[i] != row[i + 1])
      return -1;
  return 1;
}


x86 assembly (clang, -O0):
<verify>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1167 <verify+0x67>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
je     1154 <verify+0x54>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <verify+0x6e>
jmp    1159 <verify+0x59>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <verify+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify>:
add    $0xffffffff,%edx
xor    %eax,%eax
test   %edx,%edx
cmovle %eax,%edx
nopw   0x0(%rax,%rax,1)
cmp    %rax,%rdx
je     112d <verify+0x2d>
mov    (%rsi,%rax,4),%r8d
lea    0x1(%rax),%rcx
cmp    0x4(%rdi,%rax,4),%r8d
mov    %rcx,%rax
je     1110 <verify+0x10>
mov    $0xffffffff,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @verify(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = add i32 %2, -1
%5 = call i32 @llvm.smax.i32(i32 %4, i32 0)
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %10, %3
%8 = phi i64 [ %13, %10 ], [ 0, %3 ]
%9 = icmp eq i64 %8, %6
br i1 %9, label %17, label %10
10: ; preds = %7
%11 = getelementptr inbounds i32, i32* %1, i64 %8
%12 = load i32, i32* %11
%13 = add nuw nsw i64 %8, 1
%14 = getelementptr inbounds i32, i32* %0, i64 %13
%15 = load i32, i32* %14
%16 = icmp eq i32 %12, %15
br i1 %16, label %7, label %17
17: ; preds = %7, %10
%18 = phi i32 [ -1, %10 ], [ 1, %7 ]
ret i32 %18
}
unsigned char countdigits(unsigned long n) {
  unsigned char d;
  for (d = 1; n /= 10; d++)
    ;
  return d;
}


x86 assembly (clang, -O0):
<countdigits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x1,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     113a <countdigits+0x3a>
jmp    112d <countdigits+0x2d>
mov    -0x9(%rbp),%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
jmp    110c <countdigits+0xc>
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countdigits>:
mov    $0x1,%cl
cmp    $0xa,%rdi
jb     1136 <countdigits+0x36>
mov    $0x1,%cl
movabs $0xcccccccccccccccd,%rsi
cc cc cc
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rdi,%rax
mul    %rsi
shr    $0x3,%rdx
add    $0x1,%cl
cmp    $0x63,%rdi
mov    %rdx,%rdi
ja     1120 <countdigits+0x20>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @countdigits(i64 %0) {
%2 = alloca i64
%3 = alloca i8
store i64 %0, i64* %2
store i8 1, i8* %3
br label %4
4: ; preds = %9, %1
%5 = load i64, i64* %2
%6 = udiv i64 %5, 10
store i64 %6, i64* %2
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
br label %9
9: ; preds = %8
%10 = load i8, i8* %3
%11 = add i8 %10, 1
store i8 %11, i8* %3
br label %4
12: ; preds = %4
%13 = load i8, i8* %3
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @countdigits(i64 %0) {
%2 = icmp ult i64 %0, 10
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8 [ %7, %3 ], [ 1, %1 ]
%5 = phi i64 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i64 %5, 10
%7 = add i8 %4, 1
%8 = icmp ult i64 %5, 100
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i8 [ 1, %1 ], [ %7, %3 ]
ret i8 %10
}
int fork(void) {
  int r;
  __asm__ __volatile__("\tint $0x80\n" : "=a"(r) : "a"(2) : "memory");
  return set_errno(r);
}


x86 assembly (clang, -O0):
<fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%eax
int    $0x80
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <set_errno@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork>:
mov    $0x2,%eax
int    $0x80
mov    %eax,%edi
xor    %eax,%eax
jmp    1030 <set_errno@plt>

LLVM IR (-O0):
define i32 @fork() {
%1 = alloca i32
%2 = call i32 asm sideeffect "\09int $$0x80\0A", "={ax},{ax},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 2)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 (i32, ...) bitcast (i32 (...)* @set_errno to i32 (i32, ...)*)(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @fork() {
%1 = tail call i32 asm sideeffect "\09int $$0x80\0A", "={ax},{ax},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 2)
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @set_errno to i32 (i32, ...)*)(i32 %1)
ret i32 %2
}
int menor_do_vetor(int *vetor) {
  int menor, menor_indice, tam_vet, i;
  for (i = 0; i < tam_vet; i++) {
    if (i == 0) {
      menor = vetor[i];
      menor_indice = i;
    }
    if (vetor[i] < menor) {
      menor = vetor[i];
      menor_indice = i;
    }
  }
  return menor_indice;
}


x86 assembly (clang, -O0):
<menor_do_vetor>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1174 <menor_do_vetor+0x74>
cmpl   $0x0,-0x18(%rbp)
jne    1139 <menor_do_vetor+0x39>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0xc(%rbp),%eax
jge    1161 <menor_do_vetor+0x61>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1166 <menor_do_vetor+0x66>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    110f <menor_do_vetor+0xf>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @menor_do_vetor(i32* nocapture readnone %0) {
ret i32 undef
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void scrypt_le16enc(void *pp, uint16_t x) {
  uint8_t *p = (uint8_t *)pp;
  p[0] = x & 0xff;
  p[1] = (x >> 8) & 0xff;
}


x86 assembly (clang, -O0):
<scrypt_le16enc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<scrypt_le16enc>:
mov    %esi,%eax
movzbl %al,%ecx
mov    %ecx,(%rdi)
movzbl %ah,%eax
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
define void @scrypt_le16enc(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 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* %4
%9 = and i32 %8, 255
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32, i32* %4
%13 = ashr i32 %12, 8
%14 = and i32 %13, 255
%15 = load i32*, i32** %5
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
ret void
}

LLVM IR (-O2):
define void @scrypt_le16enc(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = and i32 %1, 255
store i32 %4, i32* %3
%5 = lshr i32 %1, 8
%6 = and i32 %5, 255
%7 = getelementptr inbounds i8, i8* %0, i64 4
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int number_of_facets(int dim, int *nbr) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(582, &dim, nbr, c);
  return fail;
}


x86 assembly (clang, -O0):
<number_of_facets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x246,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_of_facets>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x246,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @number_of_facets(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 582, i32* %3, i32* %1, double* undef)
ret i32 %4
}
void echo(int listenfd) {}


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

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

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

LLVM IR (-O2):
define void @echo(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xor_encode_uint(unsigned int *, unsigned int const *, size_t,
                                   unsigned int *, int);
void caesar_encode_uint(unsigned int *enc, const unsigned int *dec, size_t len,
                        unsigned int key) {
  xor_encode_uint(enc, dec, len, &key, 1);
}


x86 assembly (clang, -O0):
<caesar_encode_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <xor_encode_uint@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<caesar_encode_uint>:
push   %rax
mov    %ecx,0x4(%rsp)
lea    0x4(%rsp),%rcx
mov    $0x1,%r8d
call   1030 <xor_encode_uint@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @caesar_encode_uint(i32* %0, i32* %1, i64 %2, i32 %3) {
%5 = alloca i32
store i32 %3, i32* %5
%6 = call i32 @xor_encode_uint(i32* %0, i32* %1, i64 %2, i32* %5, i32 1)
ret void
}
int main(void) {
  int i = 22;
  __gcov_flush();
  i = 42;
  asm("int $3");
  i = 84;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 22, i32* %2
%3 = call i32 (...) @__gcov_flush()
store i32 42, i32* %2
store i32 84, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__gcov_flush()
tail call void asm sideeffect "int $$3", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
float Mcp9800TempRawToC(uint16_t ta_raw) {
  float ta_c = (float)((ta_raw & 0x7FFF) >> 4) / 16.0f;
  if ((ta_raw & 0x8000) != 0) {
    ta_c = -ta_c;
  }
  return ta_c;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7fff,%eax
sar    $0x4,%eax
cvtsi2ss %eax,%xmm0
movss  0xee2(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     114f <Mcp9800TempRawToC+0x4f>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    %edi,%eax
shr    $0x4,%eax
and    $0x7ff,%eax
cvtsi2ss %eax,%xmm0
mulss  0xeea(%rip),%xmm0
test   $0x8000,%edi
je     1125 <Mcp9800TempRawToC+0x25>
xorps  0xeeb(%rip),%xmm0
ret

LLVM IR (-O0):
define float @Mcp9800TempRawToC(i32 %0) {
%2 = alloca i32
%3 = alloca float
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 32767
%6 = ashr i32 %5, 4
%7 = sitofp i32 %6 to float
%8 = fdiv float %7, 1.600000e+01
store float %8, float* %3
%9 = load i32, i32* %2
%10 = and i32 %9, 32768
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load float, float* %3
%14 = fneg float %13
store float %14, float* %3
br label %15
15: ; preds = %12, %1
%16 = load float, float* %3
ret float %16
}

LLVM IR (-O2):
define float @Mcp9800TempRawToC(i32 %0) {
%2 = lshr i32 %0, 4
%3 = and i32 %2, 2047
%4 = sitofp i32 %3 to float
%5 = fmul float %4, 6.250000e-02
%6 = and i32 %0, 32768
%7 = icmp eq i32 %6, 0
%8 = fneg float %5
%9 = select i1 %7, float %5, float %8
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int /*<<< orphan*/ g(int);
void main() {
  f(1);
  if (1) {
    g(1);
  } else {
    g(1);
  }
  g(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <f@plt>
mov    $0x1,%edi
call   1040 <g@plt>
mov    $0x1,%edi
call   1040 <g@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <f@plt>
mov    $0x1,%edi
call   1040 <g@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <g@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @f(i32 1)
%2 = call i32 @g(i32 1)
%3 = call i32 @g(i32 1)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @f(i32 1)
%2 = tail call i32 @g(i32 1)
%3 = tail call i32 @g(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _m_psubd(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((no, unused)) test_alias(__m64 s1, __m64 s2) {
  return _m_psubd(s1, s2);
}


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

x86 assembly (clang, -O2):
<test_alias>:
jmp    1030 <_m_psubd@plt>

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

LLVM IR (-O2):
define i32 @test_alias(i32 %0, i32 %1) {
%3 = tail call i32 @_m_psubd(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
double pow(double, double);
unsigned long ldr_getlux(long adcresistance) {
  double a = adcresistance / (double)165;
  return (long)((double)9000 * (pow((double)a, (double)-1.65)));
}


x86 assembly (clang, -O0):
<ldr_getlux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec8(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xeb0(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldr_getlux>:
push   %rax
cvtsi2sd %rdi,%xmm0
divsd  0xee2(%rip),%xmm0
movsd  0xee2(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xedd(%rip),%xmm0
cvttsd2si %xmm0,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @ldr_getlux(i64 %0) {
%2 = alloca i64
%3 = alloca double
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = sitofp i64 %4 to double
%6 = fdiv double %5, 1.650000e+02
store double %6, double* %3
%7 = load double, double* %3
%8 = call double @pow(double %7, double -1.650000e+00)
%9 = fmul double 9.000000e+03, %8
%10 = fptosi double %9 to i64
ret i64 %10
}

LLVM IR (-O2):
define i64 @ldr_getlux(i64 %0) {
%2 = sitofp i64 %0 to double
%3 = fdiv double %2, 1.650000e+02
%4 = tail call double @pow(double %3, double -1.650000e+00)
%5 = fmul double %4, 9.000000e+03
%6 = fptosi double %5 to i64
ret i64 %6
}
unsigned char __max_impl_uchar(unsigned char a, unsigned char b) {
  return (a > b) ? a : b;
}


x86 assembly (clang, -O0):
<__max_impl_uchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
jle    112c <__max_impl_uchar+0x2c>
movzbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <__max_impl_uchar+0x33>
movzbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__max_impl_uchar>:
mov    %esi,%eax
cmp    %al,%dil
cmova  %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @__max_impl_uchar(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp sgt i32 %6, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
br label %16
13: ; preds = %2
%14 = load i8, i8* %4
%15 = zext i8 %14 to i32
br label %16
16: ; preds = %13, %10
%17 = phi i32 [ %12, %10 ], [ %15, %13 ]
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @__max_impl_uchar(i8 zeroext %0, i8 zeroext %1) {
%3 = icmp ugt i8 %0, %1
%4 = select i1 %3, i8 %0, i8 %1
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ O_WRONLY;
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
void execute_command(const char *cmd, int len) {
  int fd;
  fd = open("/dev/adb_arbiter", O_WRONLY);
  ;
  write(fd, cmd, strlen(cmd));
  close(fd);
}


x86 assembly (clang, -O0):
<execute_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%esi
lea    0xea1(%rip),%rdi
call   1060 <open@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    -0x10(%rbp),%edi
call   1050 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_command>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
lea    0xeaa(%rip),%rdi
call   1060 <open@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <close@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"/dev/adb_arbiter\00"
@O_WRONLY = global i32 0
define void @execute_command(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 i32, i32* @O_WRONLY
%7 = call i32 @open(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i8*, i8** %3
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = call i32 @write(i32 %8, i8* %9, i32 %11)
%13 = load i32, i32* %5
%14 = call i32 @close(i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"/dev/adb_arbiter\00"
@O_WRONLY = global i32 0
define void @execute_command(i8* %0, i32 %1) {
%3 = load i32, i32* @O_WRONLY
%4 = tail call i32 @open(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @strlen(i8* %0)
%6 = tail call i32 @write(i32 %4, i8* %0, i32 %5)
%7 = tail call i32 @close(i32 %4)
ret void
}
/* Variables and functions */
int ioctl(int, int, char *);
int /*<<< orphan*/ snprintf(char *, size_t, char *, char *);
int get_scsi_pci(int fd, char *slot_name, size_t size) {
  char buf[((size_t)21)] = "";
  int rc;
  rc = ioctl(fd, 0x5387, buf);
  if (rc == 0) {
    snprintf(slot_name, size, "%s", buf);
  }
  return rc;
}


x86 assembly (clang, -O0):
<get_scsi_pci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x15,%edx
call   1040 <memset@plt>
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rdx
mov    $0x5387,%esi
call   1050 <ioctl@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jne    1189 <get_scsi_pci+0x59>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x30(%rbp),%rcx
lea    0xe7c(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_scsi_pci>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movq   $0x0,0xd(%rsp)
mov    %rsp,%rdx
mov    $0x5387,%esi
call   1040 <ioctl@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1166 <get_scsi_pci+0x46>
lea    0xea8(%rip),%rdx
mov    %rsp,%rcx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <snprintf@plt>
mov    %ebp,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @get_scsi_pci(i32 %0, i8* %1, i64 %2) {
%4 = alloca [21 x i8]
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 0
%6 = call i32 @ioctl(i32 %0, i32 21383, i8* %5)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = call i32 @snprintf(i8* %1, i64 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %10
10: ; preds = %8, %3
ret i32 %6
}
unsigned char get_I_TBS_UL(unsigned char I_MCS) {
  if (I_MCS <= 10)
    return (I_MCS);
  else if (I_MCS == 10)
    return (10);
  else if (I_MCS < 21)
    return (I_MCS - 1);
  else
    return (I_MCS - 2);
}


x86 assembly (clang, -O0):
<get_I_TBS_UL>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0xa,%eax
jg     1122 <get_I_TBS_UL+0x22>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    115e <get_I_TBS_UL+0x5e>
movzbl -0x2(%rbp),%eax
cmp    $0xa,%eax
jne    1138 <get_I_TBS_UL+0x38>
movb   $0xa,-0x1(%rbp)
jmp    115e <get_I_TBS_UL+0x5e>
movzbl -0x2(%rbp),%eax
cmp    $0x15,%eax
jge    1154 <get_I_TBS_UL+0x54>
movzbl -0x2(%rbp),%eax
sub    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    115e <get_I_TBS_UL+0x5e>
movzbl -0x2(%rbp),%eax
sub    $0x2,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_I_TBS_UL>:
mov    %edi,%eax
cmp    $0xb,%al
jb     110f <get_I_TBS_UL+0xf>
cmp    $0x14,%al
ja     110d <get_I_TBS_UL+0xd>
add    $0xff,%al
ret
add    $0xfe,%al
ret

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

LLVM IR (-O2):
define zeroext i8 @get_I_TBS_UL(i8 zeroext %0) {
%2 = icmp ult i8 %0, 11
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = icmp ult i8 %0, 21
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = add nsw i8 %0, -1
br label %9
7: ; preds = %3
%8 = add i8 %0, -2
br label %9
9: ; preds = %1, %7, %5
%10 = phi i8 [ %6, %5 ], [ %8, %7 ], [ %0, %1 ]
ret i8 %10
}
void ingresarPiso() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SLIP_send_frame_data_buf(void const *, int /*<<< orphan*/);
int /*<<< orphan*/ SLIP_send_frame_delimiter();
void SLIP_send(const void *pkt, uint32_t size) {
  SLIP_send_frame_delimiter();
  SLIP_send_frame_data_buf(pkt, size);
  SLIP_send_frame_delimiter();
}


x86 assembly (clang, -O0):
<SLIP_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <SLIP_send_frame_delimiter@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <SLIP_send_frame_data_buf@plt>
mov    $0x0,%al
call   1040 <SLIP_send_frame_delimiter@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SLIP_send>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <SLIP_send_frame_delimiter@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <SLIP_send_frame_data_buf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <SLIP_send_frame_delimiter@plt>

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

LLVM IR (-O2):
define void @SLIP_send(i8* %0, i32 %1) {
%3 = tail call i32 (...) @SLIP_send_frame_delimiter()
%4 = tail call i32 @SLIP_send_frame_data_buf(i8* %0, i32 %1)
%5 = tail call i32 (...) @SLIP_send_frame_delimiter()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int a, b;
  scanf("%d%d", &a, &b);
  printf("%d\n", a * b);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = mul nsw i32 %7, %6
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ stic_simple_test_result(int, char *, char const *,
                                           unsigned int);
void stic_assert_true(int test, const char *function, unsigned int line) {
  stic_simple_test_result(test, "Should have been true", function, line);
}


x86 assembly (clang, -O0):
<stic_assert_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xecd(%rip),%rsi
call   1030 <stic_simple_test_result@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stic_assert_true>:
mov    %edx,%ecx
mov    %rsi,%rdx
lea    0xee4(%rip),%rsi
jmp    1030 <stic_simple_test_result@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Should have been true\00"
define void @stic_assert_true(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @stic_simple_test_result(i32 %7, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Should have been true\00"
define void @stic_assert_true(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @stic_simple_test_result(i32 %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Screen;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_Screen(void *_p) {
  if (_p == NULL)
    abort();
  free((Screen *)_p);
}


x86 assembly (clang, -O0):
<free_Screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_Screen+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_Screen>:
test   %rdi,%rdi
je     112a <free_Screen+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_Screen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_Screen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ send_break_signal();
int /*<<< orphan*/ set_dtr(int);
int /*<<< orphan*/ set_rts(int /*<<< orphan*/);
int /*<<< orphan*/ usleep(int);
void hard_reset_to_user_code(void) {
  printf("Reset CPU (into user code)\r\n");
  set_rts(0);
  set_dtr(1);
  send_break_signal();
  usleep(75000);
  set_dtr(0);
  usleep(40000);
}


x86 assembly (clang, -O0):
<hard_reset_to_user_code>:
push   %rbp
mov    %rsp,%rbp
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <set_rts@plt>
mov    $0x1,%edi
call   1050 <set_dtr@plt>
mov    $0x0,%al
call   1060 <send_break_signal@plt>
mov    $0x124f8,%edi
call   1070 <usleep@plt>
xor    %edi,%edi
call   1050 <set_dtr@plt>
mov    $0x9c40,%edi
call   1070 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hard_reset_to_user_code>:
push   %rax
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <set_rts@plt>
mov    $0x1,%edi
call   1050 <set_dtr@plt>
xor    %eax,%eax
call   1060 <send_break_signal@plt>
mov    $0x124f8,%edi
call   1070 <usleep@plt>
xor    %edi,%edi
call   1050 <set_dtr@plt>
mov    $0x9c40,%edi
pop    %rax
jmp    1070 <usleep@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Reset CPU (into user code)\0D\0A\00"
define void @hard_reset_to_user_code() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @set_rts(i32 0)
%3 = call i32 @set_dtr(i32 1)
%4 = call i32 (...) @send_break_signal()
%5 = call i32 @usleep(i32 75000)
%6 = call i32 @set_dtr(i32 0)
%7 = call i32 @usleep(i32 40000)
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"Reset CPU (into user code)\0D\00"
define void @hard_reset_to_user_code() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @set_rts(i32 0)
%3 = tail call i32 @set_dtr(i32 1)
%4 = tail call i32 (...) @send_break_signal()
%5 = tail call i32 @usleep(i32 75000)
%6 = tail call i32 @set_dtr(i32 0)
%7 = tail call i32 @usleep(i32 40000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int my_puterr(char *str) {
  if (str == NULL)
    return (-1);
  write(2, str, my_strlen(str));
  return (0);
}


x86 assembly (clang, -O0):
<my_puterr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1143 <my_puterr+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <my_puterr+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1040 <write@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_puterr>:
test   %rdi,%rdi
je     1141 <my_puterr+0x21>
push   %rbx
mov    %rdi,%rbx
call   1030 <my_strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @my_puterr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @my_strlen(i8* %0)
%5 = tail call i32 @write(i32 2, i8* %0, i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ 0, %3 ], [ -1, %1 ]
ret i32 %7
}