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

/* Variables and functions */
int gpio_ex_unex_port(int /*<<< orphan*/, int);
int gpio_unexport(uint16_t gpio) { return gpio_ex_unex_port(gpio, false); }


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

x86 assembly (clang, -O2):
<gpio_unexport>:
xor    %esi,%esi
jmp    1030 <gpio_ex_unex_port@plt>

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

LLVM IR (-O2):
define i32 @gpio_unexport(i32 %0) {
%2 = tail call i32 @gpio_ex_unex_port(i32 %0, i32 0)
ret i32 %2
}
void Clean_Music() {}


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

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

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

LLVM IR (-O2):
define void @Clean_Music() {
ret void
}
unsigned int get_Elf32_Word(unsigned char *p) {
  return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
}


x86 assembly (clang, -O0):
<get_Elf32_Word>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_Elf32_Word>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_Elf32_Word(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 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = or i32 %12, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 3
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = shl i32 %22, 24
%24 = or i32 %18, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @get_Elf32_Word(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Variables and functions */
unsigned long read_cr4();
unsigned long read_cr4_safe(void) {
  unsigned long val;
  val = read_cr4();
  return val;
}


x86 assembly (clang, -O0):
<read_cr4_safe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <read_cr4@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @read_cr4_safe() {
%1 = alloca i64
%2 = call i64 (...) @read_cr4()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @read_cr4_safe() {
%1 = tail call i64 (...) @read_cr4()
ret i64 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int blake2b(int /*<<< orphan*/ *, void const *, void const *,
            int /*<<< orphan*/ const, int /*<<< orphan*/ const,
            int /*<<< orphan*/);
int blake2(uint8_t *out, const void *in, const void *key, const uint8_t outlen,
           const uint64_t inlen, uint8_t keylen) {
  return blake2b(out, in, key, outlen, inlen, keylen);
}


x86 assembly (clang, -O0):
<blake2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1030 <blake2b@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blake2>:
jmp    1030 <blake2b@plt>

LLVM IR (-O0):
define i32 @blake2(i32* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @blake2b(i32* %13, i8* %14, i8* %15, i32 %16, i32 %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @blake2(i32* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @blake2b(i32* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ divisible(long);
int /*<<< orphan*/ printf(char *, long);
int main(int argc, char **argv) {
  const long incr = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 19;
  long n = incr;
  for (; !divisible(n); n += incr)
    ;
  printf("%ld\n", n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x94016a,-0x18(%rbp)
movq   $0x94016a,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <divisible@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1164 <main+0x44>
jmp    117c <main+0x5c>
jmp    1169 <main+0x49>
mov    -0x20(%rbp),%rax
add    $0x94016a,%rax
mov    %rax,-0x20(%rbp)
jmp    1146 <main+0x26>
mov    -0x20(%rbp),%rsi
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x94016a,%rbx
mov    %rbx,%rdi
call   1040 <divisible@plt>
test   %eax,%eax
je     1130 <main+0x10>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 9699690, i64* %6
store i64 9699690, i64* %7
br label %8
8: ; preds = %14, %2
%9 = load i64, i64* %7
%10 = call i32 @divisible(i64 %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br i1 %12, label %13, label %17
13: ; preds = %8
br label %14
14: ; preds = %13
%15 = load i64, i64* %7
%16 = add nsw i64 %15, 9699690
store i64 %16, i64* %7
br label %8
17: ; preds = %8
%18 = load i64, i64* %7
%19 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %18)
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 9699690, %2 ], [ %7, %3 ]
%5 = tail call i32 @divisible(i64 %4)
%6 = icmp eq i32 %5, 0
%7 = add nuw nsw i64 %4, 9699690
br i1 %6, label %3, label %8
8: ; preds = %3
%9 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ putc(int, int /*<<< orphan*/ *);
int main() {
  int c;
  FILE *stream;
  stream = fopen("putc.txt", "w");
  c = 'x';
  putc(c, stream);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xeda(%rip),%rsi
call   1040 <fopen@plt>
mov    $0x78,%edi
mov    %rax,%rsi
call   1030 <putc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"putc.txt\00"
@.str.1 = [2 x i8] c"w\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
store i32 120, i32* %2
%5 = load i32, i32* %2
%6 = load i32*, i32** %3
%7 = call i32 @putc(i32 %5, i32* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"putc.txt\00"
@.str.1 = [2 x i8] c"w\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @putc(i32 120, i32* %1)
ret i32 0
}
char *skip_line(const char *p) {
  while (*p != '\n')
    p++;
  return (char *)++p;
}


x86 assembly (clang, -O0):
<skip_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1129 <skip_line+0x29>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_line+0x8>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @skip_line(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 10
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ client_start(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strtol(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  if (argc != 3) {
    usage();
  }
  client_start(argv[1], strtol(argv[2], NULL, 0));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1157 <main+0x27>
mov    $0x0,%al
call   1040 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1050 <client_start@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x3,%edi
je     1143 <main+0x13>
xor    %eax,%eax
call   1040 <usage@plt>
mov    0x8(%rbx),%r14
mov    0x10(%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1050 <client_start@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
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 = load i32, i32* %4
%7 = icmp ne i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @usage()
br label %10
10: ; preds = %8, %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @strtol(i8* %16, i32* null, i32 0)
%18 = call i32 @client_start(i8* %13, i32 %17)
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @strtol(i8* nocapture %10, i32* null, i32 0)
%12 = tail call i32 @client_start(i8* %8, i32 %11)
ret i32 0
}
void tree_sitter_r2cmd_external_scanner_destroy(void *payload) {}


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

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

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

LLVM IR (-O2):
define void @tree_sitter_r2cmd_external_scanner_destroy(i8* nocapture %0) {
ret void
}
/* Variables and functions */
double NAN;
double my_nan(const char *s) { return NAN; }


x86 assembly (clang, -O0):
<my_nan>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ee9(%rip),%rax
movsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_nan>:
mov    0x2ef1(%rip),%rax
movsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@NAN = global double 0.000000e+00
define double @my_nan(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load double, double* @NAN
ret double %3
}

LLVM IR (-O2):
@NAN = global double 0.000000e+00
define double @my_nan(i8* nocapture readnone %0) {
%2 = load double, double* @NAN
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ blinkdash();
int /*<<< orphan*/ sleep(double);
int blink0() {
  int c = 0;
  while (c != 5) {
    blinkdash();
    c++;
  }
  sleep(1.5);
  return 0;
}


x86 assembly (clang, -O0):
<blink0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
je     114e <blink0+0x2e>
mov    $0x0,%al
call   1030 <blinkdash@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <blink0+0xf>
movsd  0xeaa(%rip),%xmm0
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blink0>:
push   %rax
xor    %eax,%eax
call   1030 <blinkdash@plt>
xor    %eax,%eax
call   1030 <blinkdash@plt>
xor    %eax,%eax
call   1030 <blinkdash@plt>
xor    %eax,%eax
call   1030 <blinkdash@plt>
xor    %eax,%eax
call   1030 <blinkdash@plt>
movsd  0xeb4(%rip),%xmm0
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blink0() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 5
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = call i32 (...) @blinkdash()
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
%10 = call i32 @sleep(double 1.500000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @blink0() {
%1 = tail call i32 (...) @blinkdash()
%2 = tail call i32 (...) @blinkdash()
%3 = tail call i32 (...) @blinkdash()
%4 = tail call i32 (...) @blinkdash()
%5 = tail call i32 (...) @blinkdash()
%6 = tail call i32 @sleep(double 1.500000e+00)
ret i32 0
}
int test_imm_06int64_highword_reg(long long val) {
  return ((val >> 32) & (0x06 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_06int64_highword_reg>:
movabs $0x600000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_06int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 6
%6 = icmp ne i64 %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_06int64_highword_reg(i64 %0) {
%2 = and i64 %0, 25769803776
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(char *arg, int size) {
  int i;
  for (i = size; i >= 0; --i) {
    printf("%c", arg[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <print+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1125 <print+0x15>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
js     1130 <print+0x20>
mov    %rdi,%r14
mov    %esi,%ebx
nopl   (%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbx
jb     1120 <print+0x10>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
br label %7
7: ; preds = %18, %2
%8 = load i32, i32* %5
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, -1
store i32 %20, i32* %5
br label %7
21: ; preds = %7
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @print(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = tail call i32 @putchar(i32 %10)
%12 = add nsw i64 %7, -1
%13 = icmp eq i64 %7, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 @putchar(i32 10)
ret void
}
void socket_setup() {}


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

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

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

LLVM IR (-O2):
define void @socket_setup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *myname) {
  fprintf(stderr,
          "Usage: %s [ -c | -f | -h ]\n"
          "    -c  Clear buffer.\n"
          "    -f  Show format.\n"
          "    -h  Display this help screen.\n",
          myname);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [105 x i8] c"Usage: %s [ -c | -f | -h ]\0A -c Clear buffer.\0A -f Show format.\0A -h Display this help screen.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [105 x i8] c"Usage: %s [ -c | -f | -h ]\0A -c Clear buffer.\0A -f Show format.\0A -h Display this help screen.\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M133_f(char *s) {
  debug("M133_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M133_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M133_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M133_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M133_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M133_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M133_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *mpz_get_str(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
size_t strlen(char *);
size_t mpz_len(mpz_t i) {
  size_t len = 0;
  char *str = mpz_get_str(NULL, 10, i);
  if (!str)
    goto out;
  len = strlen(str);
  free(str);
out:
  return len;
}


x86 assembly (clang, -O0):
<mpz_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    %eax,%edi
mov    $0xa,%esi
call   1050 <mpz_get_str@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1168 <mpz_len+0x38>
jmp    117e <mpz_len+0x4e>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpz_len>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%edx
xor    %edi,%edi
mov    $0xa,%esi
call   1050 <mpz_get_str@plt>
test   %rax,%rax
je     1162 <mpz_len+0x32>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
jmp    1164 <mpz_len+0x34>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @mpz_len(i32 %0) {
%2 = tail call i8* @mpz_get_str(i32* null, i32 10, i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @strlen(i8* %2)
%6 = tail call i32 @free(i8* %2)
br label %7
7: ; preds = %1, %4
%8 = phi i64 [ %5, %4 ], [ 0, %1 ]
ret i64 %8
}
void init_spi(void) {
  (*(volatile unsigned long *)(0xE0020000 + 0x0C)) = 0x04;
  (*(volatile unsigned long *)(0xE0020000 + 0x00)) = 0x20;
}


x86 assembly (clang, -O0):
<init_spi>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe002000c,%eax
movq   $0x4,(%rax)
mov    $0xe0020000,%eax
movq   $0x20,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_spi>:
mov    $0xe0020000,%eax
movq   $0x4,0xc(%rax)
movq   $0x20,(%rax)
ret

LLVM IR (-O0):
define void @init_spi() {
store volatile i64 4, i64* inttoptr (i64 3758227468 to i64*)
store volatile i64 32, i64* inttoptr (i64 3758227456 to i64*)
ret void
}

LLVM IR (-O2):
define void @init_spi() {
store volatile i64 4, i64* inttoptr (i64 3758227468 to i64*)
store volatile i64 32, i64* inttoptr (i64 3758227456 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Com_Printf(char *, char const *);
void Com_ScriptModule_Print(const char *msg) { Com_Printf("%s", msg); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @Com_ScriptModule_Print(i8* %0) {
%2 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int addNumbers(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Sum = %d", addNumbers(10));
  return 0;
}


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

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

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

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

/* Variables and functions */
int private_AES_set_encrypt_key(unsigned char const *, int const,
                                int /*<<< orphan*/ *);
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
                        AES_KEY *key) {
  return private_AES_set_encrypt_key(userKey, bits, key);
}


x86 assembly (clang, -O0):
<AES_set_encrypt_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <private_AES_set_encrypt_key@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AES_set_encrypt_key>:
jmp    1030 <private_AES_set_encrypt_key@plt>

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

LLVM IR (-O2):
define i32 @AES_set_encrypt_key(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 @private_AES_set_encrypt_key(i8* %0, i32 %1, i32* %2)
ret i32 %4
}
void vec3_sub(const float a[3], const float b[3], float out[3]) {
  out[0] = a[0] - b[0];
  out[1] = a[1] - b[1];
  out[2] = a[2] - b[2];
}


x86 assembly (clang, -O0):
<vec3_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_sub>:
movss  (%rdi),%xmm0
subss  (%rsi),%xmm0
movss  %xmm0,(%rdx)
movss  0x4(%rdi),%xmm0
subss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdx)
movss  0x8(%rdi),%xmm0
subss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdx)
ret

LLVM IR (-O0):
define void @vec3_sub(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fsub float %9, %12
%14 = load float*, float** %6
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %4
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %5
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fsub float %18, %21
%23 = load float*, float** %6
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %4
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %5
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fsub float %27, %30
%32 = load float*, float** %6
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
ret void
}

LLVM IR (-O2):
define void @vec3_sub(float* nocapture %0, float* nocapture %1, float* nocapture writeonly %2) {
%4 = load float, float* %0
%5 = load float, float* %1
%6 = fsub float %4, %5
store float %6, float* %2
%7 = getelementptr inbounds float, float* %0, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 1
%10 = load float, float* %9
%11 = fsub float %8, %10
%12 = getelementptr inbounds float, float* %2, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %0, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %1, i64 2
%16 = load float, float* %15
%17 = fsub float %14, %16
%18 = getelementptr inbounds float, float* %2, i64 2
store float %17, float* %18
ret void
}
int compare_ints(const void *pa, const void *pb) {
  const int *a = pa;
  const int *b = pb;
  if (*a < *b)
    return -1;
  else if (*a > *b)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compare_ints>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    113a <compare_ints+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <compare_ints+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jle    1158 <compare_ints+0x58>
movl   $0x1,-0x4(%rbp)
jmp    115f <compare_ints+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @compare_ints(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = icmp sgt i32 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void quantifier2repeating() {}


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

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

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

LLVM IR (-O2):
define void @quantifier2repeating() {
ret void
}
double QuinticEaseIn(double p) { return p * p * p * p * p; }


x86 assembly (clang, -O0):
<QuinticEaseIn>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuinticEaseIn>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @QuinticEaseIn(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
%8 = load double, double* %2
%9 = fmul double %7, %8
%10 = load double, double* %2
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @QuinticEaseIn(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
%4 = fmul double %3, %0
%5 = fmul double %4, %0
ret double %5
}
void sigusr1_handler(int sig) { (void)sig; }


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

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

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

LLVM IR (-O2):
define void @sigusr1_handler(i32 %0) {
ret void
}
/* Type definitions */
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int NSS_STATUS_SUCCESS;
enum nss_status _nss_noenum_endgrent(void) { return NSS_STATUS_SUCCESS; }


x86 assembly (clang, -O0):
<_nss_noenum_endgrent>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_noenum_endgrent>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@NSS_STATUS_SUCCESS = global i32 0
define i32 @_nss_noenum_endgrent() {
%1 = load i32, i32* @NSS_STATUS_SUCCESS
ret i32 %1
}

LLVM IR (-O2):
@NSS_STATUS_SUCCESS = global i32 0
define i32 @_nss_noenum_endgrent() {
%1 = load i32, i32* @NSS_STATUS_SUCCESS
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ft_elemdel(void *content, size_t size) {
  (void)size;
  free(content);
}


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

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

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

LLVM IR (-O2):
define void @ft_elemdel(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
void X509_REVOKED_add1_ext_i2d(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_REVOKED_add1_ext_i2d() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
const char *unpack_s16(int16_t *data, const char *buffer) {
  *data = ntohs(*(int16_t *)buffer);
  return buffer + sizeof(*data);
}


x86 assembly (clang, -O0):
<unpack_s16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <ntohs@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_s16>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rsi),%edi
call   1030 <ntohs@plt>
mov    %eax,(%r14)
add    $0x4,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @unpack_s16(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = call i32 @ntohs(i32 %7)
%9 = load i32*, i32** %3
store i32 %8, i32* %9
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 4
ret i8* %11
}

LLVM IR (-O2):
define i8* @unpack_s16(i32* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @ntohs(i32 %4)
store i32 %5, i32* %0
%6 = getelementptr inbounds i8, i8* %1, i64 4
ret i8* %6
}
char *strcpy(char *dest, char *src) {
  do {
    *dest++ = *src++;
  } while (*src != 0);
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    110c <strcpy+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
add    $0x1,%rsi
nopl   0x0(%rax)
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
br label %4
4: ; preds = %4, %2
%5 = phi i8 [ %3, %2 ], [ %10, %4 ]
%6 = phi i8* [ %0, %2 ], [ %9, %4 ]
%7 = phi i8* [ %1, %2 ], [ %8, %4 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %5, i8* %6
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void auth_fn(const char *pServer, const char *pShare, char *pWorkgroup,
             int workgroup_len, char *pUsername, int username_len,
             char *pPassword, int password_len) {
  strncpy(pUsername, "anonymous", username_len);
  strncpy(pPassword, "password", password_len);
}


x86 assembly (clang, -O0):
<auth_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%edx
lea    0xebc(%rip),%rsi
call   1030 <strncpy@plt>
mov    0x10(%rbp),%rdi
mov    0x18(%rbp),%edx
lea    0xeb3(%rip),%rsi
call   1030 <strncpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<auth_fn>:
push   %rbp
push   %rbx
push   %rax
mov    %r9d,%edx
mov    %r8,%rdi
mov    0x20(%rsp),%rbx
mov    0x28(%rsp),%ebp
lea    0xed7(%rip),%rsi
call   1030 <strncpy@plt>
lea    0xed5(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"anonymous\00"
@.str.1 = [9 x i8] c"password\00"
define void @auth_fn(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i32 %5, i8* %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
store i8* %0, i8** %9
store i8* %1, i8** %10
store i8* %2, i8** %11
store i32 %3, i32* %12
store i8* %4, i8** %13
store i32 %5, i32* %14
store i8* %6, i8** %15
store i32 %7, i32* %16
%17 = load i8*, i8** %13
%18 = load i32, i32* %14
%19 = call i32 @strncpy(i8* %17, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i8*, i8** %15
%21 = load i32, i32* %16
%22 = call i32 @strncpy(i8* %20, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"anonymous\00"
@.str.1 = [9 x i8] c"password\00"
define void @auth_fn(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3, i8* %4, i32 %5, i8* %6, i32 %7) {
%9 = tail call i32 @strncpy(i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5)
%10 = tail call i32 @strncpy(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void __mx_fclose(FILE **ptr) {
  if (*ptr)
    fclose(*ptr);
}


x86 assembly (clang, -O0):
<__mx_fclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <__mx_fclose+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mx_fclose>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <__mx_fclose+0xd>
jmp    1030 <fclose@plt>
ret

LLVM IR (-O0):
define void @__mx_fclose(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = load i32**, i32*** %2
%4 = load i32*, i32** %3
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32**, i32*** %2
%8 = load i32*, i32** %7
%9 = call i32 @fclose(i32* %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @__mx_fclose(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %4, %1
ret void
}
int __fegetround(void) {
  int cw;
  __asm__("fnstcw %0" : "=m"(*&cw));
  return cw & 0xc00;
}


x86 assembly (clang, -O0):
<__fegetround>:
push   %rbp
mov    %rsp,%rbp
fnstcw -0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xc00,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fegetround>:
fnstcw -0x4(%rsp)
mov    $0xc00,%eax
and    -0x4(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @__fegetround() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* %1
%4 = and i32 %3, 3072
ret i32 %4
}
__attribute__((no, noclone)) short foo9(short arg) {
  short ret = -1;
  if (arg + 1 < 1 || arg + 1 > ((!1) ? ((1 << (sizeof(char) * 8 - 1)) - 1)
                                     : ((1 << (sizeof(char) * 8)) - 1)) -
                                   1)
    return ret;
  arg = arg + -1;
  ret = (unsigned char)arg;
  return arg;
}


x86 assembly (clang, -O0):
<foo9>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movw   $0xffff,-0x6(%rbp)
movswl -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0x1,%eax
jl     1133 <foo9+0x33>
movswl -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0xfe,%eax
jle    1140 <foo9+0x40>
mov    -0x6(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    115e <foo9+0x5e>
movswl -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
movzbl %al,%eax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo9>:
movzwl %di,%eax
lea    -0x1(%rdi),%ecx
cmp    $0xfe,%eax
mov    $0xffff,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define signext i16 @foo9(i16 signext %0) {
%2 = icmp ugt i16 %0, 253
%3 = add i16 %0, -1
%4 = select i1 %2, i16 -1, i16 %3
ret i16 %4
}