xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_dmd_strings() {
  test_parser_verify_parse(
      test_parser_sourcefile("dmd", "'/*' not a comment '*/'"), "dmd",
      "'/*' not a comment '*/'", "", 0);
}


x86 assembly (clang, -O0):
<test_dmd_strings>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebd(%rip),%rdx
lea    0xecd(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dmd_strings>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rbx
lea    0xed2(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xed7(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %r8d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"dmd\00"
@.str.1 = [24 x i8] c"'/*' not a comment '*/'\00"
@.str.2 = [1 x i8] zeroinitializer
define void @test_dmd_strings() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"dmd\00"
@.str.1 = [24 x i8] c"'/*' not a comment '*/'\00"
@.str.2 = [1 x i8] zeroinitializer
define void @test_dmd_strings() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int str_cmp(void *p, void *q) { return strcmp((char *)p, (char *)q); }


x86 assembly (clang, -O0):
<str_cmp>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @str_cmp(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 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @str_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void log_stdout(const char *format, va_list ap) {
  vfprintf(stdout, format, ap);
  fprintf(stdout, "\r\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<log_stdout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <vfprintf@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_stdout>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ea3(%rip),%rbx
mov    (%rbx),%edi
call   1050 <vfprintf@plt>
mov    (%rbx),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"\0D\0A\00"
define void @log_stdout(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vfprintf(i32 %5, i8* %6, i32 %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @stdout
%12 = call i32 @fflush(i32 %11)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"\0D\0A\00"
define void @log_stdout(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 @fflush(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ grace(int);
int fn6(int i) {
  switch (i) {
  case 1:
    if (i == 5) {
      grace(1);
      goto done;
    }
  case 2:
    grace(8);
  }
done:;
}


x86 assembly (clang, -O0):
<fn6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1140 <fn6+0x30>
jmp    112f <fn6+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     115e <fn6+0x4e>
jmp    1168 <fn6+0x58>
cmpl   $0x5,-0x8(%rbp)
jne    1159 <fn6+0x49>
mov    $0x1,%edi
call   1030 <grace@plt>
jmp    116d <fn6+0x5d>
jmp    115e <fn6+0x4e>
mov    $0x8,%edi
call   1030 <grace@plt>
jmp    116d <fn6+0x5d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn6>:
add    $0xffffffff,%edi
cmp    $0x1,%edi
ja     1127 <fn6+0x17>
push   %rax
mov    $0x8,%edi
call   1030 <grace@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @fn6(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 1, label %5
i32 2, label %11
]
5: ; preds = %1
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 5
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @grace(i32 1)
br label %14
10: ; preds = %5
br label %11
11: ; preds = %1, %10
%12 = call i32 @grace(i32 8)
br label %13
13: ; preds = %11, %1
br label %14
14: ; preds = %13, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn6(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 2
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @grace(i32 8)
br label %6
6: ; preds = %1, %4
ret i32 undef
}
adrx0indreg1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (((int *)10000000)[x0]) = (*p1); }


x86 assembly (clang, -O0):
<adrx0indreg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%edx
movslq -0x10(%rbp),%rcx
mov    $0x989680,%eax
mov    %edx,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0indreg1_set>:
mov    (%r9),%eax
movslq %edx,%rcx
mov    %eax,0x989680(,%rcx,4)
ret

LLVM IR (-O0):
define i32 @adrx0indreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %13
%15 = load i32, i32* %14
%16 = load i32, i32* %10
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %17
store i32 %15, i32* %18
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @adrx0indreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = load i32, i32* %5
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %8
store i32 %7, i32* %9
ret i32 undef
}
int veces_letra(char letra, char *pal) {
  char letra_de_pal = *pal;
  int k = 0;
  int veces = 0;
  while (letra_de_pal != '\0') {
    if (letra_de_pal == letra) {
      veces = veces + 1;
    }
    k = k + 1;
    letra_de_pal = *(pal + k);
  }
  return veces;
}


x86 assembly (clang, -O0):
<veces_letra>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x0,%eax
je     1167 <veces_letra+0x67>
movsbl -0x11(%rbp),%eax
movsbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
jne    114b <veces_letra+0x4b>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
jmp    1125 <veces_letra+0x25>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<veces_letra>:
mov    (%rsi),%cl
test   %cl,%cl
je     1126 <veces_letra+0x26>
add    $0x1,%rsi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    %dil,%cl
sete   %dl
add    %edx,%eax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <veces_letra+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @veces_letra(i8 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %12, %5 ], [ 0, %2 ]
%7 = phi i8 [ %14, %5 ], [ %3, %2 ]
%8 = phi i32 [ %11, %5 ], [ 0, %2 ]
%9 = icmp eq i8 %7, %0
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %8, %10
%12 = add nuw nsw i64 %6, 1
%13 = getelementptr inbounds i8, i8* %1, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %2
%17 = phi i32 [ 0, %2 ], [ %11, %5 ]
ret i32 %17
}
int count_slashes(const char *s) {
  int i = 0;
  while (*s)
    if (*s++ == '/')
      ++i;
  return i;
}


x86 assembly (clang, -O0):
<count_slashes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <count_slashes+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1140 <count_slashes+0x40>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <count_slashes+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @count_slashes(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = icmp eq i8 %5, 47
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %6, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ _IO(int, int);
int /*<<< orphan*/ close(int);
int ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  int result;
  int fd = open("/dev/md0", O_RDWR, 0);
  result = ioctl(fd, _IO(9, 0x14), 0);
  close(fd);
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
lea    0xea1(%rip),%rdi
xor    %edx,%edx
call   1060 <open@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x9,%edi
mov    $0x14,%esi
call   1030 <_IO@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
xor    %edx,%edx
call   1040 <ioctl@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <close@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
lea    0xead(%rip),%rdi
xor    %edx,%edx
call   1060 <open@plt>
mov    %eax,%ebx
mov    $0x9,%edi
mov    $0x14,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %edx,%edx
call   1040 <ioctl@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <close@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"/dev/md0\00"
@O_RDWR = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* @O_RDWR
%5 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4, i32 0)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @_IO(i32 9, i32 20)
%8 = call i32 @ioctl(i32 %6, i32 %7, i32 0)
store i32 %8, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @close(i32 %9)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [9 x i8] c"/dev/md0\00"
@O_RDWR = global i32 0
define i32 @main() {
%1 = load i32, i32* @O_RDWR
%2 = tail call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i32 0)
%3 = tail call i32 @_IO(i32 9, i32 20)
%4 = tail call i32 @ioctl(i32 %2, i32 %3, i32 0)
%5 = tail call i32 @close(i32 %2)
ret i32 %4
}
/* Variables and functions */
int getToken(unsigned char const *, int *);
int sqlite3GetToken(const unsigned char *z, int *tokenType) {
  return getToken(z, tokenType);
}


x86 assembly (clang, -O0):
<sqlite3GetToken>:
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 <getToken@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlite3GetToken>:
jmp    1030 <getToken@plt>

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

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


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

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

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

LLVM IR (-O2):
define void @traceclose() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int main(void) {
  unsigned int who_am_i();
  printf("I am %u.\n", who_am_i());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"I am %u.\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @who_am_i()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by_ptr_pp(int /*<<< orphan*/);
void xor_by_ptr_pp(uint32_t x) {
  by_ptr_pp(x);
  xor();
}


x86 assembly (clang, -O0):
<xor_by_ptr_pp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <by_ptr_pp@plt>
mov    $0x0,%al
call   1040 <xor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor_by_ptr_pp>:
push   %rax
call   1030 <by_ptr_pp@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <xor@plt>

LLVM IR (-O0):
define void @xor_by_ptr_pp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @by_ptr_pp(i32 %3)
%5 = call i32 (...) @xor()
ret void
}

LLVM IR (-O2):
define void @xor_by_ptr_pp(i32 %0) {
%2 = tail call i32 @by_ptr_pp(i32 %0)
%3 = tail call i32 (...) @xor()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
fp(double a, int b) {
  if (a != 33 || b != 11)
    abort();
}


x86 assembly (clang, -O0):
<fp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1147 <fp+0x37>
jp     1147 <fp+0x37>
cmpl   $0xb,-0x14(%rbp)
je     114e <fp+0x3e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp>:
push   %rax
ucomisd 0xee7(%rip),%xmm0
jne    1124 <fp+0x14>
jp     1124 <fp+0x14>
cmp    $0xb,%edi
jne    1124 <fp+0x14>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @fp(double %0, i32 %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca i32
store double %0, double* %4
store i32 %1, i32* %5
%6 = load double, double* %4
%7 = fcmp une double %6, 3.300000e+01
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 11
br i1 %10, label %11, label %13
11: ; preds = %8, %2
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %8
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @fp(double %0, i32 %1) {
%3 = fcmp une double %0, 3.300000e+01
%4 = icmp ne i32 %1, 11
%5 = or i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret i32 undef
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int c;
  c = (getchar() != EOF);
  printf("%d", c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@EOF = global i64 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp ne i64 %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
struct ship {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Write(int, struct ship *, long, long, int /*<<< orphan*/,
                         int /*<<< orphan*/);
void send_gunr(struct ship *ship, long a, long b) {
  Write(11, ship, a, b, 0, 0);
}


x86 assembly (clang, -O0):
<send_gunr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0xb,%edi
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1030 <Write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_gunr>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xb,%edi
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <Write@plt>

LLVM IR (-O0):
%struct.ship = type { i32 }
define void @send_gunr(%struct.ship* %0, i64 %1, i64 %2) {
%4 = alloca %struct.ship*
%5 = alloca i64
%6 = alloca i64
store %struct.ship* %0, %struct.ship** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load %struct.ship*, %struct.ship** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i32 @Write(i32 11, %struct.ship* %7, i64 %8, i64 %9, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.ship = type { i32 }
define void @send_gunr(%struct.ship* %0, i64 %1, i64 %2) {
%4 = tail call i32 @Write(i32 11, %struct.ship* %0, i64 %1, i64 %2, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ keyboard_irq();
int /*<<< orphan*/ outb(int, int);
int /*<<< orphan*/ system_timer_irq();
void irq_handler(unsigned number) {
  switch (number) {
  case 0:
    system_timer_irq();
    break;
  case 1:
    keyboard_irq();
    break;
  }
  if (number >= 8) {
    outb(0xa0, 0x20);
  }
  outb(0x20, 0x20);
}


x86 assembly (clang, -O0):
<irq_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     115f <irq_handler+0x2f>
jmp    114e <irq_handler+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     116b <irq_handler+0x3b>
jmp    1172 <irq_handler+0x42>
mov    $0x0,%al
call   1050 <system_timer_irq@plt>
jmp    1172 <irq_handler+0x42>
mov    $0x0,%al
call   1040 <keyboard_irq@plt>
cmpl   $0x8,-0x4(%rbp)
jb     118b <irq_handler+0x5b>
mov    $0xa0,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x20,%esi
mov    %esi,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_handler>:
push   %rax
cmp    $0x1,%edi
je     1143 <irq_handler+0x13>
test   %edi,%edi
jne    114c <irq_handler+0x1c>
xor    %eax,%eax
call   1050 <system_timer_irq@plt>
jmp    1160 <irq_handler+0x30>
xor    %eax,%eax
call   1040 <keyboard_irq@plt>
jmp    1160 <irq_handler+0x30>
cmp    $0x8,%edi
jb     1160 <irq_handler+0x30>
mov    $0xa0,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    $0x20,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @irq_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 0, label %4
i32 1, label %6
]
4: ; preds = %1
%5 = call i32 (...) @system_timer_irq()
br label %8
6: ; preds = %1
%7 = call i32 (...) @keyboard_irq()
br label %8
8: ; preds = %1, %6, %4
%9 = load i32, i32* %2
%10 = icmp uge i32 %9, 8
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @outb(i32 160, i32 32)
br label %13
13: ; preds = %11, %8
%14 = call i32 @outb(i32 32, i32 32)
ret void
}

LLVM IR (-O2):
define void @irq_handler(i32 %0) {
switch i32 %0, label %6 [
i32 0, label %2
i32 1, label %4
]
2: ; preds = %1
%3 = tail call i32 (...) @system_timer_irq()
br label %10
4: ; preds = %1
%5 = tail call i32 (...) @keyboard_irq()
br label %10
6: ; preds = %1
%7 = icmp ugt i32 %0, 7
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @outb(i32 160, i32 32)
br label %10
10: ; preds = %2, %4, %8, %6
%11 = tail call i32 @outb(i32 32, i32 32)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dstdevtk(int, int, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dstdevtk(N, 1, x, stride);
  printf("sample standard deviation: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%ecx
mov    $0x1,%esi
call   1030 <stdlib_strided_dstdevtk@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2,%ecx
call   1030 <stdlib_strided_dstdevtk@plt>
lea    0xecf(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [32 x i8] c"sample standard deviation: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dstdevtk(i32 %6, i32 1, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [32 x i8] c"sample standard deviation: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dstdevtk(i32 4, i32 1, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ e_adc();
int /*<<< orphan*/ e_izpy();
void e_adc_izpy() {
  e_izpy();
  e_adc();
}


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

x86 assembly (clang, -O2):
<e_adc_izpy>:
push   %rax
xor    %eax,%eax
call   1030 <e_izpy@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <e_adc@plt>

LLVM IR (-O0):
define void @e_adc_izpy() {
%1 = call i32 (...) @e_izpy()
%2 = call i32 (...) @e_adc()
ret void
}

LLVM IR (-O2):
define void @e_adc_izpy() {
%1 = tail call i32 (...) @e_izpy()
%2 = tail call i32 (...) @e_adc()
ret void
}
/* Type definitions */
struct student {
  int dummy;
};

/* Variables and functions */
struct student *create_struct_list() {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.student = type { i32 }
define %struct.student* @create_struct_list() {
ret %struct.student* null
}

LLVM IR (-O2):
%struct.student = type { i32 }
define noalias %struct.student* @create_struct_list() {
ret %struct.student* null
}
/* Variables and functions */
int expr_r(char const *, size_t *, int /*<<< orphan*/);
int /*<<< orphan*/ term(char const *, size_t *);
int expr(const char *expr_str, size_t *cursor) {
  return expr_r(expr_str, cursor, term(expr_str, cursor));
}


x86 assembly (clang, -O0):
<expr>:
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),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <term@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <expr_r@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <term@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <expr_r@plt>

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

LLVM IR (-O2):
define i32 @expr(i8* %0, i64* %1) {
%3 = tail call i32 @term(i8* %0, i64* %1)
%4 = tail call i32 @expr_r(i8* %0, i64* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ w5100_write_byte(int, unsigned int);
void w5100_writeRCR(unsigned data) { w5100_write_byte(0x0019, data); }


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

x86 assembly (clang, -O2):
mov    %edi,%esi
mov    $0x19,%edi
jmp    1030 <w5100_write_byte@plt>

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

LLVM IR (-O2):
define void @w5100_writeRCR(i32 %0) {
%2 = tail call i32 @w5100_write_byte(i32 25, i32 %0)
ret void
}
float debuginator__ease_out(float t, float start_value, float change,
                            float duration) {
  t /= duration;
  return -change * t * (t - 2) + start_value;
}


x86 assembly (clang, -O0):
<debuginator__ease_out>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xeb1(%rip),%xmm1
subss  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<debuginator__ease_out>:
divss  %xmm3,%xmm0
mulss  %xmm0,%xmm2
addss  0xef0(%rip),%xmm0
mulss  %xmm2,%xmm0
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @debuginator__ease_out(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %8
%10 = load float, float* %5
%11 = fdiv float %10, %9
store float %11, float* %5
%12 = load float, float* %7
%13 = fneg float %12
%14 = load float, float* %5
%15 = fmul float %13, %14
%16 = load float, float* %5
%17 = fsub float %16, 2.000000e+00
%18 = load float, float* %6
%19 = call float @llvm.fmuladd.f32(float %15, float %17, float %18)
ret float %19
}

LLVM IR (-O2):
define float @debuginator__ease_out(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fneg float %2
%7 = fmul float %5, %6
%8 = fadd float %5, -2.000000e+00
%9 = tail call float @llvm.fmuladd.f32(float %7, float %8, float %1)
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void test_strncpy_warn(char *d) { strncpy(d + 1, d + 3, 5); }


x86 assembly (clang, -O0):
<test_strncpy_warn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x8(%rbp),%rsi
add    $0x3,%rsi
mov    $0x5,%edx
call   1030 <strncpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_strncpy_warn>:
lea    0x1(%rdi),%rax
lea    0x3(%rdi),%rsi
mov    %rax,%rdi
mov    $0x5,%edx
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define void @test_strncpy_warn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 3
%7 = call i32 @strncpy(i8* %4, i8* %6, i32 5)
ret void
}

LLVM IR (-O2):
define void @test_strncpy_warn(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = getelementptr inbounds i8, i8* %0, i64 3
%4 = tail call i32 @strncpy(i8* %2, i8* %3, i32 5)
ret void
}
/* Variables and functions */
long get_message_row();
long get_ls_msg_line_per_page(void) { return (get_message_row()); }


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

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

LLVM IR (-O0):
define i64 @get_ls_msg_line_per_page() {
%1 = call i64 (...) @get_message_row()
ret i64 %1
}

LLVM IR (-O2):
define i64 @get_ls_msg_line_per_page() {
%1 = tail call i64 (...) @get_message_row()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ USBNDebug(char *);
unsigned char USBNRead(int);
void _USBNNackEvent(void) {
  unsigned char event;
  event = USBNRead(0x0E);
  USBNDebug("nack event\r\n");
}


x86 assembly (clang, -O0):
<_USBNNackEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xe,%edi
call   1030 <USBNRead@plt>
mov    %al,-0x1(%rbp)
lea    0xec4(%rip),%rdi
call   1040 <USBNDebug@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_USBNNackEvent>:
push   %rax
mov    $0xe,%edi
call   1030 <USBNRead@plt>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1040 <USBNDebug@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"nack event\0D\0A\00"
define void @_USBNNackEvent() {
%1 = alloca i8
%2 = call zeroext i8 @USBNRead(i32 14)
store i8 %2, i8* %1
%3 = call i32 @USBNDebug(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"nack event\0D\0A\00"
define void @_USBNNackEvent() {
%1 = tail call zeroext i8 @USBNRead(i32 14)
%2 = tail call i32 @USBNDebug(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
void fn34AA() { return; }


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

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

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

LLVM IR (-O2):
define void @fn34AA() {
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
double atof(char const *);
double pow(int, int);
scalar_t__ round(double);
int str2int32(int32_t *i, const char *str, int ndec) {
  double dbl;
  if (i == NULL)
    return 0;
  dbl = atof(str);
  *i = (int32_t)(round(dbl * pow(10, ndec)));
  return 1;
}


x86 assembly (clang, -O0):
<str2int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115a <str2int32+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    11a1 <str2int32+0x71>
mov    -0x18(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x1c(%rbp),%esi
mov    $0xa,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <round@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2int32>:
test   %rdi,%rdi
je     116f <str2int32+0x3f>
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <atof@plt>
movsd  %xmm0,(%rsp)
mov    $0xa,%edi
mov    %ebp,%esi
call   1040 <pow@plt>
mulsd  (%rsp),%xmm0
call   1050 <round@plt>
mov    %rax,(%rbx)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @str2int32(i64* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca double
store i64* %0, i64** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i64*, i64** %5
%10 = icmp eq i64* %9, null
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 0, i32* %4
br label %21
12: ; preds = %3
%13 = load i8*, i8** %6
%14 = call double @atof(i8* %13)
store double %14, double* %8
%15 = load double, double* %8
%16 = load i32, i32* %7
%17 = call double @pow(i32 10, i32 %16)
%18 = fmul double %15, %17
%19 = call i64 @round(double %18)
%20 = load i64*, i64** %5
store i64 %19, i64* %20
store i32 1, i32* %4
br label %21
21: ; preds = %12, %11
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @str2int32(i64* writeonly %0, i8* nocapture %1, i32 %2) {
%4 = icmp eq i64* %0, null
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = tail call double @atof(i8* %1)
%7 = tail call double @pow(i32 10, i32 %2)
%8 = fmul double %6, %7
%9 = tail call i64 @round(double %8)
store i64 %9, i64* %0
br label %10
10: ; preds = %3, %5
%11 = phi i32 [ 1, %5 ], [ 0, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ CONF_modules_free();
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ENGINE_cleanup();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ EVP_cleanup();
int /*<<< orphan*/ OBJ_cleanup();
void cleanup_lib_state(void) {
  OBJ_cleanup();
  ENGINE_cleanup();
  EVP_cleanup();
  CONF_modules_free();
  CRYPTO_cleanup_all_ex_data();
  ERR_free_strings();
}


x86 assembly (clang, -O0):
<cleanup_lib_state>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <OBJ_cleanup@plt>
mov    $0x0,%al
call   1040 <ENGINE_cleanup@plt>
mov    $0x0,%al
call   1060 <EVP_cleanup@plt>
mov    $0x0,%al
call   1080 <CONF_modules_free@plt>
mov    $0x0,%al
call   1030 <CRYPTO_cleanup_all_ex_data@plt>
mov    $0x0,%al
call   1070 <ERR_free_strings@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup_lib_state>:
push   %rax
xor    %eax,%eax
call   1050 <OBJ_cleanup@plt>
xor    %eax,%eax
call   1040 <ENGINE_cleanup@plt>
xor    %eax,%eax
call   1060 <EVP_cleanup@plt>
xor    %eax,%eax
call   1080 <CONF_modules_free@plt>
xor    %eax,%eax
call   1030 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <ERR_free_strings@plt>

LLVM IR (-O0):
define void @cleanup_lib_state() {
%1 = call i32 (...) @OBJ_cleanup()
%2 = call i32 (...) @ENGINE_cleanup()
%3 = call i32 (...) @EVP_cleanup()
%4 = call i32 (...) @CONF_modules_free()
%5 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%6 = call i32 (...) @ERR_free_strings()
ret void
}

LLVM IR (-O2):
define void @cleanup_lib_state() {
%1 = tail call i32 (...) @OBJ_cleanup()
%2 = tail call i32 (...) @ENGINE_cleanup()
%3 = tail call i32 (...) @EVP_cleanup()
%4 = tail call i32 (...) @CONF_modules_free()
%5 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
%6 = tail call i32 (...) @ERR_free_strings()
ret void
}
/* Variables and functions */
int rename(char const *, char const *);
int move(const char *src, const char *dest) { return rename(src, dest); }


x86 assembly (clang, -O0):
<move>:
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 <rename@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move>:
jmp    1030 <rename@plt>

LLVM IR (-O0):
define i32 @move(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 @rename(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @move(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @rename(i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int OnesCount(int);
uint32_t FloorLog2(uint32_t value) {
  value |= value >> 1;
  value |= value >> 2;
  value |= value >> 4;
  value |= value >> 8;
  value |= value >> 16;
  return (OnesCount(value >> 1));
}


x86 assembly (clang, -O0):
<FloorLog2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x1,%edi
call   1030 <OnesCount@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FloorLog2>:
mov    %edi,%eax
sar    %eax
or     %eax,%edi
mov    %edi,%eax
sar    $0x2,%eax
or     %eax,%edi
mov    %edi,%eax
sar    $0x4,%eax
or     %eax,%edi
mov    %edi,%eax
sar    $0x8,%eax
or     %eax,%edi
mov    %edi,%eax
sar    $0x11,%eax
sar    %edi
or     %eax,%edi
jmp    1030 <OnesCount@plt>

LLVM IR (-O0):
define i32 @FloorLog2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 %7, 2
%9 = load i32, i32* %2
%10 = or i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = ashr i32 %11, 4
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = ashr i32 %15, 8
%17 = load i32, i32* %2
%18 = or i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = ashr i32 %19, 16
%21 = load i32, i32* %2
%22 = or i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = ashr i32 %23, 1
%25 = call i32 @OnesCount(i32 %24)
ret i32 %25
}

LLVM IR (-O2):
define i32 @FloorLog2(i32 %0) {
%2 = ashr i32 %0, 1
%3 = or i32 %2, %0
%4 = ashr i32 %3, 2
%5 = or i32 %4, %3
%6 = ashr i32 %5, 4
%7 = or i32 %6, %5
%8 = ashr i32 %7, 8
%9 = or i32 %8, %7
%10 = ashr i32 %9, 17
%11 = ashr i32 %9, 1
%12 = or i32 %10, %11
%13 = tail call i32 @OnesCount(i32 %12)
ret i32 %13
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISREG(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int yap_fileexists(char *fname) {
  struct stat buf;
  if (stat(fname, &buf))
    return 0;
  if (S_ISREG(buf.st_mode))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<yap_fileexists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     114f <yap_fileexists+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1174 <yap_fileexists+0x54>
mov    -0x18(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%rax
je     116d <yap_fileexists+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1174 <yap_fileexists+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yap_fileexists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <yap_fileexists+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @yap_fileexists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %16
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @S_ISREG(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 1, i32* %2
br label %16
15: ; preds = %9
store i32 0, i32* %2
br label %16
16: ; preds = %15, %14, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @yap_fileexists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISREG(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
char *strdup(char const *);
char *lwm2m_strdup(const char *str) { return strdup(str); }


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

x86 assembly (clang, -O2):
<lwm2m_strdup>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @lwm2m_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}