xunge/DecIR huggingface dataset:
unsigned long long int dig(int n) {
  int i, dig = 0;
  for (i = 0; i < n; i++) {
    dig = dig * 10;
    dig = dig + 5;
  }
  return dig;
}


x86 assembly (clang, -O0):
<dig>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    113f <dig+0x3f>
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <dig+0x15>
movslq -0xc(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dig>:
xor    %eax,%eax
test   %edi,%edi
jle    114f <dig+0x4f>
lea    -0x1(%rdi),%edx
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%edx
jb     1130 <dig+0x30>
and    $0xfffffff8,%edi
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
imul   $0x5f5e100,%eax,%eax
add    $0x34fb5e3,%eax
add    $0xfffffff8,%edi
jne    1120 <dig+0x20>
test   %ecx,%ecx
je     114d <dig+0x4d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rax,%rax,4),%eax
add    %eax,%eax
add    $0x5,%eax
add    $0xffffffff,%ecx
jne    1140 <dig+0x40>
cltq
ret

LLVM IR (-O0):
define i64 @dig(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %17
9: ; preds = %5
%10 = load i32, i32* %4
%11 = mul nsw i32 %10, 10
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 5
store i32 %13, i32* %4
br label %14
14: ; preds = %9
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %5
17: ; preds = %5
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
ret i64 %19
}

LLVM IR (-O2):
define i64 @dig(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %30
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %16, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i32 [ 0, %7 ], [ %13, %9 ]
%11 = phi i32 [ 0, %7 ], [ %14, %9 ]
%12 = mul i32 %10, 100000000
%13 = add i32 %12, 55555555
%14 = add i32 %11, 8
%15 = icmp eq i32 %14, %8
br i1 %15, label %16, label %9
16: ; preds = %9, %3
%17 = phi i32 [ undef, %3 ], [ %13, %9 ]
%18 = phi i32 [ 0, %3 ], [ %13, %9 ]
%19 = icmp eq i32 %5, 0
br i1 %19, label %27, label %20
20: ; preds = %16, %20
%21 = phi i32 [ %24, %20 ], [ %18, %16 ]
%22 = phi i32 [ %25, %20 ], [ 0, %16 ]
%23 = mul nsw i32 %21, 10
%24 = add nsw i32 %23, 5
%25 = add i32 %22, 1
%26 = icmp eq i32 %25, %5
br i1 %26, label %27, label %20
27: ; preds = %20, %16
%28 = phi i32 [ %17, %16 ], [ %24, %20 ]
%29 = sext i32 %28 to i64
br label %30
30: ; preds = %27, %1
%31 = phi i64 [ 0, %1 ], [ %29, %27 ]
ret i64 %31
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ dup2(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
void ct_restorestream(FILE *to, FILE *from) {
  if (to == from)
    return;
  fflush(to);
  fflush(from);
  dup2(fileno(from), fileno(to));
  fclose(from);
}


x86 assembly (clang, -O0):
<ct_restorestream>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1163 <ct_restorestream+0x23>
jmp    119d <ct_restorestream+0x5d>
mov    -0x8(%rbp),%rdi
call   1060 <fflush@plt>
mov    -0x10(%rbp),%rdi
call   1060 <fflush@plt>
mov    -0x10(%rbp),%rdi
call   1050 <fileno@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <fileno@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <dup2@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ct_restorestream>:
cmp    %rsi,%rdi
je     1183 <ct_restorestream+0x43>
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1060 <fflush@plt>
mov    %r14,%rdi
call   1060 <fflush@plt>
mov    %r14,%rdi
call   1050 <fileno@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <fileno@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <dup2@plt>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fclose@plt>
ret

LLVM IR (-O0):
define void @ct_restorestream(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 = icmp eq i32* %5, %6
br i1 %7, label %8, label %9
8: ; preds = %2
br label %21
9: ; preds = %2
%10 = load i32*, i32** %3
%11 = call i32 @fflush(i32* %10)
%12 = load i32*, i32** %4
%13 = call i32 @fflush(i32* %12)
%14 = load i32*, i32** %4
%15 = call i32 @fileno(i32* %14)
%16 = load i32*, i32** %3
%17 = call i32 @fileno(i32* %16)
%18 = call i32 @dup2(i32 %15, i32 %17)
%19 = load i32*, i32** %4
%20 = call i32 @fclose(i32* %19)
br label %21
21: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @ct_restorestream(i32* %0, i32* %1) {
%3 = icmp eq i32* %0, %1
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = tail call i32 @fflush(i32* %0)
%6 = tail call i32 @fflush(i32* %1)
%7 = tail call i32 @fileno(i32* %1)
%8 = tail call i32 @fileno(i32* %0)
%9 = tail call i32 @dup2(i32 %7, i32 %8)
%10 = tail call i32 @fclose(i32* %1)
br label %11
11: ; preds = %2, %4
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int assignment_wrapper(const char *a, const char *b) {
  int cmp = strcmp(a, b);
  return cmp;
}


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

x86 assembly (clang, -O2):
<assignment_wrapper>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @assignment_wrapper(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x7d() {
  Assert_real((isspace(125) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              630, ("isspace should be 0 for }"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x7d>:
push   %rax
mov    $0x7d,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x276,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for }\00"
define void @t_isspace_0x7d() {
%1 = call i64 @isspace(i32 125)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for }\00"
define void @t_isspace_0x7d() {
%1 = tail call i64 @isspace(i32 125)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BootVideoChunkedPrint(char *);
int console_putchar(int c) {
  char buf[2];
  buf[0] = (char)c;
  buf[1] = 0;
  BootVideoChunkedPrint(buf);
  return (int)buf[0];
}


x86 assembly (clang, -O0):
<console_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x6(%rbp)
movb   $0x0,-0x5(%rbp)
lea    -0x6(%rbp),%rdi
call   1030 <BootVideoChunkedPrint@plt>
movsbl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_putchar>:
push   %rax
mov    %dil,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x6(%rsp),%rdi
call   1030 <BootVideoChunkedPrint@plt>
movsbl 0x6(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @console_putchar(i32 %0) {
%2 = alloca i32
%3 = alloca [2 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %5, i8* %6
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 0, i8* %7
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%9 = call i32 @BootVideoChunkedPrint(i8* %8)
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @console_putchar(i32 %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 0, i8* %5
%6 = call i32 @BootVideoChunkedPrint(i8* %3)
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
ret i32 %8
}
double sign(double x) {
  if (x == 0.0)
    return (0.0);
  if (x > 0)
    return (1.0);
  if (x < 0)
    return (-1.0);
  return (0.0);
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    112e <sign+0x2e>
jp     112e <sign+0x2e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117a <sign+0x7a>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1152 <sign+0x52>
movsd  0xec0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117a <sign+0x7a>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1172 <sign+0x72>
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117a <sign+0x7a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    1111 <sign+0x11>
jp     1111 <sign+0x11>
ret
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jbe    1124 <sign+0x24>
movsd  0xedd(%rip),%xmm0
ret
cmpltsd %xmm0,%xmm1
movsd  0xed7(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @sign(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = fcmp ogt double %0, 0.000000e+00
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = fcmp olt double %0, 0.000000e+00
%7 = select i1 %6, double -1.000000e+00, double 0.000000e+00
br label %8
8: ; preds = %5, %3, %1
%9 = phi double [ 0.000000e+00, %1 ], [ 1.000000e+00, %3 ], [ %7, %5 ]
ret double %9
}
/* Type definitions */
struct obj {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ err(char *, struct obj *);
void err0(void) { err("0", ((struct obj *)0)); }


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

x86 assembly (clang, -O2):
<err0>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <err@plt>

LLVM IR (-O0):
%struct.obj = type { i32 }
@.str = [2 x i8] c"0\00"
define void @err0() {
%1 = call i32 @err(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %struct.obj* null)
ret void
}

LLVM IR (-O2):
%struct.obj = type { i32 }
@.str = [2 x i8] c"0\00"
define void @err0() {
%1 = tail call i32 @err(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %struct.obj* null)
ret void
}
void ext2_discard_prealloc(struct inode *inode) {}


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
define void @ext2_discard_prealloc(%struct.inode* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ POLICYQUALINFO;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ POLICYQUALINFO_it;
POLICYQUALINFO *d2i_POLICYQUALINFO(POLICYQUALINFO **a, const unsigned char **in,
                                   long len) {
  return (POLICYQUALINFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                         &POLICYQUALINFO_it);
}


x86 assembly (clang, -O0):
<d2i_POLICYQUALINFO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2eb9(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_POLICYQUALINFO>:
mov    0x2ed9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@POLICYQUALINFO_it = global i32 0
define i32* @d2i_POLICYQUALINFO(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @POLICYQUALINFO_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@POLICYQUALINFO_it = global i32 0
define i32* @d2i_POLICYQUALINFO(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @POLICYQUALINFO_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Variables and functions */
int /*<<< orphan*/ ClearInterrupt();
int /*<<< orphan*/ ConfigureInterruptSourceModeRegister();
int /*<<< orphan*/ EnableCompareInterruptForRegisterC();
int /*<<< orphan*/ SetInterruptHandler();
void Timer_ConfigureInterrupt(void) {
  SetInterruptHandler();
  ConfigureInterruptSourceModeRegister();
  ClearInterrupt();
  EnableCompareInterruptForRegisterC();
}


x86 assembly (clang, -O0):
<Timer_ConfigureInterrupt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <SetInterruptHandler@plt>
mov    $0x0,%al
call   1060 <ConfigureInterruptSourceModeRegister@plt>
mov    $0x0,%al
call   1040 <ClearInterrupt@plt>
mov    $0x0,%al
call   1030 <EnableCompareInterruptForRegisterC@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Timer_ConfigureInterrupt>:
push   %rax
xor    %eax,%eax
call   1050 <SetInterruptHandler@plt>
xor    %eax,%eax
call   1060 <ConfigureInterruptSourceModeRegister@plt>
xor    %eax,%eax
call   1040 <ClearInterrupt@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <EnableCompareInterruptForRegisterC@plt>

LLVM IR (-O0):
define void @Timer_ConfigureInterrupt() {
%1 = call i32 (...) @SetInterruptHandler()
%2 = call i32 (...) @ConfigureInterruptSourceModeRegister()
%3 = call i32 (...) @ClearInterrupt()
%4 = call i32 (...) @EnableCompareInterruptForRegisterC()
ret void
}

LLVM IR (-O2):
define void @Timer_ConfigureInterrupt() {
%1 = tail call i32 (...) @SetInterruptHandler()
%2 = tail call i32 (...) @ConfigureInterruptSourceModeRegister()
%3 = tail call i32 (...) @ClearInterrupt()
%4 = tail call i32 (...) @EnableCompareInterruptForRegisterC()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ st103_ep_set_rx_status(int, int);
void usb_lld_stall_rx(int ep_num) { st103_ep_set_rx_status(ep_num, (0x1000)); }


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

x86 assembly (clang, -O2):
<usb_lld_stall_rx>:
mov    $0x1000,%esi
jmp    1030 <st103_ep_set_rx_status@plt>

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

LLVM IR (-O2):
define void @usb_lld_stall_rx(i32 %0) {
%2 = tail call i32 @st103_ep_set_rx_status(i32 %0, i32 4096)
ret void
}
/* Variables and functions */
int menorElemento(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int arr[10] = {4, 5, 8, 65, 0, 21, 65, 7, -54, 2};
  printf("O menor elemento do array eh: %d", menorElemento(arr, 9));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x9,%esi
call   1040 <menorElemento@plt>
mov    %eax,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x9,%esi
call   1040 <menorElemento@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [10 x i32] [i32 4, i32 5, i32 8, i32 65, i32 0, i32 21, i32 65, i32 7, i32 -54, i32 2]
@.str = [33 x i8] c"O menor elemento do array eh: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @menorElemento(i32* %4, i32 9)
%6 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [10 x i32] [i32 4, i32 5, i32 8, i32 65, i32 0, i32 21, i32 65, i32 7, i32 -54, i32 2]
@.str = [33 x i8] c"O menor elemento do array eh: %d\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @menorElemento(i32* %3, i32 9)
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
scalar_t__ EquateFind(char *);
int CheckEquate(char *name) {
  if (EquateFind(name))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<CheckEquate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <EquateFind@plt>
cmp    $0x0,%rax
je     113b <CheckEquate+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <CheckEquate+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckEquate>:
push   %rax
call   1030 <EquateFind@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CheckEquate(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @EquateFind(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @CheckEquate(i8* %0) {
%2 = tail call i64 @EquateFind(i8* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int generic_phy_init(struct phy *phy) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.phy = type opaque
define i32 @generic_phy_init(%struct.phy* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/ *);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ log_error(int, char *);
int pthread_cond_broadcast(int /*<<< orphan*/ *);
int conditionBroadcast(pthread_cond_t *cond) {
  ASSERT(cond);
  int retval;
  retval = pthread_cond_broadcast(cond);
  if (retval != 0) {
    log_error(retval, "Error pthread_cond_broadcast()");
    abort();
  }
  return retval;
}


x86 assembly (clang, -O0):
<conditionBroadcast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <ASSERT@plt>
mov    -0x8(%rbp),%rdi
call   1040 <pthread_cond_broadcast@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1181 <conditionBroadcast+0x41>
mov    -0xc(%rbp),%edi
lea    0xe8b(%rip),%rsi
call   1050 <log_error@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conditionBroadcast>:
push   %rbx
mov    %rdi,%rbx
call   1060 <ASSERT@plt>
mov    %rbx,%rdi
call   1040 <pthread_cond_broadcast@plt>
test   %eax,%eax
jne    1159 <conditionBroadcast+0x19>
xor    %eax,%eax
pop    %rbx
ret
lea    0xea0(%rip),%rsi
mov    %eax,%edi
call   1050 <log_error@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Error pthread_cond_broadcast()\00"
define i32 @conditionBroadcast(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @ASSERT(i32* %4)
%6 = load i32*, i32** %2
%7 = call i32 @pthread_cond_broadcast(i32* %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call i32 @log_error(i32 %11, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %1
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [31 x i8] c"Error pthread_cond_broadcast()\00"
define i32 @conditionBroadcast(i32* %0) {
%2 = tail call i32 @ASSERT(i32* %0)
%3 = tail call i32 @pthread_cond_broadcast(i32* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @log_error(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XEnterWindowEvent;

/* Variables and functions */
int get_XEnterWindowEvent_y(void *_p) {
  return (int)((XEnterWindowEvent *)_p)->y;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XEnterWindowEvent_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ open_shlib();
int main() {
  open_shlib();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @open_shlib()
ret i32 0
}
/* Variables and functions */
int test_finite_alias();
int do_test(void) { return test_finite_alias(); }


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

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

LLVM IR (-O0):
define i32 @do_test() {
%1 = call i32 (...) @test_finite_alias()
ret i32 %1
}

LLVM IR (-O2):
define i32 @do_test() {
%1 = tail call i32 (...) @test_finite_alias()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(int *A, int num_elements) {
  for (int i = 0; i < num_elements; ++i) {
    printf("%d ", A[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_array(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void ecrire_commentaire_ascii(FILE *fichier, char *comment) {
  fprintf(fichier, "# %s\n", comment);
}


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

x86 assembly (clang, -O2):
<ecrire_commentaire_ascii>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"# %s\0A\00"
define void @ecrire_commentaire_ascii(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
void geom_CM_cyl_rpz(double xm[], double xp[], double xc[]) {
  xc[0] = 0.5 * (xm[0] + xp[0]);
  xc[1] = 0.5 * (xm[1] + xp[1]);
}


x86 assembly (clang, -O0):
<geom_CM_cyl_rpz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm1
movsd  0xed8(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm1
movsd  0xeb2(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_CM_cyl_rpz>:
movsd  (%rdi),%xmm0
addsd  (%rsi),%xmm0
movsd  0xef0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rdx)
movsd  0x8(%rdi),%xmm0
addsd  0x8(%rsi),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rdx)
ret

LLVM IR (-O0):
define void @geom_CM_cyl_rpz(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %5
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fadd double %9, %12
%14 = fmul double 5.000000e-01, %13
%15 = load double*, double** %6
%16 = getelementptr inbounds double, double* %15, i64 0
store double %14, double* %16
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = load double*, double** %5
%21 = getelementptr inbounds double, double* %20, i64 1
%22 = load double, double* %21
%23 = fadd double %19, %22
%24 = fmul double 5.000000e-01, %23
%25 = load double*, double** %6
%26 = getelementptr inbounds double, double* %25, i64 1
store double %24, double* %26
ret void
}

LLVM IR (-O2):
define void @geom_CM_cyl_rpz(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = fadd double %4, %5
%7 = fmul double %6, 5.000000e-01
store double %7, double* %2
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %1, i64 1
%11 = load double, double* %10
%12 = fadd double %9, %11
%13 = fmul double %12, 5.000000e-01
%14 = getelementptr inbounds double, double* %2, i64 1
store double %13, double* %14
ret void
}
const char *str_skipWhite(const char *cp) {
  int c;
  while ((c = *cp)) {
    if (c == ' ' || c == '\t' || c == '\n' || c == '\r')
      ++cp;
    else
      break;
  }
  return cp;
}


x86 assembly (clang, -O0):
<str_skipWhite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     115e <str_skipWhite+0x5e>
cmpl   $0x20,-0xc(%rbp)
je     1143 <str_skipWhite+0x43>
cmpl   $0x9,-0xc(%rbp)
je     1143 <str_skipWhite+0x43>
cmpl   $0xa,-0xc(%rbp)
je     1143 <str_skipWhite+0x43>
cmpl   $0xd,-0xc(%rbp)
jne    1154 <str_skipWhite+0x54>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <str_skipWhite+0x59>
jmp    115e <str_skipWhite+0x5e>
jmp    1108 <str_skipWhite+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_skipWhite>:
mov    %rdi,%rax
movabs $0x100002600,%rcx
nopl   (%rax)
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1125 <str_skipWhite+0x25>
bt     %rdx,%rcx
jae    1125 <str_skipWhite+0x25>
add    $0x1,%rax
jmp    1110 <str_skipWhite+0x10>
ret

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

LLVM IR (-O2):
define i8* @str_skipWhite(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 9, label %5
i8 32, label %5
i8 13, label %5
i8 10, label %5
]
5: ; preds = %2, %2, %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int valueNotInListStr(char *, char *);
int main() {
  char *string = NULL;
  string = "9930|9998|9999";
  int x = 10000;
  return valueNotInListStr("10000", string);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
lea    0xed2(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x2710,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xecb(%rip),%rdi
call   1030 <valueNotInListStr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xef8(%rip),%rdi
lea    0xee2(%rip),%rsi
jmp    1030 <valueNotInListStr@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"9930|9998|9999\00"
@.str.1 = [6 x i8] c"10000\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1
store i8* null, i8** %2
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %2
store i32 10000, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 @valueNotInListStr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@.str = [15 x i8] c"9930|9998|9999\00"
@.str.1 = [6 x i8] c"10000\00"
define i32 @main() {
%1 = tail call i32 @valueNotInListStr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
double exp(int /*<<< orphan*/);
int /*<<< orphan*/ lnchoose(int, int);
double choose(int n, int m) {
  if (m > n) {
    return 0;
  }
  return exp(lnchoose(n, m));
}


x86 assembly (clang, -O0):
<choose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1147 <choose+0x27>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115e <choose+0x3e>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <lnchoose@plt>
mov    %eax,%edi
call   1040 <exp@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<choose>:
cmp    %edi,%esi
jle    1128 <choose+0x8>
xorps  %xmm0,%xmm0
ret
push   %rax
call   1030 <lnchoose@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <exp@plt>

LLVM IR (-O0):
define double @choose(i32 %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store double 0.000000e+00, double* %3
br label %15
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @lnchoose(i32 %11, i32 %12)
%14 = call double @exp(i32 %13)
store double %14, double* %3
br label %15
15: ; preds = %10, %9
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
define double @choose(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @lnchoose(i32 %0, i32 %1)
%6 = tail call double @exp(i32 %5)
br label %7
7: ; preds = %2, %4
%8 = phi double [ %6, %4 ], [ 0.000000e+00, %2 ]
ret double %8
}
int CLOSE(int fd) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @CLOSE(i32 %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ write_all(int, char *, int);
int outcap(int i) {
  char c = i;
  return write_all(1, &c, 1) == 0 ? 1 : -1;
}


x86 assembly (clang, -O0):
<outcap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
mov    $0x1,%edx
lea    -0x5(%rbp),%rsi
mov    %edx,%edi
call   1030 <write_all@plt>
mov    %rax,%rdx
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outcap>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write_all@plt>
neg    %rax
sbb    %eax,%eax
or     $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @outcap(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = call i64 @write_all(i32 1, i8* %2, i32 1)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 1, i32 -1
ret i32 %6
}
/* Type definitions */
typedef int __u32;

/* Variables and functions */
void tcmu_hdr_set_len(__u32 *len_op, __u32 len) {
  *len_op &= 0x7;
  *len_op |= len;
}


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

x86 assembly (clang, -O2):
<tcmu_hdr_set_len>:
mov    (%rdi),%eax
and    $0x7,%eax
or     %esi,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @tcmu_hdr_set_len(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* %5
%7 = and i32 %6, 7
store i32 %7, i32* %5
%8 = load i32, i32* %4
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = or i32 %10, %8
store i32 %11, i32* %9
ret void
}

LLVM IR (-O2):
define void @tcmu_hdr_set_len(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = and i32 %3, 7
%5 = or i32 %4, %1
store i32 %5, i32* %0
ret void
}
void bfqg_stats_update_avg_queue_size(struct bfq_group *bfqg) {}


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

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

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

LLVM IR (-O2):
%struct.bfq_group = type opaque
define void @bfqg_stats_update_avg_queue_size(%struct.bfq_group* nocapture %0) {
ret void
}
/* Variables and functions */
long double powl(long double, long double);
long double exp10l(long double x) { return powl(10.0L, x); }


x86 assembly (clang, -O0):
<exp10l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
flds   0xed3(%rip)
fstpt  (%rax)
call   1030 <powl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp10l>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fstpt  0x10(%rsp)
flds   0xede(%rip)
fstpt  (%rsp)
call   1030 <powl@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @exp10l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @powl(x86_fp80 0xK4002A000000000000000, x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @exp10l(x86_fp80 %0) {
%2 = tail call x86_fp80 @powl(x86_fp80 0xK4002A000000000000000, x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int btp_skip_char_span(char **, char *);
int btp_skip_unsigned_integer(char **input) {
  return btp_skip_char_span(input, "0123456789");
}


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

x86 assembly (clang, -O2):
<btp_skip_unsigned_integer>:
lea    0xee9(%rip),%rsi
jmp    1030 <btp_skip_char_span@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"0123456789\00"
define i32 @btp_skip_unsigned_integer(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 @btp_skip_char_span(i8** %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [11 x i8] c"0123456789\00"
define i32 @btp_skip_unsigned_integer(i8** %0) {
%2 = tail call i32 @btp_skip_char_span(i8** %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, double *, float *);
int main(void) {
  float f;
  double d;
  scanf("%lf %f", &d, &f);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <scanf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%lf %f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca double
%3 = bitcast float* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %2, float* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int scheduler() {
  for (;;) {
    sleep(1);
  }
  return -99;
}


x86 assembly (clang, -O0):
<scheduler>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <scheduler+0x9>
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1119 <scheduler+0x9>

x86 assembly (clang, -O2):
<scheduler>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1120 <scheduler+0x10>

LLVM IR (-O0):
define i32 @scheduler() {
br label %1
1: ; preds = %1, %0
%2 = call i32 @sleep(i32 1)
br label %1
}

LLVM IR (-O2):
define i32 @scheduler() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @sleep(i32 1)
br label %1
}
int next_up(int i) {
  int r = i + 1;
  if (r >= 16)
    r = 0;
  return r;
}


x86 assembly (clang, -O0):
<next_up>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jl     1121 <next_up+0x21>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_up>:
lea    0x1(%rdi),%ecx
xor    %eax,%eax
cmp    $0xf,%edi
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @next_up(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = icmp sgt i32 %0, 14
%4 = select i1 %3, i32 0, i32 %2
ret i32 %4
}
unsigned int fn6(int a, int b) { return a - ((a / b) * b); }


x86 assembly (clang, -O0):
<fn6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn6>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @fn6(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}