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

/* Variables and functions */
size_t wcslen(const wchar_t *string) {
  size_t len = 0;
  while (*(string++))
    len++;
  return len;
}


x86 assembly (clang, -O0):
<wcslen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
cmpl   $0x0,(%rax)
je     1139 <wcslen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <wcslen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcslen>:
cmpl   $0x0,(%rdi)
je     111f <wcslen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpl   $0x0,0x4(%rdi,%rcx,4)
mov    %rax,%rcx
jne    1110 <wcslen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @wcslen(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i32* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = add i64 %5, 1
%9 = load i32, i32* %7
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Mem_Free(void *block) { free(block); }


x86 assembly (clang, -O0):
<Mem_Free>:
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):
<Mem_Free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @Mem_Free(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 @Mem_Free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gds_swap2bytes(unsigned char *);
int /*<<< orphan*/ write(int, short *, int);
void gds_write_boundary(int fd) {
  static short int count, token;
  count = 4;
  gds_swap2bytes((unsigned char *)&count);
  write(fd, &count, 2);
  token = 0x0800;
  gds_swap2bytes((unsigned char *)&token);
  write(fd, &token, 2);
}


x86 assembly (clang, -O0):
<gds_write_boundary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movw   $0x4,0x2efe(%rip)
lea    0x2ef7(%rip),%rdi
call   1040 <gds_swap2bytes@plt>
mov    -0x4(%rbp),%edi
lea    0x2ee8(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
movw   $0x800,0x2ed7(%rip)
lea    0x2ed0(%rip),%rdi
call   1040 <gds_swap2bytes@plt>
mov    -0x4(%rbp),%edi
lea    0x2ec1(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gds_write_boundary>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
movw   $0x4,0x2f03(%rip)
lea    0x2efc(%rip),%r14
mov    %r14,%rdi
call   1040 <gds_swap2bytes@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x2,%edx
call   1030 <write@plt>
movw   $0x800,0x2ede(%rip)
lea    0x2ed7(%rip),%r14
mov    %r14,%rdi
call   1040 <gds_swap2bytes@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x2,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <write@plt>

LLVM IR (-O0):
@gds_write_boundary.count = internal global i16 0
@gds_write_boundary.token = internal global i16 0
define void @gds_write_boundary(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
store i16 4, i16* @gds_write_boundary.count
%3 = call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_boundary.count to i8*))
%4 = load i32, i32* %2
%5 = call i32 @write(i32 %4, i16* @gds_write_boundary.count, i32 2)
store i16 2048, i16* @gds_write_boundary.token
%6 = call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_boundary.token to i8*))
%7 = load i32, i32* %2
%8 = call i32 @write(i32 %7, i16* @gds_write_boundary.token, i32 2)
ret void
}

LLVM IR (-O2):
@gds_write_boundary.count = internal global i16 0
@gds_write_boundary.token = internal global i16 0
define void @gds_write_boundary(i32 %0) {
store i16 4, i16* @gds_write_boundary.count
%2 = tail call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_boundary.count to i8*))
%3 = tail call i32 @write(i32 %0, i16* @gds_write_boundary.count, i32 2)
store i16 2048, i16* @gds_write_boundary.token
%4 = tail call i32 @gds_swap2bytes(i8* bitcast (i16* @gds_write_boundary.token to i8*))
%5 = tail call i32 @write(i32 %0, i16* @gds_write_boundary.token, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int main(int argc, char **argv) {
  int *a, *c;
  a = (int *)malloc(sizeof(int));
  a = c;
  free(a);
  a = NULL;
  a = c;
  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    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i64 @malloc(i32 4)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %6
%10 = load i32*, i32** %7
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = call i32 @free(i32* %11)
store i32* null, i32** %6
%13 = load i32*, i32** %7
store i32* %13, i32** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 4)
%4 = tail call i32 @free(i32* undef)
ret i32 0
}
int removeTrailingSpaces(char *s, int l) {
  while (s[l - 1] == ' ')
    l -= 1;
  s[l] = '\0';
  return l;
}


x86 assembly (clang, -O0):
<removeTrailingSpaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1133 <removeTrailingSpaces+0x33>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110b <removeTrailingSpaces+0xb>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeTrailingSpaces>:
movslq %esi,%rcx
lea    0x1(%rcx),%eax
lea    (%rcx,%rdi,1),%rdx
add    $0xffffffffffffffff,%rdx
mov    %rcx,%rsi
shl    $0x20,%rsi
movabs $0x100000000,%rcx
add    %rsi,%rcx
movabs $0xffffffff00000000,%rsi
ff ff ff
nopl   0x0(%rax)
add    %rsi,%rcx
add    $0xffffffff,%eax
cmpb   $0x20,(%rdx)
lea    -0x1(%rdx),%rdx
je     1130 <removeTrailingSpaces+0x30>
sar    $0x20,%rcx
movb   $0x0,(%rdi,%rcx,1)
ret

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

LLVM IR (-O2):
define i32 @removeTrailingSpaces(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %6, %4 ], [ %3, %2 ]
%6 = add nsw i64 %5, -1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 32
br i1 %9, label %4, label %10
10: ; preds = %4
%11 = trunc i64 %5 to i32
%12 = shl i64 %5, 32
%13 = ashr exact i64 %12, 32
%14 = getelementptr inbounds i8, i8* %0, i64 %13
store i8 0, i8* %14
ret i32 %11
}
int func(int *x) {
#pragma critTer : 3 :../../ test / resources / functionCommentReturn.c:
  return 0;
#pragma critTer : 4 :../../ test / resources / functionCommentReturn.c:
}


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

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

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

LLVM IR (-O2):
define i32 @func(i32* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t EEPROMBlockProtectGet(uint32_t ui32Block) {
  ;
  (*((volatile unsigned long *)(0x400AF004))) = ui32Block;
  return ((*((volatile unsigned long *)(0x400AF030))));
}


x86 assembly (clang, -O0):
<EEPROMBlockProtectGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400af004,%eax
mov    %rcx,(%rax)
mov    $0x400af030,%eax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMBlockProtectGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    %rax,0x400af004
40
mov    0x400af030,%rax
40
ret

LLVM IR (-O0):
define i64 @EEPROMBlockProtectGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074458628 to i64*)
%4 = load volatile i64, i64* inttoptr (i64 1074458672 to i64*)
ret i64 %4
}

LLVM IR (-O2):
define i64 @EEPROMBlockProtectGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074458628 to i64*)
%4 = load volatile i64, i64* inttoptr (i64 1074458672 to i64*)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prgname) {
  fprintf(stderr,
          "usage: %s [OPTIONS] <infile>\n"
          "\n"
          "Options:\n"
          "-o <outfile>     output to <outfile>\n"
          "-l <loadaddr>    specify load address\n"
          "-c               Add config header\n"
          "-h               This help\n",
          prgname);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [177 x i8] c"usage: %s [OPTIONS] <infile>\0A\0AOptions:\0A-o <outfile> output to <outfile>\0A-l <loadaddr> specify load address\0A-c Add config header\0A-h This help\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [177 x i8] c"usage: %s [OPTIONS] <infile>\0A\0AOptions:\0A-o <outfile> output to <outfile>\0A-l <loadaddr> specify load address\0A-c Add config header\0A-h This help\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int Max2(int a, int b) {
  if (b > a)
    return b;
  else
    return a;
}


x86 assembly (clang, -O0):
<Max2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <Max2+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <Max2+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Max2>:
mov    %edi,%eax
cmp    %edi,%esi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @Max2(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Type definitions */
struct utsname {
  int dummy;
};

/* Variables and functions */
int __xuname(int, struct utsname *);
int uname(struct utsname *name) { return __xuname(32, name); }


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

x86 assembly (clang, -O2):
<uname>:
mov    %rdi,%rsi
mov    $0x20,%edi
jmp    1030 <__xuname@plt>

LLVM IR (-O0):
%struct.utsname = type { i32 }
define i32 @uname(%struct.utsname* %0) {
%2 = alloca %struct.utsname*
store %struct.utsname* %0, %struct.utsname** %2
%3 = load %struct.utsname*, %struct.utsname** %2
%4 = call i32 @__xuname(i32 32, %struct.utsname* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.utsname = type { i32 }
define i32 @uname(%struct.utsname* %0) {
%2 = tail call i32 @__xuname(i32 32, %struct.utsname* %0)
ret i32 %2
}
const char *as_str(const char *line) {
  if (*line != ':')
    return as_str(line + 1);
  return line + 1;
}


x86 assembly (clang, -O0):
<as_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
je     1142 <as_str+0x32>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <as_str@plt>
mov    %rax,-0x8(%rbp)
jmp    114e <as_str+0x3e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<as_str>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0x3a,(%rax)
lea    0x1(%rax),%rax
jne    1110 <as_str+0x10>
ret

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

LLVM IR (-O2):
define i8* @as_str(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 58
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i8* %6
}
int kvm_write(void *kd, unsigned long addr, const void *buf,
              unsigned int nbytes) {
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @kvm_write(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @kvm_write(i8* nocapture readnone %0, i64 %1, i8* nocapture readnone %2, i32 %3) {
ret i32 0
}
double Sleef_erf_u10(double x) { return __builtin_erf(x); }


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

x86 assembly (clang, -O2):
<Sleef_erf_u10>:
jmp    1030 <erf@plt>

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

LLVM IR (-O2):
define double @Sleef_erf_u10(double %0) {
%2 = tail call double @erf(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void cmp_reg64_imm32(int reg64, unsigned int imm32) {
  put8(0x48);
  put8(0x81);
  put8(0xF8 + reg64);
  put32(imm32);
}


x86 assembly (clang, -O0):
<cmp_reg64_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x81,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
add    $0xf8,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_reg64_imm32>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x81,%edi
call   1030 <put8@plt>
add    $0xf8,%ebp
mov    %ebp,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @cmp_reg64_imm32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @put8(i32 72)
%6 = call i32 @put8(i32 129)
%7 = load i32, i32* %3
%8 = add nsw i32 248, %7
%9 = call i32 @put8(i32 %8)
%10 = load i32, i32* %4
%11 = call i32 @put32(i32 %10)
ret void
}

LLVM IR (-O2):
define void @cmp_reg64_imm32(i32 %0, i32 %1) {
%3 = tail call i32 @put8(i32 72)
%4 = tail call i32 @put8(i32 129)
%5 = add nsw i32 %0, 248
%6 = tail call i32 @put8(i32 %5)
%7 = tail call i32 @put32(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int print_digest_manifest(char *);
int /*<<< orphan*/ stderr;
int do_get_signature(int num_args, char **args) {
  if (num_args != 1) {
    fprintf(stderr, "usage: get-signature FILE\n");
    return 1;
  }
  return print_digest_manifest(args[0]);
}


x86 assembly (clang, -O0):
<do_get_signature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     115a <do_get_signature+0x3a>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1169 <do_get_signature+0x49>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <print_digest_manifest@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_get_signature>:
push   %rax
cmp    $0x1,%edi
jne    112f <do_get_signature+0xf>
mov    (%rsi),%rdi
pop    %rax
jmp    1030 <print_digest_manifest@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"usage: get-signature FILE\0A\00"
define i32 @do_get_signature(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %2
%8 = load i8*, i8** %1
%9 = tail call i32 @print_digest_manifest(i8* %8)
br label %10
10: ; preds = %7, %4
%11 = phi i32 [ 1, %4 ], [ %9, %7 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", sizeof(short));
  printf("%d\n", sizeof(int));
  printf("%d\n", sizeof(long));
  printf("%d\n", sizeof(float));
  printf("%d\n", sizeof(double));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xea1(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printmatwl(double *, int, int, int);
void printmatl(double *a, int m, int n) { printmatwl(a, m, n, 5); }


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

x86 assembly (clang, -O2):
<printmatl>:
mov    $0x5,%ecx
jmp    1030 <printmatwl@plt>

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

LLVM IR (-O2):
define void @printmatl(double* %0, i32 %1, i32 %2) {
%4 = tail call i32 @printmatwl(double* %0, i32 %1, i32 %2, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ one_three();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("starting now:\n");
  one_three();
  printf("done!\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <one_three@plt>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <one_three@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"starting now:\0A\00"
@.str.1 = [7 x i8] c"done!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @one_three()
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"starting now:\00"
@str.2 = [6 x i8] c"done!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @one_three()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char cstring_req_type(size_t string_size) {
  if (string_size < 1 << 5)
    return 0;
  if (string_size < 1 << 8)
    return 1;
  if (string_size < 1 << 16)
    return 2;
  if (string_size < 1ll << 32)
    return 3;
  return 4;
}


x86 assembly (clang, -O0):
<cstring_req_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x20,-0x10(%rbp)
jae    111c <cstring_req_type+0x1c>
movb   $0x0,-0x1(%rbp)
jmp    116b <cstring_req_type+0x6b>
cmpq   $0x100,-0x10(%rbp)
jae    1133 <cstring_req_type+0x33>
movb   $0x1,-0x1(%rbp)
jmp    116b <cstring_req_type+0x6b>
cmpq   $0x10000,-0x10(%rbp)
jae    114a <cstring_req_type+0x4a>
movb   $0x2,-0x1(%rbp)
jmp    116b <cstring_req_type+0x6b>
movabs $0x100000000,%rax
cmp    %rax,-0x10(%rbp)
jae    1167 <cstring_req_type+0x67>
movb   $0x3,-0x1(%rbp)
jmp    116b <cstring_req_type+0x6b>
movb   $0x4,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstring_req_type>:
cmp    $0x20,%rdi
jae    1109 <cstring_req_type+0x9>
xor    %eax,%eax
ret
mov    $0x1,%al
cmp    $0x100,%rdi
jb     112b <cstring_req_type+0x2b>
mov    $0x2,%al
cmp    $0x10000,%rdi
jb     112b <cstring_req_type+0x2b>
shr    $0x20,%rdi
cmp    $0x1,%rdi
mov    $0x4,%al
sbb    $0x0,%al
ret

LLVM IR (-O0):
define signext i8 @cstring_req_type(i64 %0) {
%2 = alloca i8
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ult i64 %4, 32
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 0, i8* %2
br label %20
7: ; preds = %1
%8 = load i64, i64* %3
%9 = icmp ult i64 %8, 256
br i1 %9, label %10, label %11
10: ; preds = %7
store i8 1, i8* %2
br label %20
11: ; preds = %7
%12 = load i64, i64* %3
%13 = icmp ult i64 %12, 65536
br i1 %13, label %14, label %15
14: ; preds = %11
store i8 2, i8* %2
br label %20
15: ; preds = %11
%16 = load i64, i64* %3
%17 = icmp ult i64 %16, 4294967296
br i1 %17, label %18, label %19
18: ; preds = %15
store i8 3, i8* %2
br label %20
19: ; preds = %15
store i8 4, i8* %2
br label %20
20: ; preds = %19, %18, %14, %10, %6
%21 = load i8, i8* %2
ret i8 %21
}

LLVM IR (-O2):
define signext i8 @cstring_req_type(i64 %0) {
%2 = icmp ult i64 %0, 32
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp ult i64 %0, 256
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp ult i64 %0, 65536
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i64 %0, 4294967296
%9 = select i1 %8, i8 3, i8 4
br label %10
10: ; preds = %7, %5, %3, %1
%11 = phi i8 [ 0, %1 ], [ 1, %3 ], [ 2, %5 ], [ %9, %7 ]
ret i8 %11
}
void ff_hevc_put_hevc_uni_epel_hv12_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv12_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Atm128CounterC__0__Counter__overflow();
void Atm128CounterC__0__Timer__overflow(void) {
  Atm128CounterC__0__Counter__overflow();
}


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

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

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

LLVM IR (-O2):
define void @Atm128CounterC__0__Timer__overflow() {
%1 = tail call i32 (...) @Atm128CounterC__0__Counter__overflow()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void RogueVMTraceMethod(void *allocation) {
  printf("TODO: RogueVMTraceMethod()\n");
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"TODO: RogueVMTraceMethod()\0A\00"
define void @RogueVMTraceMethod(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"TODO: RogueVMTraceMethod()\00"
define void @RogueVMTraceMethod(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EOF;
int fputs(char const *, int /*<<< orphan*/);
scalar_t__ putchar(char);
int /*<<< orphan*/ stdout;
int puts(const char *str) {
  int out = fputs(str, stdout);
  if (out < 0)
    return out;
  if (0 == putchar('\n'))
    return EOF;
  return out + 1;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1156 <puts+0x36>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1188 <puts+0x68>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    117f <puts+0x5f>
mov    0x2e73(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1188 <puts+0x68>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1152 <puts+0x32>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %rax,%rax
je     1149 <puts+0x29>
add    $0x1,%ebx
jmp    1152 <puts+0x32>
mov    0x2e98(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@EOF = global i32 0
define i32 @puts(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %20
12: ; preds = %1
%13 = call i64 @putchar(i8 signext 10)
%14 = icmp eq i64 0, %13
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = load i32, i32* @EOF
store i32 %16, i32* %2
br label %20
17: ; preds = %12
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %15, %10
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@stdout = global i32 0
@EOF = global i32 0
define i32 @puts(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %1
%6 = tail call i64 @putchar(i8 signext 10)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = load i32, i32* @EOF
br label %12
10: ; preds = %5
%11 = add nuw nsw i32 %3, 1
br label %12
12: ; preds = %1, %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ], [ %3, %1 ]
ret i32 %13
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int n1 = 32;
  int n2 = 28;
  printf("MAX %d\n", ((n1) > (n2) ? (n1) : (n2)));
  printf("%d\n", n1);
  ;
  printf("%d\n", n2);
  ;
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x20,-0x8(%rbp)
movl   $0x1c,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1144 <main+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114a <main+0x3a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
lea    0xedb(%rip),%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1c,%esi
call   1030 <printf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"MAX %d\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 32, i32* %2
store i32 28, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp sgt i32 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i32, i32* %2
br label %11
9: ; preds = %0
%10 = load i32, i32* %3
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ]
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}

LLVM IR (-O2):
@.str = [8 x i8] c"MAX %d\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 32)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 32)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 28)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
void __gnat_default_unlock(void) { return; }


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

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

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

LLVM IR (-O2):
define void @__gnat_default_unlock() {
ret void
}
void gtk_action_connect_proxy() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_connect_proxy() {
ret void
}
void genni() {}


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

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

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

LLVM IR (-O2):
define void @genni() {
ret void
}
long gcd(long m, long n) {
  long t;
  while (n != 0) {
    t = n;
    n = m % n;
    m = t;
  }
  return m;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113a <gcd+0x3a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    110c <gcd+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <gcd+0x35>
mov    %rsi,%rdx
jmp    111d <gcd+0x1d>
nopl   (%rax)
cqto
idiv   %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <gcd+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <gcd+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <gcd+0x15>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @gcd(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
br label %6
6: ; preds = %9, %2
%7 = load i64, i64* %4
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i64, i64* %4
store i64 %10, i64* %5
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = srem i64 %11, %12
store i64 %13, i64* %4
%14 = load i64, i64* %5
store i64 %14, i64* %3
br label %6
15: ; preds = %6
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @gcd(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %6, %4 ], [ %0, %2 ]
%6 = phi i64 [ %7, %4 ], [ %1, %2 ]
%7 = srem i64 %5, %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %0, %2 ], [ %6, %4 ]
ret i64 %10
}
/* Variables and functions */
int Run_SemVer(int, char **);
int main(int argc, char **argv) { return (Run_SemVer(argc, argv)); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <Run_SemVer@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @Run_SemVer(i32 %0, i8** %1)
ret i32 %3
}
double Sleef_erfc_u15(double x) { return __builtin_erfc(x); }


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

x86 assembly (clang, -O2):
<Sleef_erfc_u15>:
jmp    1030 <erfc@plt>

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

LLVM IR (-O2):
define double @Sleef_erfc_u15(double %0) {
%2 = tail call double @erfc(double %0)
ret double %2
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sched_rr_get_interval(int, struct timespec *);
int main() {
  struct timespec tp;
  sched_rr_get_interval(0, &tp);
  sched_rr_get_interval(-1, &tp);
  sched_rr_get_interval(999999, &tp);
  sched_rr_get_interval(0, (struct timespec *)-1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
call   1030 <sched_rr_get_interval@plt>
mov    $0xffffffff,%edi
lea    -0x8(%rbp),%rsi
call   1030 <sched_rr_get_interval@plt>
mov    $0xf423f,%edi
lea    -0x8(%rbp),%rsi
call   1030 <sched_rr_get_interval@plt>
xor    %edi,%edi
mov    $0xffffffffffffffff,%rsi
call   1030 <sched_rr_get_interval@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <sched_rr_get_interval@plt>
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1030 <sched_rr_get_interval@plt>
mov    $0xf423f,%edi
mov    %rbx,%rsi
call   1030 <sched_rr_get_interval@plt>
xor    %edi,%edi
mov    $0xffffffffffffffff,%rsi
call   1030 <sched_rr_get_interval@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timespec
store i32 0, i32* %1
%3 = call i32 @sched_rr_get_interval(i32 0, %struct.timespec* %2)
%4 = call i32 @sched_rr_get_interval(i32 -1, %struct.timespec* %2)
%5 = call i32 @sched_rr_get_interval(i32 999999, %struct.timespec* %2)
%6 = call i32 @sched_rr_get_interval(i32 0, %struct.timespec* inttoptr (i64 -1 to %struct.timespec*))
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @main() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = call i32 @sched_rr_get_interval(i32 0, %struct.timespec* %1)
%4 = call i32 @sched_rr_get_interval(i32 -1, %struct.timespec* %1)
%5 = call i32 @sched_rr_get_interval(i32 999999, %struct.timespec* %1)
%6 = call i32 @sched_rr_get_interval(i32 0, %struct.timespec* inttoptr (i64 -1 to %struct.timespec*))
ret i32 0
}
int test_imm_5Fint16_reg(short val) {
  return ((val) & (-0x5F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Fint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffffa1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Fint16_reg>:
test   $0xffa1,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Fint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -95
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_5Fint16_reg(i16 signext %0) {
%2 = and i16 %0, -95
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Fish001();
int /*<<< orphan*/ Fish002();
int /*<<< orphan*/ Fish003();
int /*<<< orphan*/ Fish004();
int /*<<< orphan*/ Fish005();
int /*<<< orphan*/ Fish006();
int /*<<< orphan*/ Fish007();
int /*<<< orphan*/ Fish008();
int /*<<< orphan*/ Fish009();
void Fish_5(void) {
  Fish009();
  Fish006();
  Fish007();
  Fish001();
  Fish002();
  Fish003();
  Fish008();
  Fish004();
  Fish005();
}


x86 assembly (clang, -O0):
<Fish_5>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <Fish009@plt>
mov    $0x0,%al
call   1090 <Fish006@plt>
mov    $0x0,%al
call   1060 <Fish007@plt>
mov    $0x0,%al
call   1050 <Fish001@plt>
mov    $0x0,%al
call   1080 <Fish002@plt>
mov    $0x0,%al
call   1040 <Fish003@plt>
mov    $0x0,%al
call   10b0 <Fish008@plt>
mov    $0x0,%al
call   10a0 <Fish004@plt>
mov    $0x0,%al
call   1030 <Fish005@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fish_5>:
push   %rax
xor    %eax,%eax
call   1070 <Fish009@plt>
xor    %eax,%eax
call   1090 <Fish006@plt>
xor    %eax,%eax
call   1060 <Fish007@plt>
xor    %eax,%eax
call   1050 <Fish001@plt>
xor    %eax,%eax
call   1080 <Fish002@plt>
xor    %eax,%eax
call   1040 <Fish003@plt>
xor    %eax,%eax
call   10b0 <Fish008@plt>
xor    %eax,%eax
call   10a0 <Fish004@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Fish005@plt>

LLVM IR (-O0):
define void @Fish_5() {
%1 = call i32 (...) @Fish009()
%2 = call i32 (...) @Fish006()
%3 = call i32 (...) @Fish007()
%4 = call i32 (...) @Fish001()
%5 = call i32 (...) @Fish002()
%6 = call i32 (...) @Fish003()
%7 = call i32 (...) @Fish008()
%8 = call i32 (...) @Fish004()
%9 = call i32 (...) @Fish005()
ret void
}

LLVM IR (-O2):
define void @Fish_5() {
%1 = tail call i32 (...) @Fish009()
%2 = tail call i32 (...) @Fish006()
%3 = tail call i32 (...) @Fish007()
%4 = tail call i32 (...) @Fish001()
%5 = tail call i32 (...) @Fish002()
%6 = tail call i32 (...) @Fish003()
%7 = tail call i32 (...) @Fish008()
%8 = tail call i32 (...) @Fish004()
%9 = tail call i32 (...) @Fish005()
ret void
}
void window_tooltip_emptysub() {}


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

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

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

LLVM IR (-O2):
define void @window_tooltip_emptysub() {
ret void
}
int test_imm_5Cuint32_mem(unsigned int *val) {
  return ((*val) & (0x5C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Cuint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x5c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Cuint32_mem>:
testb  $0x5c,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Cuint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 92
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_5Cuint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 92
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int strcmp(char const *, char const *);
int comp_string(const void *str1, const void *str2) {
  const char **s1 = (const char **)str1;
  const char **s2 = (const char **)str2;
  return strcmp(*s1, *s2);
}


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

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

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

LLVM IR (-O2):
define i32 @comp_string(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int test_server_nonblock_slow();
int main() {
  int nret = 0;
  nret = test_server_nonblock_slow();
  return -nret;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_server_nonblock_slow@plt>
neg    %eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_server_nonblock_slow()
%2 = sub nsw i32 0, %1
ret i32 %2
}