xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ nouveau_drm_screen_create();
int /*<<< orphan*/ printf(char *);
void vdp_imp_device_create_x11(void) {
  printf("VDPAU: entry point\n");
  nouveau_drm_screen_create();
}


x86 assembly (clang, -O0):
<vdp_imp_device_create_x11>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <nouveau_drm_screen_create@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdp_imp_device_create_x11>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <nouveau_drm_screen_create@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"VDPAU: entry point\0A\00"
define void @vdp_imp_device_create_x11() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @nouveau_drm_screen_create()
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"VDPAU: entry point\00"
define void @vdp_imp_device_create_x11() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @nouveau_drm_screen_create()
ret void
}
/* Type definitions */
struct s_read_t {
  int dummy;
};
struct model {
  int dummy;
};

/* Variables and functions */
double cond_noise_prob(struct model const *, struct s_read_t const *);
double ng_prob(struct model const *);
double noise_prob(const struct model *m, const struct s_read_t *read) {
  double g = ng_prob(m);
  return g * cond_noise_prob(m, read);
}


x86 assembly (clang, -O0):
<noise_prob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ng_prob@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cond_noise_prob@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<noise_prob>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <ng_prob@plt>
movsd  %xmm0,(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <cond_noise_prob@plt>
mulsd  (%rsp),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.model = type { i32 }
%struct.s_read_t = type { i32 }
define double @noise_prob(%struct.model* %0, %struct.s_read_t* %1) {
%3 = alloca %struct.model*
%4 = alloca %struct.s_read_t*
%5 = alloca double
store %struct.model* %0, %struct.model** %3
store %struct.s_read_t* %1, %struct.s_read_t** %4
%6 = load %struct.model*, %struct.model** %3
%7 = call double @ng_prob(%struct.model* %6)
store double %7, double* %5
%8 = load double, double* %5
%9 = load %struct.model*, %struct.model** %3
%10 = load %struct.s_read_t*, %struct.s_read_t** %4
%11 = call double @cond_noise_prob(%struct.model* %9, %struct.s_read_t* %10)
%12 = fmul double %8, %11
ret double %12
}

LLVM IR (-O2):
%struct.model = type { i32 }
%struct.s_read_t = type { i32 }
define double @noise_prob(%struct.model* %0, %struct.s_read_t* %1) {
%3 = tail call double @ng_prob(%struct.model* %0)
%4 = tail call double @cond_noise_prob(%struct.model* %0, %struct.s_read_t* %1)
%5 = fmul double %3, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ noop(char *);
void funcall_in_loop(char *p) {
  int i;
  for (i = 0; i < 3; i++) {
    noop(p);
  }
}


x86 assembly (clang, -O0):
<funcall_in_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1144 <funcall_in_loop+0x34>
mov    -0x8(%rbp),%rdi
call   1030 <noop@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <funcall_in_loop+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcall_in_loop>:
push   %rbx
mov    %rdi,%rbx
call   1030 <noop@plt>
mov    %rbx,%rdi
call   1030 <noop@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <noop@plt>

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

LLVM IR (-O2):
define void @funcall_in_loop(i8* %0) {
%2 = tail call i32 @noop(i8* %0)
%3 = tail call i32 @noop(i8* %0)
%4 = tail call i32 @noop(i8* %0)
ret void
}
unsigned char test35(int a, int *b) { return (b[4] & b[0] & a) == a; }


x86 assembly (clang, -O0):
<test35>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%eax
mov    -0x10(%rbp),%rcx
and    (%rcx),%eax
and    -0x4(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test35>:
mov    0x10(%rsi),%eax
and    %edi,%eax
and    (%rsi),%eax
cmp    %edi,%eax
sete   %al
ret

LLVM IR (-O0):
define zeroext i8 @test35(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 4
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = and i32 %7, %10
%12 = load i32, i32* %3
%13 = and i32 %11, %12
%14 = load i32, i32* %3
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i32
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @test35(i32 %0, i32* nocapture %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 4
%4 = load i32, i32* %3
%5 = load i32, i32* %1
%6 = and i32 %4, %0
%7 = and i32 %6, %5
%8 = icmp eq i32 %7, %0
%9 = zext i1 %8 to i8
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void hSpVectFree(double *arr, int len) {
  int i;
  free(arr);
}


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

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

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

LLVM IR (-O2):
define void @hSpVectFree(double* nocapture %0, i32 %1) {
%3 = tail call i32 @free(double* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getppid();
void do_null_syscall(unsigned long nr) {
  unsigned long i;
  for (i = 0; i < nr; i++)
    getppid();
}


x86 assembly (clang, -O0):
<do_null_syscall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    114a <do_null_syscall+0x3a>
mov    $0x0,%al
call   1030 <getppid@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <do_null_syscall+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_null_syscall>:
push   %rbx
test   %rdi,%rdi
je     112d <do_null_syscall+0x1d>
mov    %rdi,%rbx
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <getppid@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <do_null_syscall+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @do_null_syscall(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 (...) @getppid()
%6 = add nuw i64 %4, 1
%7 = icmp eq i64 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned short);
void dtls_prng_init(unsigned short seed) { srand(seed); }


x86 assembly (clang, -O0):
<dtls_prng_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtls_prng_init>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define void @dtls_prng_init(i16 zeroext %0) {
%2 = tail call i32 @srand(i16 zeroext %0)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
char *strdup(const char *s) {
  char *ss = (char *)malloc(3);
  *ss = *s;
  return ss;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x3,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3,%edi
call   1030 <malloc@plt>
mov    (%rbx),%cl
mov    %cl,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i64 @malloc(i32 3)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = load i8*, i8** %3
store i8 %7, i8* %8
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @strdup(i8* nocapture %0) {
%2 = tail call i64 @malloc(i32 3)
%3 = inttoptr i64 %2 to i8*
%4 = load i8, i8* %0
store i8 %4, i8* %3
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ wFileClose(int /*<<< orphan*/);
int /*<<< orphan*/ wPopNumber();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasFClose() {
  wFileClose(wPopNumber());
  wPushNumber(0);
}


x86 assembly (clang, -O0):
<wBasFClose>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1050 <wFileClose@plt>
xor    %edi,%edi
call   1030 <wPushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasFClose>:
push   %rax
xor    %eax,%eax
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1050 <wFileClose@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasFClose() {
%1 = call i32 (...) @wPopNumber()
%2 = call i32 @wFileClose(i32 %1)
%3 = call i32 @wPushNumber(i32 0)
ret void
}

LLVM IR (-O2):
define void @wBasFClose() {
%1 = tail call i32 (...) @wPopNumber()
%2 = tail call i32 @wFileClose(i32 %1)
%3 = tail call i32 @wPushNumber(i32 0)
ret void
}
char *icl_xz_parameters(void) {
  return "\"level\"\n  numeric 1-9\n  defaults 9\n  specifying how much CPU "
         "and memory to use to compress\n"
         "\"extreme\"\n  numeric 0-1\n  defaults 0\n  enable extreme CPU modes";
}


x86 assembly (clang, -O0):
<icl_xz_parameters>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<icl_xz_parameters>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [155 x i8] c"\22level\22\0A numeric 1-9\0A defaults 9\0A specifying how much CPU and memory to use to compress\0A\22extreme\22\0A numeric 0-1\0A defaults 0\0A enable extreme CPU modes\00"
define i8* @icl_xz_parameters() {
ret i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [155 x i8] c"\22level\22\0A numeric 1-9\0A defaults 9\0A specifying how much CPU and memory to use to compress\0A\22extreme\22\0A numeric 0-1\0A defaults 0\0A enable extreme CPU modes\00"
define i8* @icl_xz_parameters() {
ret i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ core2_swap(char *, int);
void U_EMRPOLYPOLYLINE_swap(char *record, int torev) {
  core2_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_EMRPOLYPOLYLINE_swap>:
jmp    1030 <core2_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRPOLYPOLYLINE_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core2_swap(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t bswap16(uint16_t n) { return (n >> 8) | (n << 8); }


x86 assembly (clang, -O0):
<bswap16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap16>:
mov    %edi,%eax
sar    $0x8,%eax
shl    $0x8,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @bswap16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @bswap16(i32 %0) {
%2 = ashr i32 %0, 8
%3 = shl i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
nam() {}


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

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

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

LLVM IR (-O2):
define i32 @nam() {
ret i32 undef
}
void __tone_on(struct tone_t *tone) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
void writeByte(long desc, char value) {
  FILE *fd = (FILE *)desc;
  fwrite(&value, 1, 1, fd);
}


x86 assembly (clang, -O0):
<writeByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
lea    -0x9(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeByte>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %rax,%rsi
jmp    1030 <fputc@plt>

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

LLVM IR (-O2):
define void @writeByte(i64 %0, i8 signext %1) {
%3 = inttoptr i64 %0 to i32*
%4 = sext i8 %1 to i32
%5 = tail call i32 @fputc(i32 %4, i32* %3)
ret void
}
void *signal_waiter(void *arg) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @signal_waiter(i8* nocapture readnone %0) {
ret i8* undef
}
int test_72_4(int *mem) { return __atomic_nand_fetch(mem + 0, -1, 4); }


x86 assembly (clang, -O0):
<test_72_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
and    %esi,%edx
mov    %edx,-0x28(%rbp)
not    %edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    1150 <test_72_4+0x50>
jmp    1122 <test_72_4+0x22>
mov    -0x18(%rbp),%ecx
mov    -0x24(%rbp),%eax
and    %ecx,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_72_4>:
mov    (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
not    %ecx
lock cmpxchg %ecx,(%rdi)
jne    1110 <test_72_4+0x10>
not    %eax
ret

LLVM IR (-O0):
define i32 @test_72_4(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
store i32 -1, i32* %3
%7 = load i32, i32* %3
%8 = atomicrmw nand i32* %6, i32 %7 acq_rel
%9 = and i32 %8, %7
%10 = xor i32 %9, -1
store i32 %10, i32* %4
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_72_4(i32* nocapture %0) {
%2 = atomicrmw nand i32* %0, i32 -1 acq_rel
%3 = xor i32 %2, -1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ g_load(int);
void aload(int n) { g_load(n); }


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

x86 assembly (clang, -O2):
<aload>:
jmp    1030 <g_load@plt>

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

LLVM IR (-O2):
define void @aload(i32 %0) {
%2 = tail call i32 @g_load(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
scalar_t__ vmstop(int);
void power_stop() {
  int id;
  scanf("%d", &id);
  if (vmstop(id)) {
    printf("ok\n");
  } else {
    printf("error\n");
  }
}


x86 assembly (clang, -O0):
<power_stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1030 <vmstop@plt>
cmp    $0x0,%rax
je     116b <power_stop+0x3b>
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
jmp    1177 <power_stop+0x47>
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power_stop>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <vmstop@plt>
test   %rax,%rax
lea    0xeae(%rip),%rax
lea    0xead(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"ok\0A\00"
@.str.2 = [7 x i8] c"error\0A\00"
define void @power_stop() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = call i64 @vmstop(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [6 x i8] c"error\00"
@str.3 = [3 x i8] c"ok\00"
define void @power_stop() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i64 @vmstop(i32 %4)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.3, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dsmeanpw(int, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dsmeanpw(N, x, stride);
  printf("mean: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1040 <stdlib_strided_dsmeanpw@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_dsmeanpw@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [11 x i8] c"mean: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dsmeanpw(i32 %6, float* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [11 x i8] c"mean: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dsmeanpw(i32 4, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_compression_mode_pg(struct list_head *, int);
uint8_t set_t10k_comp(struct list_head *m, int lvl) {
  ;
  return set_compression_mode_pg(m, lvl);
}


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

x86 assembly (clang, -O2):
<set_t10k_comp>:
jmp    1030 <set_compression_mode_pg@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define i32 @set_t10k_comp(%struct.list_head* %0, i32 %1) {
%3 = alloca %struct.list_head*
%4 = alloca i32
store %struct.list_head* %0, %struct.list_head** %3
store i32 %1, i32* %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load i32, i32* %4
%7 = call i32 @set_compression_mode_pg(%struct.list_head* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @set_t10k_comp(%struct.list_head* %0, i32 %1) {
%3 = tail call i32 @set_compression_mode_pg(%struct.list_head* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
bool is_angle_valid(double x) { return x > 0 && x <= 1.4; }


x86 assembly (clang, -O0):
<is_angle_valid>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jbe    1133 <is_angle_valid+0x33>
movsd  0xed8(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_angle_valid>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
movsd  0xeed(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_angle_valid(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fcmp ole double %6, 1.400000e+00
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_angle_valid(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fcmp ole double %0, 1.400000e+00
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ stdout;
void progress(float x) {
  printf("veryfing %5.2f\r", x * 100);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<progress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xecb(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<progress>:
push   %rax
mulss  0xed7(%rip),%xmm0
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"veryfing %5.2f\0D\00"
@stdout = global i32 0
define void @progress(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 1.000000e+02
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), float %4)
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"veryfing %5.2f\0D\00"
@stdout = global i32 0
define void @progress(float %0) {
%2 = fmul float %0, 1.000000e+02
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), float %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
ret void
}
/* Type definitions */
struct stat {
  int st_mode;
};

/* Variables and functions */
int S_IFIFO;
int S_IFMT;
int file_pipe(const struct stat *stat) {
  return (stat->st_mode & S_IFMT) != S_IFIFO;
}


x86 assembly (clang, -O0):
<file_pipe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2ecb(%rip),%rcx
and    (%rcx),%eax
mov    0x2eba(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_pipe>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
and    (%rdi),%ecx
mov    0x2ec6(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%ecx
setne  %al
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_IFMT = global i32 0
@S_IFIFO = global i32 0
define i32 @file_pipe(%struct.stat* %0) {
%2 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %2
%3 = load %struct.stat*, %struct.stat** %2
%4 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = load i32, i32* @S_IFMT
%7 = and i32 %5, %6
%8 = load i32, i32* @S_IFIFO
%9 = icmp ne i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IFMT = global i32 0
@S_IFIFO = global i32 0
define i32 @file_pipe(%struct.stat* nocapture %0) {
%2 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = load i32, i32* @S_IFMT
%5 = and i32 %4, %3
%6 = load i32, i32* @S_IFIFO
%7 = icmp ne i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ isinf(long double);
void uninitvar_isinf(void) {
  float f;
  (void)isinf(f);
  double d;
  (void)isinf(d);
  long double ld;
  (void)isinf(ld);
}


x86 assembly (clang, -O0):
<uninitvar_isinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
flds   -0x4(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <isinf@plt>
fldl   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <isinf@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <isinf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_isinf>:
sub    $0x18,%rsp
call   1030 <isinf@plt>
call   1030 <isinf@plt>
call   1030 <isinf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_isinf() {
%1 = alloca float
%2 = alloca double
%3 = alloca x86_fp80
%4 = load float, float* %1
%5 = fpext float %4 to x86_fp80
%6 = call i32 @isinf(x86_fp80 %5)
%7 = load double, double* %2
%8 = fpext double %7 to x86_fp80
%9 = call i32 @isinf(x86_fp80 %8)
%10 = load x86_fp80, x86_fp80* %3
%11 = call i32 @isinf(x86_fp80 %10)
ret void
}

LLVM IR (-O2):
define void @uninitvar_isinf() {
%1 = tail call i32 @isinf(x86_fp80 undef)
%2 = tail call i32 @isinf(x86_fp80 undef)
%3 = tail call i32 @isinf(x86_fp80 undef)
ret void
}
/* Type definitions */
struct string_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct string_list *);
int /*<<< orphan*/ string_list_clear(struct string_list *);
void string_list_free(struct string_list *list) {
  if (!list)
    return;
  string_list_clear(list);
  free(list);
}


x86 assembly (clang, -O0):
<string_list_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <string_list_free+0x1c>
jmp    114e <string_list_free+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <string_list_clear@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_list_free>:
test   %rdi,%rdi
je     1137 <string_list_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <string_list_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
%struct.string_list = type { i32 }
define void @string_list_free(%struct.string_list* %0) {
%2 = icmp eq %struct.string_list* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @string_list_clear(%struct.string_list* %0)
%5 = tail call i32 @free(%struct.string_list* %0)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ h2o__fatal(char *);
void *malloc(size_t);
void *h2o_mem_alloc(size_t sz) {
  void *p = malloc(sz);
  if (p == NULL)
    h2o__fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/rayrapetyan/h2o/refs/heads/"
               "master/include/h2o/memory.h"
               ":"
               "335"
               ":"
               "no memory");
  return p;
}


x86 assembly (clang, -O0):
<h2o_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <h2o_mem_alloc+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_mem_alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <h2o_mem_alloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [159 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rayrapetyan/h2o/refs/heads/master/include/h2o/memory.h:335:no memory\00"
define i8* @h2o_mem_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %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 @h2o__fatal(i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [159 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rayrapetyan/h2o/refs/heads/master/include/h2o/memory.h:335:no memory\00"
define noalias i8* @h2o_mem_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @h2o__fatal(i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ _STACK;

/* Variables and functions */
int /*<<< orphan*/ *sk_new(int (*)(void const *, void const *));
_STACK *sk_new_null(void) {
  return sk_new((int (*)(const void *, const void *))0);
}


x86 assembly (clang, -O0):
<sk_new_null>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <sk_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sk_new_null>:
xor    %edi,%edi
jmp    1030 <sk_new@plt>

LLVM IR (-O0):
define i32* @sk_new_null() {
%1 = call i32* @sk_new(i32 (i8*, i8*)* null)
ret i32* %1
}

LLVM IR (-O2):
define i32* @sk_new_null() {
%1 = tail call i32* @sk_new(i32 (i8*, i8*)* null)
ret i32* %1
}
long foo1(long a) {
  long b = a + 1;
  if (b != 0)
    return b;
  return 1;
}


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     112c <foo1+0x2c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <foo1+0x34>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
inc    %rdi
mov    $0x1,%eax
cmovne %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @foo1(i64 %0) {
%2 = add nsw i64 %0, 1
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i64 1, i64 %2
ret i64 %4
}
/* Variables and functions */
unsigned char *__ziplistDelete(unsigned char *, unsigned char *, unsigned int);
unsigned char *ziplistIndex(unsigned char *, int);
unsigned char *ziplistDeleteRange(unsigned char *zl, int index,
                                  unsigned int num) {
  unsigned char *p = ziplistIndex(zl, index);
  return (p == NULL) ? zl : __ziplistDelete(zl, p, num);
}


x86 assembly (clang, -O0):
<ziplistDeleteRange>:
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
call   1030 <ziplistIndex@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115a <ziplistDeleteRange+0x3a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    116e <ziplistDeleteRange+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%edx
call   1040 <__ziplistDelete@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ziplistDeleteRange>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <ziplistIndex@plt>
test   %rax,%rax
je     1145 <ziplistDeleteRange+0x25>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <__ziplistDelete@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ziplistDeleteRange(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i8* @ziplistIndex(i8* %8, i32 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = load i8*, i8** %4
br label %20
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = load i8*, i8** %7
%18 = load i32, i32* %6
%19 = call i8* @__ziplistDelete(i8* %16, i8* %17, i32 %18)
br label %20
20: ; preds = %15, %13
%21 = phi i8* [ %14, %13 ], [ %19, %15 ]
ret i8* %21
}

LLVM IR (-O2):
define i8* @ziplistDeleteRange(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @ziplistIndex(i8* %0, i32 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i8* @__ziplistDelete(i8* %0, i8* %4, i32 %2)
br label %8
8: ; preds = %3, %6
%9 = phi i8* [ %7, %6 ], [ %0, %3 ]
ret i8* %9
}
void cf_say(char *c) {}


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

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

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

LLVM IR (-O2):
define void @cf_say(i8* nocapture %0) {
ret void
}
/* Variables and functions */
double __nv_erfcinv(double);
double erfcinv(double __a) { return __nv_erfcinv(__a); }


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

x86 assembly (clang, -O2):
<erfcinv>:
jmp    1030 <__nv_erfcinv@plt>

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

LLVM IR (-O2):
define double @erfcinv(double %0) {
%2 = tail call double @__nv_erfcinv(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_log2f();
scalar_t__ log2f(float);
void test_log2f(float f) {
  if (log2f(f) != log2f(f))
    link_failure_log2f();
}


x86 assembly (clang, -O0):
<test_log2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log2f@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log2f@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_log2f+0x3c>
mov    $0x0,%al
call   1040 <link_failure_log2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_log2f>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1030 <log2f@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1030 <log2f@plt>
cmp    %rax,%rbx
jne    1149 <test_log2f+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_log2f@plt>

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

LLVM IR (-O2):
define void @test_log2f(float %0) {
%2 = tail call i64 @log2f(float %0)
%3 = tail call i64 @log2f(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_log2f()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
float atof(char *);
int /*<<< orphan*/ trap_Cvar_VariableStringBuffer(char const *, char *, int);
float trap_Cvar_VariableValue(const char *var_name) {
  char buf[128];
  trap_Cvar_VariableStringBuffer(var_name, buf, sizeof(buf));
  return atof(buf);
}


x86 assembly (clang, -O0):
<trap_Cvar_VariableValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
mov    $0x80,%edx
call   1040 <trap_Cvar_VariableStringBuffer@plt>
lea    -0x90(%rbp),%rdi
call   1030 <atof@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trap_Cvar_VariableValue>:
push   %rbx
sub    $0x80,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x80,%edx
call   1040 <trap_Cvar_VariableStringBuffer@plt>
mov    %rbx,%rdi
call   1030 <atof@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @trap_Cvar_VariableValue(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%6 = call i32 @trap_Cvar_VariableStringBuffer(i8* %4, i8* %5, i32 128)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = call float @atof(i8* %7)
ret float %8
}

LLVM IR (-O2):
define float @trap_Cvar_VariableValue(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @trap_Cvar_VariableStringBuffer(i8* %0, i8* %3, i32 128)
%5 = call float @atof(i8* %3)
ret float %5
}
/* Variables and functions */
size_t abs(int);
int /*<<< orphan*/ push_candidates_sub(int, int, int **, int *);
void push_candidates(int rep, int equ, int **_Vc, int *var_clean) {
  var_clean[abs(equ)] = 1;
  push_candidates_sub(rep, equ, _Vc, var_clean);
  push_candidates_sub(-rep, -equ, _Vc, var_clean);
}


x86 assembly (clang, -O0):
<push_candidates>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax,%rcx,4)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <push_candidates_sub@plt>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
xor    %esi,%esi
sub    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <push_candidates_sub@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<push_candidates>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r15
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <abs@plt>
movl   $0x1,(%r15,%rax,4)
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r15,%rcx
call   1040 <push_candidates_sub@plt>
neg    %ebx
neg    %ebp
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r15,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <push_candidates_sub@plt>

LLVM IR (-O0):
define void @push_candidates(i32 %0, i32 %1, i32** %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32**
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32** %2, i32*** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %8
%10 = load i32, i32* %6
%11 = call i64 @abs(i32 %10)
%12 = getelementptr inbounds i32, i32* %9, i64 %11
store i32 1, i32* %12
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = load i32**, i32*** %7
%16 = load i32*, i32** %8
%17 = call i32 @push_candidates_sub(i32 %13, i32 %14, i32** %15, i32* %16)
%18 = load i32, i32* %5
%19 = sub nsw i32 0, %18
%20 = load i32, i32* %6
%21 = sub nsw i32 0, %20
%22 = load i32**, i32*** %7
%23 = load i32*, i32** %8
%24 = call i32 @push_candidates_sub(i32 %19, i32 %21, i32** %22, i32* %23)
ret void
}

LLVM IR (-O2):
define void @push_candidates(i32 %0, i32 %1, i32** %2, i32* %3) {
%5 = tail call i64 @abs(i32 %1)
%6 = getelementptr inbounds i32, i32* %3, i64 %5
store i32 1, i32* %6
%7 = tail call i32 @push_candidates_sub(i32 %0, i32 %1, i32** %2, i32* %3)
%8 = sub nsw i32 0, %0
%9 = sub nsw i32 0, %1
%10 = tail call i32 @push_candidates_sub(i32 %8, i32 %9, i32** %2, i32* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *, char const *, char const *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void log(const char *tag, const char *message) {
  time_t now;
  time(&now);
  printf("%s [%s]: %s\n", ctime(&now), tag, message);
}


x86 assembly (clang, -O0):
<log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1050 <time@plt>
lea    -0x14(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xc(%rsp),%r15
mov    %r15,%rdi
call   1050 <time@plt>
mov    %r15,%rdi
call   1030 <ctime@plt>
lea    0xea5(%rip),%rdi
mov    %rax,%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"%s [%s]: %s\0A\00"
define void @log(i8* %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @time(i32* %3)
%6 = call i8* @ctime(i32* %3)
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OGGEmbedded_Done();
int /*<<< orphan*/ OGGPacket_Done();
int /*<<< orphan*/ OGG_Done();
int /*<<< orphan*/ Vorbis_Done();
void DLLUnRegister() {
  OGG_Done();
  OGGEmbedded_Done();
  OGGPacket_Done();
  Vorbis_Done();
}


x86 assembly (clang, -O0):
<DLLUnRegister>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <OGG_Done@plt>
mov    $0x0,%al
call   1050 <OGGEmbedded_Done@plt>
mov    $0x0,%al
call   1030 <OGGPacket_Done@plt>
mov    $0x0,%al
call   1040 <Vorbis_Done@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DLLUnRegister>:
push   %rax
xor    %eax,%eax
call   1060 <OGG_Done@plt>
xor    %eax,%eax
call   1050 <OGGEmbedded_Done@plt>
xor    %eax,%eax
call   1030 <OGGPacket_Done@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <Vorbis_Done@plt>

LLVM IR (-O0):
define void @DLLUnRegister() {
%1 = call i32 (...) @OGG_Done()
%2 = call i32 (...) @OGGEmbedded_Done()
%3 = call i32 (...) @OGGPacket_Done()
%4 = call i32 (...) @Vorbis_Done()
ret void
}

LLVM IR (-O2):
define void @DLLUnRegister() {
%1 = tail call i32 (...) @OGG_Done()
%2 = tail call i32 (...) @OGGEmbedded_Done()
%3 = tail call i32 (...) @OGGPacket_Done()
%4 = tail call i32 (...) @Vorbis_Done()
ret void
}