xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
char *hostmask_skip_nick(char const *);
__attribute__((always_)) size_t hostmask_get_nick_size(const char *h) {
  const char *p = hostmask_skip_nick(h);
  return (size_t)((ptrdiff_t)p - (ptrdiff_t)h);
}


x86 assembly (clang, -O0):
<hostmask_get_nick_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hostmask_skip_nick@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hostmask_get_nick_size>:
push   %rbx
mov    %rdi,%rbx
call   1030 <hostmask_skip_nick@plt>
sub    %ebx,%eax
cltq
pop    %rbx
ret

LLVM IR (-O0):
define i64 @hostmask_get_nick_size(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @hostmask_skip_nick(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i32
%8 = load i8*, i8** %2
%9 = ptrtoint i8* %8 to i32
%10 = sub nsw i32 %7, %9
%11 = sext i32 %10 to i64
ret i64 %11
}

LLVM IR (-O2):
define i64 @hostmask_get_nick_size(i8* %0) {
%2 = tail call i8* @hostmask_skip_nick(i8* %0)
%3 = ptrtoint i8* %2 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = shl i64 %5, 32
%7 = ashr exact i64 %6, 32
ret i64 %7
}
/* Variables and functions */
size_t ft_strlen(char const *);
int ft_strnequ(char const *, char const *, size_t);
int ft_strstartwith(const char *s1, const char *s2) {
  size_t s2len;
  if ((s2len = ft_strlen(s2)) > ft_strlen(s1))
    return (0);
  return (ft_strnequ(s1, s2, s2len));
}


x86 assembly (clang, -O0):
<ft_strstartwith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <ft_strlen@plt>
mov    %rax,-0x28(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ft_strlen@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jbe    1166 <ft_strstartwith+0x46>
movl   $0x0,-0x4(%rbp)
jmp    117a <ft_strstartwith+0x5a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <ft_strnequ@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strstartwith>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <ft_strlen@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1030 <ft_strlen@plt>
cmp    %rax,%rbx
jbe    114b <ft_strstartwith+0x2b>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <ft_strnequ@plt>

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

LLVM IR (-O2):
define i32 @ft_strstartwith(i8* %0, i8* %1) {
%3 = tail call i64 @ft_strlen(i8* %1)
%4 = tail call i64 @ft_strlen(i8* %0)
%5 = icmp ugt i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @ft_strnequ(i8* %0, i8* %1, i64 %3)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int8_t;
typedef int /*<<< orphan*/ u_int16_t;
typedef int /*<<< orphan*/ r;

/* Variables and functions */
int /*<<< orphan*/ htons(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void net_write16(u_int8_t *p, u_int16_t n) {
  u_int16_t r;
  r = htons(n);
  memcpy(p, &r, sizeof(r));
}


x86 assembly (clang, -O0):
<net_write16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <htons@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_write16>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htons@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @net_write16(i32* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @htons(i32 %1)
store i32 %5, i32* %3
%6 = call i32 @memcpy(i32* %0, i32* %3, i32 4)
ret void
}
int charCompare(const void *left, const void *right) {
  const char leftChar = *((const char *)left);
  const char rightChar = *((const char *)right);
  if (leftChar < rightChar) {
    return -1;
  } else if (leftChar > rightChar) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<charCompare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x1a(%rbp)
movsbl -0x19(%rbp),%eax
movsbl -0x1a(%rbp),%ecx
cmp    %ecx,%eax
jge    113a <charCompare+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <charCompare+0x62>
movsbl -0x19(%rbp),%eax
movsbl -0x1a(%rbp),%ecx
cmp    %ecx,%eax
jle    1156 <charCompare+0x56>
movl   $0x1,-0x4(%rbp)
jmp    1162 <charCompare+0x62>
jmp    115b <charCompare+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charCompare>:
mov    (%rdi),%al
xor    %ecx,%ecx
cmp    (%rsi),%al
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @charCompare(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp slt i8 %3, %4
%6 = icmp sgt i8 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void printUsage(char const *argv[]) {
  assert(argv != NULL);
  printf("Usage: %s <fileName>", argv[0]);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    (%rbx),%rsi
lea    0xec4(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s <fileName>\00"
define void @printUsage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i8**, i8*** %2
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s <fileName>\00"
define void @printUsage(i8** %0) {
%2 = icmp ne i8** %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load i8*, i8** %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv, char **envp) {
  while (*envp)
    fprintf(stderr, "%s\n", *envp++);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1166 <main+0x56>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%rax
mov    %eax,%edx
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
jmp    112a <main+0x1a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    (%rdx),%rdx
test   %rdx,%rdx
je     1157 <main+0x47>
add    $0x8,%rbx
mov    0x2eb5(%rip),%r15
lea    0xece(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15),%edi
mov    %r14,%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%rdx
add    $0x8,%rbx
test   %rdx,%rdx
jne    1140 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %16, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %14, %6 ], [ %4, %3 ]
%8 = phi i8** [ %10, %6 ], [ %2, %3 ]
%9 = load i32, i32* @stderr
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = ptrtoint i8* %7 to i64
%12 = trunc i64 %11 to i32
%13 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i8*, i8** %10
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %6
16: ; preds = %6, %3
ret i32 0
}
/* Variables and functions */
scalar_t__ isspace(int);
char *drop_leading_whitespace(char *str) {
  if (str == NULL)
    return NULL;
  while (isspace((int)*str))
    ++str;
  return str;
}


x86 assembly (clang, -O0):
<drop_leading_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <drop_leading_whitespace+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1168 <drop_leading_whitespace+0x58>
jmp    1139 <drop_leading_whitespace+0x29>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1160 <drop_leading_whitespace+0x50>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1139 <drop_leading_whitespace+0x29>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop_leading_whitespace>:
push   %rbx
test   %rdi,%rdi
je     1134 <drop_leading_whitespace+0x24>
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <drop_leading_whitespace+0x10>
jmp    1136 <drop_leading_whitespace+0x26>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @drop_leading_whitespace(i8* %0) {
%2 = alloca i8*
%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 i8* null, i8** %2
br label %19
7: ; preds = %1
br label %8
8: ; preds = %14, %7
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = call i64 @isspace(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
br label %8
17: ; preds = %8
%18 = load i8*, i8** %3
store i8* %18, i8** %2
br label %19
19: ; preds = %17, %6
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @drop_leading_whitespace(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %9, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = tail call i64 @isspace(i32 %6)
%8 = icmp eq i64 %7, 0
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %10, label %3
10: ; preds = %3, %1
%11 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %11
}
/* Variables and functions */
unsigned long *malloc(size_t);
int /*<<< orphan*/ memcpy(unsigned long *, unsigned long const *, size_t);
unsigned long *zludup(unsigned long const *src, size_t len) {
  unsigned long *p = malloc(len * sizeof(unsigned long));
  memcpy(p, src, len * sizeof(unsigned long));
  return p;
}


x86 assembly (clang, -O0):
<zludup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
shl    $0x3,%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zludup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
lea    0x0(,%rsi,8),%r15
mov    %r15,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64* @zludup(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64*
store i64* %0, i64** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = mul i64 %6, 8
%8 = call i64* @malloc(i64 %7)
store i64* %8, i64** %5
%9 = load i64*, i64** %5
%10 = load i64*, i64** %3
%11 = load i64, i64* %4
%12 = mul i64 %11, 8
%13 = call i32 @memcpy(i64* %9, i64* %10, i64 %12)
%14 = load i64*, i64** %5
ret i64* %14
}

LLVM IR (-O2):
define i64* @zludup(i64* %0, i64 %1) {
%3 = shl i64 %1, 3
%4 = tail call i64* @malloc(i64 %3)
%5 = tail call i32 @memcpy(i64* %4, i64* %0, i64 %3)
ret i64* %4
}
/* Variables and functions */
int /*<<< orphan*/ e(int);
int /*<<< orphan*/ printf(char *, int);
void k(int x) {
  printf("k(%d)\n", x);
  if (x >= 2)
    e(x - 1);
}


x86 assembly (clang, -O0):
<k>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x2,-0x4(%rbp)
jl     114f <k+0x2f>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1040 <e@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<k>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x2,%ebx
jl     1141 <k+0x21>
add    $0xffffffff,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <e@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"k(%d)\0A\00"
define void @k(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = add nsw i32 %0, -1
%6 = tail call i32 @e(i32 %5)
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
char *malloc(size_t);
size_t strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
char *getInfo() {
  char *name;
  size_t size;
  size = strlen("Wipe out (C) 2004 Panayotis Katsaloulis "
                "http://www.panayotis.com under the GNU GPL");
  name = malloc(size + 1);
  strncpy(name,
          ("Wipe out (C) 2004 Panayotis Katsaloulis http://www.panayotis.com "
           "under the GNU GPL"),
          size + 1);
  return name;
}


x86 assembly (clang, -O0):
<getInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
add    $0x1,%rdx
lea    0xe94(%rip),%rsi
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInfo>:
push   %rbx
mov    $0x53,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    $0x53,%edx
mov    %rax,%rdi
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [83 x i8] c"Wipe out (C) 2004 Panayotis Katsaloulis http://www.panayotis.com under the GNU GPL\00"
define i8* @getInfo() {
%1 = alloca i8*
%2 = alloca i64
%3 = call i64 @strlen(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = add i64 %4, 1
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %1
%7 = load i8*, i8** %1
%8 = load i64, i64* %2
%9 = add i64 %8, 1
%10 = call i32 @strncpy(i8* %7, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@.str = [83 x i8] c"Wipe out (C) 2004 Panayotis Katsaloulis http://www.panayotis.com under the GNU GPL\00"
define i8* @getInfo() {
%1 = tail call dereferenceable_or_null(83) i8* @malloc(i64 83)
%2 = tail call i32 @strncpy(i8* %1, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i64 83)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_220() {
  Assert_real((isqrt(220) == 14),
              "/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/stdlib/isqrt.c",
              1105, ("Integer square root of 220 should be 14"));
}


x86 assembly (clang, -O0):
<t_sqrt_220>:
push   %rbp
mov    %rsp,%rbp
mov    $0xdc,%edi
call   1030 <isqrt@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x451,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_220>:
push   %rax
mov    $0xdc,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x451,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 220 should be 14\00"
define void @t_sqrt_220() {
%1 = call i32 @isqrt(i32 220)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1105, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 220 should be 14\00"
define void @t_sqrt_220() {
%1 = tail call i32 @isqrt(i32 220)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1105, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void die(char *blame) {
  perror(blame);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
unsigned long edf_maxkeylen(void) { return (64); }


x86 assembly (clang, -O0):
<edf_maxkeylen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @edf_maxkeylen() {
ret i64 64
}

LLVM IR (-O2):
define i64 @edf_maxkeylen() {
ret i64 64
}
/* Variables and functions */
int /*<<< orphan*/ xfree(void *);
int _tim_freer(const void *key, const void *datum) {
  xfree((void *)datum);
  return 0;
}


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

x86 assembly (clang, -O2):
<_tim_freer>:
push   %rax
mov    %rsi,%rdi
call   1030 <xfree@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @_tim_freer(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @xfree(i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void MessageManipulatorfree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<MessageManipulatorfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @MessageManipulatorfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ member_0;
};
typedef TYPE_1__ z_stream;

/* Variables and functions */
int /*<<< orphan*/ Z_DEFAULT_COMPRESSION;
int deflateInit(TYPE_1__ *, int /*<<< orphan*/);
int main(void) {
  z_stream strm = {0};
  return deflateInit(&strm, Z_DEFAULT_COMPRESSION);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdi
call   1040 <deflateInit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,(%rsp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdi
call   1030 <deflateInit@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@Z_DEFAULT_COMPRESSION = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.TYPE_3__
store i32 0, i32* %1
%3 = bitcast %struct.TYPE_3__* %2 to i8*
%4 = load i32, i32* @Z_DEFAULT_COMPRESSION
%5 = call i32 @deflateInit(%struct.TYPE_3__* %2, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@Z_DEFAULT_COMPRESSION = global i32 0
define i32 @main() {
%1 = alloca %struct.TYPE_3__
%2 = bitcast %struct.TYPE_3__* %1 to i8*
%3 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
store i32 0, i32* %3
%4 = load i32, i32* @Z_DEFAULT_COMPRESSION
%5 = call i32 @deflateInit(%struct.TYPE_3__* %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void displayHelp(char *programName) {
  printf("%s [inputfile.extension] [outputfile.extension 2] [arguments]\n"
         "\n"
         "Input extensions...              Output extensions\n"
         "83p 8xp 89p 89t 92p 92t          txt\n"
         "\n"
         "Valid arguments are\n"
         "nifty - File complies to Nifty Markup Language v1.0\n"
         "colon - Starts each new line with :\n"
         "\n"
         "Read the file called alpha.txt\n",
         programName);
  return;
}


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

x86 assembly (clang, -O2):
<displayHelp>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [293 x i8] c"%s [inputfile.extension] [outputfile.extension 2] [arguments]\0A\0AInput extensions... Output extensions\0A83p 8xp 89p 89t 92p 92t txt\0A\0AValid arguments are\0Anifty - File complies to Nifty Markup Language v1.0\0Acolon - Starts each new line with :\0A\0ARead the file called alpha.txt\0A\00"
define void @displayHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([293 x i8], [293 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [293 x i8] c"%s [inputfile.extension] [outputfile.extension 2] [arguments]\0A\0AInput extensions... Output extensions\0A83p 8xp 89p 89t 92p 92t txt\0A\0AValid arguments are\0Anifty - File complies to Nifty Markup Language v1.0\0Acolon - Starts each new line with :\0A\0ARead the file called alpha.txt\0A\00"
define void @displayHelp(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([293 x i8], [293 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
__attribute__((no)) int f(int i) {
  char big_array[500];
  big_array[0] = 12;
  big_array[23] = 34;
  big_array[256] = 56;
  big_array[434] = 78;
  assert(480 == (&big_array[490] - &big_array[10]));
  return big_array[i];
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
mov    %edi,-0x4(%rbp)
movb   $0xc,-0x200(%rbp)
movb   $0x22,-0x1e9(%rbp)
movb   $0x38,-0x100(%rbp)
movb   $0x4e,-0x4e(%rbp)
lea    -0x200(%rbp),%rcx
add    $0x1ea,%rcx
lea    -0x200(%rbp),%rax
add    $0xa,%rax
sub    %rax,%rcx
mov    $0x1e0,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movslq -0x4(%rbp),%rax
movsbl -0x200(%rbp,%rax,1),%eax
ff
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
sub    $0x200,%rsp
mov    %edi,%ebx
movb   $0xc,(%rsp)
movb   $0x22,0x17(%rsp)
movb   $0x38,0x100(%rsp)
38
movb   $0x4e,0x1b2(%rsp)
4e
mov    $0x1,%edi
call   1030 <assert@plt>
movslq %ebx,%rax
movsbl (%rsp,%rax,1),%eax
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca [500 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
store i8 12, i8* %4
%5 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 23
store i8 34, i8* %5
%6 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 256
store i8 56, i8* %6
%7 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 434
store i8 78, i8* %7
%8 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 490
%9 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 10
%10 = ptrtoint i8* %8 to i64
%11 = ptrtoint i8* %9 to i64
%12 = sub i64 %10, %11
%13 = icmp eq i64 480, %12
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = alloca [500 x i8]
%3 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 0
store i8 12, i8* %3
%4 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 23
store i8 34, i8* %4
%5 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 256
store i8 56, i8* %5
%6 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 434
store i8 78, i8* %6
%7 = tail call i32 @assert(i32 1)
%8 = sext i32 %0 to i64
%9 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
ret i32 %11
}
long lsquare(long x) { return x * x; }


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

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

LLVM IR (-O0):
define i64 @lsquare(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = mul nsw i64 %3, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @lsquare(i64 %0) {
%2 = mul nsw i64 %0, %0
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ rot16l7(int /*<<< orphan*/);
int /*<<< orphan*/ rot16r2(int /*<<< orphan*/);
void speckey_inverse(uint16_t *left, uint16_t *right) {
  *right ^= *left;
  *right = rot16r2(*right);
  *left -= *right;
  *left = rot16l7(*left);
}


x86 assembly (clang, -O0):
<speckey_inverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <rot16r2@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <rot16l7@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<speckey_inverse>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rsi),%edi
xor    (%r14),%edi
mov    %edi,(%rsi)
call   1040 <rot16r2@plt>
mov    %eax,(%rbx)
mov    (%r14),%edi
sub    %eax,%edi
mov    %edi,(%r14)
call   1030 <rot16l7@plt>
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @speckey_inverse(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = xor i32 %8, %6
store i32 %9, i32* %7
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = call i32 @rot16r2(i32 %11)
%13 = load i32*, i32** %4
store i32 %12, i32* %13
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = load i32*, i32** %3
%17 = load i32, i32* %16
%18 = sub nsw i32 %17, %15
store i32 %18, i32* %16
%19 = load i32*, i32** %3
%20 = load i32, i32* %19
%21 = call i32 @rot16l7(i32 %20)
%22 = load i32*, i32** %3
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @speckey_inverse(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = xor i32 %4, %3
store i32 %5, i32* %1
%6 = tail call i32 @rot16r2(i32 %5)
store i32 %6, i32* %1
%7 = load i32, i32* %0
%8 = sub nsw i32 %7, %6
store i32 %8, i32* %0
%9 = tail call i32 @rot16l7(i32 %8)
store i32 %9, i32* %0
ret void
}
void bmd(int motor) {}


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

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

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

LLVM IR (-O2):
define void @bmd(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ string;

/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int getstring(char *source) {
  char target[50];
  char string[50];
  strncpy(string, source, sizeof(string));
  strcpy(target, "mainstartlibc");
  if (strcmp(string, target))
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<getstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x32,%edx
call   1030 <strncpy@plt>
lea    -0x50(%rbp),%rdi
lea    0xea1(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x90(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     118a <getstring+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    1191 <getstring+0x61>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getstring>:
push   %r14
push   %rbx
sub    $0x78,%rsp
mov    %rdi,%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x32,%edx
call   1030 <strncpy@plt>
lea    0xeaf(%rip),%rsi
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"mainstartlibc\00"
define i32 @getstring(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [50 x i8]
%5 = alloca [50 x i8]
store i8* %0, i8** %3
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @strncpy(i8* %6, i8* %7, i32 50)
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%10 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%13 = call i64 @strcmp(i8* %11, i8* %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %1
store i32 0, i32* %2
br label %17
16: ; preds = %1
store i32 1, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [14 x i8] c"mainstartlibc\00"
define i32 @getstring(i8* %0) {
%2 = alloca [50 x i8]
%3 = alloca [50 x i8]
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%6 = call i32 @strncpy(i8* %5, i8* %0, i32 50)
%7 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = call i64 @strcmp(i8* %5, i8* %4)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
double log(double);
double btic1g_slog(double f) {
  return ((f >= 0) ? log(f + 1) : (-log(-f + 1)));
}


x86 assembly (clang, -O0):
<btic1g_slog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     114b <btic1g_slog+0x3b>
movsd  0xec9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1194 <btic1g_slog+0x84>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe91(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btic1g_slog>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    113a <btic1g_slog+0x2a>
movsd  0xedd(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <log@plt>
xorpd  0xed8(%rip),%xmm0
pop    %rax
ret
addsd  0xebe(%rip),%xmm0
pop    %rax
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @btic1g_slog(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double %6, 1.000000e+00
%8 = call double @log(double %7)
br label %15
9: ; preds = %1
%10 = load double, double* %2
%11 = fneg double %10
%12 = fadd double %11, 1.000000e+00
%13 = call double @log(double %12)
%14 = fneg double %13
br label %15
15: ; preds = %9, %5
%16 = phi double [ %8, %5 ], [ %14, %9 ]
ret double %16
}

LLVM IR (-O2):
define double @btic1g_slog(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = fadd double %0, 1.000000e+00
%5 = tail call double @log(double %4)
br label %10
6: ; preds = %1
%7 = fsub double 1.000000e+00, %0
%8 = tail call double @log(double %7)
%9 = fneg double %8
br label %10
10: ; preds = %6, %3
%11 = phi double [ %5, %3 ], [ %9, %6 ]
ret double %11
}
/* Type definitions */
struct d_tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
void d_tree_reduce_common_parents(struct d_tree *t) {
  do {
    fprintf(stderr, "NOT IMPLEMENTED");
    printf("\n");
  } while (0);
}


x86 assembly (clang, -O0):
<d_tree_reduce_common_parents>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_tree_reduce_common_parents>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
%struct.d_tree = type { i32 }
@stderr = global i32 0
@.str = [16 x i8] c"NOT IMPLEMENTED\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @d_tree_reduce_common_parents(%struct.d_tree* %0) {
%2 = alloca %struct.d_tree*
store %struct.d_tree* %0, %struct.d_tree** %2
br label %3
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.d_tree = type { i32 }
@stderr = global i32 0
@.str = [16 x i8] c"NOT IMPLEMENTED\00"
define void @d_tree_reduce_common_parents(%struct.d_tree* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
ret void
}
double log2(double x) {
  double r;
  if (!x)
    return __pole_error(1);
  __asm__ __volatile__("fld1; fyl2x" : "=t"(r) : "0"(x));
  return r;
}


x86 assembly (clang, -O0):
<log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    114f <log2+0x3f>
jp     114f <log2+0x3f>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <__pole_error@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1177 <log2+0x67>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
fldl   -0x20(%rbp)
fld1
fyl2x
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2>:
sub    $0x18,%rsp
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1120 <log2+0x10>
jnp    113d <log2+0x2d>
movsd  %xmm0,0x10(%rsp)
fldl   0x10(%rsp)
fld1
fyl2x
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <__pole_error@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @log2(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp une double %5, 0.000000e+00
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = call i32 (i32, ...) bitcast (i32 (...)* @__pole_error to i32 (i32, ...)*)(i32 1)
%9 = sitofp i32 %8 to double
store double %9, double* %2
br label %14
10: ; preds = %1
%11 = load double, double* %3
%12 = call double asm sideeffect "fld1; fyl2x", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %11)
store double %12, double* %4
%13 = load double, double* %4
store double %13, double* %2
br label %14
14: ; preds = %10, %7
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @log2(double %0) {
%2 = fcmp une double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @__pole_error to i32 (i32, ...)*)(i32 1)
%5 = sitofp i32 %4 to double
br label %8
6: ; preds = %1
%7 = tail call double asm sideeffect "fld1; fyl2x", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %0)
br label %8
8: ; preds = %6, %3
%9 = phi double [ %7, %6 ], [ %5, %3 ]
ret double %9
}
/* Variables and functions */
double pow(int, int);
double exponentialEaseInd(double p) {
  return (p == 0.0) ? p : pow(2, 10 * (p - 1));
}


x86 assembly (clang, -O0):
<exponentialEaseInd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1144 <exponentialEaseInd+0x34>
jp     1144 <exponentialEaseInd+0x34>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1174 <exponentialEaseInd+0x64>
movsd  -0x8(%rbp),%xmm1
movsd  0xeb7(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xea3(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponentialEaseInd>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    111d <exponentialEaseInd+0xd>
jp     111d <exponentialEaseInd+0xd>
ret
addsd  0xedb(%rip),%xmm0
mulsd  0xedb(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @exponentialEaseInd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %13
7: ; preds = %1
%8 = load double, double* %2
%9 = fsub double %8, 1.000000e+00
%10 = fmul double 1.000000e+01, %9
%11 = fptosi double %10 to i32
%12 = call double @pow(i32 2, i32 %11)
br label %13
13: ; preds = %7, %5
%14 = phi double [ %6, %5 ], [ %12, %7 ]
ret double %14
}

LLVM IR (-O2):
define double @exponentialEaseInd(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = fadd double %0, -1.000000e+00
%5 = fmul double %4, 1.000000e+01
%6 = fptosi double %5 to i32
%7 = tail call double @pow(i32 2, i32 %6)
br label %8
8: ; preds = %1, %3
%9 = phi double [ %7, %3 ], [ %0, %1 ]
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void speex_free_scratch(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<speex_free_scratch>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @speex_free_scratch(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
size_t mbrlen(const char *__restrict p, size_t l, mbstate_t *__restrict v) {
  size_t i;
  for (i = 0; i < l; i++)
    if (p[i] == '\0')
      return i;
  return l;
}


x86 assembly (clang, -O0):
<mbrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    115e <mbrlen+0x5e>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1148 <mbrlen+0x48>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1166 <mbrlen+0x66>
jmp    114d <mbrlen+0x4d>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1118 <mbrlen+0x18>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbrlen>:
xor    %eax,%eax
test   %rsi,%rsi
je     1122 <mbrlen+0x22>
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rdi,%rax,1)
je     1122 <mbrlen+0x22>
add    $0x1,%rax
cmp    %rax,%rsi
jne    1110 <mbrlen+0x10>
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @mbrlen(i8* noalias nocapture %0, i64 %1, i32* noalias nocapture readnone %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %13, label %5
5: ; preds = %3, %10
%6 = phi i64 [ %11, %10 ], [ 0, %3 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %5
%11 = add nuw i64 %6, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %13, label %5
13: ; preds = %5, %10, %3
%14 = phi i64 [ 0, %3 ], [ %1, %10 ], [ %6, %5 ]
ret i64 %14
}