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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ strstr(char const *, char *);
void writeType(FILE *f, const char *type) {
  if (strstr(type, "*"))
    fprintf(f, "IntPtr");
  else
    fprintf(f, "%s", type);
}


x86 assembly (clang, -O0):
<writeType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1161 <writeType+0x41>
mov    -0x8(%rbp),%rdi
lea    0xead(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1177 <writeType+0x57>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe99(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeType>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strstr@plt>
test   %rax,%rax
je     116e <writeType+0x3e>
lea    0xead(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fwrite@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
@.str.1 = [7 x i8] c"IntPtr\00"
@.str.2 = [3 x i8] c"%s\00"
define void @writeType(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 = call i64 @strstr(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32*, i32** %3
%10 = call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %15
11: ; preds = %2
%12 = load i32*, i32** %3
%13 = load i8*, i8** %4
%14 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"*\00"
@.str.1 = [7 x i8] c"IntPtr\00"
define void @writeType(i32* nocapture %0, i8* %1) {
%3 = tail call i64 @strstr(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i64 6, i64 1, i32* %0)
br label %9
7: ; preds = %2
%8 = tail call i32 @fputs(i8* %1, i32* %0)
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int pthread_self();
void *imprimirThread(void *arg) {
  printf("Nova thread criada. TID == %u \n", pthread_self());
}


x86 assembly (clang, -O0):
<imprimirThread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"Nova thread criada. TID == %u \0A\00"
define i8* @imprimirThread(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (...) @pthread_self()
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i8*, i8** %2
ret i8* %6
}

LLVM IR (-O2):
@.str = [32 x i8] c"Nova thread criada. TID == %u \0A\00"
define noalias i8* @imprimirThread(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i8* undef
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strcmp_vptr(const void *v1, const void *v2) {
  return strcmp((const char *)v1, (const char *)v2);
}


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

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

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

LLVM IR (-O2):
define i32 @strcmp_vptr(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void bar(void) {
  void f(void);
  f();
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
call   1030 <f@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define void @bar() {
tail call void @f()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x2e() {
  Assert_real((isbdigit(46) == 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",
              235, ("isbdigit should be 0 for ."));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x2e>:
push   %rax
mov    $0x2e,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xeb,%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 = [27 x i8] c"isbdigit should be 0 for .\00"
define void @t_isbdigit_0x2e() {
%1 = call i64 @isbdigit(i32 46)
%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 235, i8* getelementptr inbounds ([27 x i8], [27 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 = [27 x i8] c"isbdigit should be 0 for .\00"
define void @t_isbdigit_0x2e() {
%1 = tail call i64 @isbdigit(i32 46)
%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 235, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void chk_ret(int ret) {
  if (ret < 0) {
    perror("File output error");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<chk_ret>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    114b <chk_ret+0x2b>
lea    0xec4(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chk_ret>:
test   %edi,%edi
js     1125 <chk_ret+0x5>
ret
push   %rax
lea    0xed3(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"File output error\00"
define void @chk_ret(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"File output error\00"
define void @chk_ret(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
char const *_default_auth_password(char const *username) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @_default_auth_password(i8* nocapture readnone %0) {
ret i8* null
}
void cd() {}


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

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

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

LLVM IR (-O2):
define void @cd() {
ret void
}
void autonomous5() {}


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

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

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

LLVM IR (-O2):
define void @autonomous5() {
ret void
}
/* Variables and functions */
size_t _upper_multiple(size_t, size_t);
size_t _closest_multiple(size_t v, size_t m) {
  size_t up = _upper_multiple(v, m);
  size_t down = _upper_multiple(v, m);
  size_t mid = down + (m / 2);
  return ((up) ^ (((down) ^ (up)) & -(v < mid)));
}


x86 assembly (clang, -O0):
<_closest_multiple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_upper_multiple@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_upper_multiple@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
xor    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rdx
cmp    -0x28(%rbp),%rdx
setb   %dl
and    $0x1,%dl
movzbl %dl,%esi
xor    %edx,%edx
sub    %esi,%edx
movslq %edx,%rdx
and    %rdx,%rcx
xor    %rcx,%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_closest_multiple>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <_upper_multiple@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <_upper_multiple@plt>
shr    %rbx
add    %rax,%rbx
cmp    %r14,%rbx
cmovbe %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @_closest_multiple(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = call i64 @_upper_multiple(i64 %8, i64 %9)
store i64 %10, i64* %5
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = call i64 @_upper_multiple(i64 %11, i64 %12)
store i64 %13, i64* %6
%14 = load i64, i64* %6
%15 = load i64, i64* %4
%16 = udiv i64 %15, 2
%17 = add i64 %14, %16
store i64 %17, i64* %7
%18 = load i64, i64* %5
%19 = load i64, i64* %6
%20 = load i64, i64* %5
%21 = xor i64 %19, %20
%22 = load i64, i64* %3
%23 = load i64, i64* %7
%24 = icmp ult i64 %22, %23
%25 = zext i1 %24 to i32
%26 = sub nsw i32 0, %25
%27 = sext i32 %26 to i64
%28 = and i64 %21, %27
%29 = xor i64 %18, %28
ret i64 %29
}

LLVM IR (-O2):
define i64 @_closest_multiple(i64 %0, i64 %1) {
%3 = tail call i64 @_upper_multiple(i64 %0, i64 %1)
%4 = tail call i64 @_upper_multiple(i64 %0, i64 %1)
%5 = lshr i64 %1, 1
%6 = add i64 %4, %5
%7 = icmp ugt i64 %6, %0
%8 = select i1 %7, i64 %4, i64 %3
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ get_console_attributes();
int /*<<< orphan*/ make_pty();
int /*<<< orphan*/ read_in();
int /*<<< orphan*/ restore_can(int /*<<< orphan*/);
int /*<<< orphan*/ set_clear_zombie();
int /*<<< orphan*/ set_noncan(int /*<<< orphan*/);
int /*<<< orphan*/ spawn_slave();
int main(int argc, char *argv[]) {
  get_console_attributes();
  set_clear_zombie();
  make_pty();
  spawn_slave();
  set_noncan(STDIN_FILENO);
  read_in();
  restore_can(STDIN_FILENO);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <get_console_attributes@plt>
mov    $0x0,%al
call   1030 <set_clear_zombie@plt>
mov    $0x0,%al
call   1070 <make_pty@plt>
mov    $0x0,%al
call   1040 <spawn_slave@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
call   1080 <set_noncan@plt>
mov    $0x0,%al
call   1090 <read_in@plt>
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
call   1060 <restore_can@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <get_console_attributes@plt>
xor    %eax,%eax
call   1030 <set_clear_zombie@plt>
xor    %eax,%eax
call   1070 <make_pty@plt>
xor    %eax,%eax
call   1040 <spawn_slave@plt>
mov    0x2e4c(%rip),%rbx
mov    (%rbx),%edi
call   1080 <set_noncan@plt>
xor    %eax,%eax
call   1090 <read_in@plt>
mov    (%rbx),%edi
call   1060 <restore_can@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @get_console_attributes()
%6 = call i32 (...) @set_clear_zombie()
%7 = call i32 (...) @make_pty()
%8 = call i32 (...) @spawn_slave()
%9 = load i32, i32* @STDIN_FILENO
%10 = call i32 @set_noncan(i32 %9)
%11 = call i32 (...) @read_in()
%12 = load i32, i32* @STDIN_FILENO
%13 = call i32 @restore_can(i32 %12)
ret i32 0
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @get_console_attributes()
%4 = tail call i32 (...) @set_clear_zombie()
%5 = tail call i32 (...) @make_pty()
%6 = tail call i32 (...) @spawn_slave()
%7 = load i32, i32* @STDIN_FILENO
%8 = tail call i32 @set_noncan(i32 %7)
%9 = tail call i32 (...) @read_in()
%10 = load i32, i32* @STDIN_FILENO
%11 = tail call i32 @restore_can(i32 %10)
ret i32 0
}
/* Variables and functions */
scalar_t__ nrf_drv_usbd_errata_type_52840_eng_a();
bool nrf_drv_usbd_errata_104(void) {
  return (1 && nrf_drv_usbd_errata_type_52840_eng_a());
}


x86 assembly (clang, -O0):
<nrf_drv_usbd_errata_104>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrf_drv_usbd_errata_type_52840_eng_a@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_drv_usbd_errata_104>:
push   %rax
xor    %eax,%eax
call   1030 <nrf_drv_usbd_errata_type_52840_eng_a@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nrf_drv_usbd_errata_104() {
%1 = call i64 (...) @nrf_drv_usbd_errata_type_52840_eng_a()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @nrf_drv_usbd_errata_104() {
%1 = tail call i64 (...) @nrf_drv_usbd_errata_type_52840_eng_a()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ is_utf8(char);
int length_utf8(char ch) {
  int i = 0;
  while (is_utf8(ch)) {
    i++;
    ch <<= 1;
  }
  return i;
}


x86 assembly (clang, -O0):
<length_utf8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_utf8@plt>
cmp    $0x0,%rax
je     1150 <length_utf8+0x40>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    1125 <length_utf8+0x15>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<length_utf8>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <is_utf8@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     1142 <length_utf8+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
add    %bl,%bl
movsbl %bl,%edi
call   1030 <is_utf8@plt>
test   %rax,%rax
jne    1130 <length_utf8+0x20>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @length_utf8(i8 signext %0) {
%2 = tail call i64 @is_utf8(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8 [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = shl i8 %6, 1
%9 = tail call i64 @is_utf8(i8 signext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void dog_speak(void) { printf("bark!\n"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"bark!\0A\00"
define void @dog_speak() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [6 x i8] c"bark!\00"
define void @dog_speak() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
void R_ETHER_Callback_Link_Off(void) {}


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

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

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

LLVM IR (-O2):
define void @R_ETHER_Callback_Link_Off() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pm_freearray2(void *const);
void pm_freearray(char **const rowIndex, int const rows) {
  void *const rowIndexVoid = rowIndex;
  pm_freearray2(rowIndexVoid);
}


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

x86 assembly (clang, -O2):
<pm_freearray>:
jmp    1030 <pm_freearray2@plt>

LLVM IR (-O0):
define void @pm_freearray(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i8*
store i8** %0, i8*** %3
store i32 %1, i32* %4
%6 = load i8**, i8*** %3
%7 = bitcast i8** %6 to i8*
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = call i32 @pm_freearray2(i8* %8)
ret void
}

LLVM IR (-O2):
define void @pm_freearray(i8** %0, i32 %1) {
%3 = bitcast i8** %0 to i8*
%4 = tail call i32 @pm_freearray2(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _writegsbase_u32(unsigned int);
void write_gs_base32(unsigned int base) { _writegsbase_u32(base); }


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

x86 assembly (clang, -O2):
<write_gs_base32>:
jmp    1030 <_writegsbase_u32@plt>

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

LLVM IR (-O2):
define void @write_gs_base32(i32 %0) {
%2 = tail call i32 @_writegsbase_u32(i32 %0)
ret void
}
/* Variables and functions */
char *rindex(char *, char);
char *basename(char *name) {
  char *base;
  base = rindex(name, '/');
  return base ? base + 1 : name;
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <rindex@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <basename+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <basename+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <rindex@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @rindex(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @basename(i8* %0) {
%2 = tail call i8* @rindex(i8* %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
void Print_Array(struct Ballot *Ballots[10000]) {}


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

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

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

LLVM IR (-O2):
%struct.Ballot = type opaque
define void @Print_Array(%struct.Ballot** nocapture %0) {
ret void
}
/* Variables and functions */
double genbet(double, double);
void beta_rndc(int n, double a, double b, double *array) {
  int i;
  for (i = 0; i < n; i++)
    *(array + i) = genbet(a, b);
}


x86 assembly (clang, -O0):
<beta_rndc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1166 <beta_rndc+0x56>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <genbet@plt>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1130 <beta_rndc+0x20>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<beta_rndc>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
test   %edi,%edi
jle    114f <beta_rndc+0x3f>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <genbet@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <beta_rndc+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @beta_rndc(i32 %0, double %1, double %2, double* nocapture writeonly %3) {
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %14
6: ; preds = %4
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %12, %8 ]
%10 = tail call double @genbet(double %1, double %2)
%11 = getelementptr inbounds double, double* %3, i64 %9
store double %10, double* %11
%12 = add nuw nsw i64 %9, 1
%13 = icmp eq i64 %12, %7
br i1 %13, label %14, label %8
14: ; preds = %8, %4
ret void
}
void foo1f() {}


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

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

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

LLVM IR (-O2):
define void @foo1f() {
ret void
}
int cache_db_list_entries() {}


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

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

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

LLVM IR (-O2):
define i32 @cache_db_list_entries() {
ret i32 undef
}
void f_def_basepcs(void) {}


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

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

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

LLVM IR (-O2):
define void @f_def_basepcs() {
ret void
}
int foo3(char *filename, const char *modes) {}


x86 assembly (clang, -O0):
<foo3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo3(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ McSrv_DisableIrq();
int /*<<< orphan*/ McSrv_EnableIrq();
int /*<<< orphan*/ machdep_WriteSPI(unsigned char *, unsigned long);
void McSrv_WriteSPI(unsigned char *pbData, unsigned long dSize) {
  McSrv_DisableIrq();
  machdep_WriteSPI(pbData, dSize);
  McSrv_EnableIrq();
}


x86 assembly (clang, -O0):
<McSrv_WriteSPI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <McSrv_DisableIrq@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <machdep_WriteSPI@plt>
mov    $0x0,%al
call   1050 <McSrv_EnableIrq@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<McSrv_WriteSPI>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <McSrv_DisableIrq@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <machdep_WriteSPI@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <McSrv_EnableIrq@plt>

LLVM IR (-O0):
define void @McSrv_WriteSPI(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = call i32 (...) @McSrv_DisableIrq()
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 @machdep_WriteSPI(i8* %6, i64 %7)
%9 = call i32 (...) @McSrv_EnableIrq()
ret void
}

LLVM IR (-O2):
define void @McSrv_WriteSPI(i8* %0, i64 %1) {
%3 = tail call i32 (...) @McSrv_DisableIrq()
%4 = tail call i32 @machdep_WriteSPI(i8* %0, i64 %1)
%5 = tail call i32 (...) @McSrv_EnableIrq()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("cl_dx9_media_sharing.h standalone test PASSED.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"cl_dx9_media_sharing.h standalone test PASSED.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [47 x i8] c"cl_dx9_media_sharing.h standalone test PASSED.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *_(char *);
int /*<<< orphan*/ printf(char *);
void version(void) { printf(_("ddcci v_ - libddcci v_\n")); }


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <_@plt>
mov    %rax,%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <_@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"ddcci v_ - libddcci v_\0A\00"
define void @version() {
%1 = call i8* @_(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* %1)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"ddcci v_ - libddcci v_\0A\00"
define void @version() {
%1 = tail call i8* @_(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) %1)
ret void
}
char *gettstr(s)
long s;
{
  static char tstr[8];
  sprintf(tstr, "%02ld:%02ld:%02ld", s / 60 / 60, s / 60 % 60, s % 60);
  return (tstr);
}


x86 assembly (clang, -O0):
<gettstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %rdx,%rcx
mov    -0x8(%rbp),%rax
mov    $0x3c,%esi
cqto
idiv   %rsi
mov    %rdx,%r8
mov    -0x10(%rbp),%rdx
lea    0x2eba(%rip),%rdi
lea    0xe8a(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
lea    0x2ea5(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettstr>:
push   %rbx
mov    %rdi,%r8
movabs $0x48d159e26af37c05,%rcx
59 d1 48
mov    %rdi,%rax
imul   %rcx
mov    %rdx,%r9
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0xa,%r9
add    %rax,%r9
movabs $0x8888888888888889,%rsi
88 88 88
mov    %rdi,%rax
imul   %rsi
mov    %rdx,%rcx
add    %rdi,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x5,%rcx
add    %rax,%rcx
mov    %rcx,%rax
imul   %rsi
add    %rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x5,%rdx
add    %rax,%rdx
imul   $0x3c,%rdx,%rax
imul   $0x3c,%rcx,%rdx
sub    %rax,%rcx
sub    %rdx,%r8
lea    0x2ea4(%rip),%rbx
lea    0xe74(%rip),%rsi
mov    %rbx,%rdi
mov    %r9,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@gettstr.tstr = internal global [8 x i8] zeroinitializer
@.str = [18 x i8] c"%02ld:%02ld:%02ld\00"
define i8* @gettstr(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sdiv i64 %3, 60
%5 = sdiv i64 %4, 60
%6 = load i64, i64* %2
%7 = sdiv i64 %6, 60
%8 = srem i64 %7, 60
%9 = load i64, i64* %2
%10 = srem i64 %9, 60
%11 = call i32 (i8*, i8*, ...) @sprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @gettstr.tstr, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %8, i64 %10)
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @gettstr.tstr, i64 0, i64 0)
}

LLVM IR (-O2):
@gettstr.tstr = internal global [8 x i8] zeroinitializer
@.str = [18 x i8] c"%02ld:%02ld:%02ld\00"
define i8* @gettstr(i64 %0) {
%2 = sdiv i64 %0, 60
%3 = sdiv i64 %0, 3600
%4 = srem i64 %2, 60
%5 = srem i64 %0, 60
%6 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @gettstr.tstr, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %3, i64 %4, i64 %5)
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @gettstr.tstr, i64 0, i64 0)
}
int a_twist_b_on_eflip(eflip)
int eflip;
{
  int temp_arr[12];
  a_eflip_unpack(eflip, temp_arr);
  four_cycle(temp_arr, 10, 6, 11, 2);
  adjust_eflip(temp_arr, 10, 6, 11, 2);
  return a_eflip_pack(temp_arr);
}


x86 assembly (clang, -O0):
<a_twist_b_on_eflip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1030 <a_eflip_unpack@plt>
lea    -0x40(%rbp),%rdi
mov    $0xa,%esi
mov    $0x6,%edx
mov    $0xb,%ecx
mov    $0x2,%r8d
mov    $0x0,%al
call   1050 <four_cycle@plt>
lea    -0x40(%rbp),%rdi
mov    $0xa,%esi
mov    $0x6,%edx
mov    $0xb,%ecx
mov    $0x2,%r8d
mov    $0x0,%al
call   1040 <adjust_eflip@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1060 <a_eflip_pack@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_twist_b_on_eflip>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <a_eflip_unpack@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x6,%edx
mov    $0xb,%ecx
mov    $0x2,%r8d
xor    %eax,%eax
call   1050 <four_cycle@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x6,%edx
mov    $0xb,%ecx
mov    $0x2,%r8d
xor    %eax,%eax
call   1040 <adjust_eflip@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <a_eflip_pack@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @a_twist_b_on_eflip(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_eflip_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %7, i32 10, i32 6, i32 11, i32 2)
%9 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @adjust_eflip to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %9, i32 10, i32 6, i32 11, i32 2)
%11 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%12 = call i32 (i32*, ...) bitcast (i32 (...)* @a_eflip_pack to i32 (i32*, ...)*)(i32* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @a_twist_b_on_eflip(i32 %0) {
%2 = alloca [12 x i32]
%3 = bitcast [12 x i32]* %2 to i8*
%4 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_eflip_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 10, i32 6, i32 11, i32 2)
%7 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @adjust_eflip to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 10, i32 6, i32 11, i32 2)
%8 = call i32 (i32*, ...) bitcast (i32 (...)* @a_eflip_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %8
}
int region_identify(offset, len)
int offset, len;
{ return 0; }


x86 assembly (clang, -O0):
<region_identify>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @region_identify(i32 %0, i32 %1) {
ret i32 0
}
int my_atomic_casptr(void *volatile *a, void **cmp, void *set) {
  return __atomic_compare_exchange_n(a, cmp, set, 0, 5, 5);
}


x86 assembly (clang, -O0):
<my_atomic_casptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rdx
mov    %rdx,-0x20(%rbp)
mov    (%rax),%rax
mov    -0x20(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
mov    %al,-0x31(%rbp)
mov    %rcx,-0x30(%rbp)
test   $0x1,%al
jne    1150 <my_atomic_casptr+0x50>
mov    -0x40(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x31(%rbp),%al
and    $0x1,%al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_atomic_casptr>:
mov    (%rsi),%rax
xor    %ecx,%ecx
lock cmpxchg %rdx,(%rdi)
sete   %dl
je     1112 <my_atomic_casptr+0x12>
mov    %rax,(%rsi)
mov    %dl,%cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @my_atomic_casptr(i8** %0, i8** %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8
store i8** %0, i8*** %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%9 = load i8**, i8*** %4
%10 = load i8**, i8*** %5
%11 = load i8*, i8** %6
store i8* %11, i8** %7
%12 = bitcast i8** %9 to i64*
%13 = bitcast i8** %10 to i64*
%14 = bitcast i8** %7 to i64*
%15 = load i64, i64* %13
%16 = load i64, i64* %14
%17 = cmpxchg volatile i64* %12, i64 %15, i64 %16 seq_cst seq_cst
%18 = extractvalue { i64, i1 } %17, 0
%19 = extractvalue { i64, i1 } %17, 1
br i1 %19, label %21, label %20
20: ; preds = %3
store i64 %18, i64* %13
br label %21
21: ; preds = %20, %3
%22 = zext i1 %19 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %8
%24 = trunc i8 %23 to i1
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @my_atomic_casptr(i8** %0, i8** nocapture %1, i8* %2) {
%4 = bitcast i8** %0 to i64*
%5 = bitcast i8** %1 to i64*
%6 = load i64, i64* %5
%7 = ptrtoint i8* %2 to i64
%8 = cmpxchg volatile i64* %4, i64 %6, i64 %7 seq_cst seq_cst
%9 = extractvalue { i64, i1 } %8, 1
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = extractvalue { i64, i1 } %8, 0
store i64 %11, i64* %5
br label %12
12: ; preds = %10, %3
%13 = zext i1 %9 to i32
ret i32 %13
}
/* Variables and functions */
int getchr();
int /*<<< orphan*/ ungetcc(int);
void get_return() {
  int c;
  c = getchr();
  if (c != '\n' && c != '\r' && c != ' ' && c != (-2))
    ungetcc(c);
}


x86 assembly (clang, -O0):
<get_return>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchr@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
je     1162 <get_return+0x42>
cmpl   $0xd,-0x4(%rbp)
je     1162 <get_return+0x42>
cmpl   $0x20,-0x4(%rbp)
je     1162 <get_return+0x42>
cmpl   $0xfffffffe,-0x4(%rbp)
je     1162 <get_return+0x42>
mov    -0x4(%rbp),%edi
call   1040 <ungetcc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_return>:
push   %rax
xor    %eax,%eax
call   1030 <getchr@plt>
lea    0x2(%rax),%ecx
cmp    $0x22,%ecx
ja     1142 <get_return+0x22>
movabs $0x400009001,%rdx
bt     %rcx,%rdx
jae    1142 <get_return+0x22>
pop    %rax
ret
mov    %eax,%edi
pop    %rax
jmp    1040 <ungetcc@plt>

LLVM IR (-O0):
define void @get_return() {
%1 = alloca i32
%2 = call i32 (...) @getchr()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %0
%6 = load i32, i32* %1
%7 = icmp ne i32 %6, 13
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %1
%10 = icmp ne i32 %9, 32
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %1
%13 = icmp ne i32 %12, -2
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %1
%16 = call i32 @ungetcc(i32 %15)
br label %17
17: ; preds = %14, %11, %8, %5, %0
ret void
}

LLVM IR (-O2):
define void @get_return() {
%1 = tail call i32 (...) @getchr()
switch i32 %1, label %2 [
i32 -2, label %4
i32 32, label %4
i32 13, label %4
i32 10, label %4
]
2: ; preds = %0
%3 = tail call i32 @ungetcc(i32 %1)
br label %4
4: ; preds = %0, %0, %0, %0, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ board_init();
void uci_new_game() { board_init(); }


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

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

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

LLVM IR (-O2):
define void @uci_new_game() {
%1 = tail call i32 (...) @board_init()
ret void
}
void fpsimd_disable_trap(void) {}


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

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

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

LLVM IR (-O2):
define void @fpsimd_disable_trap() {
ret void
}
/* Variables and functions */
char const *dsfmt_get_idstring();
const char *get_idstring(void) { return dsfmt_get_idstring(); }


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

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

LLVM IR (-O0):
define i8* @get_idstring() {
%1 = call i8* (...) @dsfmt_get_idstring()
ret i8* %1
}

LLVM IR (-O2):
define i8* @get_idstring() {
%1 = tail call i8* (...) @dsfmt_get_idstring()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ zwave_sendClassCommand(unsigned int, int, int,
                                          unsigned char *, int);
void zwavecmd_association_get(unsigned int id, unsigned int group) {
  unsigned char buf[255];
  buf[0] = group;
  zwave_sendClassCommand(id, 0x85, 0x2, buf, 1);
}


x86 assembly (clang, -O0):
<zwavecmd_association_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0x110(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x110(%rbp),%rcx
mov    $0x85,%esi
mov    $0x2,%edx
mov    $0x1,%r8d
call   1030 <zwave_sendClassCommand@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zwavecmd_association_get>:
sub    $0x108,%rsp
mov    %sil,(%rsp)
mov    %rsp,%rcx
mov    $0x85,%esi
mov    $0x2,%edx
mov    $0x1,%r8d
call   1030 <zwave_sendClassCommand@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
define void @zwavecmd_association_get(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [255 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
store i8 %7, i8* %8
%9 = load i32, i32* %3
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%11 = call i32 @zwave_sendClassCommand(i32 %9, i32 133, i32 2, i8* %10, i32 1)
ret void
}

LLVM IR (-O2):
define void @zwavecmd_association_get(i32 %0, i32 %1) {
%3 = alloca [255 x i8]
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = trunc i32 %1 to i8
store i8 %5, i8* %4
%6 = call i32 @zwave_sendClassCommand(i32 %0, i32 133, i32 2, i8* %4, i32 1)
ret void
}
double pathconN_nm4_sq(double x) { return x * x; }


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

x86 assembly (clang, -O2):
<pathconN_nm4_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @pathconN_nm4_sq(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
ret double %5
}

LLVM IR (-O2):
define double @pathconN_nm4_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ addline(char *);
int getch();
int getstartinput(void) {
  addline("Type SPC to begin....");
  for (;;) {
    int ch = getch();
    if (ch == ((('D') - '@') & 0x7F))
      return 0;
    else if (ch == ' ')
      return 1;
  }
}


x86 assembly (clang, -O0):
<getstartinput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <addline@plt>
mov    $0x0,%al
call   1040 <getch@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jne    1154 <getstartinput+0x34>
movl   $0x0,-0x4(%rbp)
jmp    1174 <getstartinput+0x54>
cmpl   $0x20,-0x8(%rbp)
jne    116a <getstartinput+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1174 <getstartinput+0x54>
jmp    116f <getstartinput+0x4f>
jmp    1134 <getstartinput+0x14>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getstartinput>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <addline@plt>
nopl   (%rax)
xor    %eax,%eax
call   1040 <getch@plt>
cmp    $0x20,%eax
je     1145 <getstartinput+0x25>
cmp    $0x4,%eax
jne    1130 <getstartinput+0x10>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Type SPC to begin....\00"
define i32 @getstartinput() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @addline(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %14, %0
%5 = call i32 (...) @getch()
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 4
br i1 %7, label %8, label %9
8: ; preds = %4
store i32 0, i32* %1
br label %15
9: ; preds = %4
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 32
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %1
br label %15
13: ; preds = %9
br label %14
14: ; preds = %13
br label %4
15: ; preds = %12, %8
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [22 x i8] c"Type SPC to begin....\00"
define i32 @getstartinput() {
%1 = tail call i32 @addline(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @getch()
switch i32 %3, label %2 [
i32 4, label %4
i32 32, label %5
]
4: ; preds = %2
br label %5
5: ; preds = %2, %4
%6 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int /*<<< orphan*/ SSL_connect;
int zopenssl_timed_do(int /*<<< orphan*/ *, int /*<<< orphan*/,
                      int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/, int /*<<< orphan*/, long);
int zopenssl_connect(SSL *ssl, long timeout) {
  return zopenssl_timed_do(ssl, SSL_connect, 0, 0, 0, 0, timeout);
}


x86 assembly (clang, -O0):
<zopenssl_connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %rax,(%rsp)
call   1030 <zopenssl_timed_do@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zopenssl_connect>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%eax
mov    %rsi,(%rsp)
mov    %eax,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <zopenssl_timed_do@plt>
pop    %rcx
ret

LLVM IR (-O0):
@SSL_connect = global i32 0
define i32 @zopenssl_connect(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* @SSL_connect
%7 = load i64, i64* %4
%8 = call i32 @zopenssl_timed_do(i32* %5, i32 %6, i32 0, i32 0, i32 0, i32 0, i64 %7)
ret i32 %8
}

LLVM IR (-O2):
@SSL_connect = global i32 0
define i32 @zopenssl_connect(i32* %0, i64 %1) {
%3 = load i32, i32* @SSL_connect
%4 = tail call i32 @zopenssl_timed_do(i32* %0, i32 %3, i32 0, i32 0, i32 0, i32 0, i64 %1)
ret i32 %4
}