xunge/DecIR huggingface dataset:
int Memory__proportion(int bytes, int total) {
  float B = (float)bytes, T = (float)total;
  float P = (1000 * B) / (1024 * T);
  return (int)P;
}


x86 assembly (clang, -O0):
<Memory__proportion>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xede(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  0xecd(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
cvttss2si -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Memory__proportion>:
movd   %esi,%xmm0
movd   %edi,%xmm1
punpckldq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm0
mulps  0xeea(%rip),%xmm0
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @Memory__proportion(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to float
store float %9, float* %5
%10 = load i32, i32* %4
%11 = sitofp i32 %10 to float
store float %11, float* %6
%12 = load float, float* %5
%13 = fmul float 1.000000e+03, %12
%14 = load float, float* %6
%15 = fmul float 1.024000e+03, %14
%16 = fdiv float %13, %15
store float %16, float* %7
%17 = load float, float* %7
%18 = fptosi float %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @Memory__proportion(i32 %0, i32 %1) {
%3 = insertelement <2 x i32> poison, i32 %0, i64 0
%4 = insertelement <2 x i32> %3, i32 %1, i64 1
%5 = sitofp <2 x i32> %4 to <2 x float>
%6 = fmul <2 x float> %5, <float 1.000000e+03, float 1.024000e+03>
%7 = extractelement <2 x float> %6, i64 0
%8 = extractelement <2 x float> %6, i64 1
%9 = fdiv float %7, %8
%10 = fptosi float %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ CP15DCacheCleanFlushBuff(unsigned int, unsigned int);
void CacheDataCleanInvalidateBuff(unsigned int startAddr,
                                  unsigned int numBytes) {
  CP15DCacheCleanFlushBuff(startAddr, numBytes);
}


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

x86 assembly (clang, -O2):
<CacheDataCleanInvalidateBuff>:
jmp    1030 <CP15DCacheCleanFlushBuff@plt>

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

LLVM IR (-O2):
define void @CacheDataCleanInvalidateBuff(i32 %0, i32 %1) {
%3 = tail call i32 @CP15DCacheCleanFlushBuff(i32 %0, i32 %1)
ret void
}
int PyMPELog_PackBytes(char bytebuf[], int *position, char tokentype, int count,
                       const void *data) {
  int ierr = 0;
  return ierr;
}


x86 assembly (clang, -O0):
<PyMPELog_PackBytes>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @PyMPELog_PackBytes(i8* nocapture readnone %0, i32* nocapture readnone %1, i8 signext %2, i32 %3, i8* nocapture readnone %4) {
ret i32 0
}
/* Type definitions */
struct entry {
  int dummy;
};

/* Variables and functions */
char *av_strdup(char *);
int pass_username_get(struct entry *ent, const char *param, char **resp) {
  *resp = av_strdup("");
  return 0;
}


x86 assembly (clang, -O0):
<pass_username_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed5(%rip),%rdi
call   1030 <av_strdup@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pass_username_get>:
push   %rbx
mov    %rdx,%rbx
lea    0xee5(%rip),%rdi
call   1030 <av_strdup@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.entry = type { i32 }
@.str = [1 x i8] zeroinitializer
define i32 @pass_username_get(%struct.entry* %0, i8* %1, i8** %2) {
%4 = alloca %struct.entry*
%5 = alloca i8*
%6 = alloca i8**
store %struct.entry* %0, %struct.entry** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%7 = call i8* @av_strdup(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%8 = load i8**, i8*** %6
store i8* %7, i8** %8
ret i32 0
}

LLVM IR (-O2):
%struct.entry = type { i32 }
@.str = [1 x i8] zeroinitializer
define i32 @pass_username_get(%struct.entry* nocapture readnone %0, i8* nocapture readnone %1, i8** nocapture writeonly %2) {
%4 = tail call i8* @av_strdup(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ limpiar_token();
void inic_com() { limpiar_token(); }


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

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

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

LLVM IR (-O2):
define void @inic_com() {
%1 = tail call i32 (...) @limpiar_token()
ret void
}
/* Variables and functions */
unsigned int size_24section(unsigned char *section) {
  if (section == NULL)
    return 0;
  return (section[0] << 16) + (section[1] << 8) + section[2];
}


x86 assembly (clang, -O0):
<size_24section>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <size_24section+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1143 <size_24section+0x43>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
shl    $0x10,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_24section>:
test   %rdi,%rdi
je     111b <size_24section+0x1b>
movzbl (%rdi),%eax
shl    $0x10,%eax
movzbl 0x1(%rdi),%ecx
shl    $0x8,%ecx
or     %eax,%ecx
movzbl 0x2(%rdi),%eax
or     %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @size_24section(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = zext i8 %4 to i32
%6 = shl nuw nsw i32 %5, 16
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl nuw nsw i32 %9, 8
%11 = or i32 %10, %6
%12 = getelementptr inbounds i8, i8* %0, i64 2
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = or i32 %11, %14
br label %16
16: ; preds = %1, %3
%17 = phi i32 [ %15, %3 ], [ 0, %1 ]
ret i32 %17
}
void dyna_jump() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ __builtin_popcount(unsigned int);
uint32_t chpl_bitops_popcount_32(unsigned int x) {
  return __builtin_popcount(x);
}


x86 assembly (clang, -O0):
<chpl_bitops_popcount_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chpl_bitops_popcount_32>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
ret

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

LLVM IR (-O2):
define i32 @chpl_bitops_popcount_32(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compare_core_file_names(const void *a, const void *b) {
  const char *ca = *((const char **)a);
  const char *cb = *((const char **)b);
  return strcmp(cb, ca);
}


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

x86 assembly (clang, -O2):
<compare_core_file_names>:
mov    (%rdi),%rax
mov    (%rsi),%rdi
mov    %rax,%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @compare_core_file_names(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
%9 = load i8*, i8** %8
store i8* %9, i8** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
store i8* %12, i8** %6
%13 = load i8*, i8** %6
%14 = load i8*, i8** %5
%15 = call i32 @strcmp(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @compare_core_file_names(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(1) %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ put8(unsigned char);
void jge_rj(unsigned char saut) {
  put8(0x7D);
  put8(saut);
}


x86 assembly (clang, -O0):
<jge_rj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x7d,%edi
call   1030 <put8@plt>
movzbl -0x1(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jge_rj>:
push   %rbx
mov    %edi,%ebx
mov    $0x7d,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @jge_rj(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @put8(i8 zeroext 125)
%4 = load i8, i8* %2
%5 = call i32 @put8(i8 zeroext %4)
ret void
}

LLVM IR (-O2):
define void @jge_rj(i8 zeroext %0) {
%2 = tail call i32 @put8(i8 zeroext 125)
%3 = tail call i32 @put8(i8 zeroext %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void om_text_print_subtitle(FILE *fp, char *subtitle) {
  fprintf(fp, "--- %s\n", subtitle);
}


x86 assembly (clang, -O0):
<om_text_print_subtitle>:
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):
<om_text_print_subtitle>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"--- %s\0A\00"
define void @om_text_print_subtitle(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 ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"--- %s\0A\00"
define void @om_text_print_subtitle(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printD() { printf("\n\n\n\n\n\n\n\n\n\t\t\t\tUP"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\09\09\09\09UP\00"
define void @printD() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\09\09\09\09UP\00"
define void @printD() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fastio_write(int, double *, int);
int fastio_write_double(int fd, double val) {
  return fastio_write(fd, &val, sizeof(double));
}


x86 assembly (clang, -O0):
<fastio_write_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <fastio_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastio_write_double>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <fastio_write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fastio_write_double(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%5 = load i32, i32* %3
%6 = call i32 @fastio_write(i32 %5, double* %4, i32 8)
ret i32 %6
}

LLVM IR (-O2):
define i32 @fastio_write_double(i32 %0, double %1) {
%3 = alloca double
store double %1, double* %3
%4 = call i32 @fastio_write(i32 %0, double* %3, i32 8)
ret i32 %4
}
/* Variables and functions */
int f(char *);
int main() {
  char b[12];
  b[0] = 1;
  b[1] = 2;
  b[2] = 3;
  b[3] = 4;
  b[4] = 0;
  b[5] = 0;
  b[6] = 0;
  b[7] = 0;
  b[8] = 0;
  b[9] = 0;
  b[10] = 0;
  b[11] = 0;
  return f(b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x1,-0x10(%rbp)
movb   $0x2,-0xf(%rbp)
movb   $0x3,-0xe(%rbp)
movb   $0x4,-0xd(%rbp)
movb   $0x0,-0xc(%rbp)
movb   $0x0,-0xb(%rbp)
movb   $0x0,-0xa(%rbp)
movb   $0x0,-0x9(%rbp)
movb   $0x0,-0x8(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0x0,-0x6(%rbp)
movb   $0x0,-0x5(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x4030201,0xc(%rsp)
04
movq   $0x0,0x10(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <f@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
store i8 1, i8* %3
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 1
store i8 2, i8* %4
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 2
store i8 3, i8* %5
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 3
store i8 4, i8* %6
%7 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 4
store i8 0, i8* %7
%8 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 5
store i8 0, i8* %8
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 6
store i8 0, i8* %9
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 7
store i8 0, i8* %10
%11 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 8
store i8 0, i8* %11
%12 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 9
store i8 0, i8* %12
%13 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 10
store i8 0, i8* %13
%14 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 11
store i8 0, i8* %14
%15 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%16 = call i32 @f(i8* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
store i8 1, i8* %2
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 1
store i8 2, i8* %3
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 2
store i8 3, i8* %4
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 3
store i8 4, i8* %5
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 4
%7 = bitcast i8* %6 to i64*
store i64 0, i64* %7
%8 = call i32 @f(i8* %2)
ret i32 %8
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rot32r15(uint32_t x) { return (x >> 15) | (x << 17); }


x86 assembly (clang, -O0):
<rot32r15>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xf,%eax
mov    -0x4(%rbp),%ecx
shl    $0x11,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot32r15>:
mov    %edi,%eax
sar    $0xf,%eax
shl    $0x11,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot32r15(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 15
%5 = load i32, i32* %2
%6 = shl i32 %5, 17
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot32r15(i32 %0) {
%2 = ashr i32 %0, 15
%3 = shl i32 %0, 17
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int foo();
int main(void) {
  bar();
  return foo() - 2;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1040 <foo@plt>
add    $0xfffffffe,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bar()
%2 = tail call i32 (...) @foo()
%3 = add nsw i32 %2, -2
ret i32 %3
}
int slib_procexec(int lib_id, int index) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @slib_procexec(i32 %0, i32 %1) {
ret i32 0
}
int my_strlen(char *palabra) {
  unsigned int indice;
  for (indice = 0; *(palabra + indice) != '\0'; indice++) {
  }
  indice++;
  return indice;
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1136 <my_strlen+0x36>
jmp    1128 <my_strlen+0x28>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <my_strlen+0xf>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
add    $0x1,%eax
cmpb   $0x0,(%rdi,%rcx,1)
jne    1110 <my_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xe1() {
  Assert_real((isprint(225) == 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_isprint.c",
              1130, ("isprint should be 0 for 0xe1"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xe1>:
push   %rax
mov    $0xe1,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x46a,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xe1\00"
define void @t_isprint_0xe1() {
%1 = call i64 @isprint(i32 225)
%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 1130, i8* getelementptr inbounds ([29 x i8], [29 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xe1\00"
define void @t_isprint_0xe1() {
%1 = tail call i64 @isprint(i32 225)
%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 1130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void freeMatrix(int **matrix, int sizeofmatrix) {
  int i;
  for (i = 0; i < sizeofmatrix; ++i) {
    free(matrix[i]);
  }
  free(matrix);
  return;
}


x86 assembly (clang, -O0):
<freeMatrix>:
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    1151 <freeMatrix+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <freeMatrix+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeMatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <freeMatrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeMatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freeMatrix(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 = bitcast i32* %15 to i8*
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 = load i32**, i32*** %3
%22 = bitcast i32** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @freeMatrix(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(double, double, double);
int main(void) { test(1.0, 2.0, 3.0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movsd  0xee4(%rip),%xmm0
movsd  0xee4(%rip),%xmm1
movsd  0xee4(%rip),%xmm2
call   1030 <test@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
movsd  0xee7(%rip),%xmm1
movsd  0xee7(%rip),%xmm2
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @test(double 1.000000e+00, double 2.000000e+00, double 3.000000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(double 1.000000e+00, double 2.000000e+00, double 3.000000e+00)
ret i32 0
}
void clear_line(char *line) {
  int i = 0;
  for (i = 0; i < 1000; i++) {
    *line++ = 0;
  }
}


x86 assembly (clang, -O0):
<clear_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    1143 <clear_line+0x43>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <clear_line+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_line>:
push   %rax
mov    $0x3e8,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @clear_line(i8* nocapture writeonly %0) {
ret void
}
char *strcpy(char *dest, const char *src) {
  int i = 0;
  while (src[i] != '\0') {
    dest[i] = src[i];
    i++;
  }
  dest[i] = '\0';
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114c <strcpy+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strcpy+0x13>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1127 <strcpy+0x27>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax,%rdx,1)
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <strcpy+0x10>
mov    %edx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret
xor    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = and i64 %9, 4294967295
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 0, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 0, i8* %17
ret i8* %0
}
/* Variables and functions */
int any_decrqss(char const *, char *);
int rpt_DECLFKC(const char *the_title) { return any_decrqss(the_title, "*}"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"*}\00"
define i32 @rpt_DECLFKC(i8* %0) {
%2 = tail call i32 @any_decrqss(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ CompileCondition();
int /*<<< orphan*/ ResetIf();
int /*<<< orphan*/ WriteInstruction(char *);
void CR_Deadly(void) {
  WriteInstruction("ld b,DEADLY");
  WriteInstruction("call tded");
  WriteInstruction("cp b");
  WriteInstruction("jp nz,      ");
  CompileCondition();
  ResetIf();
}


x86 assembly (clang, -O0):
<CR_Deadly>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <WriteInstruction@plt>
lea    0xec5(%rip),%rdi
call   1040 <WriteInstruction@plt>
lea    0xec3(%rip),%rdi
call   1040 <WriteInstruction@plt>
lea    0xebc(%rip),%rdi
call   1040 <WriteInstruction@plt>
mov    $0x0,%al
call   1050 <CompileCondition@plt>
mov    $0x0,%al
call   1030 <ResetIf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CR_Deadly>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <WriteInstruction@plt>
lea    0xec8(%rip),%rdi
call   1040 <WriteInstruction@plt>
lea    0xec6(%rip),%rdi
call   1040 <WriteInstruction@plt>
lea    0xebf(%rip),%rdi
call   1040 <WriteInstruction@plt>
xor    %eax,%eax
call   1050 <CompileCondition@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ResetIf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"ld b,DEADLY\00"
@.str.1 = [10 x i8] c"call tded\00"
@.str.2 = [5 x i8] c"cp b\00"
@.str.3 = [13 x i8] c"jp nz, \00"
define void @CR_Deadly() {
%1 = call i32 @WriteInstruction(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @WriteInstruction(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @WriteInstruction(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @WriteInstruction(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (...) @CompileCondition()
%6 = call i32 (...) @ResetIf()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"ld b,DEADLY\00"
@.str.1 = [10 x i8] c"call tded\00"
@.str.2 = [5 x i8] c"cp b\00"
@.str.3 = [13 x i8] c"jp nz, \00"
define void @CR_Deadly() {
%1 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 (...) @CompileCondition()
%6 = tail call i32 (...) @ResetIf()
ret void
}
short dns_cache_events(struct dns_cache *cache) {
  (void)cache;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.dns_cache = type opaque
define signext i16 @dns_cache_events(%struct.dns_cache* %0) {
%2 = alloca %struct.dns_cache*
store %struct.dns_cache* %0, %struct.dns_cache** %2
%3 = load %struct.dns_cache*, %struct.dns_cache** %2
ret i16 0
}

LLVM IR (-O2):
%struct.dns_cache = type opaque
define signext i16 @dns_cache_events(%struct.dns_cache* nocapture readnone %0) {
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int usage() {
  printf("%s", "awesomereplace"
               " v"
               "1.1"
               "\n"
               "Read data from STDIN replace [search] with [replace] and print "
               "it to STDOUT\n"
               "\n"
               "Usage:\n"
               "\t"
               "awesomereplace"
               " [search] [replace]\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [140 x i8] c"awesomereplace v1.1\0ARead data from STDIN replace [search] with [replace] and print it to STDOUT\0A\0AUsage:\0A\09awesomereplace [search] [replace]\0A\00"
define i32 @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [140 x i8] c"awesomereplace v1.1\0ARead data from STDIN replace [search] with [replace] and print it to STDOUT\0A\0AUsage:\0A\09awesomereplace [search] [replace]\0A\00"
define i32 @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int gethostname(char *, unsigned int);
int g_gethostname(char *name, unsigned int len) {
  return gethostname(name, len);
}


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

x86 assembly (clang, -O2):
<g_gethostname>:
jmp    1030 <gethostname@plt>

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

LLVM IR (-O2):
define i32 @g_gethostname(i8* %0, i32 %1) {
%3 = tail call i32 @gethostname(i8* %0, i32 %1)
ret i32 %3
}
void ASN1_tag2bit(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_tag2bit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ putstr(char *);
void run(void) {
  putstr("Hello, I am the CRIS\n");
  exit(0);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <putstr@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<run>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <putstr@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Hello, I am the CRIS\0A\00"
define void @run() {
%1 = call i32 @putstr(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [22 x i8] c"Hello, I am the CRIS\0A\00"
define void @run() {
%1 = tail call i32 @putstr(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ is_alpha(unsigned int);
int /*<<< orphan*/ is_digit(unsigned int);
scalar_t__ is_graph(unsigned int);
bool is_punct(unsigned int ch) {
  return (is_graph(ch) && !is_alpha(ch) && !is_digit(ch));
}


x86 assembly (clang, -O0):
<is_punct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <is_graph@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1180 <is_punct+0x50>
mov    -0x4(%rbp),%edi
call   1050 <is_alpha@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    1180 <is_punct+0x50>
mov    -0x4(%rbp),%edi
call   1030 <is_digit@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_punct>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <is_graph@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     115a <is_punct+0x2a>
mov    %ebp,%edi
call   1050 <is_alpha@plt>
test   %eax,%eax
jne    115a <is_punct+0x2a>
mov    %ebp,%edi
call   1030 <is_digit@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_punct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @is_graph(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @is_alpha(i32 %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @is_digit(i32 %11)
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
br label %15
15: ; preds = %10, %6, %1
%16 = phi i1 [ false, %6 ], [ false, %1 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @is_punct(i32 %0) {
%2 = tail call i64 @is_graph(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i32 @is_alpha(i32 %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i32 @is_digit(i32 %0)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
void strip(char *name) {
  int i;
  for (i = 0; name[i] != '\0'; i++) {
    if (name[i] != '.')
      continue;
    name[i] = '\0';
    break;
  }
}


x86 assembly (clang, -O0):
<strip>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115d <strip+0x5d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
je     113e <strip+0x3e>
jmp    114f <strip+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    115d <strip+0x5d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strip+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1129 <strip+0x29>
cmp    $0x2e,%cl
je     1123 <strip+0x23>
add    $0x1,%rax
jmp    1110 <strip+0x10>
mov    %eax,%eax
movb   $0x0,(%rdi,%rax,1)
ret

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

LLVM IR (-O2):
define void @strip(i8* nocapture %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i64 [ %10, %9 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %9 [
i8 0, label %11
i8 46, label %6
]
6: ; preds = %2
%7 = and i64 %3, 4294967295
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 0, i8* %8
br label %11
9: ; preds = %2
%10 = add nuw i64 %3, 1
br label %2
11: ; preds = %2, %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
char *asctime(struct tm *);
struct tm *gmtime(int /*<<< orphan*/ *);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *TimeNow() {
  struct tm *local;
  time_t t;
  t = time(NULL);
  local = localtime(&t);
  local = gmtime(&t);
  return asctime(local);
}


x86 assembly (clang, -O0):
<TimeNow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1060 <gmtime@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <asctime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimeNow>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <localtime@plt>
mov    %rbx,%rdi
call   1060 <gmtime@plt>
mov    %rax,%rdi
call   1040 <asctime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i8* @TimeNow() {
%1 = alloca %struct.tm*
%2 = alloca i32
%3 = call i32 @time(i32* null)
store i32 %3, i32* %2
%4 = call %struct.tm* @localtime(i32* %2)
store %struct.tm* %4, %struct.tm** %1
%5 = call %struct.tm* @gmtime(i32* %2)
store %struct.tm* %5, %struct.tm** %1
%6 = load %struct.tm*, %struct.tm** %1
%7 = call i8* @asctime(%struct.tm* %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @TimeNow() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
%5 = call %struct.tm* @gmtime(i32* %1)
%6 = call i8* @asctime(%struct.tm* %5)
ret i8* %6
}
/* Variables and functions */
char *strdup(char const *);
char tolower(char);
char *to_low(const char *s) {
  char *r = strdup(s);
  for (size_t i = 0;; ++i) {
    char c = r[i];
    if (c == 0)
      break;
    r[i] = tolower(c);
  }
  return r;
}


x86 assembly (clang, -O0):
<to_low>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x0,%eax
jne    1161 <to_low+0x41>
jmp    1188 <to_low+0x68>
movsbl -0x19(%rbp),%edi
call   1030 <tolower@plt>
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1141 <to_low+0x21>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_low>:
push   %r14
push   %rbx
push   %rax
call   1040 <strdup@plt>
mov    %rax,%r14
mov    (%rax),%al
test   %al,%al
je     1156 <to_low+0x36>
mov    %r14,%rbx
add    $0x1,%rbx
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <to_low+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @to_low(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %12, %5 ], [ %3, %1 ]
%7 = phi i8* [ %11, %5 ], [ %2, %1 ]
%8 = phi i64 [ %10, %5 ], [ 0, %1 ]
%9 = tail call signext i8 @tolower(i8 signext %6)
store i8 %9, i8* %7
%10 = add i64 %8, 1
%11 = getelementptr inbounds i8, i8* %2, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %1
ret i8* %2
}
int f(__builtin_va_list vl) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i32 @f(%struct.__va_list_tag* nocapture readnone %0) {
ret i32 0
}