xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cblas_cswap(int const, void *, int const, void *, int const);
void c_cswap(const int N, void *X, const int strideX, void *Y,
             const int strideY) {
  cblas_cswap(N, X, strideX, Y, strideY);
}


x86 assembly (clang, -O0):
<c_cswap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <cblas_cswap@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_cswap>:
jmp    1030 <cblas_cswap@plt>

LLVM IR (-O0):
define void @c_cswap(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i32 @cblas_cswap(i32 %11, i8* %12, i32 %13, i8* %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @c_cswap(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @cblas_cswap(i32 %0, i8* %1, i32 %2, i8* %3, i32 %4)
ret void
}
c() {}


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

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

LLVM IR (-O0):
define i32 @c() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @c() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf("Usage: app.out [input_filename] [output_filename] [options]\n"
         "Where options include:\n"
         "-d                print debug messages [default OFF]\n"
         "-e                print errors [default OFF]\n"
         "-p                print matrix [default OFF]\n"
         "-t                print execution time [default OFF]\n"
         "-prec=<num>       precision [default - 1e-20]\n"
         "-eps=<num>        'epsilon' [default - 1e-20]\n"
         "-max_iter=<num>   limit number of iterations [default - 0, i.e. not "
         "limit]\n"
         "-h, -?            print this and exit\n");
}


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

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

LLVM IR (-O0):
@.str = [485 x i8] c"Usage: app.out [input_filename] [output_filename] [options]\0AWhere options include:\0A-d print debug messages [default OFF]\0A-e print errors [default OFF]\0A-p print matrix [default OFF]\0A-t print execution time [default OFF]\0A-prec=<num> precision [default - 1e-20]\0A-eps=<num> 'epsilon' [default - 1e-20]\0A-max_iter=<num> limit number of iterations [default - 0, i.e. not limit]\0A-h, -? print this and exit\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([485 x i8], [485 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [484 x i8] c"Usage: app.out [input_filename] [output_filename] [options]\0AWhere options include:\0A-d print debug messages [default OFF]\0A-e print errors [default OFF]\0A-p print matrix [default OFF]\0A-t print execution time [default OFF]\0A-prec=<num> precision [default - 1e-20]\0A-eps=<num> 'epsilon' [default - 1e-20]\0A-max_iter=<num> limit number of iterations [default - 0, i.e. not limit]\0A-h, -? print this and exit\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([484 x i8], [484 x i8]* @str, i64 0, i64 0))
ret void
}
int f(int a) {
  int fem_key_src;
  int D2930 = a & 4294967291;
  fem_key_src = a == 6 ? 0 : 15;
  fem_key_src = D2930 != 1 ? fem_key_src : 0;
  return fem_key_src;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xfffffffb,%rcx
and    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xf,%eax
xor    %ecx,%ecx
cmp    $0x6,%edx
cmove  %ecx,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1143 <f+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114d <f+0x4d>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    114d <f+0x4d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
and    $0xfffffffb,%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
mov    $0xf,%eax
cmove  %ecx,%eax
cmp    $0x6,%edi
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = and i32 %0, -5
%3 = icmp eq i32 %0, 6
%4 = icmp eq i32 %2, 1
%5 = or i1 %3, %4
%6 = select i1 %5, i32 0, i32 15
ret i32 %6
}
int nstrcpy(char *s, const char *t) {
  int n;
  for (n = 0; (s[n] = t[n]) != '\0'; n++)
    ;
  return n;
}


x86 assembly (clang, -O0):
<nstrcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1148 <nstrcpy+0x48>
jmp    113a <nstrcpy+0x3a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <nstrcpy+0x13>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nstrcpy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <nstrcpy+0x10>
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @nstrcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = icmp eq i8 %6, 0
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
%11 = trunc i64 %4 to i32
ret i32 %11
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
char *getExecutablePath(char *nameFile) {
  char *newPath = malloc(sizeof(char) * 1024);
  sprintf(newPath, "./%s", nameFile);
  return newPath;
}


x86 assembly (clang, -O0):
<getExecutablePath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb7(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getExecutablePath>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec5(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"./%s\00"
define i8* @getExecutablePath(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @malloc(i32 1024)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [5 x i8] c"./%s\00"
define noalias i8* @getExecutablePath(i8* %0) {
%2 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %2
}
int spaceship1(long a) { return a > 0 ? 1 : a < 0 ? -1 : 0; }


x86 assembly (clang, -O0):
<spaceship1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    1120 <spaceship1+0x20>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1135 <spaceship1+0x35>
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spaceship1>:
xor    %ecx,%ecx
test   %rdi,%rdi
setne  %cl
neg    %ecx
test   %rdi,%rdi
mov    $0x1,%eax
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @spaceship1(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load i64, i64* %2
%8 = icmp slt i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 -1, i32 0
br label %11
11: ; preds = %6, %5
%12 = phi i32 [ 1, %5 ], [ %10, %6 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @spaceship1(i64 %0) {
%2 = icmp sgt i64 %0, 0
%3 = icmp ne i64 %0, 0
%4 = sext i1 %3 to i32
%5 = select i1 %2, i32 1, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ SkipQuotes(char **);
int DoACName(char *s) {
  SkipQuotes(&s);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @DoACName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @SkipQuotes(i8** %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @DoACName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @SkipQuotes(i8** %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ IPPROTO_TCP;
int /*<<< orphan*/ TCP_NODELAY;
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, char *, int);
int disable_tcp_nagle(int sockfd) {
  int flag = 1;
  int ret = 0;
  return setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag,
                    sizeof(int));
}


x86 assembly (clang, -O0):
<disable_tcp_nagle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_tcp_nagle>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ebf(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rcx
ret

LLVM IR (-O0):
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define i32 @disable_tcp_nagle(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* @IPPROTO_TCP
%7 = load i32, i32* @TCP_NODELAY
%8 = bitcast i32* %3 to i8*
%9 = call i32 @setsockopt(i32 %5, i32 %6, i32 %7, i8* %8, i32 4)
ret i32 %9
}

LLVM IR (-O2):
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define i32 @disable_tcp_nagle(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @IPPROTO_TCP
%5 = load i32, i32* @TCP_NODELAY
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i8* %3, i32 4)
ret i32 %6
}
void BN_div_recp(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_div_recp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_open();
int /*<<< orphan*/ logx(int, char *, int);
int /*<<< orphan*/ ws_init();
scalar_t__ ws_openserver(int);
int startup(int port) {
  log_open();
  logx(3, "startup %i\n", port);
  ws_init();
  if (ws_openserver(port))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<startup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <log_open@plt>
mov    -0x8(%rbp),%edx
mov    $0x3,%edi
lea    0xe9f(%rip),%rsi
call   1040 <logx@plt>
mov    $0x0,%al
call   1050 <ws_init@plt>
mov    -0x8(%rbp),%edi
call   1060 <ws_openserver@plt>
cmp    $0x0,%rax
je     118b <startup+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1192 <startup+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startup>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <log_open@plt>
lea    0xeaf(%rip),%rsi
mov    $0x3,%edi
mov    %ebx,%edx
call   1040 <logx@plt>
xor    %eax,%eax
call   1050 <ws_init@plt>
mov    %ebx,%edi
call   1060 <ws_openserver@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"startup %i\0A\00"
define i32 @startup(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (...) @log_open()
%5 = load i32, i32* %3
%6 = call i32 @logx(i32 3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @ws_init()
%8 = load i32, i32* %3
%9 = call i64 @ws_openserver(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [12 x i8] c"startup %i\0A\00"
define i32 @startup(i32 %0) {
%2 = tail call i32 (...) @log_open()
%3 = tail call i32 @logx(i32 3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 (...) @ws_init()
%5 = tail call i64 @ws_openserver(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int tinyrely_close(int);
int tinystream_close_connection(int id) { return tinyrely_close(id); }


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

x86 assembly (clang, -O2):
<tinystream_close_connection>:
jmp    1030 <tinyrely_close@plt>

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

LLVM IR (-O2):
define i32 @tinystream_close_connection(i32 %0) {
%2 = tail call i32 @tinyrely_close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, char const *);
void usage(const char *progname) {
  die("usage: %s <file> [<file> ...]", progname);
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"usage: %s <file> [<file> ...]\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @die(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"usage: %s <file> [<file> ...]\00"
define void @usage(i8* %0) {
%2 = tail call i32 @die(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void ceph_fscache_readpages_cancel(struct inode *inode,
                                   struct list_head *pages) {}


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

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

LLVM IR (-O0):
%struct.inode = type opaque
%struct.list_head = type opaque
define void @ceph_fscache_readpages_cancel(%struct.inode* %0, %struct.list_head* %1) {
%3 = alloca %struct.inode*
%4 = alloca %struct.list_head*
store %struct.inode* %0, %struct.inode** %3
store %struct.list_head* %1, %struct.list_head** %4
ret void
}

LLVM IR (-O2):
%struct.inode = type opaque
%struct.list_head = type opaque
define void @ceph_fscache_readpages_cancel(%struct.inode* nocapture %0, %struct.list_head* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ menu();
int main(int argc, char **argv) {
  while (1)
    menu();
}


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    $0x0,%al
call   1030 <menu@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <menu@plt>
jmp    1120 <main+0x10>

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
br label %6
6: ; preds = %2, %6
%7 = call i32 (...) @menu()
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = tail call i32 (...) @menu()
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void print_help_crit_time(const char *def) {
  printf(" -c, --critical=time[d|h|m|s]\n      Return critical if elapsed time "
         "exceeds value. Defaults to %s\n",
         def);
}


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

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

LLVM IR (-O0):
@.str = [99 x i8] c" -c, --critical=time[d|h|m|s]\0A Return critical if elapsed time exceeds value. Defaults to %s\0A\00"
define void @print_help_crit_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [99 x i8] c" -c, --critical=time[d|h|m|s]\0A Return critical if elapsed time exceeds value. Defaults to %s\0A\00"
define void @print_help_crit_time(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int test_imm_CEint8_reg(signed char val) {
  return ((val) & (-0xCE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CEint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff32,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_CEint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -206
%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_CEint8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -206
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void h_cmgf(char *name, int argc, char **argv, void *user_data) {
  printf("Called: %s\n", __FUNCTION__);
}


x86 assembly (clang, -O0):
<h_cmgf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    0xed2(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_cmgf>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Called: %s\0A\00"
@__FUNCTION__.h_cmgf = [7 x i8] c"h_cmgf\00"
define void @h_cmgf(i8* %0, i32 %1, i8** %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i8* %3, i8** %8
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.h_cmgf, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Called: %s\0A\00"
@__FUNCTION__.h_cmgf = [7 x i8] c"h_cmgf\00"
define void @h_cmgf(i8* nocapture readnone %0, i32 %1, i8** nocapture readnone %2, i8* nocapture readnone %3) {
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.h_cmgf, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ arrangeUnlink(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
int /*<<< orphan*/ pm_make_tmpfile(int /*<<< orphan*/ **, char const **);
int /*<<< orphan*/ pm_strfree(char const *);
FILE *pm_tmpfile(void) {
  FILE *fileP;
  const char *tmpfileNm;
  pm_make_tmpfile(&fileP, &tmpfileNm);
  arrangeUnlink(tmpfileNm, fileno(fileP));
  pm_strfree(tmpfileNm);
  return fileP;
}


x86 assembly (clang, -O0):
<pm_tmpfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <pm_make_tmpfile@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fileno@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <arrangeUnlink@plt>
mov    -0x10(%rbp),%rdi
call   1050 <pm_strfree@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm_tmpfile>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1060 <pm_make_tmpfile@plt>
mov    (%rsp),%rbx
mov    0x8(%rsp),%rdi
call   1040 <fileno@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <arrangeUnlink@plt>
mov    (%rsp),%rdi
call   1050 <pm_strfree@plt>
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32* @pm_tmpfile() {
%1 = alloca i32*
%2 = alloca i8*
%3 = call i32 @pm_make_tmpfile(i32** %1, i8** %2)
%4 = load i8*, i8** %2
%5 = load i32*, i32** %1
%6 = call i32 @fileno(i32* %5)
%7 = call i32 @arrangeUnlink(i8* %4, i32 %6)
%8 = load i8*, i8** %2
%9 = call i32 @pm_strfree(i8* %8)
%10 = load i32*, i32** %1
ret i32* %10
}

LLVM IR (-O2):
define i32* @pm_tmpfile() {
%1 = alloca i32*
%2 = alloca i8*
%3 = bitcast i32** %1 to i8*
%4 = bitcast i8** %2 to i8*
%5 = call i32 @pm_make_tmpfile(i32** %1, i8** %2)
%6 = load i8*, i8** %2
%7 = load i32*, i32** %1
%8 = call i32 @fileno(i32* %7)
%9 = call i32 @arrangeUnlink(i8* %6, i32 %8)
%10 = load i8*, i8** %2
%11 = call i32 @pm_strfree(i8* %10)
%12 = load i32*, i32** %1
ret i32* %12
}
/* Variables and functions */
int /*<<< orphan*/ blockhere();
int /*<<< orphan*/ init_pool();
int main(int argc, char *argv[]) {
  init_pool();
  blockhere();
  return -1;
}


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    $0x0,%al
call   1030 <init_pool@plt>
mov    $0x0,%al
call   1040 <blockhere@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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 = call i32 (...) @init_pool()
%7 = call i32 (...) @blockhere()
ret i32 -1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_pool()
%4 = tail call i32 (...) @blockhere()
ret i32 -1
}
_Bool ne_float_rc(float a, float _Complex b) { return a != b; }


x86 assembly (clang, -O0):
<ne_float_rc>:
push   %rbp
mov    %rsp,%rbp
movlpd %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
ucomiss %xmm2,%xmm0
setne  %al
setp   %cl
or     %cl,%al
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
setne  %cl
setp   %dl
or     %dl,%cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_float_rc>:
ucomiss %xmm0,%xmm1
shufps $0x55,%xmm1,%xmm1
setp   %al
setne  %cl
or     %al,%cl
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
setp   %dl
setne  %al
or     %dl,%al
or     %cl,%al
ret

LLVM IR (-O0):
define zeroext i1 @ne_float_rc(float %0, <2 x float> %1) {
%3 = alloca { float, float }
%4 = alloca float
%5 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %1, <2 x float>* %5
store float %0, float* %4
%6 = load float, float* %4
%7 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%8 = load float, float* %7
%9 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%10 = load float, float* %9
%11 = fcmp une float %6, %8
%12 = fcmp une float 0.000000e+00, %10
%13 = or i1 %11, %12
ret i1 %13
}

LLVM IR (-O2):
define zeroext i1 @ne_float_rc(float %0, <2 x float> %1) {
%3 = extractelement <2 x float> %1, i64 0
%4 = extractelement <2 x float> %1, i64 1
%5 = fcmp une float %3, %0
%6 = fcmp une float %4, 0.000000e+00
%7 = or i1 %5, %6
ret i1 %7
}
/* Variables and functions */
int /*<<< orphan*/ si475xFMRX_tune(int /*<<< orphan*/, unsigned short);
void si47xxFMRX_tune(int channel) {
  si475xFMRX_tune(0, (unsigned short)(channel & 0xffff));
}


x86 assembly (clang, -O0):
<si47xxFMRX_tune>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
xor    %edi,%edi
movzwl %ax,%esi
call   1030 <si475xFMRX_tune@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<si47xxFMRX_tune>:
movzwl %di,%esi
xor    %edi,%edi
jmp    1030 <si475xFMRX_tune@plt>

LLVM IR (-O0):
define void @si47xxFMRX_tune(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65535
%5 = trunc i32 %4 to i16
%6 = call i32 @si475xFMRX_tune(i32 0, i16 zeroext %5)
ret void
}

LLVM IR (-O2):
define void @si47xxFMRX_tune(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i32 @si475xFMRX_tune(i32 0, i16 zeroext %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void help() {
  printf("dump-elf-metadata: a tool to dump the .metadata section of an ELF "
         "binary\n"
         "Usage: dump-elf-metadata /path/to/binary\n\n"
         "(C) 2005 Mike Hearn <mike@plan99.net>\n\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [155 x i8] c"dump-elf-metadata: a tool to dump the .metadata section of an ELF binary\0AUsage: dump-elf-metadata /path/to/binary\0A\0A(C) 2005 Mike Hearn <mike@plan99.net>\0A\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [154 x i8] c"dump-elf-metadata: a tool to dump the .metadata section of an ELF binary\0AUsage: dump-elf-metadata /path/to/binary\0A\0A(C) 2005 Mike Hearn <mike@plan99.net>\0A\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([154 x i8], [154 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
void instr_nop(void) {}


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

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

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

LLVM IR (-O2):
define void @instr_nop() {
ret void
}
/* Variables and functions */
int strlen(char const *);
int is_type_name(char const *s) {
  return s[0] == '[' && s[strlen(s) - 1] == ']';
}


x86 assembly (clang, -O0):
<is_type_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x5b,%ecx
mov    %al,-0x9(%rbp)
jne    115b <is_type_name+0x4b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5d,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_type_name>:
push   %rbx
xor    %eax,%eax
cmpb   $0x5b,(%rdi)
jne    112d <is_type_name+0x1d>
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
xor    %eax,%eax
cmpb   $0x5d,-0x1(%rcx,%rbx,1)
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_type_name(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 91
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 93
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %4, %1
%13 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %13
}
/* Variables and functions */
int readBytes(int, unsigned char, char, unsigned char *);
int bsReadBytes(unsigned char *values, char length) {
  return readBytes(0x77, values[0], length, values);
}


x86 assembly (clang, -O0):
<bsReadBytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%dl
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%rcx
mov    $0x77,%edi
movzbl %dl,%esi
movsbl %al,%edx
call   1030 <readBytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsReadBytes>:
mov    %esi,%edx
mov    %rdi,%rcx
movzbl (%rdi),%esi
mov    $0x77,%edi
jmp    1030 <readBytes@plt>

LLVM IR (-O0):
define i32 @bsReadBytes(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = load i8, i8* %4
%9 = load i8*, i8** %3
%10 = call i32 @readBytes(i32 119, i8 zeroext %7, i8 signext %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @bsReadBytes(i8* %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = tail call i32 @readBytes(i32 119, i8 zeroext %3, i8 signext %1, i8* %0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Direct(int);
int /*<<< orphan*/ STX8(int /*<<< orphan*/);
void Op86X1(void) { STX8(Direct(2)); }


x86 assembly (clang, -O0):
<Op86X1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <Direct@plt>
mov    %eax,%edi
call   1040 <STX8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op86X1>:
push   %rax
mov    $0x2,%edi
call   1030 <Direct@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <STX8@plt>

LLVM IR (-O0):
define void @Op86X1() {
%1 = call i32 @Direct(i32 2)
%2 = call i32 @STX8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op86X1() {
%1 = tail call i32 @Direct(i32 2)
%2 = tail call i32 @STX8(i32 %1)
ret void
}
int digit_fact_sum(int n, const int digits[]) {
  int sum = 0;
  for (; n > 0; n /= 10) {
    sum += digits[n % 10];
  }
  return sum;
}


x86 assembly (clang, -O0):
<digit_fact_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1152 <digit_fact_sum+0x52>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rax
movslq %edx,%rcx
mov    (%rax,%rcx,4),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1112 <digit_fact_sum+0x12>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit_fact_sum>:
xor    %eax,%eax
test   %edi,%edi
jle    1130 <digit_fact_sum+0x30>
mov    $0xcccccccd,%r8d
nopl   0x0(%rax)
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%ecx
lea    (%rcx,%rcx,4),%r9d
mov    %edi,%ecx
sub    %r9d,%ecx
add    (%rsi,%rcx,4),%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <digit_fact_sum+0x10>
ret

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

LLVM IR (-O2):
define i32 @digit_fact_sum(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 0, %2 ]
%6 = phi i32 [ %12, %4 ], [ %0, %2 ]
%7 = urem i32 %6, 10
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %1, i64 %8
%10 = load i32, i32* %9
%11 = add nsw i32 %10, %5
%12 = udiv i32 %6, 10
%13 = icmp ult i32 %6, 10
br i1 %13, label %14, label %4
14: ; preds = %4, %2
%15 = phi i32 [ 0, %2 ], [ %11, %4 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
scalar_t__ syscall(int, int /*<<< orphan*/, int /*<<< orphan*/,
                   int /*<<< orphan*/);
int write(int file, char *ptr, int len) {
  return (int)syscall(4, (uint)file, (uint)ptr, (uint)len);
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
mov    -0x14(%rbp),%ecx
mov    $0x4,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x4,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = ptrtoint i8* %1 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i64 @syscall(i32 4, i32 %0, i32 %5, i32 %2)
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ find(int *, int, int *, int *);
int test_one_element() {
  int one = 0;
  int two = 0;
  int array[] = {2};
  find(array, 1, &one, &two);
  return 2 == one && 0 == two;
}


x86 assembly (clang, -O0):
<test_one_element>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0xed4(%rip),%eax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
mov    $0x1,%esi
lea    -0x4(%rbp),%rdx
lea    -0x8(%rbp),%rcx
call   1030 <find@plt>
xor    %eax,%eax
mov    $0x2,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0xd(%rbp)
jne    1163 <test_one_element+0x53>
xor    %eax,%eax
cmp    -0x8(%rbp),%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_one_element>:
sub    $0x18,%rsp
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x2,0x14(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    $0x1,%esi
call   1030 <find@plt>
mov    0x10(%rsp),%ecx
xor    $0x2,%ecx
xor    %eax,%eax
or     0xc(%rsp),%ecx
sete   %al
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_one_element.array = [1 x i32] [i32 2]
define i32 @test_one_element() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1 x i32]
store i32 0, i32* %1
store i32 0, i32* %2
%4 = bitcast [1 x i32]* %3 to i8*
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
%6 = call i32 @find(i32* %5, i32 1, i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = icmp eq i32 2, %7
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp eq i32 0, %10
br label %12
12: ; preds = %9, %0
%13 = phi i1 [ false, %0 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @test_one_element() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1 x i32]
%4 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast [1 x i32]* %3 to i8*
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
store i32 2, i32* %7
%8 = call i32 @find(i32* %7, i32 1, i32* %1, i32* %2)
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 2
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 0
%13 = select i1 %10, i1 %12, i1 false
%14 = zext i1 %13 to i32
ret i32 %14
}
int test_imm_F3uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xF3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F3uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0xf3,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_F3uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1043677052928
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
void testLateAssignment() {
  int a;
  int *q;
  q = &a;
  a = 5;
  test(*q == a);
}


x86 assembly (clang, -O0):
<testLateAssignment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x5,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testLateAssignment>:
mov    $0x1,%edi
jmp    1030 <test@plt>

LLVM IR (-O0):
define void @testLateAssignment() {
%1 = alloca i32
%2 = alloca i32*
store i32* %1, i32** %2
store i32 5, i32* %1
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = load i32, i32* %1
%6 = icmp eq i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @test(i32 %7)
ret void
}

LLVM IR (-O2):
define void @testLateAssignment() {
%1 = tail call i32 @test(i32 1)
ret void
}
void nseel_asm_bnot_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_bnot_end() {
ret void
}
void av_cast5_alloc() {}


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

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

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

LLVM IR (-O2):
define void @av_cast5_alloc() {
ret void
}
int f(void *p) { return 3; }


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

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

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

LLVM IR (-O2):
define i32 @f(i8* nocapture readnone %0) {
ret i32 3
}
int main(void) {
  int a;
  a = 0;
  return (a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void out_char(int c) { putchar(c); }


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

x86 assembly (clang, -O2):
<out_char>:
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @out_char(i32 %0) {
%2 = tail call i32 @putchar(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ greet(int /*<<< orphan*/);
int /*<<< orphan*/ recursive_a(int);
void greet_a(int i) {
  greet(0);
  recursive_a(i);
}


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

x86 assembly (clang, -O2):
<greet_a>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <greet@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <recursive_a@plt>

LLVM IR (-O0):
define void @greet_a(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @greet(i32 0)
%4 = load i32, i32* %2
%5 = call i32 @recursive_a(i32 %4)
ret void
}

LLVM IR (-O2):
define void @greet_a(i32 %0) {
%2 = tail call i32 @greet(i32 0)
%3 = tail call i32 @recursive_a(i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char);
int _is_number_char(char c) {
  return (isdigit(c) || c == '.' || c == '-' || c == '+');
}


x86 assembly (clang, -O0):
<_is_number_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    116a <_is_number_char+0x5a>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0x2(%rbp)
je     116a <_is_number_char+0x5a>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     116a <_is_number_char+0x5a>
movsbl -0x1(%rbp),%eax
cmp    $0x2b,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_number_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
lea    -0x2d(%rbx),%ecx
cmp    $0x2,%cl
setb   %cl
or     %al,%cl
cmp    $0x2b,%bl
sete   %al
or     %cl,%al
movzbl %al,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_is_number_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isdigit(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 46
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 45
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 43
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @_is_number_char(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = add i8 %0, -45
%5 = icmp ult i8 %4, 2
%6 = or i1 %5, %3
%7 = icmp eq i8 %0, 43
%8 = or i1 %7, %6
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ emsRep(char *, char const *, int *);
void astPutErr_(int status, const char *message) {
  int local_status;
  local_status = status;
  emsRep("AST_ERROR", message, &local_status);
}


x86 assembly (clang, -O0):
<astPutErr_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed0(%rip),%rdi
lea    -0x14(%rbp),%rdx
call   1030 <emsRep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<astPutErr_>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0xee4(%rip),%rdi
lea    0x4(%rsp),%rdx
call   1030 <emsRep@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"AST_ERROR\00"
define void @astPutErr_(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i8*, i8** %4
%8 = call i32 @emsRep(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %7, i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"AST_ERROR\00"
define void @astPutErr_(i32 %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 %0, i32* %3
%5 = call i32 @emsRep(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1, i32* %3)
ret void
}