xunge/DecIR huggingface dataset:
char HexDigit(int Value) {
  if ((Value >= 0) && (Value < 10))
    return Value + '0';
  else if ((Value > 9) && (Value < 16))
    return Value - 10 + 'A';
  else
    return 'z';
}


x86 assembly (clang, -O0):
<HexDigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1129 <HexDigit+0x29>
cmpl   $0xa,-0x8(%rbp)
jge    1129 <HexDigit+0x29>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1152 <HexDigit+0x52>
cmpl   $0x9,-0x8(%rbp)
jle    114e <HexDigit+0x4e>
cmpl   $0x10,-0x8(%rbp)
jge    114e <HexDigit+0x4e>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    1152 <HexDigit+0x52>
movb   $0x7a,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HexDigit>:
cmp    $0x9,%edi
ja     110b <HexDigit+0xb>
add    $0x30,%dil
jmp    1119 <HexDigit+0x19>
lea    -0xa(%rdi),%ecx
mov    $0x7a,%al
cmp    $0x5,%ecx
ja     111b <HexDigit+0x1b>
add    $0x37,%dil
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @HexDigit(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = trunc i32 %0 to i8
%5 = add nuw nsw i8 %4, 48
br label %12
6: ; preds = %1
%7 = add i32 %0, -10
%8 = icmp ult i32 %7, 6
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = trunc i32 %0 to i8
%11 = add nuw nsw i8 %10, 55
br label %12
12: ; preds = %6, %9, %3
%13 = phi i8 [ %5, %3 ], [ %11, %9 ], [ 122, %6 ]
ret i8 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void erase_toeol(void) { printf("\033[K"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[K\00"
define void @erase_toeol() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[K\00"
define void @erase_toeol() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct inputfile {
  int dummy;
};

/* Variables and functions */
char const *get_token_white_char(struct inputfile *, char);
const char *get_token_table_start(struct inputfile *inf) {
  return get_token_white_char(inf, '{');
}


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

x86 assembly (clang, -O2):
<get_token_table_start>:
mov    $0x7b,%esi
jmp    1030 <get_token_white_char@plt>

LLVM IR (-O0):
%struct.inputfile = type { i32 }
define i8* @get_token_table_start(%struct.inputfile* %0) {
%2 = alloca %struct.inputfile*
store %struct.inputfile* %0, %struct.inputfile** %2
%3 = load %struct.inputfile*, %struct.inputfile** %2
%4 = call i8* @get_token_white_char(%struct.inputfile* %3, i8 signext 123)
ret i8* %4
}

LLVM IR (-O2):
%struct.inputfile = type { i32 }
define i8* @get_token_table_start(%struct.inputfile* %0) {
%2 = tail call i8* @get_token_white_char(%struct.inputfile* %0, i8 signext 123)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, char *, int);
void *realloc(void *, size_t);
void *erealloc(void *p, size_t n) {
  void *rv;
  if ((rv = realloc(p, n)) == NULL)
    fatal("realloc() failed", "", 1);
  return rv;
}


x86 assembly (clang, -O0):
<erealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1163 <erealloc+0x43>
lea    0xeae(%rip),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x1,%edx
call   1040 <fatal@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erealloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <erealloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x1,%edx
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"realloc() failed\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @erealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @fatal(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %12
12: ; preds = %10, %2
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
@.str = [17 x i8] c"realloc() failed\00"
@.str.1 = [1 x i8] zeroinitializer
define noalias i8* @erealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @fatal(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void foo(struct A *a) {}


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

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

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

LLVM IR (-O2):
%struct.A = type opaque
define void @foo(%struct.A* nocapture %0) {
ret void
}
void gdk_string_to_compound_text() {}


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

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

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

LLVM IR (-O2):
define void @gdk_string_to_compound_text() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rfree(int);
void rprotect() {
  int i;
  for (i = (1); i < (1 << 6); i <<= 1)
    rfree(i);
}


x86 assembly (clang, -O0):
<rprotect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    113f <rprotect+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <rfree@plt>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <rprotect+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rprotect>:
push   %rax
mov    $0x1,%edi
call   1030 <rfree@plt>
mov    $0x2,%edi
call   1030 <rfree@plt>
mov    $0x4,%edi
call   1030 <rfree@plt>
mov    $0x8,%edi
call   1030 <rfree@plt>
mov    $0x10,%edi
call   1030 <rfree@plt>
mov    $0x20,%edi
pop    %rax
jmp    1030 <rfree@plt>

LLVM IR (-O0):
define void @rprotect() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 64
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @rfree(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = shl i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @rprotect() {
%1 = tail call i32 @rfree(i32 1)
%2 = tail call i32 @rfree(i32 2)
%3 = tail call i32 @rfree(i32 4)
%4 = tail call i32 @rfree(i32 8)
%5 = tail call i32 @rfree(i32 16)
%6 = tail call i32 @rfree(i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WNOWAIT;
int /*<<< orphan*/ wait(int /*<<< orphan*/ *, int /*<<< orphan*/);
void handler(int s) { wait(NULL, WNOWAIT); }


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edi
call   1030 <wait@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
jmp    1030 <wait@plt>

LLVM IR (-O0):
@WNOWAIT = global i32 0
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @WNOWAIT
%4 = call i32 @wait(i32* null, i32 %3)
ret void
}

LLVM IR (-O2):
@WNOWAIT = global i32 0
define void @handler(i32 %0) {
%2 = load i32, i32* @WNOWAIT
%3 = tail call i32 @wait(i32* null, i32 %2)
ret void
}
int hash(int h) {
  unsigned int x = h;
  x ^= (x >> 20) ^ (x >> 12);
  return (x ^ (x >> 7) ^ (x >> 4));
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x14,%eax
mov    -0x8(%rbp),%ecx
shr    $0xc,%ecx
xor    %ecx,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    $0x7,%ecx
xor    %ecx,%eax
mov    -0x8(%rbp),%ecx
shr    $0x4,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    %edi,%eax
shr    $0xc,%eax
xor    %edi,%eax
shr    $0x14,%edi
xor    %edi,%eax
mov    %eax,%ecx
shr    $0x7,%ecx
xor    %eax,%ecx
shr    $0x4,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hash(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = lshr i32 %5, 20
%7 = load i32, i32* %3
%8 = lshr i32 %7, 12
%9 = xor i32 %6, %8
%10 = load i32, i32* %3
%11 = xor i32 %10, %9
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = load i32, i32* %3
%14 = lshr i32 %13, 7
%15 = xor i32 %12, %14
%16 = load i32, i32* %3
%17 = lshr i32 %16, 4
%18 = xor i32 %15, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @hash(i32 %0) {
%2 = lshr i32 %0, 20
%3 = lshr i32 %0, 12
%4 = xor i32 %3, %0
%5 = xor i32 %4, %2
%6 = lshr i32 %5, 7
%7 = xor i32 %6, %5
%8 = lshr i32 %5, 4
%9 = xor i32 %7, %8
ret i32 %9
}
/* Variables and functions */
int sockgetstatus(int);
int udpgetstatus(int sock) { return sockgetstatus(sock); }


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

x86 assembly (clang, -O2):
<udpgetstatus>:
jmp    1030 <sockgetstatus@plt>

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

LLVM IR (-O2):
define i32 @udpgetstatus(i32 %0) {
%2 = tail call i32 @sockgetstatus(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_strlen(char *);
int main(int argc, const char *argv[]) {
  ft_strlen("lolololololol");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"lolololololol\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @ft_strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"lolololololol\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @ft_strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
add(string1, string2) { return (binstr(strbin(string1) + strbin(string2))); }


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <strbin@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <strbin@plt>
mov    -0xc(%rbp),%edi
add    %eax,%edi
mov    $0x0,%al
call   1030 <binstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
xor    %eax,%eax
call   1040 <strbin@plt>
mov    %eax,%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <strbin@plt>
add    %eax,%ebp
mov    %ebp,%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <binstr@plt>

LLVM IR (-O0):
define i32 @add(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 (i32, ...) bitcast (i32 (...)* @strbin to i32 (i32, ...)*)(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 (i32, ...) bitcast (i32 (...)* @strbin to i32 (i32, ...)*)(i32 %7)
%9 = add nsw i32 %6, %8
%10 = call i32 (i32, ...) bitcast (i32 (...)* @binstr to i32 (i32, ...)*)(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @strbin to i32 (i32, ...)*)(i32 %0)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @strbin to i32 (i32, ...)*)(i32 %1)
%5 = add nsw i32 %4, %3
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @binstr to i32 (i32, ...)*)(i32 %5)
ret i32 %6
}
int bwx_LPRINT_WIDTH() { return 80; }


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

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

LLVM IR (-O0):
define i32 @bwx_LPRINT_WIDTH() {
ret i32 80
}

LLVM IR (-O2):
define i32 @bwx_LPRINT_WIDTH() {
ret i32 80
}
/* Variables and functions */
char *ctime(long *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ time(long *);
dotime() {
  long curtime;
  time(&curtime);
  printf(ctime(&curtime));
}


x86 assembly (clang, -O0):
<dotime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
call   1050 <time@plt>
lea    -0x10(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dotime>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1030 <ctime@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @dotime() {
%1 = alloca i32
%2 = alloca i64
%3 = call i32 @time(i64* %2)
%4 = call i8* @ctime(i64* %2)
%5 = call i32 @printf(i8* %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @dotime() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @time(i64* %1)
%4 = call i8* @ctime(i64* %1)
%5 = call i32 @printf(i8* dereferenceable(1) %4)
ret i32 undef
}
/* Type definitions */
typedef unsigned int uint64_t;
typedef unsigned int uint32_t;

/* Variables and functions */
size_t UINT32_MAX;
unsigned int aeron_hash_code(unsigned int);
size_t aeron_hash(uint64_t value, size_t mask) {
  uint64_t hash = aeron_hash_code(value);
  if (mask <= UINT32_MAX) {
    hash = (uint32_t)hash ^ (uint32_t)(hash >> 32u);
  }
  return (size_t)(hash & mask);
}


x86 assembly (clang, -O0):
<aeron_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <aeron_hash_code@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%rax
ja     1152 <aeron_hash+0x42>
mov    -0x14(%rbp),%eax
mov    -0x14(%rbp),%edx
mov    $0x20,%ecx
shr    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeron_hash>:
push   %rbx
mov    %rsi,%rbx
call   1030 <aeron_hash_code@plt>
and    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@UINT32_MAX = global i64 0
define i64 @aeron_hash(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i32, i32* %3
%7 = call i32 @aeron_hash_code(i32 %6)
store i32 %7, i32* %5
%8 = load i64, i64* %4
%9 = load i64, i64* @UINT32_MAX
%10 = icmp ule i64 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* %5
%13 = load i32, i32* %5
%14 = lshr i32 %13, 32
%15 = xor i32 %12, %14
store i32 %15, i32* %5
br label %16
16: ; preds = %11, %2
%17 = load i32, i32* %5
%18 = zext i32 %17 to i64
%19 = load i64, i64* %4
%20 = and i64 %18, %19
ret i64 %20
}

LLVM IR (-O2):
@UINT32_MAX = global i64 0
define i64 @aeron_hash(i32 %0, i64 %1) {
%3 = tail call i32 @aeron_hash_code(i32 %0)
%4 = zext i32 %3 to i64
%5 = and i64 %4, %1
ret i64 %5
}
void fn0000000000018378() { return; }


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @fn0000000000018378() {
ret void
}
void I400ToARGBRow_AVX2() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @I400ToARGBRow_AVX2() {
ret void
}
int shape_line2(double L, double *N) {
  N[0] = 0.5 * (1.0 - L);
  N[1] = 0.5 * (1.0 + L);
  return 0;
}


x86 assembly (clang, -O0):
<shape_line2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  0xef3(%rip),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  0xede(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xed2(%rip),%xmm1
addsd  -0x8(%rbp),%xmm1
movsd  0xebd(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shape_line2>:
movsd  0xef8(%rip),%xmm1
subsd  %xmm0,%xmm1
unpcklpd %xmm0,%xmm0
addpd  0xef8(%rip),%xmm0
movsd  %xmm1,%xmm0
mulpd  0xefc(%rip),%xmm0
movupd %xmm0,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @shape_line2(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = fsub double 1.000000e+00, %5
%7 = fmul double 5.000000e-01, %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
store double %7, double* %9
%10 = load double, double* %3
%11 = fadd double 1.000000e+00, %10
%12 = fmul double 5.000000e-01, %11
%13 = load double*, double** %4
%14 = getelementptr inbounds double, double* %13, i64 1
store double %12, double* %14
ret i32 0
}

LLVM IR (-O2):
define i32 @shape_line2(double %0, double* nocapture writeonly %1) {
%3 = insertelement <2 x double> poison, double %0, i64 0
%4 = shufflevector <2 x double> %3, <2 x double> poison, <2 x i32> zeroinitializer
%5 = fsub <2 x double> <double 1.000000e+00, double poison>, %4
%6 = fadd <2 x double> %4, <double poison, double 1.000000e+00>
%7 = shufflevector <2 x double> %5, <2 x double> %6, <2 x i32> <i32 0, i32 3>
%8 = fmul <2 x double> %7, <double 5.000000e-01, double 5.000000e-01>
%9 = bitcast double* %1 to <2 x double>*
store <2 x double> %8, <2 x double>* %9
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _gar_free(void *p) { free(p); }


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

LLVM IR (-O0):
define void @_gar_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 @_gar_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ *__m128;

/* Variables and functions */
__m128 __attribute__((__always___, __nodebug__))
_mm_mul_ss(__m128 a, __m128 b) {
  a[0] *= b[0];
  return a;
}


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

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

LLVM IR (-O0):
define i32* @_mm_mul_ss(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = mul nsw i32 %10, %7
store i32 %11, i32* %9
%12 = load i32*, i32** %3
ret i32* %12
}

LLVM IR (-O2):
define i32* @_mm_mul_ss(i32* returned %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = mul nsw i32 %4, %3
store i32 %5, i32* %0
ret i32* %0
}
int ft_isalnum(int c) {
  if (c >= 'A' && c <= 'Z')
    return (1);
  if (c >= 'a' && c <= 'z')
    return (1);
  if (c >= '0' && c <= '9')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isalnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1127 <ft_isalnum+0x27>
cmpl   $0x5a,-0x8(%rbp)
jg     1127 <ft_isalnum+0x27>
movl   $0x1,-0x4(%rbp)
jmp    116e <ft_isalnum+0x6e>
cmpl   $0x61,-0x8(%rbp)
jl     1147 <ft_isalnum+0x47>
cmpl   $0x7a,-0x8(%rbp)
jg     1147 <ft_isalnum+0x47>
movl   $0x1,-0x4(%rbp)
jmp    116e <ft_isalnum+0x6e>
cmpl   $0x30,-0x8(%rbp)
jl     1167 <ft_isalnum+0x67>
cmpl   $0x39,-0x8(%rbp)
jg     1167 <ft_isalnum+0x67>
movl   $0x1,-0x4(%rbp)
jmp    116e <ft_isalnum+0x6e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalnum>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x1a,%eax
setb   %al
add    $0xffffffd0,%edi
cmp    $0xa,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ft_isalnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %25
10: ; preds = %6, %1
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 97
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 122
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %2
br label %25
17: ; preds = %13, %10
%18 = load i32, i32* %3
%19 = icmp sge i32 %18, 48
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp sle i32 %21, 57
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 1, i32* %2
br label %25
24: ; preds = %20, %17
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23, %16, %9
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @ft_isalnum(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = add i32 %0, -48
%6 = icmp ult i32 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ execl(char *, char *, int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  execl(argv[1], argv[1], NULL);
  abort();
}


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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <execl@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    %rdi,%rsi
xor    %edx,%edx
call   1040 <execl@plt>
xor    %eax,%eax
call   1030 <abort@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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @execl(i8* %8, i8* %11, i32* null)
%13 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @execl(i8* %4, i8* %4, i32* null)
%6 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int quaddobl_trace_grid_diagnostics(double *err, double *dis) {
  int *a, *b, fail;
  double c[2];
  fail = _ada_use_c2phc(676, a, b, c);
  *err = c[0];
  *dis = c[1];
  return fail;
}


x86 assembly (clang, -O0):
<quaddobl_trace_grid_diagnostics>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    $0x2a4,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x24(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x24(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quaddobl_trace_grid_diagnostics>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rcx
mov    $0x2a4,%edi
call   1030 <_ada_use_c2phc@plt>
movsd  (%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @quaddobl_trace_grid_diagnostics(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca [2 x double]
store double* %0, double** %3
store double* %1, double** %4
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%12 = call i32 @_ada_use_c2phc(i32 676, i32* %9, i32* %10, double* %11)
store i32 %12, i32* %7
%13 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%14 = load double, double* %13
%15 = load double*, double** %3
store double %14, double* %15
%16 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 1
%17 = load double, double* %16
%18 = load double*, double** %4
store double %17, double* %18
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @quaddobl_trace_grid_diagnostics(double* nocapture writeonly %0, double* nocapture writeonly %1) {
%3 = alloca [2 x double]
%4 = bitcast [2 x double]* %3 to i8*
%5 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
%6 = call i32 @_ada_use_c2phc(i32 676, i32* undef, i32* undef, double* %5)
%7 = load double, double* %5
store double %7, double* %0
%8 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
%9 = load double, double* %8
store double %9, double* %1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x09() {
  Assert_real((isbdigit(9) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              50, ("isbdigit should be 0 for 0x09"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x09>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x32,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x09>:
push   %rax
mov    $0x9,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x32,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x09\00"
define void @t_isbdigit_0x09() {
%1 = call i64 @isbdigit(i32 9)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x09\00"
define void @t_isbdigit_0x09() {
%1 = tail call i64 @isbdigit(i32 9)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int return_0() {
  printf("This function always returns 0.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"This function always returns 0.\0A\00"
define i32 @return_0() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [32 x i8] c"This function always returns 0.\00"
define i32 @return_0() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void I_ShutdownCD(void) {}


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

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

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

LLVM IR (-O2):
define void @I_ShutdownCD() {
ret void
}
/* Variables and functions */
unsigned long pci_read_config32(int, int);
int /*<<< orphan*/ print_debug(char *);
int cpu_init_detected(void) {
  unsigned long dcl;
  int cpu_init;
  unsigned long htic;
  htic = pci_read_config32(
      ((((0) & 0xFF) << 16) | (((0x18) & 0x1f) << 11) | (((0) & 0x7) << 8)),
      0x6c);
  cpu_init = (htic & (1 << 6));
  if (cpu_init) {
    print_debug("CPU INIT Detected.\r\n");
  }
  return cpu_init;
}


x86 assembly (clang, -O0):
<cpu_init_detected>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0xc000,%edi
mov    $0x6c,%esi
call   1030 <pci_read_config32@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0x40,%rax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     115c <cpu_init_detected+0x3c>
lea    0xea9(%rip),%rdi
call   1040 <print_debug@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_init_detected>:
push   %rbx
mov    $0xc000,%edi
mov    $0x6c,%esi
call   1030 <pci_read_config32@plt>
mov    %rax,%rbx
and    $0x40,%ebx
je     1144 <cpu_init_detected+0x24>
lea    0xec1(%rip),%rdi
call   1040 <print_debug@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"CPU INIT Detected.\0D\0A\00"
define i32 @cpu_init_detected() {
%1 = alloca i64
%2 = alloca i32
%3 = alloca i64
%4 = call i64 @pci_read_config32(i32 49152, i32 108)
store i64 %4, i64* %3
%5 = load i64, i64* %3
%6 = and i64 %5, 64
%7 = trunc i64 %6 to i32
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @print_debug(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %0
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [21 x i8] c"CPU INIT Detected.\0D\0A\00"
define i32 @cpu_init_detected() {
%1 = tail call i64 @pci_read_config32(i32 49152, i32 108)
%2 = trunc i64 %1 to i32
%3 = and i32 %2, 64
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @print_debug(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret i32 %3
}
void usrRtpAppInit(void) {}


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

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

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

LLVM IR (-O2):
define void @usrRtpAppInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_string(void *);
void print_netport(void *buf) { print_string(buf); }


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

x86 assembly (clang, -O2):
<print_netport>:
jmp    1030 <print_string@plt>

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

LLVM IR (-O2):
define void @print_netport(i8* %0) {
%2 = tail call i32 @print_string(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint8_t;

/* Variables and functions */
int /*<<< orphan*/ spi_send_byte(int);
uint8_t spi_recv_byte() {
  spi_send_byte(0xff);
  return (*(volatile uint8_t *)(void *)(0xfffee404));
}


x86 assembly (clang, -O0):
<spi_recv_byte>:
push   %rbp
mov    %rsp,%rbp
mov    $0xff,%edi
call   1030 <spi_send_byte@plt>
mov    $0xfffee404,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_recv_byte>:
push   %rax
mov    $0xff,%edi
call   1030 <spi_send_byte@plt>
mov    $0xfffee404,%eax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @spi_recv_byte() {
%1 = call i32 @spi_send_byte(i32 255)
%2 = load volatile i32, i32* inttoptr (i64 4294894596 to i32*)
ret i32 %2
}

LLVM IR (-O2):
define i32 @spi_recv_byte() {
%1 = tail call i32 @spi_send_byte(i32 255)
%2 = load volatile i32, i32* inttoptr (i64 4294894596 to i32*)
ret i32 %2
}
int numDigits(int a) {
  if (a < 10) {
    return 1;
  }
  return 1 + numDigits(a / 10);
}


x86 assembly (clang, -O0):
<numDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1131 <numDigits+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1149 <numDigits+0x39>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <numDigits@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numDigits>:
mov    $0x1,%eax
cmp    $0xa,%edi
jl     1134 <numDigits+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <numDigits+0x20>
ret

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

LLVM IR (-O2):
define i32 @numDigits(i32 %0) {
%2 = icmp slt i32 %0, 10
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 0, %1 ]
%6 = udiv i32 %4, 10
%7 = add nuw nsw i32 %5, 1
%8 = icmp ult i32 %4, 100
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = add nuw i32 %5, 2
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ 1, %1 ], [ %10, %9 ]
ret i32 %12
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
time_t time(time_t *t) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<time>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<time>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @time(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "%s\n%s\n",
          "usage: truss [-cfaedDS] [-o file] [-s strsize] -p pid",
          "       truss [-cfaedDS] [-o file] [-s strsize] command [args]");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xecc(%rip),%rdx
lea    0xefb(%rip),%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xecf(%rip),%rdx
lea    0xefe(%rip),%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [54 x i8] c"usage: truss [-cfaedDS] [-o file] [-s strsize] -p pid\00"
@.str.2 = [62 x i8] c" truss [-cfaedDS] [-o file] [-s strsize] command [args]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [54 x i8] c"usage: truss [-cfaedDS] [-o file] [-s strsize] -p pid\00"
@.str.2 = [62 x i8] c" truss [-cfaedDS] [-o file] [-s strsize] command [args]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG(int /*<<< orphan*/, char *);
int smb_load_modules(const char **modules) {
  DEBUG(0, ("This samba executable has not been built with plugin support\n"));
  return -1;
}


x86 assembly (clang, -O0):
<smb_load_modules>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
lea    0xedb(%rip),%rsi
call   1030 <DEBUG@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smb_load_modules>:
push   %rax
lea    0xee8(%rip),%rsi
xor    %edi,%edi
call   1030 <DEBUG@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [62 x i8] c"This samba executable has not been built with plugin support\0A\00"
define i32 @smb_load_modules(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @DEBUG(i32 0, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [62 x i8] c"This samba executable has not been built with plugin support\0A\00"
define i32 @smb_load_modules(i8** nocapture readnone %0) {
%2 = tail call i32 @DEBUG(i32 0, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
void mem_checkleaks(void) {}


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

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

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

LLVM IR (-O2):
define void @mem_checkleaks() {
ret void
}
/* Variables and functions */
size_t fmt_long_base(char *, long, int);
size_t fmt_long(char *ptr, long val) { return fmt_long_base(ptr, val, 10); }


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

x86 assembly (clang, -O2):
<fmt_long>:
mov    $0xa,%edx
jmp    1030 <fmt_long_base@plt>

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

LLVM IR (-O2):
define i64 @fmt_long(i8* %0, i64 %1) {
%3 = tail call i64 @fmt_long_base(i8* %0, i64 %1, i32 10)
ret i64 %3
}
void InitExpMain() {}


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

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

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

LLVM IR (-O2):
define void @InitExpMain() {
ret void
}
int modmap_not_empty(char *modmap) {
  int i;
  for (i = 0; i < 7; i++)
    if (modmap[i] != ' ') {
      return 1;
    }
  return 0;
}


x86 assembly (clang, -O0):
<modmap_not_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x7,-0x14(%rbp)
jge    114d <modmap_not_empty+0x4d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     113a <modmap_not_empty+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1154 <modmap_not_empty+0x54>
jmp    113f <modmap_not_empty+0x3f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <modmap_not_empty+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<modmap_not_empty>:
mov    $0x1,%eax
cmpb   $0x20,(%rdi)
jne    1131 <modmap_not_empty+0x31>
cmpb   $0x20,0x1(%rdi)
jne    1131 <modmap_not_empty+0x31>
cmpb   $0x20,0x2(%rdi)
jne    1131 <modmap_not_empty+0x31>
cmpb   $0x20,0x3(%rdi)
jne    1131 <modmap_not_empty+0x31>
cmpb   $0x20,0x4(%rdi)
jne    1131 <modmap_not_empty+0x31>
cmpb   $0x20,0x5(%rdi)
jne    1131 <modmap_not_empty+0x31>
xor    %eax,%eax
cmpb   $0x20,0x6(%rdi)
setne  %al
ret

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

LLVM IR (-O2):
define i32 @modmap_not_empty(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 32
br i1 %3, label %4, label %29
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 32
br i1 %7, label %8, label %29
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 32
br i1 %11, label %12, label %29
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %0, i64 3
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 32
br i1 %15, label %16, label %29
16: ; preds = %12
%17 = getelementptr inbounds i8, i8* %0, i64 4
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 32
br i1 %19, label %20, label %29
20: ; preds = %16
%21 = getelementptr inbounds i8, i8* %0, i64 5
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 32
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = getelementptr inbounds i8, i8* %0, i64 6
%26 = load i8, i8* %25
%27 = icmp ne i8 %26, 32
%28 = zext i1 %27 to i32
br label %29
29: ; preds = %24, %20, %16, %12, %8, %4, %1
%30 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 1, %8 ], [ 1, %12 ], [ 1, %16 ], [ 1, %20 ], [ %28, %24 ]
ret i32 %30
}
void gtk_entry_completion_get_entry() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_completion_get_entry() {
ret void
}
int mmc_pwrseq_alloc(struct mmc_host *host) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mmc_host = type opaque
define i32 @mmc_pwrseq_alloc(%struct.mmc_host* nocapture readnone %0) {
ret i32 0
}
int SteamAPI_ISteamApps_GetAppBuildId(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
  return 0;
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamApps_GetAppBuildId>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamApps_GetAppBuildId>:
push   %rax
mov    %rdi,%rdx
lea    0xee5(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %eax,%eax
call   1030 <xlogf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamApps_GetAppBuildId = [34 x i8] c"SteamAPI_ISteamApps_GetAppBuildId\00"
define i32 @SteamAPI_ISteamApps_GetAppBuildId(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @__func__.SteamAPI_ISteamApps_GetAppBuildId, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamApps_GetAppBuildId = [34 x i8] c"SteamAPI_ISteamApps_GetAppBuildId\00"
define i32 @SteamAPI_ISteamApps_GetAppBuildId(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @__func__.SteamAPI_ISteamApps_GetAppBuildId, i64 0, i64 0), i8* %0)
ret i32 0
}