xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Location: /index.html\r\n\r\n");
  exit(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    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [26 x i8] c"Location: /index.html\0D\0A\0D\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 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [25 x i8] c"Location: /index.html\0D\0A\0D\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/dict.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/dict.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/dict.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
int strlen(char const *);
int hash_mime(const char *str) {
  int len = strlen(str);
  if (len)
    return ((str[0] & 15) + (str[1] & 67) + len) % 11;
  else
    return 0;
}


x86 assembly (clang, -O0):
<hash_mime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     115c <hash_mime+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
and    $0xf,%eax
mov    -0x10(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
and    $0x43,%ecx
add    %ecx,%eax
add    -0x14(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
jmp    1163 <hash_mime+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_mime>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
je     114e <hash_mime+0x3e>
movzbl (%rbx),%ecx
and    $0xf,%ecx
movzbl 0x1(%rbx),%edx
and    $0x43,%edx
add    %ecx,%edx
add    %edx,%eax
cltq
imul   $0x2e8ba2e9,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,2),%ecx
sub    %ecx,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @hash_mime(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = load i8, i8* %0
%6 = and i8 %5, 15
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = and i8 %8, 67
%10 = add nuw nsw i8 %9, %6
%11 = zext i8 %10 to i32
%12 = add nsw i32 %2, %11
%13 = srem i32 %12, 11
br label %14
14: ; preds = %1, %4
%15 = phi i32 [ %13, %4 ], [ 0, %1 ]
ret i32 %15
}
int gz_init(struct coredump_params *cprm) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.coredump_params = type opaque
define i32 @gz_init(%struct.coredump_params* nocapture readnone %0) {
ret i32 1
}
void mg_ev_mgr_free(struct mg_mgr *mgr) { (void)mgr; }


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

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

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

LLVM IR (-O2):
%struct.mg_mgr = type opaque
define void @mg_ev_mgr_free(%struct.mg_mgr* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void error(const char *s) {
  fprintf(stderr, "Fatal: %s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Fatal: %s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Fatal: %s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
char *strrchr(const char *s, int c) {
  const char *found = ((void *)0);
  while (*s) {
    if (*s == (char)c)
      found = s;
    s++;
  }
  return (char *)found;
}


x86 assembly (clang, -O0):
<strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <strrchr+0x4e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0xc(%rbp),%ecx
movsbl %cl,%ecx
cmp    %ecx,%eax
jne    113d <strrchr+0x3d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <strrchr+0x13>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrchr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <strrchr+0x26>
movsbl %sil,%edx
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
cmp    %ecx,%edx
cmove  %rdi,%rax
movzbl 0x1(%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <strrchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2
%6 = shl i32 %1, 24
%7 = ashr exact i32 %6, 24
br label %8
8: ; preds = %5, %8
%9 = phi i8 [ %3, %5 ], [ %16, %8 ]
%10 = phi i8* [ null, %5 ], [ %14, %8 ]
%11 = phi i8* [ %0, %5 ], [ %15, %8 ]
%12 = sext i8 %9 to i32
%13 = icmp eq i32 %7, %12
%14 = select i1 %13, i8* %11, i8* %10
%15 = getelementptr inbounds i8, i8* %11, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %8
18: ; preds = %8, %2
%19 = phi i8* [ null, %2 ], [ %14, %8 ]
ret i8* %19
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
double floor(double);
int /*<<< orphan*/ isfinite(double);
double az_mod2pi(double theta) {
  assert(isfinite(theta));
  return theta - 6.2831853071795862 *
                     floor((theta + 3.1415926535897931) / 6.2831853071795862);
}


x86 assembly (clang, -O0):
<az_mod2pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <isfinite@plt>
mov    %eax,%edi
call   1030 <assert@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeb0(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xe9b(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <floor@plt>
movsd  -0x10(%rbp),%xmm1
movsd  0xe7d(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<az_mod2pi>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <isfinite@plt>
mov    %eax,%edi
call   1030 <assert@plt>
movsd  0xeb6(%rip),%xmm0
addsd  (%rsp),%xmm0
divsd  0xeb1(%rip),%xmm0
call   1050 <floor@plt>
mulsd  0xeac(%rip),%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @az_mod2pi(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @isfinite(double %3)
%5 = call i32 @assert(i32 %4)
%6 = load double, double* %2
%7 = load double, double* %2
%8 = fadd double %7, 0x400921FB54442D18
%9 = fdiv double %8, 0x401921FB54442D18
%10 = call double @llvm.floor.f64(double %9)
%11 = call double @llvm.fmuladd.f64(double 0xC01921FB54442D18, double %10, double %6)
ret double %11
}

LLVM IR (-O2):
define double @az_mod2pi(double %0) {
%2 = tail call i32 @isfinite(double %0)
%3 = tail call i32 @assert(i32 %2)
%4 = fadd double %0, 0x400921FB54442D18
%5 = fdiv double %4, 0x401921FB54442D18
%6 = tail call double @llvm.floor.f64(double %5)
%7 = tail call double @llvm.fmuladd.f64(double %6, double 0xC01921FB54442D18, double %0)
ret double %7
}
/* Type definitions */
struct can_filter {
  int can_id;
  int can_mask;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void printfilter(const void *data) {
  struct can_filter *filter = (struct can_filter *)data;
  printf("-f %03X:%X ", filter->can_id, filter->can_mask);
}


x86 assembly (clang, -O0):
<printfilter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printfilter>:
mov    (%rdi),%esi
mov    0x4(%rdi),%edx
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.can_filter = type { i32, i32 }
@.str = [12 x i8] c"-f %03X:%X \00"
define void @printfilter(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.can_filter*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.can_filter*
store %struct.can_filter* %5, %struct.can_filter** %3
%6 = load %struct.can_filter*, %struct.can_filter** %3
%7 = getelementptr inbounds %struct.can_filter, %struct.can_filter* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = load %struct.can_filter*, %struct.can_filter** %3
%10 = getelementptr inbounds %struct.can_filter, %struct.can_filter* %9, i32 0, i32 1
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"-f %03X:%X \00"
define void @printfilter(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = getelementptr inbounds i8, i8* %0, i64 4
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6)
ret void
}
float vec3_squaredLength(float *a) {
  float x = a[0];
  float y = a[1];
  float z = a[2];
  return x * x + y * y + z * z;
}


x86 assembly (clang, -O0):
<vec3_squaredLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_squaredLength>:
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm2
movss  0x8(%rdi),%xmm0
mulss  %xmm2,%xmm2
mulss  %xmm1,%xmm1
addss  %xmm2,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @vec3_squaredLength(float* %0) {
%2 = alloca float*
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float* %0, float** %2
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
store float %8, float* %3
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
store float %11, float* %4
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 2
%14 = load float, float* %13
store float %14, float* %5
%15 = load float, float* %3
%16 = load float, float* %3
%17 = load float, float* %4
%18 = load float, float* %4
%19 = fmul float %17, %18
%20 = call float @llvm.fmuladd.f32(float %15, float %16, float %19)
%21 = load float, float* %5
%22 = load float, float* %5
%23 = call float @llvm.fmuladd.f32(float %21, float %22, float %20)
ret float %23
}

LLVM IR (-O2):
define float @vec3_squaredLength(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = getelementptr inbounds float, float* %0, i64 2
%6 = load float, float* %5
%7 = fmul float %4, %4
%8 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %7)
%9 = tail call float @llvm.fmuladd.f32(float %6, float %6, float %8)
ret float %9
}
void ff_hevc_put_hevc_uni_epel_hv16_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv16_10_avx2() {
ret void
}
int from_hex(char ch) { return ch - ((ch >= 'A') ? 10 + 'A' : '0'); }


x86 assembly (clang, -O0):
<from_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x1(%rbp),%esi
mov    $0x30,%ecx
mov    $0x4b,%edx
cmp    $0x41,%esi
cmovge %edx,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<from_hex>:
lea    -0x30(%rdi),%ecx
lea    -0x4b(%rdi),%eax
cmp    $0x41,%dil
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @from_hex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 65
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 75, i32 48
%10 = sub nsw i32 %4, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @from_hex(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = icmp sgt i8 %0, 64
%4 = select i1 %3, i32 -75, i32 -48
%5 = add nsw i32 %4, %2
ret i32 %5
}
isrepair(card) register short card;
{ return card == 10 || card == 11 || card == 12 || card == -1; }


x86 assembly (clang, -O0):
<isrepair>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x3(%rbp)
je     114e <isrepair+0x4e>
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0x3(%rbp)
je     114e <isrepair+0x4e>
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0xc,%ecx
mov    %al,-0x3(%rbp)
je     114e <isrepair+0x4e>
movswl -0x2(%rbp),%eax
cmp    $0xffffffff,%eax
sete   %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isrepair>:
mov    %edi,%eax
shl    $0x10,%eax
and    $0xfffe,%edi
cmp    $0xa,%edi
sete   %cl
cmp    $0xc0000,%eax
sete   %dl
or     %cl,%dl
cmp    $0xffff0000,%eax
sete   %al
or     %dl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @isrepair(i32 %0) {
%2 = shl i32 %0, 16
%3 = and i32 %0, 65534
%4 = icmp eq i32 %3, 10
%5 = icmp eq i32 %2, 786432
%6 = or i1 %4, %5
%7 = icmp eq i32 %2, -65536
%8 = or i1 %7, %6
%9 = zext i1 %8 to i32
ret i32 %9
}
int ft_contains_char(const char *s, char c) {
  while (*s) {
    if (*s == c)
      return (1);
    s++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_contains_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <ft_contains_char+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    113a <ft_contains_char+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1152 <ft_contains_char+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110e <ft_contains_char+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_contains_char>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <ft_contains_char+0x20>
add    $0x1,%rdi
nopl   0x0(%rax)
cmp    %sil,%cl
je     1121 <ft_contains_char+0x21>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_contains_char+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_contains_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = load i8, i8* %12
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %2, %5
%9 = phi i8 [ %6, %5 ], [ %3, %2 ]
%10 = phi i8* [ %12, %5 ], [ %0, %2 ]
%11 = icmp eq i8 %9, %1
%12 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %2
%14 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ StrnCpy(char *, char *, int);
int strlen(char *);
char *remove_carriage_return(char *str_noret, char *str) {
  int n;
  char *d = str_noret;
  n = strlen(str);
  n = n - 1;
  StrnCpy(d, str, n);
  return (str_noret);
}


x86 assembly (clang, -O0):
<remove_carriage_return>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <StrnCpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_carriage_return>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    -0x1(%rax),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <StrnCpy@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @remove_carriage_return(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %6
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = sub nsw i32 %10, 1
store i32 %11, i32* %5
%12 = load i8*, i8** %6
%13 = load i8*, i8** %4
%14 = load i32, i32* %5
%15 = call i32 @StrnCpy(i8* %12, i8* %13, i32 %14)
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @remove_carriage_return(i8* returned %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = add nsw i32 %3, -1
%5 = tail call i32 @StrnCpy(i8* %0, i8* %1, i32 %4)
ret i8* %0
}
char *strcpy(char *restrict s1, const char *restrict s2) {
  char *tmp = s1;
  while ((*s1++ == *s2++) != '\0')
    ;
  return tmp;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     1150 <strcpy+0x50>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* noalias returned %0, i8* noalias nocapture %1) {
ret i8* %0
}
/* Variables and functions */
int write(int, char *, int);
int qSocketWrite(char *binary, int size, int sockfd) {
  return write(sockfd, binary, size);
}


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

x86 assembly (clang, -O2):
<qSocketWrite>:
mov    %edx,%eax
mov    %esi,%edx
mov    %rdi,%rsi
mov    %eax,%edi
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @qSocketWrite(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @write(i32 %2, i8* %0, i32 %1)
ret i32 %4
}
int davinci_mux_register(const struct mux_config *pins, unsigned long size) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.mux_config = type opaque
define i32 @davinci_mux_register(%struct.mux_config* %0, i64 %1) {
%3 = alloca %struct.mux_config*
%4 = alloca i64
store %struct.mux_config* %0, %struct.mux_config** %3
store i64 %1, i64* %4
ret i32 0
}

LLVM IR (-O2):
%struct.mux_config = type opaque
define i32 @davinci_mux_register(%struct.mux_config* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char *);
char *my_strcpy_end(char *dst, char const *src) {
  strcpy(dst, src);
  return dst + strlen(dst);
}


x86 assembly (clang, -O0):
<my_strcpy_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcpy_end>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @my_strcpy_end(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcpy(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @strlen(i8* %9)
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
ret i8* %12
}

LLVM IR (-O2):
define i8* @my_strcpy_end(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* %1)
%4 = tail call i32 @strlen(i8* %0)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
ret i8* %6
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int64_t now_ms() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return ((int64_t)tv.tv_sec) * 1000 + ((int64_t)tv.tv_usec) / 1000;
}


x86 assembly (clang, -O0):
<now_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now_ms>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x10(%rsp),%ecx
movslq 0x8(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i32 @now_ms() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = sdiv i32 %9, 1000
%11 = add nsw i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i32 @now_ms() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = sdiv i32 %10, 1000
%12 = add nsw i32 %11, %7
ret i32 %12
}
void genbgezal_out() {}


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

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

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

LLVM IR (-O2):
define void @genbgezal_out() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ charAt(char *, int);
int /*<<< orphan*/ test(int /*<<< orphan*/, char);
int /*<<< orphan*/ testError(int /*<<< orphan*/);
void testIthChar(void) {
  test(charAt("abcde", 0), 'a');
  test(charAt("abcde", 4), 'e');
  test(charAt("abcde", 5), '\0');
  testError(charAt("abcde", 6));
}


x86 assembly (clang, -O0):
<testIthChar>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
xor    %esi,%esi
call   1030 <charAt@plt>
mov    %eax,%edi
mov    $0x61,%esi
call   1050 <test@plt>
lea    0xeab(%rip),%rdi
mov    $0x4,%esi
call   1030 <charAt@plt>
mov    %eax,%edi
mov    $0x65,%esi
call   1050 <test@plt>
lea    0xe8e(%rip),%rdi
mov    $0x5,%esi
call   1030 <charAt@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1050 <test@plt>
lea    0xe74(%rip),%rdi
mov    $0x6,%esi
call   1030 <charAt@plt>
mov    %eax,%edi
call   1040 <testError@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testIthChar>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <charAt@plt>
mov    %eax,%edi
mov    $0x61,%esi
call   1050 <test@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <charAt@plt>
mov    %eax,%edi
mov    $0x65,%esi
call   1050 <test@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <charAt@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1050 <test@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <charAt@plt>
mov    %eax,%edi
pop    %rbx
jmp    1040 <testError@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"abcde\00"
define void @testIthChar() {
%1 = call i32 @charAt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = call i32 @test(i32 %1, i8 signext 97)
%3 = call i32 @charAt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = call i32 @test(i32 %3, i8 signext 101)
%5 = call i32 @charAt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = call i32 @test(i32 %5, i8 signext 0)
%7 = call i32 @charAt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 6)
%8 = call i32 @testError(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"abcde\00"
define void @testIthChar() {
%1 = tail call i32 @charAt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @test(i32 %1, i8 signext 97)
%3 = tail call i32 @charAt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = tail call i32 @test(i32 %3, i8 signext 101)
%5 = tail call i32 @charAt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = tail call i32 @test(i32 %5, i8 signext 0)
%7 = tail call i32 @charAt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 6)
%8 = tail call i32 @testError(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int d(int x) {
  switch (x) {
  case 2:
    printf("%s\n", "fiftyfifty");
    break;
  case 3:
    printf("%s\n", "splitthreeways");
    break;
  case 4:
    break;
  }
}


x86 assembly (clang, -O0):
<d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2,%eax
je     1151 <d+0x41>
jmp    112f <d+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
je     1169 <d+0x59>
jmp    1140 <d+0x30>
mov    -0xc(%rbp),%eax
sub    $0x4,%eax
je     1181 <d+0x71>
jmp    1186 <d+0x76>
lea    0xea8(%rip),%rdi
lea    0xea5(%rip),%rsi
call   1030 <printf@plt>
jmp    1186 <d+0x76>
lea    0xe90(%rip),%rdi
lea    0xe98(%rip),%rsi
call   1030 <printf@plt>
jmp    1186 <d+0x76>
jmp    1186 <d+0x76>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d>:
cmp    $0x2,%edi
je     1123 <d+0x13>
cmp    $0x3,%edi
jne    113b <d+0x2b>
lea    0xeee(%rip),%rsi
jmp    112a <d+0x1a>
lea    0xeda(%rip),%rsi
push   %rax
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [11 x i8] c"fiftyfifty\00"
@.str.2 = [15 x i8] c"splitthreeways\00"
define i32 @d(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %10 [
i32 2, label %5
i32 3, label %7
i32 4, label %9
]
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %10
9: ; preds = %1
br label %10
10: ; preds = %1, %9, %7, %5
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [11 x i8] c"fiftyfifty\00"
@.str.2 = [15 x i8] c"splitthreeways\00"
define i32 @d(i32 %0) {
switch i32 %0, label %6 [
i32 2, label %3
i32 3, label %2
]
2: ; preds = %1
br label %3
3: ; preds = %1, %2
%4 = phi i8* [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %2 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), %1 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %6
6: ; preds = %3, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void main() {
  int i;
  for (i = 0; i < 256; i++) {
    fprintf(stdout, "%c", i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1152 <main+0x42>
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %ebx,%ebx
mov    0x2ec2(%rip),%r15
lea    0xedb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15),%edi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1130 <main+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"%c\00"
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 256
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = load i32, i32* @stdout
%7 = load i32, i32* %1
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"%c\00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 256
br i1 %6, label %7, label %1
7: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void bar(int x) {
  if (x != 0)
    abort();
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112c <bar+0x1c>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
test   %edi,%edi
jne    1115 <bar+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @bar(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}
/* Variables and functions */
scalar_t__ sign_and_verify(int);
int dsa_small_digest_test(void) {
  return sign_and_verify(16) && sign_and_verify(1);
}


x86 assembly (clang, -O0):
<dsa_small_digest_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x10,%edi
call   1030 <sign_and_verify@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     1148 <dsa_small_digest_test+0x38>
mov    $0x1,%edi
call   1030 <sign_and_verify@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dsa_small_digest_test>:
push   %rax
mov    $0x10,%edi
call   1030 <sign_and_verify@plt>
test   %rax,%rax
je     1137 <dsa_small_digest_test+0x27>
mov    $0x1,%edi
call   1030 <sign_and_verify@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dsa_small_digest_test() {
%1 = call i64 @sign_and_verify(i32 16)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i64 @sign_and_verify(i32 1)
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @dsa_small_digest_test() {
%1 = tail call i64 @sign_and_verify(i32 16)
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 @sign_and_verify(i32 1)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t AESIntStatusMasked(void) {
  uint32_t mask;
  mask = (*((volatile unsigned long *)(0x40024000 + 0x00000784)));
  return (mask & (*((volatile unsigned long *)(0x40024000 + 0x00000790))));
}


x86 assembly (clang, -O0):
<AESIntStatusMasked>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40024784,%eax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x40024790,%ecx
mov    (%rcx),%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESIntStatusMasked>:
mov    0x40024784,%rax
40
mov    %rax,-0x8(%rsp)
mov    -0x8(%rsp),%rax
and    0x40024790,%rax
40
ret

LLVM IR (-O0):
define i64 @AESIntStatusMasked() {
%1 = alloca i64
%2 = load volatile i64, i64* inttoptr (i64 1073891204 to i64*)
store volatile i64 %2, i64* %1
%3 = load volatile i64, i64* %1
%4 = load volatile i64, i64* inttoptr (i64 1073891216 to i64*)
%5 = and i64 %3, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @AESIntStatusMasked() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = load volatile i64, i64* inttoptr (i64 1073891204 to i64*)
store volatile i64 %3, i64* %1
%4 = load volatile i64, i64* %1
%5 = load volatile i64, i64* inttoptr (i64 1073891216 to i64*)
%6 = and i64 %5, %4
ret i64 %6
}
/* Variables and functions */
int fc_strcoll(char const *, char const *);
int compare_strings(const void *first, const void *second) {
  return fc_strcoll((const char *)first, (const char *)second);
}


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

x86 assembly (clang, -O2):
<compare_strings>:
jmp    1030 <fc_strcoll@plt>

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

LLVM IR (-O2):
define i32 @compare_strings(i8* %0, i8* %1) {
%3 = tail call i32 @fc_strcoll(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ strtol(char *, char **, int /*<<< orphan*/);
unsigned int write_svlv(int, char *);
unsigned int cpl_int(char **expr, char *bin) {
  int i;
  i = (int)strtol(*expr, expr, 0);
  bin[0] = 4;
  return write_svlv(i, (signed char *)bin + 1) + 1;
}


x86 assembly (clang, -O0):
<cpl_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x4,(%rax)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
call   1040 <write_svlv@plt>
add    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpl_int>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    (%rdi),%rdi
xor    %edx,%edx
call   1030 <strtol@plt>
movb   $0x4,(%rbx)
add    $0x1,%rbx
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <write_svlv@plt>
add    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @cpl_int(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = tail call i64 @strtol(i8* %3, i8** %0, i32 0)
%5 = trunc i64 %4 to i32
store i8 4, i8* %1
%6 = getelementptr inbounds i8, i8* %1, i64 1
%7 = tail call i32 @write_svlv(i32 %5, i8* %6)
%8 = add i32 %7, 1
ret i32 %8
}
/* Variables and functions */
double ferf(double);
double fexp(double);
double erf_env_pure(double t_on, double t_off, double iattack,
                    double irelease) {
  double v = ferf(iattack * t_on);
  if (t_off > 0) {
    v *= fexp(-irelease * t_off);
  }
  return v;
}


x86 assembly (clang, -O0):
<erf_env_pure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <ferf@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1192 <erf_env_pure+0x72>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <fexp@plt>
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erf_env_pure>:
sub    $0x28,%rsp
movaps %xmm3,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
mulsd  %xmm2,%xmm0
call   1040 <ferf@plt>
movsd  0x8(%rsp),%xmm2
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jbe    1173 <erf_env_pure+0x53>
movapd 0x10(%rsp),%xmm0
xorpd  0xea6(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm1,0x8(%rsp)
call   1030 <fexp@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @erf_env_pure(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%10 = load double, double* %7
%11 = load double, double* %5
%12 = fmul double %10, %11
%13 = call double @ferf(double %12)
store double %13, double* %9
%14 = load double, double* %6
%15 = fcmp ogt double %14, 0.000000e+00
br i1 %15, label %16, label %24
16: ; preds = %4
%17 = load double, double* %8
%18 = fneg double %17
%19 = load double, double* %6
%20 = fmul double %18, %19
%21 = call double @fexp(double %20)
%22 = load double, double* %9
%23 = fmul double %22, %21
store double %23, double* %9
br label %24
24: ; preds = %16, %4
%25 = load double, double* %9
ret double %25
}

LLVM IR (-O2):
define double @erf_env_pure(double %0, double %1, double %2, double %3) {
%5 = fmul double %0, %2
%6 = tail call double @ferf(double %5)
%7 = fcmp ogt double %1, 0.000000e+00
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = fneg double %3
%10 = fmul double %9, %1
%11 = tail call double @fexp(double %10)
%12 = fmul double %6, %11
br label %13
13: ; preds = %8, %4
%14 = phi double [ %12, %8 ], [ %6, %4 ]
ret double %14
}