xunge/DecIR huggingface dataset:
/* Variables and functions */
char *CRYPTO_malloc(scalar_t__, char const *, int);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *CRYPTO_strdup(const char *str, const char *file, int line) {
  char *ret = CRYPTO_malloc(strlen(str) + 1, file, line);
  if (ret == NULL)
    return NULL;
  strcpy(ret, str);
  return ret;
}


x86 assembly (clang, -O0):
<CRYPTO_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <CRYPTO_malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    117b <CRYPTO_strdup+0x4b>
movq   $0x0,-0x8(%rbp)
jmp    1190 <CRYPTO_strdup+0x60>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_strdup>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%r14
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <CRYPTO_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1162 <CRYPTO_strdup+0x32>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @CRYPTO_strdup(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @CRYPTO_malloc(i64 %5, i8* %1, i32 %2)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %10
10: ; preds = %3, %8
ret i8* %6
}
void i2d_PKCS7_ENCRYPT(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_PKCS7_ENCRYPT() {
ret void
}
double mysecs2days(double s) { return s / 86400.; }


x86 assembly (clang, -O0):
<mysecs2days>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mysecs2days>:
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @mysecs2days(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 8.640000e+04
ret double %4
}

LLVM IR (-O2):
define double @mysecs2days(double %0) {
%2 = fdiv double %0, 8.640000e+04
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void sleep_(unsigned ms) { usleep(ms * 1000); }


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

x86 assembly (clang, -O2):
<sleep_>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @sleep_(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @sleep_(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int fmod(double, double);
int issymleapyear(int symyear) {
  if (fmod((52.0 * symyear + 146.0), 293.0) < 52)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<issymleapyear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xedc(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xec0(%rip),%xmm1
call   1030 <fmod@plt>
cmp    $0x34,%eax
jge    115a <issymleapyear+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1161 <issymleapyear+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<issymleapyear>:
push   %rax
cvtsi2sd %edi,%xmm0
mulsd  0xee3(%rip),%xmm0
addsd  0xee3(%rip),%xmm0
movsd  0xee3(%rip),%xmm1
call   1030 <fmod@plt>
xor    %ecx,%ecx
cmp    $0x34,%eax
setl   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @issymleapyear(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sitofp i32 %4 to double
%6 = call double @llvm.fmuladd.f64(double 5.200000e+01, double %5, double 1.460000e+02)
%7 = call i32 @fmod(double %6, double 2.930000e+02)
%8 = icmp slt i32 %7, 52
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @issymleapyear(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 5.200000e+01, double 1.460000e+02)
%4 = tail call i32 @fmod(double %3, double 2.930000e+02)
%5 = icmp slt i32 %4, 52
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ int8_t;

/* Variables and functions */
void f(uint32_t *restrict dst, int8_t *restrict src) {
  for (int i = 0; i < 7; ++i)
    dst[i] = (int8_t)~src[i];
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x7,-0x14(%rbp)
jge    1147 <f+0x47>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <f+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movdqu (%rsi),%xmm0
pcmpeqd %xmm1,%xmm1
pxor   %xmm1,%xmm0
movdqu %xmm0,(%rdi)
movdqu 0x10(%rsi),%xmm0
pxor   %xmm1,%xmm0
movdqu %xmm0,0x10(%rdi)
movdqu 0x20(%rsi),%xmm0
pxor   %xmm1,%xmm0
movdqu %xmm0,0x20(%rdi)
mov    0x30(%rsi),%rax
not    %rax
mov    %rax,0x30(%rdi)
ret

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

LLVM IR (-O2):
define void @f(i64* noalias nocapture writeonly %0, i64* noalias nocapture %1) {
%3 = bitcast i64* %1 to <2 x i64>*
%4 = load <2 x i64>, <2 x i64>* %3
%5 = xor <2 x i64> %4, <i64 -1, i64 -1>
%6 = bitcast i64* %0 to <2 x i64>*
store <2 x i64> %5, <2 x i64>* %6
%7 = getelementptr inbounds i64, i64* %1, i64 2
%8 = getelementptr inbounds i64, i64* %0, i64 2
%9 = bitcast i64* %7 to <2 x i64>*
%10 = load <2 x i64>, <2 x i64>* %9
%11 = xor <2 x i64> %10, <i64 -1, i64 -1>
%12 = bitcast i64* %8 to <2 x i64>*
store <2 x i64> %11, <2 x i64>* %12
%13 = getelementptr inbounds i64, i64* %1, i64 4
%14 = getelementptr inbounds i64, i64* %0, i64 4
%15 = bitcast i64* %13 to <2 x i64>*
%16 = load <2 x i64>, <2 x i64>* %15
%17 = xor <2 x i64> %16, <i64 -1, i64 -1>
%18 = bitcast i64* %14 to <2 x i64>*
store <2 x i64> %17, <2 x i64>* %18
%19 = getelementptr inbounds i64, i64* %1, i64 6
%20 = load i64, i64* %19
%21 = xor i64 %20, -1
%22 = getelementptr inbounds i64, i64* %0, i64 6
store i64 %21, i64* %22
ret void
}
void swap_nums(int *x, int *y) {
  int tmp;
  tmp = *x;
  *x = *y;
  *y = tmp;
}


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

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

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

LLVM IR (-O2):
define void @swap_nums(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int _strcasecmp(char const *, char const *, void *);
int hfuzz_strcasecmp(const char *s1, const char *s2, void *addr) {
  return _strcasecmp(s1, s2, addr);
}


x86 assembly (clang, -O0):
<hfuzz_strcasecmp>:
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
call   1030 <_strcasecmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hfuzz_strcasecmp>:
jmp    1030 <_strcasecmp@plt>

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

LLVM IR (-O2):
define i32 @hfuzz_strcasecmp(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @_strcasecmp(i8* %0, i8* %1, i8* %2)
ret i32 %4
}
void highlight_dest(void) {}


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

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

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

LLVM IR (-O2):
define void @highlight_dest() {
ret void
}
float *vector(nl, nh)
int nl, nh;
{
  float *v;
  v = (float *)calloc((unsigned)(nh - nl + 1), sizeof(float));
  if (!v)
    nrerror("allocation failure in vector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1162 <vector+0x42>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <nrerror@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x1(%rsi),%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114a <vector+0x2a>
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1030 <nrerror@plt>
movslq %ebp,%rax
shl    $0x2,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"allocation failure in vector()\00"
define float* @vector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = zext i32 %9 to i64
%11 = call i8* @calloc(i64 %10, i64 4)
%12 = bitcast i8* %11 to float*
store float* %12, float** %5
%13 = load float*, float** %5
%14 = icmp ne float* %13, null
br i1 %14, label %17, label %15
15: ; preds = %2
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @nrerror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %2
%18 = load float*, float** %5
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = sub i64 0, %20
%22 = getelementptr inbounds float, float* %18, i64 %21
ret float* %22
}

LLVM IR (-O2):
@.str = [31 x i8] c"allocation failure in vector()\00"
define float* @vector(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = zext i32 %4 to i64
%6 = tail call i8* @calloc(i64 %5, i64 4)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @nrerror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = bitcast i8* %6 to float*
%12 = sext i32 %0 to i64
%13 = sub nsw i64 0, %12
%14 = getelementptr inbounds float, float* %11, i64 %13
ret float* %14
}
void XtMapWidget() {}


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

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

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

LLVM IR (-O2):
define void @XtMapWidget() {
ret void
}
/* Variables and functions */
int strlen(char *);
long hash(char *word) {
  long int hash;
  hash = 42;
  for (int i = 0; i < strlen(word); i++) {
    hash = hash + (word[i] * (i + 1));
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x2a,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    1178 <hash+0x68>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
mov    -0x14(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <hash+0x1b>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    $0x2a,%r15d
test   %eax,%eax
jle    1150 <hash+0x40>
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%eax
add    $0x1,%rbx
imul   %ebx,%eax
cltq
add    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1130 <hash+0x20>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @hash(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %6, %1
%5 = phi i64 [ 42, %1 ], [ %16, %6 ]
ret i64 %5
6: ; preds = %1, %6
%7 = phi i64 [ %12, %6 ], [ 0, %1 ]
%8 = phi i64 [ %16, %6 ], [ 42, %1 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = sext i8 %10 to i64
%12 = add nuw nsw i64 %7, 1
%13 = mul i64 %12, %11
%14 = shl i64 %13, 32
%15 = ashr exact i64 %14, 32
%16 = add nsw i64 %8, %15
%17 = tail call i32 @strlen(i8* %0)
%18 = sext i32 %17 to i64
%19 = icmp slt i64 %12, %18
br i1 %19, label %6, label %4
}
int get_sector_size_kb(int sector) {
  return 1;
  return 2;
  (void)sector;
}


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

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

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

LLVM IR (-O2):
define i32 @get_sector_size_kb(i32 %0) {
ret i32 1
}
/* Type definitions */
struct utmpx {
  int dummy;
};
struct utmp {
  int dummy;
};

/* Variables and functions */
scalar_t__ pututline(struct utmp const *);
struct utmpx *pututxline(const struct utmpx *utmp_entry) {
  return (struct utmpx *)pututline((const struct utmp *)utmp_entry);
}


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

x86 assembly (clang, -O2):
<pututxline>:
jmp    1030 <pututline@plt>

LLVM IR (-O0):
%struct.utmpx = type { i32 }
%struct.utmp = type { i32 }
define %struct.utmpx* @pututxline(%struct.utmpx* %0) {
%2 = alloca %struct.utmpx*
store %struct.utmpx* %0, %struct.utmpx** %2
%3 = load %struct.utmpx*, %struct.utmpx** %2
%4 = bitcast %struct.utmpx* %3 to %struct.utmp*
%5 = call i64 @pututline(%struct.utmp* %4)
%6 = inttoptr i64 %5 to %struct.utmpx*
ret %struct.utmpx* %6
}

LLVM IR (-O2):
%struct.utmpx = type { i32 }
%struct.utmp = type { i32 }
define %struct.utmpx* @pututxline(%struct.utmpx* %0) {
%2 = bitcast %struct.utmpx* %0 to %struct.utmp*
%3 = tail call i64 @pututline(%struct.utmp* %2)
%4 = inttoptr i64 %3 to %struct.utmpx*
ret %struct.utmpx* %4
}
void udev_selinux_init(struct udev *udev) {}


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

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

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

LLVM IR (-O2):
%struct.udev = type opaque
define void @udev_selinux_init(%struct.udev* nocapture %0) {
ret void
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("PID: %d\n", getpid());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"PID: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void sortByNomeComponenteDois() {}


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

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

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

LLVM IR (-O2):
define void @sortByNomeComponenteDois() {
ret void
}
/* Variables and functions */
int f(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int m, n;
  scanf("%d%d", &m, &n);
  printf("%d\n", f(n) / (f(m) * f(n - m)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0xc(%rbp),%edi
call   1030 <f@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <f@plt>
mov    -0x14(%rbp),%ecx
mov    %eax,%edx
mov    -0x10(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    (%rsp),%edi
call   1030 <f@plt>
mov    %eax,%ebx
mov    0x4(%rsp),%edi
call   1030 <f@plt>
mov    %eax,%ebp
mov    (%rsp),%edi
sub    0x4(%rsp),%edi
call   1030 <f@plt>
mov    %eax,%ecx
imul   %ebp,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
lea    0xe8c(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
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* %3
%6 = call i32 @f(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @f(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = sub nsw i32 %9, %10
%12 = call i32 @f(i32 %11)
%13 = mul nsw i32 %8, %12
%14 = sdiv i32 %6, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
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* %2
%7 = call i32 @f(i32 %6)
%8 = load i32, i32* %1
%9 = call i32 @f(i32 %8)
%10 = load i32, i32* %2
%11 = load i32, i32* %1
%12 = sub nsw i32 %10, %11
%13 = call i32 @f(i32 %12)
%14 = mul nsw i32 %13, %9
%15 = sdiv i32 %7, %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %15)
ret i32 0
}
void jump_to_zero(void) {
  int (*foo)(void);
  foo = (void *)((0));
  (*foo)();
}


x86 assembly (clang, -O0):
<jump_to_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @jump_to_zero() {
%1 = alloca i32 ()*
store i32 ()* null, i32 ()** %1
%2 = load i32 ()*, i32 ()** %1
%3 = call i32 %2()
ret void
}

LLVM IR (-O2):
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *src) {
  char *buf = malloc(strlen(src) + 1);
  if (buf)
    strcpy(buf, src);
  return buf;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <strdup+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <strdup+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %11, i8* %12)
br label %14
14: ; preds = %10, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char *argv[]) {
  for (int i = 0; i < argc; i++) {
    printf("%d: %s\n", i, argv[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1162 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
void consume_cpu() {
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<consume_cpu>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <consume_cpu+0x9>
jmp    1109 <consume_cpu+0x9>

x86 assembly (clang, -O2):
<consume_cpu>:
jmp    1100 <consume_cpu>

LLVM IR (-O0):
define void @consume_cpu() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @consume_cpu() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c, opp;
  int n, op, k;
  scanf("%c", &c);
  n = c;
  k = n - 97;
  op = 122 - k;
  opp = op;
  printf("%c", opp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x14(%rbp)
mov    $0x7a,%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %al,-0x6(%rbp)
lea    0xe99(%rip),%rdi
movsbl -0x6(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xf(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0xf(%rsp),%al
movsbl %al,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 97
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = sub nsw i32 122, %12
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = trunc i32 %14 to i8
store i8 %15, i8* %3
%16 = load i8, i8* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %16)
ret i32 0
}

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


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

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

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

LLVM IR (-O2):
define void @VMR3Destroy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int bitvector_get_word_length();
int /*<<< orphan*/ printf(char *);
void test_bitvector_get_word_length() {
  int word_length = bitvector_get_word_length();
  assert(word_length == 64);
  printf("\tWord length test passed\n");
}


x86 assembly (clang, -O0):
<test_bitvector_get_word_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <bitvector_get_word_length@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bitvector_get_word_length>:
push   %rax
xor    %eax,%eax
call   1050 <bitvector_get_word_length@plt>
xor    %edi,%edi
cmp    $0x40,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xeb3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"\09Word length test passed\0A\00"
define void @test_bitvector_get_word_length() {
%1 = alloca i32
%2 = call i32 (...) @bitvector_get_word_length()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 64
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"\09Word length test passed\00"
define void @test_bitvector_get_word_length() {
%1 = tail call i32 (...) @bitvector_get_word_length()
%2 = icmp eq i32 %1, 64
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
__attribute__((always_)) int sched_info_on(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sched_info_on() {
ret i32 0
}
int findNdigits(int n) {
  int digmodulus, ndigits, modulus;
  digmodulus = 1;
  ndigits = 1;
  modulus = 1 % n;
  while (modulus != 0) {
    digmodulus = (digmodulus * 10) % n;
    modulus = (modulus + digmodulus) % n;
    ndigits++;
  }
  return (ndigits);
}


x86 assembly (clang, -O0):
<findNdigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1151 <findNdigits+0x51>
imul   $0xa,-0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1121 <findNdigits+0x21>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findNdigits>:
mov    $0x1,%r8d
mov    $0x1,%eax
xor    %edx,%edx
idiv   %edi
test   %edx,%edx
je     114b <findNdigits+0x4b>
mov    $0x1,%esi
mov    $0x1,%r8d
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%eax
cltd
idiv   %edi
mov    %edx,%ecx
add    %edx,%esi
add    $0x1,%r8d
mov    %esi,%eax
cltd
idiv   %edi
mov    %edx,%esi
test   %edx,%edx
jne    1130 <findNdigits+0x30>
mov    %r8d,%eax
ret

LLVM IR (-O0):
define i32 @findNdigits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
store i32 1, i32* %4
%6 = load i32, i32* %2
%7 = srem i32 1, %6
store i32 %7, i32* %5
br label %8
8: ; preds = %11, %1
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %23
11: ; preds = %8
%12 = load i32, i32* %3
%13 = mul nsw i32 %12, 10
%14 = load i32, i32* %2
%15 = srem i32 %13, %14
store i32 %15, i32* %3
%16 = load i32, i32* %5
%17 = load i32, i32* %3
%18 = add nsw i32 %16, %17
%19 = load i32, i32* %2
%20 = srem i32 %18, %19
store i32 %20, i32* %5
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %8
23: ; preds = %8
%24 = load i32, i32* %4
ret i32 %24
}

LLVM IR (-O2):
define i32 @findNdigits(i32 %0) {
%2 = srem i32 1, %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %12, %4 ], [ 1, %1 ]
%6 = phi i32 [ %11, %4 ], [ 1, %1 ]
%7 = phi i32 [ %9, %4 ], [ 1, %1 ]
%8 = mul nsw i32 %7, 10
%9 = srem i32 %8, %0
%10 = add nsw i32 %9, %5
%11 = add nuw nsw i32 %6, 1
%12 = srem i32 %10, %0
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 1, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ printElapsedTimeNoNewLine(int /*<<< orphan*/ *, int const,
                                             int const, int const,
                                             int /*<<< orphan*/, int const,
                                             double const);
void printElapsedTime(FILE *file, const int printHour, const int printMin,
                      const int printSec, const int secNumberOfDecimal,
                      const double seconds) {
  printElapsedTimeNoNewLine(file, printHour, printMin, printSec, 0,
                            secNumberOfDecimal, seconds);
  fprintf(file, "\n");
}


x86 assembly (clang, -O0):
<printElapsedTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r9d
movsd  -0x20(%rbp),%xmm0
xor    %r8d,%r8d
call   1040 <printElapsedTimeNoNewLine@plt>
mov    -0x8(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printElapsedTime>:
push   %rbx
mov    %r8d,%r9d
mov    %rdi,%rbx
xor    %r8d,%r8d
call   1040 <printElapsedTimeNoNewLine@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @printElapsedTime(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, double %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store double %5, double* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load double, double* %12
%19 = call i32 @printElapsedTimeNoNewLine(i32* %13, i32 %14, i32 %15, i32 %16, i32 0, i32 %17, double %18)
%20 = load i32*, i32** %7
%21 = call i32 @fprintf(i32* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @printElapsedTime(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, double %5) {
%7 = tail call i32 @printElapsedTimeNoNewLine(i32* %0, i32 %1, i32 %2, i32 %3, i32 0, i32 %4, double %5)
%8 = tail call i32 @fputc(i32 10, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ indigoFree(int);
int indigoLoadQueryMolecule(int);
int indigoReadBuffer(char const *, int);
__attribute__((visibility("default"))) int
indigoLoadQueryMoleculeFromBuffer(const char *buf, int size) {
  int source = indigoReadBuffer(buf, size);
  int result;
  if (source <= 0)
    return -1;
  result = indigoLoadQueryMolecule(source);
  indigoFree(source);
  return result;
}


x86 assembly (clang, -O0):
<indigoLoadQueryMoleculeFromBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <indigoReadBuffer@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jg     1164 <indigoLoadQueryMoleculeFromBuffer+0x34>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <indigoLoadQueryMoleculeFromBuffer+0x4d>
mov    -0x18(%rbp),%edi
call   1040 <indigoLoadQueryMolecule@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%edi
call   1030 <indigoFree@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indigoLoadQueryMoleculeFromBuffer>:
push   %rbp
push   %rbx
push   %rax
call   1050 <indigoReadBuffer@plt>
test   %eax,%eax
jle    1152 <indigoLoadQueryMoleculeFromBuffer+0x22>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <indigoLoadQueryMolecule@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <indigoFree@plt>
mov    %ebp,%eax
jmp    1157 <indigoLoadQueryMoleculeFromBuffer+0x27>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @indigoLoadQueryMoleculeFromBuffer(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 @indigoReadBuffer(i8* %8, i32 %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp sle i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %20
14: ; preds = %2
%15 = load i32, i32* %6
%16 = call i32 @indigoLoadQueryMolecule(i32 %15)
store i32 %16, i32* %7
%17 = load i32, i32* %6
%18 = call i32 @indigoFree(i32 %17)
%19 = load i32, i32* %7
store i32 %19, i32* %3
br label %20
20: ; preds = %14, %13
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @indigoLoadQueryMoleculeFromBuffer(i8* %0, i32 %1) {
%3 = tail call i32 @indigoReadBuffer(i8* %0, i32 %1)
%4 = icmp slt i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @indigoLoadQueryMolecule(i32 %3)
%7 = tail call i32 @indigoFree(i32 %3)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %9
}
int main(int argc, char *argv[]) {
  printf("The number is %s\n", 67);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"The number is %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 67)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"The number is %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 67)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ printf(char *, void *, int);
void *the_freeing_function(void *arg) {
  int *ip = (int *)arg;
  printf("FREE: Hey hi freeing %p (%d)\n", arg, *ip);
  free(arg);
  return NULL;
}


x86 assembly (clang, -O0):
<the_freeing_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<the_freeing_function>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edx
lea    0xed3(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"FREE: Hey hi freeing %p (%d)\0A\00"
define i8* @the_freeing_function(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i8*, i8** %2
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %8)
%10 = load i8*, i8** %2
%11 = call i32 @free(i8* %10)
ret i8* null
}

LLVM IR (-O2):
@.str = [30 x i8] c"FREE: Hey hi freeing %p (%d)\0A\00"
define noalias i8* @the_freeing_function(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
%5 = tail call i32 @free(i8* %0)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ sum(int, int);
int main(void) {
  sum(1, 2);
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sum(i32 1, i32 2)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, long);
void *needHugeMem(long);
void *needHugeZeroedMem(long size) {
  void *v;
  v = needHugeMem(size);
  memset(v, 0, size);
  return v;
}


x86 assembly (clang, -O0):
<needHugeZeroedMem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <needHugeMem@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<needHugeZeroedMem>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <needHugeMem@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @needHugeZeroedMem(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @needHugeMem(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @memset(i8* %6, i32 0, i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @needHugeZeroedMem(i64 %0) {
%2 = tail call i8* @needHugeMem(i64 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
/* Variables and functions */
scalar_t__ EINTR;
int close(int);
scalar_t__ errno;
void Dpi_close_fd(int fd) {
  int st;
  do {
    if (fd < 0) {
      return;
    };
  } while (0);
  do
    st = close(fd);
  while (st < 0 && errno == EINTR);
}


x86 assembly (clang, -O0):
<Dpi_close_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    112a <Dpi_close_fd+0x1a>
jmp    1173 <Dpi_close_fd+0x63>
jmp    112f <Dpi_close_fd+0x1f>
jmp    1134 <Dpi_close_fd+0x24>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    1168 <Dpi_close_fd+0x58>
mov    0x2e8b(%rip),%rax
mov    (%rax),%rax
mov    0x2e79(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1134 <Dpi_close_fd+0x24>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dpi_close_fd>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
js     1143 <Dpi_close_fd+0x33>
mov    %edi,%ebx
mov    0x2ebe(%rip),%r14
mov    0x2eaf(%rip),%r15
nopl   0x0(%rax)
mov    %ebx,%edi
call   1030 <close@plt>
test   %eax,%eax
jns    1143 <Dpi_close_fd+0x33>
mov    (%r15),%rax
cmp    %rax,(%r14)
je     1130 <Dpi_close_fd+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define void @Dpi_close_fd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %1
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4
br label %22
8: ; preds = %4
br label %9
9: ; preds = %8
br label %10
10: ; preds = %20, %9
%11 = load i32, i32* %2
%12 = call i32 @close(i32 %11)
store i32 %12, i32* %3
br label %13
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i64, i64* @errno
%18 = load i64, i64* @EINTR
%19 = icmp eq i64 %17, %18
br label %20
20: ; preds = %16, %13
%21 = phi i1 [ false, %13 ], [ %19, %16 ]
br i1 %21, label %10, label %22
22: ; preds = %7, %20
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define void @Dpi_close_fd(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = tail call i32 @close(i32 %0)
%5 = icmp slt i32 %4, 0
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
%9 = select i1 %5, i1 %8, i1 false
br i1 %9, label %3, label %10
10: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void plat_midi_play_msg(uint8_t *msg) {}


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

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

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

LLVM IR (-O2):
define void @plat_midi_play_msg(i32* nocapture %0) {
ret void
}