xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ dec2str(char *, int, double const, int);
int /*<<< orphan*/ fixnegzero(char *);
int hputs(char *, char const *, char *);
int hputdec(char *hstring, const char *keyword, const const double dec) {
  char value[30];
  dec2str(value, 30, dec, 2);
  fixnegzero(value);
  return (hputs(hstring, keyword, value));
}


x86 assembly (clang, -O0):
<hputdec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
mov    $0x1e,%esi
mov    $0x2,%edx
call   1050 <dec2str@plt>
lea    -0x40(%rbp),%rdi
call   1030 <fixnegzero@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1040 <hputs@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hputdec>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x1e,%esi
mov    $0x2,%edx
call   1050 <dec2str@plt>
mov    %r15,%rdi
call   1030 <fixnegzero@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <hputs@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @hputdec(i8* %0, i8* %1, double %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca [30 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store double %2, double* %6
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%9 = load double, double* %6
%10 = call i32 @dec2str(i8* %8, i32 30, double %9, i32 2)
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%12 = call i32 @fixnegzero(i8* %11)
%13 = load i8*, i8** %4
%14 = load i8*, i8** %5
%15 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%16 = call i32 @hputs(i8* %13, i8* %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @hputdec(i8* %0, i8* %1, double %2) {
%4 = alloca [30 x i8]
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %4, i64 0, i64 0
%6 = call i32 @dec2str(i8* %5, i32 30, double %2, i32 2)
%7 = call i32 @fixnegzero(i8* %5)
%8 = call i32 @hputs(i8* %0, i8* %1, i8* %5)
ret i32 %8
}
void log_null(int level, void *object, const char *function, int line,
              const char *fmt, ...) {}


x86 assembly (clang, -O0):
<log_null>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @log_null(i32 %0, i8* %1, i8* %2, i32 %3, i8* %4, ...) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
define void @log_null(i32 %0, i8* nocapture %1, i8* nocapture %2, i32 %3, i8* nocapture %4, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hires_timer(double *);
void HIRES_TIMER__(double *d) { hires_timer(d); }


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

x86 assembly (clang, -O2):
<HIRES_TIMER__>:
jmp    1030 <hires_timer@plt>

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

LLVM IR (-O2):
define void @HIRES_TIMER__(double* %0) {
%2 = tail call i32 @hires_timer(double* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_CRL;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ OPENSSL_free(char *);
int /*<<< orphan*/ *PEM_read_bio_X509_CRL(int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *);
int /*<<< orphan*/ *glue2bio(char const **, char **);
X509_CRL *CRL_from_strings(const char **pem) {
  char *p;
  BIO *b = glue2bio(pem, &p);
  X509_CRL *crl = PEM_read_bio_X509_CRL(b, NULL, NULL, NULL);
  OPENSSL_free(p);
  BIO_free(b);
  return crl;
}


x86 assembly (clang, -O0):
<CRL_from_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <glue2bio@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <PEM_read_bio_X509_CRL@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <OPENSSL_free@plt>
mov    -0x18(%rbp),%rdi
call   1050 <BIO_free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRL_from_strings>:
push   %r14
push   %rbx
push   %rax
mov    %rsp,%rsi
call   1040 <glue2bio@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <PEM_read_bio_X509_CRL@plt>
mov    %rax,%r14
mov    (%rsp),%rdi
call   1060 <OPENSSL_free@plt>
mov    %rbx,%rdi
call   1050 <BIO_free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @CRL_from_strings(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32*
store i8** %0, i8*** %2
%6 = load i8**, i8*** %2
%7 = call i32* @glue2bio(i8** %6, i8** %3)
store i32* %7, i32** %4
%8 = load i32*, i32** %4
%9 = call i32* @PEM_read_bio_X509_CRL(i32* %8, i32* null, i32* null, i32* null)
store i32* %9, i32** %5
%10 = load i8*, i8** %3
%11 = call i32 @OPENSSL_free(i8* %10)
%12 = load i32*, i32** %4
%13 = call i32 @BIO_free(i32* %12)
%14 = load i32*, i32** %5
ret i32* %14
}

LLVM IR (-O2):
define i32* @CRL_from_strings(i8** %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32* @glue2bio(i8** %0, i8** %2)
%5 = call i32* @PEM_read_bio_X509_CRL(i32* %4, i32* null, i32* null, i32* null)
%6 = load i8*, i8** %2
%7 = call i32 @OPENSSL_free(i8* %6)
%8 = call i32 @BIO_free(i32* %4)
ret i32* %5
}
char *__attribute__((no)) itos(int num) { return (char *)0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @itos(i32 %0) {
ret i8* null
}
void ade7759_unconfigure_ring(struct iio_dev *indio_dev) {}


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define void @ade7759_unconfigure_ring(%struct.iio_dev* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_srl_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_srl_epi16(__m128i A, __m128i B) { return _mm_srl_epi16(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_srl_epi16>:
jmp    1030 <_mm_srl_epi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_srl_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_srl_epi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
char *if_indextoname(unsigned ifindex, char *ifname) {
  ;
  errno = ENOSYS;
  return NULL;
  ;
}


x86 assembly (clang, -O0):
<if_indextoname>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i8* @if_indextoname(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i8* null
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define noalias i8* @if_indextoname(i32 %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ move(int, scalar_t__);
int /*<<< orphan*/ printw(char *);
void clearbelowmovebox() {
  int i;
  move(17, (0 + 31));
  printw("*--------------------------------");
  for (i = 1; i <= 2; i++) {
    move(17 + i, (0 + 31));
    printw("                                 ");
  }
}


x86 assembly (clang, -O0):
<clearbelowmovebox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x11,%edi
mov    $0x1f,%esi
call   1040 <move@plt>
lea    0xec2(%rip),%rdi
call   1030 <printw@plt>
movl   $0x1,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jg     117e <clearbelowmovebox+0x5e>
mov    -0x4(%rbp),%edi
add    $0x11,%edi
mov    $0x1f,%esi
call   1040 <move@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printw@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114a <clearbelowmovebox+0x2a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearbelowmovebox>:
push   %rbx
mov    $0x1f,%esi
mov    $0x11,%edi
call   1040 <move@plt>
lea    0xec9(%rip),%rdi
call   1030 <printw@plt>
mov    $0x1f,%esi
mov    $0x12,%edi
call   1040 <move@plt>
lea    0xed0(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printw@plt>
mov    $0x1f,%esi
mov    $0x13,%edi
call   1040 <move@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printw@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"*--------------------------------\00"
@.str.1 = [34 x i8] c" \00"
define void @clearbelowmovebox() {
%1 = alloca i32
%2 = call i32 @move(i32 17, i64 31)
%3 = call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %1
%6 = icmp sle i32 %5, 2
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %1
%9 = add nsw i32 17, %8
%10 = call i32 @move(i32 %9, i64 31)
%11 = call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %7
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"*--------------------------------\00"
@.str.1 = [34 x i8] c" \00"
define void @clearbelowmovebox() {
%1 = tail call i32 @move(i32 17, i64 31)
%2 = tail call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @move(i32 18, i64 31)
%4 = tail call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @move(i32 19, i64 31)
%6 = tail call i32 @printw(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x71() {
  Assert_real((isodigit(113) == 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_isodigit.c",
              570, ("isodigit should be 0 for q"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x71>:
push   %rax
mov    $0x71,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x23a,%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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for q\00"
define void @t_isodigit_0x71() {
%1 = call i64 @isodigit(i32 113)
%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 570, 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for q\00"
define void @t_isodigit_0x71() {
%1 = tail call i64 @isodigit(i32 113)
%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 570, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  TYPE_1__ sin_addr;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ inet_ntop(int /*<<< orphan*/, int /*<<< orphan*/ *, char *,
                             int);
void getIpFromSocketAddress(struct sockaddr_in *socketAddress, char *ip) {
  inet_ntop(AF_INET, &socketAddress->sin_addr.s_addr, ip, 15);
}


x86 assembly (clang, -O0):
<getIpFromSocketAddress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0xf,%ecx
call   1030 <inet_ntop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getIpFromSocketAddress>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ecb(%rip),%rax
mov    (%rax),%edi
mov    $0xf,%ecx
jmp    1030 <inet_ntop@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
@AF_INET = global i32 0
define void @getIpFromSocketAddress(%struct.sockaddr_in* %0, i8* %1) {
%3 = alloca %struct.sockaddr_in*
%4 = alloca i8*
store %struct.sockaddr_in* %0, %struct.sockaddr_in** %3
store i8* %1, i8** %4
%5 = load i32, i32* @AF_INET
%6 = load %struct.sockaddr_in*, %struct.sockaddr_in** %3
%7 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 0
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
%9 = load i8*, i8** %4
%10 = call i32 @inet_ntop(i32 %5, i32* %8, i8* %9, i32 15)
ret void
}

LLVM IR (-O2):
%struct.sockaddr_in = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
@AF_INET = global i32 0
define void @getIpFromSocketAddress(%struct.sockaddr_in* %0, i8* %1) {
%3 = load i32, i32* @AF_INET
%4 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %0, i64 0, i32 0, i32 0
%5 = tail call i32 @inet_ntop(i32 %3, i32* %4, i8* %1, i32 15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void greet_world(const char *text) { printf("Hello world (%s)\n", text); }


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

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"Hello world (%s)\0A\00"
define void @greet_world(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
const char *val(int bit) { return bit ? " (invalid)" : ""; }


x86 assembly (clang, -O0):
<val>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef9(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<val>:
test   %edi,%edi
lea    0xf01(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c" (invalid)\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @val(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [11 x i8] c" (invalid)\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @val(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
char *netGetHugeString(int);
int /*<<< orphan*/ noWarnAbort();
char *netRecieveHugeString(int sd) {
  char *s = netGetHugeString(sd);
  if (s == NULL)
    noWarnAbort();
  return s;
}


x86 assembly (clang, -O0):
<netRecieveHugeString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <netGetHugeString@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1149 <netRecieveHugeString+0x29>
mov    $0x0,%al
call   1040 <noWarnAbort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<netRecieveHugeString>:
push   %rbx
call   1030 <netGetHugeString@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <netRecieveHugeString+0x15>
xor    %eax,%eax
call   1040 <noWarnAbort@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @netRecieveHugeString(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @netGetHugeString(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @noWarnAbort()
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @netRecieveHugeString(i32 %0) {
%2 = tail call i8* @netGetHugeString(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @noWarnAbort()
br label %6
6: ; preds = %4, %1
ret i8* %2
}
__attribute__((no, noclone)) int f1(void **a, const char *b, int *c) {
  *a = 0;
  *c = 0;
  asm volatile("" : : "r"(&a), "r"(b), "r"(&c) : "memory");
  return 0;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rcx
lea    -0x8(%rbp),%rax
lea    -0x18(%rbp),%rdx
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    %rdi,-0x8(%rsp)
mov    %rdx,-0x10(%rsp)
movq   $0x0,(%rdi)
movl   $0x0,(%rdx)
lea    -0x8(%rsp),%rax
lea    -0x10(%rsp),%rcx
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @f1(i8** %0, i8* %1, i32* %2) {
%4 = alloca i8**
%5 = alloca i32*
store i8** %0, i8*** %4
store i32* %2, i32** %5
store i8* null, i8** %0
store i32 0, i32* %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage:\n");
  printf(" db_remove <database in> <database out> <tihm number>\n");
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [55 x i8] c" db_remove <database in> <database out> <tihm number>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [7 x i8] c"Usage:\00"
@str.2 = [54 x i8] c" db_remove <database in> <database out> <tihm number>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int _t_path_depth(int *p) {
  int i = 0;
  while (*p++ != -9999)
    i++;
  return i;
}


x86 assembly (clang, -O0):
<_t_path_depth>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
cmpl   $0xffffd8f1,(%rax)
je     1138 <_t_path_depth+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <_t_path_depth+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_t_path_depth>:
xor    %eax,%eax
cmpl   $0xffffd8f1,(%rdi)
je     111e <_t_path_depth+0x1e>
xor    %eax,%eax
nopl   0x0(%rax)
cmpl   $0xffffd8f1,0x4(%rdi,%rax,4)
ff
lea    0x1(%rax),%rax
jne    1110 <_t_path_depth+0x10>
ret

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

LLVM IR (-O2):
define i32 @_t_path_depth(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, -9999
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i32* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i32, i32* %7
%10 = icmp eq i32 %9, -9999
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
int f(int i) { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *, char const *);
void badcnt(const char *s) { errx(1, "%s: bad byte count", s); }


x86 assembly (clang, -O0):
<badcnt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xed4(%rip),%rsi
call   1030 <errx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<badcnt>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <errx@plt>

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

LLVM IR (-O2):
@.str = [19 x i8] c"%s: bad byte count\00"
define void @badcnt(i8* %0) {
%2 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void TM14_intr(void) {}


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

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

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

LLVM IR (-O2):
define void @TM14_intr() {
ret void
}
/* Variables and functions */
char *strchr(char *, char);
int countfields(char *edit) {
  char *c = edit;
  int fields = 0;
  while (c) {
    c = strchr(c + 1, ':');
    fields++;
  }
  return fields;
}


x86 assembly (clang, -O0):
<countfields>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115a <countfields+0x4a>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <countfields+0x1b>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countfields>:
push   %rbx
test   %rdi,%rdi
je     113b <countfields+0x2b>
mov    %rdi,%rax
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
mov    %rax,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1120 <countfields+0x10>
jmp    113d <countfields+0x2d>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @countfields(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i8* [ %7, %3 ], [ %0, %1 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = tail call i8* @strchr(i8* %6, i8 signext 58)
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i8* %7, null
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
uint64_t normolize_ticks(uint64_t first, uint64_t second,
                         uint64_t tsc_overhead) {
  if (second > first)
    return (second - first) > tsc_overhead ? second - first - tsc_overhead : 0;
  return 0;
}


x86 assembly (clang, -O0):
<normolize_ticks>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    115d <normolize_ticks+0x5d>
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jle    1145 <normolize_ticks+0x45>
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
sub    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1150 <normolize_ticks+0x50>
xor    %eax,%eax
mov    %rax,-0x28(%rbp)
jmp    1150 <normolize_ticks+0x50>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1165 <normolize_ticks+0x65>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<normolize_ticks>:
mov    %rsi,%rax
sub    %rdi,%rax
xor    %ecx,%ecx
sub    %rdx,%rax
cmovle %rcx,%rax
cmp    %rdi,%rsi
cmovle %rcx,%rax
ret

LLVM IR (-O0):
define i64 @normolize_ticks(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %6
%9 = load i64, i64* %5
%10 = icmp sgt i64 %8, %9
br i1 %10, label %11, label %26
11: ; preds = %3
%12 = load i64, i64* %6
%13 = load i64, i64* %5
%14 = sub nsw i64 %12, %13
%15 = load i64, i64* %7
%16 = icmp sgt i64 %14, %15
br i1 %16, label %17, label %23
17: ; preds = %11
%18 = load i64, i64* %6
%19 = load i64, i64* %5
%20 = sub nsw i64 %18, %19
%21 = load i64, i64* %7
%22 = sub nsw i64 %20, %21
br label %24
23: ; preds = %11
br label %24
24: ; preds = %23, %17
%25 = phi i64 [ %22, %17 ], [ 0, %23 ]
store i64 %25, i64* %4
br label %27
26: ; preds = %3
store i64 0, i64* %4
br label %27
27: ; preds = %26, %24
%28 = load i64, i64* %4
ret i64 %28
}

LLVM IR (-O2):
define i64 @normolize_ticks(i64 %0, i64 %1, i64 %2) {
%4 = icmp sgt i64 %1, %0
%5 = sub nsw i64 %1, %0
%6 = icmp sgt i64 %5, %2
%7 = sub nsw i64 %5, %2
%8 = select i1 %4, i1 %6, i1 false
%9 = select i1 %8, i64 %7, i64 0
ret i64 %9
}
int readint1(int *x) { return *x; }


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

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

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

LLVM IR (-O2):
define i32 @readint1(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
void _M2_FormatStrings_init(__attribute__((unused)) int argc,
                            __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_FormatStrings_init(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sleep(int /*<<< orphan*/);
int main(int argc, char **argv) {
  if (argc < 2) {
    printf("%s: missing operand\n", argv[0]);
    return 1;
  }
  sleep(atoi(argv[1]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    116f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    118a <main+0x5a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <sleep@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     114c <main+0x1c>
mov    (%rsi),%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"%s: missing operand\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %12
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 @sleep(i32 %10)
br label %12
12: ; preds = %7, %4
%13 = phi i32 [ 1, %4 ], [ 0, %7 ]
ret i32 %13
}
void foo643() {}


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

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

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

LLVM IR (-O2):
define void @foo643() {
ret void
}
/* Variables and functions */
double _atan(double);
double atan(double x) { return _atan(x); }


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

x86 assembly (clang, -O2):
<atan>:
jmp    1030 <_atan@plt>

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

LLVM IR (-O2):
define double @atan(double %0) {
%2 = tail call double @_atan(double %0)
ret double %2
}
void WatchdogStallEnable(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000418))) |= 0x00000100;
}


x86 assembly (clang, -O0):
<WatchdogStallEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x418(%rax),%rcx
or     $0x100,%rcx
mov    %rcx,0x418(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogStallEnable>:
orq    $0x100,0x418(%rdi)
ret

LLVM IR (-O0):
define void @WatchdogStallEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 1048
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, 256
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @WatchdogStallEnable(i64 %0) {
%2 = add i64 %0, 1048
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = or i64 %4, 256
store volatile i64 %5, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x2a() {
  Assert_real((isprint(42)),
              "/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_isprint.c",
              215, ("isprint should be 1 for *"));
}


x86 assembly (clang, -O0):
<t_isprint_0x2a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xd7,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x2a>:
push   %rax
mov    $0x2a,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xd7,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for *\00"
define void @t_isprint_0x2a() {
%1 = call i32 @isprint(i32 42)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 215, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for *\00"
define void @t_isprint_0x2a() {
%1 = tail call i32 @isprint(i32 42)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 215, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CompileCondition();
unsigned short NumberOnly();
int /*<<< orphan*/ ResetIf();
int /*<<< orphan*/ WriteInstruction(char *);
int /*<<< orphan*/ WriteNumber(unsigned short);
void CR_Collision(void) {
  unsigned short int nNum = NumberOnly();
  WriteInstruction("ld b,");
  WriteNumber(nNum);
  WriteInstruction("call sktyp");
  WriteInstruction("jp nc,      ");
  CompileCondition();
  ResetIf();
}


x86 assembly (clang, -O0):
<CR_Collision>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1070 <NumberOnly@plt>
mov    %ax,-0x2(%rbp)
lea    0xe96(%rip),%rdi
call   1050 <WriteInstruction@plt>
movzwl -0x2(%rbp),%edi
call   1040 <WriteNumber@plt>
lea    0xe87(%rip),%rdi
call   1050 <WriteInstruction@plt>
lea    0xe86(%rip),%rdi
call   1050 <WriteInstruction@plt>
mov    $0x0,%al
call   1060 <CompileCondition@plt>
mov    $0x0,%al
call   1030 <ResetIf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CR_Collision>:
push   %rbx
xor    %eax,%eax
call   1070 <NumberOnly@plt>
mov    %eax,%ebx
lea    0xe9f(%rip),%rdi
call   1050 <WriteInstruction@plt>
movzwl %bx,%edi
call   1040 <WriteNumber@plt>
lea    0xe91(%rip),%rdi
call   1050 <WriteInstruction@plt>
lea    0xe90(%rip),%rdi
call   1050 <WriteInstruction@plt>
xor    %eax,%eax
call   1060 <CompileCondition@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <ResetIf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ld b,\00"
@.str.1 = [11 x i8] c"call sktyp\00"
@.str.2 = [13 x i8] c"jp nc, \00"
define void @CR_Collision() {
%1 = alloca i16
%2 = call zeroext i16 (...) @NumberOnly()
store i16 %2, i16* %1
%3 = call i32 @WriteInstruction(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i16, i16* %1
%5 = call i32 @WriteNumber(i16 zeroext %4)
%6 = call i32 @WriteInstruction(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @WriteInstruction(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (...) @CompileCondition()
%9 = call i32 (...) @ResetIf()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ld b,\00"
@.str.1 = [11 x i8] c"call sktyp\00"
@.str.2 = [13 x i8] c"jp nc, \00"
define void @CR_Collision() {
%1 = tail call zeroext i16 (...) @NumberOnly()
%2 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @WriteNumber(i16 zeroext %1)
%4 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (...) @CompileCondition()
%7 = tail call i32 (...) @ResetIf()
ret void
}
/* Variables and functions */
double const cos(double);
double const sin(double);
void calcHeadCrossWindComp(const double ws, const double wd, const double rd,
                           double *hw, double *xw) {
  double diffAngle = wd - rd;
  *hw = ws * cos(diffAngle);
  *xw = ws * sin(diffAngle);
}


x86 assembly (clang, -O0):
<calcHeadCrossWindComp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcHeadCrossWindComp>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
subsd  %xmm2,%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm1,%xmm0
call   1040 <cos@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @calcHeadCrossWindComp(double %0, double %1, double %2, double* %3, double* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double*
%10 = alloca double*
%11 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double* %3, double** %9
store double* %4, double** %10
%12 = load double, double* %7
%13 = load double, double* %8
%14 = fsub double %12, %13
store double %14, double* %11
%15 = load double, double* %6
%16 = load double, double* %11
%17 = call double @cos(double %16)
%18 = fmul double %15, %17
%19 = load double*, double** %9
store double %18, double* %19
%20 = load double, double* %6
%21 = load double, double* %11
%22 = call double @sin(double %21)
%23 = fmul double %20, %22
%24 = load double*, double** %10
store double %23, double* %24
ret void
}

LLVM IR (-O2):
define void @calcHeadCrossWindComp(double %0, double %1, double %2, double* nocapture writeonly %3, double* nocapture writeonly %4) {
%6 = fsub double %1, %2
%7 = tail call double @cos(double %6)
%8 = fmul double %7, %0
store double %8, double* %3
%9 = tail call double @sin(double %6)
%10 = fmul double %9, %0
store double %10, double* %4
ret void
}
int test_imm_8Buint8_reg(unsigned char val) {
  return ((val) & (0x8B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_8Buint8_reg>:
test   $0x8b,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Buint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -117
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char *other(char b) {
  static char charStr[2];
  switch (b) {
  case '.':
    return ".";
    break;
  case ',':
    return ",";
    break;
  default:
    charStr[0] = b;
    charStr[1] = '\0';
    return charStr;
    break;
  }
}


x86 assembly (clang, -O0):
<other>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x2c,%eax
je     1140 <other+0x40>
jmp    111f <other+0x1f>
mov    -0x10(%rbp),%eax
sub    $0x2e,%eax
jne    1150 <other+0x50>
jmp    1130 <other+0x30>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116b <other+0x6b>
lea    0xebb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116b <other+0x6b>
mov    -0x9(%rbp),%al
mov    %al,0x2ec8(%rip)
movb   $0x0,0x2ec2(%rip)
lea    0x2eba(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<other>:
cmp    $0x2e,%edi
je     1112 <other+0x12>
cmp    $0x2c,%edi
jne    111a <other+0x1a>
lea    0xef1(%rip),%rax
ret
lea    0xee7(%rip),%rax
ret
mov    %dil,0x2f00(%rip)
lea    0x2ef9(%rip),%rax
movb   $0x0,0x2ef3(%rip)
ret

LLVM IR (-O0):
@other.charStr = internal global [2 x i8] zeroinitializer
@.str = [2 x i8] c".\00"
@.str.1 = [2 x i8] c",\00"
define i8* @other(i8 signext %0) {
%2 = alloca i8*
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 46, label %6
i32 44, label %7
]
6: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
%9 = load i8, i8* %3
store i8 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @other.charStr, i64 0, i64 0)
store i8 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @other.charStr, i64 0, i64 1)
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @other.charStr, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %8, %7, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@other.charStr = internal global [2 x i8] zeroinitializer
@.str = [2 x i8] c".\00"
@.str.1 = [2 x i8] c",\00"
define i8* @other(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 46, label %5
i32 44, label %3
]
3: ; preds = %1
br label %5
4: ; preds = %1
store i8 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @other.charStr, i64 0, i64 0)
store i8 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @other.charStr, i64 0, i64 1)
br label %5
5: ; preds = %1, %4, %3
%6 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @other.charStr, i64 0, i64 0), %4 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int LWZReadByte_(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int LWZReadByte(FILE *fd, int flag, int input_code_size) {
  int rv;
  rv = LWZReadByte_(fd, flag, input_code_size);
  if (0)
    printf("[LWZReadByte(,%d,%d) returning %d]\n", flag, input_code_size, rv);
  return (rv);
}


x86 assembly (clang, -O0):
<LWZReadByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <LWZReadByte_@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LWZReadByte>:
jmp    1030 <LWZReadByte_@plt>

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

LLVM IR (-O2):
define i32 @LWZReadByte(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @LWZReadByte_(i32* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int snake_end(void) {
  endwin();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @snake_end() {
%1 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
define i32 @snake_end() {
%1 = tail call i32 (...) @endwin()
ret i32 0
}
void ASN1_generate_nconf(void) {}


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

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

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

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