xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ TPU_clear_ch(int);
int /*<<< orphan*/ TPU_start_ch(int);
int /*<<< orphan*/ TPU_stop_ch(int);
void TPU_restart_ch(int ch) {
  TPU_stop_ch(ch);
  TPU_clear_ch(ch);
  TPU_start_ch(ch);
}


x86 assembly (clang, -O0):
<TPU_restart_ch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <TPU_stop_ch@plt>
mov    -0x4(%rbp),%edi
call   1030 <TPU_clear_ch@plt>
mov    -0x4(%rbp),%edi
call   1050 <TPU_start_ch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TPU_restart_ch>:
push   %rbx
mov    %edi,%ebx
call   1040 <TPU_stop_ch@plt>
mov    %ebx,%edi
call   1030 <TPU_clear_ch@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <TPU_start_ch@plt>

LLVM IR (-O0):
define void @TPU_restart_ch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @TPU_stop_ch(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @TPU_clear_ch(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @TPU_start_ch(i32 %7)
ret void
}

LLVM IR (-O2):
define void @TPU_restart_ch(i32 %0) {
%2 = tail call i32 @TPU_stop_ch(i32 %0)
%3 = tail call i32 @TPU_clear_ch(i32 %0)
%4 = tail call i32 @TPU_start_ch(i32 %0)
ret void
}
void outb(short port, unsigned char val) {
  asm volatile("outb %0, %1" : : "a"(val), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    -0x2(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i16 signext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i16, i16* %3
ret void
}

LLVM IR (-O2):
define void @outb(i16 signext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $0, $1", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(int, int *);
int f() {
  int x = 0;
  int *p = &x;
  g(1, p);
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x1,%edi
call   1030 <g@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
call   1030 <g@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @f() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @g(i32 1, i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
size_t get_data_tag_in_MsgTypes(size_t __tag) {
  (void)__tag;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i64 @get_data_tag_in_MsgTypes(i64 %0) {
ret i64 0
}
/* Variables and functions */
void IN_Restart(void) {}


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

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

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

LLVM IR (-O2):
define void @IN_Restart() {
ret void
}
/* Variables and functions */
int isatty(int);
int outside_isatty(int fd) { return isatty(fd); }


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

x86 assembly (clang, -O2):
<outside_isatty>:
jmp    1030 <isatty@plt>

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

LLVM IR (-O2):
define i32 @outside_isatty(i32 %0) {
%2 = tail call i32 @isatty(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *myStringCopy(char *string) {
  int length = strlen(string) + 1;
  char *result = malloc(length);
  strcpy(result, string);
  return result;
}


x86 assembly (clang, -O0):
<myStringCopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myStringCopy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @myStringCopy(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
define i8* @myStringCopy(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int yas_bma250_write_reg(unsigned char, unsigned char *, int);
int yas_bma250_write_reg_byte(unsigned char adr, unsigned char val) {
  return yas_bma250_write_reg(adr, &val, 1);
}


x86 assembly (clang, -O0):
<yas_bma250_write_reg_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x2(%rbp),%rsi
mov    $0x1,%edx
movzbl -0x1(%rbp),%edi
call   1030 <yas_bma250_write_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_bma250_write_reg_byte>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <yas_bma250_write_reg@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @yas_bma250_write_reg_byte(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @yas_bma250_write_reg(i8 zeroext %0, i8* %3, i32 1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_be32(int /*<<< orphan*/, void *);
void put_unaligned_be32(uint32_t val, void *p) { __put_unaligned_be32(val, p); }


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

x86 assembly (clang, -O2):
<put_unaligned_be32>:
jmp    1030 <__put_unaligned_be32@plt>

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

LLVM IR (-O2):
define void @put_unaligned_be32(i32 %0, i8* %1) {
%3 = tail call i32 @__put_unaligned_be32(i32 %0, i8* %1)
ret void
}
void coolapi_close_all(void) {}


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

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

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

LLVM IR (-O2):
define void @coolapi_close_all() {
ret void
}
/* Variables and functions */
double pow(double const, int);
double _cube(const int numInputs, const double *inputs,
             const double *connectionWeights) {
  return pow(inputs[0], 3);
}


x86 assembly (clang, -O0):
<_cube>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cube>:
movsd  (%rsi),%xmm0
mov    $0x3,%edi
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @_cube(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = call double @pow(double %9, i32 3)
ret double %10
}

LLVM IR (-O2):
define double @_cube(i32 %0, double* nocapture %1, double* nocapture readnone %2) {
%4 = load double, double* %1
%5 = tail call double @pow(double %4, i32 3)
ret double %5
}
/* Type definitions */
struct mainwindow {
  int dummy;
};

/* Variables and functions */
int context_exit(struct mainwindow *);
int handle_exit(struct mainwindow *mw) { return context_exit(mw); }


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

x86 assembly (clang, -O2):
<handle_exit>:
jmp    1030 <context_exit@plt>

LLVM IR (-O0):
%struct.mainwindow = type { i32 }
define i32 @handle_exit(%struct.mainwindow* %0) {
%2 = alloca %struct.mainwindow*
store %struct.mainwindow* %0, %struct.mainwindow** %2
%3 = load %struct.mainwindow*, %struct.mainwindow** %2
%4 = call i32 @context_exit(%struct.mainwindow* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.mainwindow = type { i32 }
define i32 @handle_exit(%struct.mainwindow* %0) {
%2 = tail call i32 @context_exit(%struct.mainwindow* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void print_date(FILE *out) {
  time_t t;
  const char *tstr;
  t = time(NULL);
  tstr = ctime(&t);
  fprintf(out, "date %s", tstr);
}


x86 assembly (clang, -O0):
<print_date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe9c(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_date>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <ctime@plt>
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"date %s\00"
define void @print_date(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i8*
store i32* %0, i32** %2
%5 = call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call i8* @ctime(i32* %3)
store i8* %6, i8** %4
%7 = load i32*, i32** %2
%8 = load i8*, i8** %4
%9 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"date %s\00"
define void @print_date(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call i8* @ctime(i32* %2)
%6 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}
/* Variables and functions */
double O2z_z(double, double, double, double);
double O3z_y(double sign, double xi, double et, double qq) {
  return O2z_z(sign, xi, et, qq);
}


x86 assembly (clang, -O0):
<O3z_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <O2z_z@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<O3z_y>:
jmp    1030 <O2z_z@plt>

LLVM IR (-O0):
define double @O3z_y(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call double @O2z_z(double %9, double %10, double %11, double %12)
ret double %13
}

LLVM IR (-O2):
define double @O3z_y(double %0, double %1, double %2, double %3) {
%5 = tail call double @O2z_z(double %0, double %1, double %2, double %3)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int test2(int);
int main() {
  printf("%d\n", test2(3));
  return 0;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ EVP_sha1();
int /*<<< orphan*/ HMAC_Init_ex(int /*<<< orphan*/ *, char const *, int,
                                int /*<<< orphan*/, int /*<<< orphan*/);
void ssl_hmac_sha1_init(void *hmac, const char *data, int len) {
  HMAC_CTX *hmac_ctx;
  hmac_ctx = (HMAC_CTX *)hmac;
  HMAC_Init_ex(hmac_ctx, data, len, EVP_sha1(), 0);
}


x86 assembly (clang, -O0):
<ssl_hmac_sha1_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1030 <EVP_sha1@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    %eax,%ecx
xor    %r8d,%r8d
call   1040 <HMAC_Init_ex@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssl_hmac_sha1_init>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %eax,%eax
call   1030 <EVP_sha1@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <HMAC_Init_ex@plt>

LLVM IR (-O0):
define void @ssl_hmac_sha1_init(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i32*, i32** %7
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 (...) @EVP_sha1()
%14 = call i32 @HMAC_Init_ex(i32* %10, i8* %11, i32 %12, i32 %13, i32 0)
ret void
}

LLVM IR (-O2):
define void @ssl_hmac_sha1_init(i8* %0, i8* %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i32 (...) @EVP_sha1()
%6 = tail call i32 @HMAC_Init_ex(i32* %4, i8* %1, i32 %2, i32 %5, i32 0)
ret void
}
long sas_atomic_dec_long(volatile long *value) {
  long result;
  long delta = -1;
  result = __atomic_fetch_add(value, delta, 2);
  return result;
}


x86 assembly (clang, -O0):
<sas_atomic_dec_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
lock xadd %rax,(%rcx)
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sas_atomic_dec_long>:
mov    $0xffffffffffffffff,%rax
lock xadd %rax,(%rdi)
ret

LLVM IR (-O0):
define i64 @sas_atomic_dec_long(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %2
store i64 -1, i64* %4
%7 = load i64*, i64** %2
%8 = load i64, i64* %4
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = atomicrmw volatile add i64* %7, i64 %9 acquire
store i64 %10, i64* %6
%11 = load i64, i64* %6
store i64 %11, i64* %3
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @sas_atomic_dec_long(i64* %0) {
%2 = atomicrmw volatile add i64* %0, i64 -1 acquire
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ __string_file(int /*<<< orphan*/ *, char *, char *, size_t);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vsnprintf(char *str, size_t len, const char *fmt, va_list args) {
  FILE tmpfile;
  int r;
  r = vfprintf(__string_file(&tmpfile, str, "w", len), fmt, args);
  fclose(&tmpfile);
  return r;
}


x86 assembly (clang, -O0):
<vsnprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rcx
lea    -0x20(%rbp),%rdi
lea    0xea6(%rip),%rdx
call   1040 <__string_file@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <vfprintf@plt>
mov    %eax,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsnprintf>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %ecx,%ebp
mov    %rdx,%rbx
mov    %rsi,%rcx
mov    %rdi,%rsi
lea    0xeb6(%rip),%rdx
lea    0xc(%rsp),%r14
mov    %r14,%rdi
call   1040 <__string_file@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1050 <vfprintf@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
define i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = call i32 @__string_file(i32* %9, i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i64 %12)
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = call i32 @vfprintf(i32 %13, i8* %14, i32 %15)
store i32 %16, i32* %10
%17 = call i32 @fclose(i32* %9)
%18 = load i32, i32* %10
ret i32 %18
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = call i32 @__string_file(i32* %5, i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i64 %1)
%8 = call i32 @vfprintf(i32 %7, i8* %2, i32 %3)
%9 = call i32 @fclose(i32* %5)
ret i32 %8
}
int is_mid_median(int a, int b, int c) {
  int result = 0;
  if (a >= b && c <= b)
    result = 1;
  if (c >= b && a <= b)
    result = 1;
  return result;
}


x86 assembly (clang, -O0):
<is_mid_median>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1133 <is_mid_median+0x33>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1133 <is_mid_median+0x33>
movl   $0x1,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1152 <is_mid_median+0x52>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1152 <is_mid_median+0x52>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_mid_median>:
cmp    %esi,%edi
setge  %al
setle  %dil
cmp    %esi,%edx
setle  %dl
setge  %cl
and    %al,%dl
and    %dil,%cl
or     %dl,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_mid_median(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
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %3
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 1, i32* %7
br label %16
16: ; preds = %15, %11, %3
%17 = load i32, i32* %6
%18 = load i32, i32* %5
%19 = icmp sge i32 %17, %18
br i1 %19, label %20, label %25
20: ; preds = %16
%21 = load i32, i32* %4
%22 = load i32, i32* %5
%23 = icmp sle i32 %21, %22
br i1 %23, label %24, label %25
24: ; preds = %20
store i32 1, i32* %7
br label %25
25: ; preds = %24, %20, %16
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @is_mid_median(i32 %0, i32 %1, i32 %2) {
%4 = icmp sge i32 %0, %1
%5 = icmp sle i32 %2, %1
%6 = and i1 %4, %5
%7 = icmp sge i32 %2, %1
%8 = icmp sle i32 %0, %1
%9 = and i1 %8, %7
%10 = or i1 %9, %6
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void error(const char *message) {
  perror(message);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello! world.\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 = [15 x i8] c"Hello! world.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello! world.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void deLoadPattern(unsigned char *pattern, unsigned long write_addr) {
  int i;
  for (i = 0; i < (8 * 8 * 2); i += 4) {
    write_addr += 4;
  }
}


x86 assembly (clang, -O0):
<deLoadPattern>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x80,-0x14(%rbp)
jge    113a <deLoadPattern+0x3a>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <deLoadPattern+0x13>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @deLoadPattern(i8* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ message(char *, char *, ...);
void editor_print_usage(char *progname) {
  message("0", "Usage: %s [options] commands...\n", progname);
  message("",
          "\n"
          "Options:\n"
          "-h            --  This help text.\n"
          "-i <savefile> --  The savefile to read from. Default: stdin\n"
          "-o <file>     --  The file an edited savestate is written to.\n");
}


x86 assembly (clang, -O0):
<editor_print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <message@plt>
lea    0xee6(%rip),%rdi
lea    0xee0(%rip),%rsi
mov    $0x0,%al
call   1030 <message@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<editor_print_usage>:
push   %rax
mov    %rdi,%rdx
lea    0xee5(%rip),%rdi
lea    0xee0(%rip),%rsi
xor    %eax,%eax
call   1030 <message@plt>
lea    0xef2(%rip),%rdi
lea    0xeec(%rip),%rsi
xor    %eax,%eax
pop    %rcx
jmp    1030 <message@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [33 x i8] c"Usage: %s [options] commands...\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [167 x i8] c"\0AOptions:\0A-h -- This help text.\0A-i <savefile> -- The savefile to read from. Default: stdin\0A-o <file> -- The file an edited savestate is written to.\0A\00"
define void @editor_print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) @message(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, i8*, ...) @message(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
@.str.1 = [33 x i8] c"Usage: %s [options] commands...\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [167 x i8] c"\0AOptions:\0A-h -- This help text.\0A-i <savefile> -- The savefile to read from. Default: stdin\0A-o <file> -- The file an edited savestate is written to.\0A\00"
define void @editor_print_usage(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) @message(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, i8*, ...) @message(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SO_REUSEADDR;
int enableSockOpt(int, int /*<<< orphan*/, int);
bool enableReuseAddr(int socket, bool enable) {
  return enableSockOpt(socket, SO_REUSEADDR, enable);
}


x86 assembly (clang, -O0):
<enableReuseAddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <enableSockOpt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enableReuseAddr>:
mov    %esi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%esi
jmp    1030 <enableSockOpt@plt>

LLVM IR (-O0):
@SO_REUSEADDR = global i32 0
define i32 @enableReuseAddr(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* @SO_REUSEADDR
%7 = load i32, i32* %4
%8 = call i32 @enableSockOpt(i32 %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@SO_REUSEADDR = global i32 0
define i32 @enableReuseAddr(i32 %0, i32 %1) {
%3 = load i32, i32* @SO_REUSEADDR
%4 = tail call i32 @enableSockOpt(i32 %0, i32 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float frandom(float max_a) { return (float)rand() / ((float)RAND_MAX / max_a); }


x86 assembly (clang, -O0):
<frandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2eb8(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frandom>:
push   %rax
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mov    0x2ebb(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  0x4(%rsp),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @frandom(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to float
%7 = load float, float* %2
%8 = fdiv float %6, %7
%9 = fdiv float %4, %8
ret float %9
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @frandom(float %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to float
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to float
%6 = fdiv float %5, %0
%7 = fdiv float %3, %6
ret float %7
}
A0RX1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((*((short *)10000000)) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<A0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0x989680,%eax
movswl (%rax),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     1147 <A0RX1+0x47>
movl   $0x1,-0x4(%rbp)
jmp    114e <A0RX1+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<A0RX1>:
movzwl 0x989680,%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,2),%dx
setle  %al
ret

LLVM IR (-O0):
define i32 @A0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* inttoptr (i64 10000000 to i16*)
%17 = sext i16 %16 to i32
%18 = load i16*, i16** %13
%19 = load i32, i32* %11
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i16, i16* %18, i64 %20
%22 = load i16, i16* %21
%23 = sext i16 %22 to i32
%24 = icmp sle i32 %17, %23
br i1 %24, label %25, label %26
25: ; preds = %6
store i32 1, i32* %7
br label %27
26: ; preds = %6
store i32 0, i32* %7
br label %27
27: ; preds = %26, %25
%28 = load i32, i32* %7
ret i32 %28
}

LLVM IR (-O2):
define i32 @A0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = load i16, i16* inttoptr (i64 10000000 to i16*)
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i16, i16* %5, i64 %8
%10 = load i16, i16* %9
%11 = icmp sle i16 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
float powf(float, float);
float exponential_ease_out(float p) {
  float f = p;
  if (p != 1.0f) {
    f = 1.0f - powf(2.0f, -10.0f * p);
  }
  return f;
}


x86 assembly (clang, -O0):
<exponential_ease_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xecc(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1148 <exponential_ease_out+0x38>
jp     1148 <exponential_ease_out+0x38>
jmp    1176 <exponential_ease_out+0x66>
movss  0xeb8(%rip),%xmm1
mulss  -0x4(%rbp),%xmm1
movss  0xea7(%rip),%xmm0
call   1030 <powf@plt>
movaps %xmm0,%xmm1
movss  0xe93(%rip),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponential_ease_out>:
push   %rax
movaps %xmm0,%xmm1
movss  0xee4(%rip),%xmm0
ucomiss %xmm0,%xmm1
jne    1123 <exponential_ease_out+0x13>
jnp    1142 <exponential_ease_out+0x32>
mulss  0xed9(%rip),%xmm1
movaps %xmm1,%xmm0
call   1030 <exp2f@plt>
movaps %xmm0,%xmm1
movss  0xec2(%rip),%xmm0
subss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @exponential_ease_out(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
store float %4, float* %3
%5 = load float, float* %2
%6 = fcmp une float %5, 1.000000e+00
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load float, float* %2
%9 = fmul float -1.000000e+01, %8
%10 = call float @powf(float 2.000000e+00, float %9)
%11 = fsub float 1.000000e+00, %10
store float %11, float* %3
br label %12
12: ; preds = %7, %1
%13 = load float, float* %3
ret float %13
}

LLVM IR (-O2):
define float @exponential_ease_out(float %0) {
%2 = fcmp une float %0, 1.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fmul float %0, -1.000000e+01
%5 = tail call float @exp2f(float %4)
%6 = fsub float 1.000000e+00, %5
br label %7
7: ; preds = %3, %1
%8 = phi float [ %6, %3 ], [ 1.000000e+00, %1 ]
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int main() {
  write(1, "Hello\n", 6);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x6,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Hello\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Hello\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
uint32_t signed_mod_longto32(long a, uint32_t p) {
  uint32_t amodp;
  if (a < 0) {
    amodp = ((unsigned long)(-a)) % p;
    if (amodp > 0)
      amodp = p - amodp;
  } else
    amodp = ((unsigned long)a) % p;
  return amodp;
}


x86 assembly (clang, -O0):
<signed_mod_longto32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1145 <signed_mod_longto32+0x45>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jbe    1140 <signed_mod_longto32+0x40>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1155 <signed_mod_longto32+0x55>
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_mod_longto32>:
mov    %rdi,%rax
test   %rdi,%rdi
js     111d <signed_mod_longto32+0x1d>
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1133 <signed_mod_longto32+0x33>
xor    %edx,%edx
div    %rsi
mov    %rdx,%rax
ret
neg    %rax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     113d <signed_mod_longto32+0x3d>
xor    %edx,%edx
div    %rsi
jmp    1141 <signed_mod_longto32+0x41>
xor    %edx,%edx
div    %esi
mov    %edx,%esi
mov    %rsi,%rax
ret
xor    %edx,%edx
div    %esi
sub    %rdx,%rsi
test   %rdx,%rdx
cmove  %rdx,%rsi
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @signed_mod_longto32(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, 0
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = sub nsw i64 0, %0
%6 = urem i64 %5, %1
%7 = icmp eq i64 %6, 0
%8 = sub i64 %1, %6
%9 = select i1 %7, i64 0, i64 %8
br label %12
10: ; preds = %2
%11 = urem i64 %0, %1
br label %12
12: ; preds = %4, %10
%13 = phi i64 [ %11, %10 ], [ %9, %4 ]
ret i64 %13
}
/* Type definitions */
typedef char wchar_t;

/* Variables and functions */
int /*<<< orphan*/ ft_putwchr_utf8(char const);
void ft_putwstr_utf8(const wchar_t *wstr) {
  if (wstr) {
    while (*wstr != '\0') {
      ft_putwchr_utf8(*wstr);
      wstr++;
    }
  }
}


x86 assembly (clang, -O0):
<ft_putwstr_utf8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115e <ft_putwstr_utf8+0x4e>
jmp    112c <ft_putwstr_utf8+0x1c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1159 <ft_putwstr_utf8+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ft_putwchr_utf8@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <ft_putwstr_utf8+0x1c>
jmp    115e <ft_putwstr_utf8+0x4e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putwstr_utf8>:
push   %rbx
test   %rdi,%rdi
je     1143 <ft_putwstr_utf8+0x33>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1143 <ft_putwstr_utf8+0x33>
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
call   1030 <ft_putwchr_utf8@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <ft_putwstr_utf8+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ft_putwstr_utf8(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %11, %6 ], [ %4, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = tail call i32 @ft_putwchr_utf8(i8 signext %7)
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ be64dec(unsigned char const *);
void be64dec_vect(uint64_t *dst, const unsigned char *src, size_t len) {
  size_t i;
  for (i = 0; i < len / 8; i++) {
    dst[i] = be64dec(src + i * 8);
  }
}


x86 assembly (clang, -O0):
<be64dec_vect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
shr    $0x3,%rcx
cmp    %rcx,%rax
jae    1173 <be64dec_vect+0x63>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <be64dec@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <be64dec_vect+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be64dec_vect>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x8,%rdx
jb     1149 <be64dec_vect+0x39>
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
shr    $0x3,%r14
xor    %ebx,%ebx
nopl   (%rax)
mov    %r12,%rdi
call   1030 <be64dec@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
add    $0x8,%r12
cmp    %rbx,%r14
jne    1130 <be64dec_vect+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @be64dec_vect(i32* nocapture writeonly %0, i8* %1, i64 %2) {
%4 = icmp ult i64 %2, 8
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = lshr i64 %2, 3
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %13, %7 ], [ 0, %5 ]
%9 = shl i64 %8, 3
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = tail call i32 @be64dec(i8* %10)
%12 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 %11, i32* %12
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ KeccakF200_StateXORBytesInLane(void *, unsigned int,
                                                  unsigned char *, unsigned int,
                                                  int);
void Ket_StateXORByte(void *state, unsigned int offset, unsigned char data) {
  unsigned char localData[1];
  localData[0] = data;
  KeccakF200_StateXORBytesInLane(state, offset / 1, localData, offset % 1, 1);
}


x86 assembly (clang, -O0):
<Ket_StateXORByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shr    $0x0,%esi
lea    -0xe(%rbp),%rdx
mov    -0xc(%rbp),%ecx
and    $0x0,%ecx
mov    $0x1,%r8d
call   1030 <KeccakF200_StateXORBytesInLane@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ket_StateXORByte>:
push   %rax
mov    %dl,0x7(%rsp)
lea    0x7(%rsp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <KeccakF200_StateXORBytesInLane@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @Ket_StateXORByte(i8* %0, i32 %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8
%7 = alloca [1 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%8 = load i8, i8* %6
%9 = getelementptr inbounds [1 x i8], [1 x i8]* %7, i64 0, i64 0
store i8 %8, i8* %9
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = udiv i32 %11, 1
%13 = getelementptr inbounds [1 x i8], [1 x i8]* %7, i64 0, i64 0
%14 = load i32, i32* %5
%15 = urem i32 %14, 1
%16 = call i32 @KeccakF200_StateXORBytesInLane(i8* %10, i32 %12, i8* %13, i32 %15, i32 1)
ret void
}

LLVM IR (-O2):
define void @Ket_StateXORByte(i8* %0, i32 %1, i8 zeroext %2) {
%4 = alloca [1 x i8]
%5 = getelementptr inbounds [1 x i8], [1 x i8]* %4, i64 0, i64 0
store i8 %2, i8* %5
%6 = call i32 @KeccakF200_StateXORBytesInLane(i8* %0, i32 %1, i8* %5, i32 0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  for (int a = 0; a < 3; a++)
    printf("%i\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *, int);
void print_err(char *msg) {
  printf("Error: %s errno %d\n", msg, errno);
  perror("Error:");
}


x86 assembly (clang, -O0):
<print_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_err>:
push   %rax
mov    %rdi,%rsi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
pop    %rax
jmp    1040 <perror@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Error: %s errno %d\0A\00"
@errno = global i32 0
@.str.1 = [7 x i8] c"Error:\00"
define void @print_err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @errno
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4)
%6 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Error: %s errno %d\0A\00"
@errno = global i32 0
@.str.1 = [7 x i8] c"Error:\00"
define void @print_err(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2)
%4 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}