xunge/DecIR huggingface dataset:
/* Variables and functions */
double sqrt(double);
double Dsqrt(double x) { return sqrt(x); }


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

x86 assembly (clang, -O2):
<Dsqrt>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     111f <Dsqrt+0xf>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define double @Dsqrt(double %0) {
%2 = tail call double @sqrt(double %0)
ret double %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t mp2vx_get_id(const uint8_t *p_mp2vx) { return p_mp2vx[4] >> 4; }


x86 assembly (clang, -O0):
<mp2vx_get_id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
sar    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vx_get_id>:
mov    0x10(%rdi),%eax
sar    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @mp2vx_get_id(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 4
ret i32 %6
}

LLVM IR (-O2):
define i32 @mp2vx_get_id(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
ret i32 %4
}
/* Variables and functions */
char *alloca(int);
int /*<<< orphan*/ memset(char *, char, int);
int strlen(char *);
int test15(void) {
  char *p = alloca(100 - 1);
  memset(p, 'a', 100);
  p[100 - 1] = 0;
  return strlen(p);
}


x86 assembly (clang, -O0):
<test15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x63,%edi
call   1050 <alloca@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x61,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rax
movb   $0x0,0x63(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test15>:
push   %rbx
mov    $0x63,%edi
call   1050 <alloca@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x61,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
movb   $0x0,0x63(%rbx)
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i32 @test15() {
%1 = alloca i8*
%2 = call i8* @alloca(i32 99)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @memset(i8* %3, i8 signext 97, i32 100)
%5 = load i8*, i8** %1
%6 = getelementptr inbounds i8, i8* %5, i64 99
store i8 0, i8* %6
%7 = load i8*, i8** %1
%8 = call i32 @strlen(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @test15() {
%1 = tail call i8* @alloca(i32 99)
%2 = tail call i32 @memset(i8* %1, i8 signext 97, i32 100)
%3 = getelementptr inbounds i8, i8* %1, i64 99
store i8 0, i8* %3
%4 = tail call i32 @strlen(i8* %1)
ret i32 %4
}
void ff_hevc_put_hevc_bi_qpel_h32_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h32_8_avx2() {
ret void
}
/* Type definitions */
struct kdtree {
  int dummy;
};
struct kdres {
  int dummy;
};

/* Variables and functions */
struct kdres *kd_nearest_geo_range_w_filter(struct kdtree *, double, double,
                                            double, int, int /*<<< orphan*/ *);
struct kdres *kd_nearest_geo_range(struct kdtree *kd, double lat, double lng,
                                   double range, int units) {
  return kd_nearest_geo_range_w_filter(kd, lat, lng, range, units, NULL);
}


x86 assembly (clang, -O0):
<kd_nearest_geo_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %esi,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
mov    -0x24(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <kd_nearest_geo_range_w_filter@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kd_nearest_geo_range>:
xor    %edx,%edx
jmp    1030 <kd_nearest_geo_range_w_filter@plt>

LLVM IR (-O0):
%struct.kdres = type { i32 }
%struct.kdtree = type { i32 }
define %struct.kdres* @kd_nearest_geo_range(%struct.kdtree* %0, double %1, double %2, double %3, i32 %4) {
%6 = alloca %struct.kdtree*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
store %struct.kdtree* %0, %struct.kdtree** %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store i32 %4, i32* %10
%11 = load %struct.kdtree*, %struct.kdtree** %6
%12 = load double, double* %7
%13 = load double, double* %8
%14 = load double, double* %9
%15 = load i32, i32* %10
%16 = call %struct.kdres* @kd_nearest_geo_range_w_filter(%struct.kdtree* %11, double %12, double %13, double %14, i32 %15, i32* null)
ret %struct.kdres* %16
}

LLVM IR (-O2):
%struct.kdres = type { i32 }
%struct.kdtree = type { i32 }
define %struct.kdres* @kd_nearest_geo_range(%struct.kdtree* %0, double %1, double %2, double %3, i32 %4) {
%6 = tail call %struct.kdres* @kd_nearest_geo_range_w_filter(%struct.kdtree* %0, double %1, double %2, double %3, i32 %4, i32* null)
ret %struct.kdres* %6
}
/* Variables and functions */
int get_response(char *);
int /*<<< orphan*/ set_cr_noecho_mode();
int /*<<< orphan*/ tty_mode(int);
int main(int argc, char *argv[]) {
  tty_mode(0);
  set_cr_noecho_mode();
  int response = get_response("Do you want another transaction");
  tty_mode(1);
  return response;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1050 <tty_mode@plt>
mov    $0x0,%al
call   1040 <set_cr_noecho_mode@plt>
lea    0xea5(%rip),%rdi
call   1030 <get_response@plt>
mov    %eax,-0x14(%rbp)
mov    $0x1,%edi
call   1050 <tty_mode@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1050 <tty_mode@plt>
xor    %eax,%eax
call   1040 <set_cr_noecho_mode@plt>
lea    0xeba(%rip),%rdi
call   1030 <get_response@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1050 <tty_mode@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Do you want another transaction\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @tty_mode(i32 0)
%8 = call i32 (...) @set_cr_noecho_mode()
%9 = call i32 @get_response(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
store i32 %9, i32* %6
%10 = call i32 @tty_mode(i32 1)
%11 = load i32, i32* %6
ret i32 %11
}

LLVM IR (-O2):
@.str = [32 x i8] c"Do you want another transaction\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @tty_mode(i32 0)
%4 = tail call i32 (...) @set_cr_noecho_mode()
%5 = tail call i32 @get_response(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @tty_mode(i32 1)
ret i32 %5
}
void DX_PAL_LogInit(void) {}


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

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

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

LLVM IR (-O2):
define void @DX_PAL_LogInit() {
ret void
}
int ri_thread_supported() { return 0; }


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

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

LLVM IR (-O0):
define i32 @ri_thread_supported() {
ret i32 0
}

LLVM IR (-O2):
define i32 @ri_thread_supported() {
ret i32 0
}
void av_max_alloc() {}


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

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

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

LLVM IR (-O2):
define void @av_max_alloc() {
ret void
}
__attribute__((__weak__, __always___)) char *softboundmpx_stpcpy(char *dest,
                                                                 char *src) {
  void *ret_ptr = stpcpy(dest, src);
  __softboundmpx_propagate_metadata_shadow_stack_from(1, 0);
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundmpx_stpcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <stpcpy@plt>
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <__softboundmpx_propagate_metadata_shadow_stack_from@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_stpcpy>:
push   %rbx
call   1040 <stpcpy@plt>
mov    %rax,%rbx
mov    $0x1,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <__softboundmpx_propagate_metadata_shadow_stack_from@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundmpx_stpcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @stpcpy(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @__softboundmpx_propagate_metadata_shadow_stack_from to i32 (i32, i32, ...)*)(i32 1, i32 0)
%10 = load i8*, i8** %5
ret i8* %10
}

LLVM IR (-O2):
define weak i8* @softboundmpx_stpcpy(i8* %0, i8* %1) {
%3 = tail call i8* @stpcpy(i8* %0, i8* %1)
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @__softboundmpx_propagate_metadata_shadow_stack_from to i32 (i32, i32, ...)*)(i32 1, i32 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void metodoX(int *array_int, int n) {
  for (int i = 0; i < n; ++i) {
    scanf("%d", &array_int[i]);
  }
}


x86 assembly (clang, -O0):
<metodoX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <metodoX+0x4b>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <metodoX+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<metodoX>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1145 <metodoX+0x35>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <metodoX+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @metodoX(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %11, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %6, label %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned char);
void fprint_addc_Rn(FILE *stream, unsigned char n) {
  fprintf(stream, "ADDC  A, R%X                     ", n);
}


x86 assembly (clang, -O0):
<fprint_addc_Rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_addc_Rn>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"ADDC A, R%X \00"
define void @fprint_addc_Rn(i32* %0, i8 zeroext %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 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"ADDC A, R%X \00"
define void @fprint_addc_Rn(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
void MemoryBarrier() { __sync_synchronize(); }


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

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

LLVM IR (-O0):
define void @MemoryBarrier() {
fence seq_cst
ret void
}

LLVM IR (-O2):
define void @MemoryBarrier() {
fence seq_cst
ret void
}
long __TBB_machine_fetchadd4(volatile void *ptr, long addend) {
  long result;
  __asm__ __volatile__("lock\nxadd %0,%1"
                       : "=r"(result), "=m"(*(long *)ptr)
                       : "0"(addend), "m"(*(long *)ptr)
                       : "memory");
  return result;
}


x86 assembly (clang, -O0):
<__TBB_machine_fetchadd4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
lock xadd %rax,(%rcx)
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__TBB_machine_fetchadd4>:
mov    %rsi,%rax
lock xadd %rax,(%rdi)
ret

LLVM IR (-O0):
define i64 @__TBB_machine_fetchadd4(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %4
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i64*
%11 = call i64 asm sideeffect "lock\0Axadd $0,$1", "=r,=*m,0,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %7, i64 %8, i64* elementtype(i64) %10)
store i64 %11, i64* %5
%12 = load i64, i64* %5
ret i64 %12
}

LLVM IR (-O2):
define i64 @__TBB_machine_fetchadd4(i8* %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
%4 = tail call i64 asm sideeffect "lock\0Axadd $0,$1", "=r,=*m,0,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %3, i64 %1, i64* elementtype(i64) %3)
ret i64 %4
}
/* Variables and functions */
void Sys_SendKeyEvents(void) {}


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

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

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

LLVM IR (-O2):
define void @Sys_SendKeyEvents() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void SysExcIntUnregister(void) {
  IntDisable(122);
  IntUnregister(122);
}


x86 assembly (clang, -O0):
<SysExcIntUnregister>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7a,%edi
call   1030 <IntDisable@plt>
mov    $0x7a,%edi
call   1040 <IntUnregister@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysExcIntUnregister>:
push   %rax
mov    $0x7a,%edi
call   1030 <IntDisable@plt>
mov    $0x7a,%edi
pop    %rax
jmp    1040 <IntUnregister@plt>

LLVM IR (-O0):
define void @SysExcIntUnregister() {
%1 = call i32 @IntDisable(i32 122)
%2 = call i32 @IntUnregister(i32 122)
ret void
}

LLVM IR (-O2):
define void @SysExcIntUnregister() {
%1 = tail call i32 @IntDisable(i32 122)
%2 = tail call i32 @IntUnregister(i32 122)
ret void
}
match(str, list) register char *str, **list;
{
  register int i;
  for (i = 0; *list; i++, list++)
    if (strcmp(str, *list) == 0)
      return (i);
  return (-1);
}


x86 assembly (clang, -O0):
<match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1178 <match+0x68>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1159 <match+0x49>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117f <match+0x6f>
jmp    115e <match+0x4e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    1127 <match+0x17>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    (%rsi),%rsi
mov    $0xffffffff,%r14d
test   %rsi,%rsi
je     114f <match+0x3f>
mov    %rdi,%r15
xor    %ebp,%ebp
nopl   (%rax)
mov    %r15,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     114c <match+0x3c>
mov    0x8(%rbx,%rbp,8),%rsi
add    $0x1,%rbp
test   %rsi,%rsi
jne    1130 <match+0x20>
jmp    114f <match+0x3f>
mov    %ebp,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @match(i8* %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %20, %2
%8 = load i8**, i8*** %5
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %25
11: ; preds = %7
%12 = load i8*, i8** %4
%13 = load i8**, i8*** %5
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = load i32, i32* %6
store i32 %18, i32* %3
br label %26
19: ; preds = %11
br label %20
20: ; preds = %19
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i32 1
store i8** %24, i8*** %5
br label %7
25: ; preds = %7
store i32 -1, i32* %3
br label %26
26: ; preds = %25, %17
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @match(i8* nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
br i1 %4, label %16, label %5
5: ; preds = %2, %11
%6 = phi i8* [ %14, %11 ], [ %3, %2 ]
%7 = phi i32 [ %12, %11 ], [ 0, %2 ]
%8 = phi i8** [ %13, %11 ], [ %1, %2 ]
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* %6)
%10 = icmp eq i32 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %5
%12 = add nuw nsw i32 %7, 1
%13 = getelementptr inbounds i8*, i8** %8, i64 1
%14 = load i8*, i8** %13
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %5
16: ; preds = %5, %11, %2
%17 = phi i32 [ -1, %2 ], [ -1, %11 ], [ %7, %5 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ set_GPIO_2bits(int, int);
void FLSMBusGPIO_resetCinDin() {
  set_GPIO_2bits(12, 13);
  delay(2);
}


x86 assembly (clang, -O0):
<FLSMBusGPIO_resetCinDin>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
mov    $0xd,%esi
call   1040 <set_GPIO_2bits@plt>
mov    $0x2,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FLSMBusGPIO_resetCinDin>:
push   %rax
mov    $0xc,%edi
mov    $0xd,%esi
call   1040 <set_GPIO_2bits@plt>
mov    $0x2,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @FLSMBusGPIO_resetCinDin() {
%1 = call i32 @set_GPIO_2bits(i32 12, i32 13)
%2 = call i32 @delay(i32 2)
ret void
}

LLVM IR (-O2):
define void @FLSMBusGPIO_resetCinDin() {
%1 = tail call i32 @set_GPIO_2bits(i32 12, i32 13)
%2 = tail call i32 @delay(i32 2)
ret void
}
AX0AX1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((((double *)10000000)[x0]) <= (((double *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AX0AX1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
movslq -0x1c(%rbp),%rcx
mov    $0x989680,%eax
movsd  (%rax,%rcx,8),%xmm1
movslq -0x20(%rbp),%rcx
mov    $0xa98ac7,%eax
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     114e <AX0AX1+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <AX0AX1+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AX0AX1>:
movslq %edi,%rcx
movslq %esi,%rax
movsd  0xa98ac7(,%rax,8),%xmm0
xor    %eax,%eax
ucomisd 0x989680(,%rcx,8),%xmm0
setae  %al
ret

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

LLVM IR (-O2):
define i32 @AX0AX1(double %0, double %1, i32 %2, i32 %3, double* nocapture readnone %4, double* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds double, double* inttoptr (i64 10000000 to double*), i64 %7
%9 = load double, double* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds double, double* inttoptr (i64 11111111 to double*), i64 %10
%12 = load double, double* %11
%13 = fcmp ole double %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
void sgIP_ICMP_Init() {}


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

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

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

LLVM IR (-O2):
define void @sgIP_ICMP_Init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ droproot();
int /*<<< orphan*/ dropuidgid(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/);
void test3(void) {
  droproot();
  if (!dropuidgid(0, 0, 0))
    _exit(111);
  _exit(0);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <droproot@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1050 <dropuidgid@plt>
cmp    $0x0,%eax
jne    1159 <test3+0x29>
mov    $0x6f,%edi
call   1030 <_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<test3>:
push   %rax
xor    %eax,%eax
call   1040 <droproot@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <dropuidgid@plt>
test   %eax,%eax
jne    1151 <test3+0x21>
mov    $0x6f,%edi
call   1030 <_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @test3() {
%1 = call i32 (...) @droproot()
%2 = call i32 @dropuidgid(i32 0, i32 0, i32 0)
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 @_exit(i32 111)
unreachable
6: ; preds = %0
%7 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @test3() {
%1 = tail call i32 (...) @droproot()
%2 = tail call i32 @dropuidgid(i32 0, i32 0, i32 0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @_exit(i32 111)
unreachable
6: ; preds = %0
%7 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ malloc(int);
char *function_with_leak7() { return (char *)malloc(12); }


x86 assembly (clang, -O0):
<function_with_leak7>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
call   1030 <malloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_with_leak7>:
mov    $0xc,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @function_with_leak7() {
%1 = call i64 @malloc(i32 12)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @function_with_leak7() {
%1 = tail call i64 @malloc(i32 12)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
void main(int args, char *argv[]) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    110b <main+0xb>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
br label %5
5: ; preds = %2, %5
br label %5
}

LLVM IR (-O2):
define void @main(i32 %0, i8** nocapture %1) {
br label %3
3: ; preds = %2, %3
br label %3
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void shell2(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 120))
    add_status(target, 20);
}


x86 assembly (clang, -O0):
<shell2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x78,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <shell2+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x14,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shell2>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x78,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <shell2+0x41>
mov    %r14,%rdi
mov    $0x14,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @shell2(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 120)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 20)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @shell2(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 120)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 20)
br label %8
8: ; preds = %6, %2
ret void
}
void g_setenv() {}


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

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

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

LLVM IR (-O2):
define void @g_setenv() {
ret void
}
/* Variables and functions */
double sqrt(double);
void compute_until_hell_freezes() {
  int i;
  double tmp;
  for (i = 0; i < 90000000; i++) {
    tmp = sqrt((double)i);
  }
}


x86 assembly (clang, -O0):
<compute_until_hell_freezes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x55d4a80,-0x4(%rbp)
jge    1149 <compute_until_hell_freezes+0x39>
cvtsi2sdl -0x4(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <compute_until_hell_freezes+0xf>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @compute_until_hell_freezes() {
ret void
}
int recurse(int i) {
  int j = i;
  if (i > 0) {
    j = i + recurse(i - 1);
  }
  return j;
}


x86 assembly (clang, -O0):
<recurse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1146 <recurse+0x36>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <recurse@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recurse>:
test   %edi,%edi
jle    111d <recurse+0x1d>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
imul   %eax,%eax
shr    %rcx
add    %edi,%eax
sub    %ecx,%eax
xor    %edi,%edi
add    %edi,%eax
ret
xor    %eax,%eax
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @recurse(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %14
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = mul i32 %4, %4
%6 = zext i32 %4 to i33
%7 = add nsw i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %0
%13 = sub i32 %12, %11
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
%16 = phi i32 [ %0, %1 ], [ 0, %3 ]
%17 = add nsw i32 %16, %15
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
void fun12(char c) { printf("%c %d\n", c, c); }


x86 assembly (clang, -O0):
<fun12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
lea    0xed8(%rip),%rdi
movsbl %al,%esi
movsbl -0x1(%rbp),%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun12>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
mov    %edx,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c %d\0A\00"
define void @fun12(i8 signext %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext %0, i8 signext %0)
ret void
}
void foo345() {}


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

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

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

LLVM IR (-O2):
define void @foo345() {
ret void
}
/* Variables and functions */
scalar_t__ pow(double, double);
double sqrt(scalar_t__);
double pgt_distance(double _x1, double _y1, double _x2, double _y2) {
  return sqrt(pow(_x1 - _x2, 2.0) + pow(_y1 - _y2, 2.0));
}


x86 assembly (clang, -O0):
<pgt_distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm1
call   1030 <pow@plt>
mov    %rax,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  0xe97(%rip),%xmm1
call   1030 <pow@plt>
mov    -0x28(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgt_distance>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm3,0x8(%rsp)
movsd  %xmm1,(%rsp)
subsd  %xmm2,%xmm0
movsd  0xec4(%rip),%xmm1
call   1030 <pow@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
movsd  0xea9(%rip),%xmm1
call   1030 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @pgt_distance(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* %7
%11 = fsub double %9, %10
%12 = call i64 @pow(double %11, double 2.000000e+00)
%13 = load double, double* %6
%14 = load double, double* %8
%15 = fsub double %13, %14
%16 = call i64 @pow(double %15, double 2.000000e+00)
%17 = add nsw i64 %12, %16
%18 = call double @sqrt(i64 %17)
ret double %18
}

LLVM IR (-O2):
define double @pgt_distance(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %2
%6 = tail call i64 @pow(double %5, double 2.000000e+00)
%7 = fsub double %1, %3
%8 = tail call i64 @pow(double %7, double 2.000000e+00)
%9 = add nsw i64 %8, %6
%10 = tail call double @sqrt(i64 %9)
ret double %10
}
void DetectTlsJa3SStringRegisterTests(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @crearArchivo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int pwm_unexport(char *pwm_key) {
  if (pwm_key == NULL)
    return -1;
  free(pwm_key);
  return 0;
}


x86 assembly (clang, -O0):
<pwm_unexport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <pwm_unexport+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    1143 <pwm_unexport+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwm_unexport>:
test   %rdi,%rdi
je     1122 <pwm_unexport+0x12>
push   %rax
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @pwm_unexport(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 0, %3 ], [ -1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ iteration(int, int *);
void *tester_thread(void *pthread) {
  int thread = (int)(long)pthread;
  int count = 0;
  while (1) {
    iteration(thread, &count);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<tester_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <iteration@plt>
jmp    112a <tester_thread+0x1a>

x86 assembly (clang, -O2):
<tester_thread>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <iteration@plt>
jmp    1130 <tester_thread+0x20>

LLVM IR (-O0):
define i8* @tester_thread(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = ptrtoint i8* %5 to i64
%7 = trunc i64 %6 to i32
store i32 %7, i32* %3
store i32 0, i32* %4
br label %8
8: ; preds = %1, %8
%9 = load i32, i32* %3
%10 = call i32 @iteration(i32 %9, i32* %4)
br label %8
}

LLVM IR (-O2):
define noalias i8* @tester_thread(i8* %0) {
%2 = alloca i32
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
br label %6
6: ; preds = %6, %1
%7 = call i32 @iteration(i32 %4, i32* %2)
br label %6
}
int do_102() { return 102; }


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

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

LLVM IR (-O0):
define i32 @do_102() {
ret i32 102
}

LLVM IR (-O2):
define i32 @do_102() {
ret i32 102
}
/* Variables and functions */
int /*<<< orphan*/ task_deassert_flag(int, int);
void task_deassert_yield(int id) { task_deassert_flag(id, (1 << 7)); }


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

x86 assembly (clang, -O2):
<task_deassert_yield>:
mov    $0x80,%esi
jmp    1030 <task_deassert_flag@plt>

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

LLVM IR (-O2):
define void @task_deassert_yield(i32 %0) {
%2 = tail call i32 @task_deassert_flag(i32 %0, i32 128)
ret void
}
void dd_pbl_ios_tapjoy_start(const char *app_id, const char *secret_key) {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_tapjoy_start(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void TMTimerStop(void) {}


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

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

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

LLVM IR (-O2):
define void @TMTimerStop() {
ret void
}
/* Variables and functions */
unsigned short vx86_NBSB_Read16(int /*<<< orphan*/, unsigned char);
unsigned short nb_Read16(unsigned char offset) {
  return vx86_NBSB_Read16(0, offset);
}


x86 assembly (clang, -O0):
<nb_Read16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %edi,%edi
movzbl -0x1(%rbp),%esi
call   1030 <vx86_NBSB_Read16@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nb_Read16>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <vx86_NBSB_Read16@plt>

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

LLVM IR (-O2):
define zeroext i16 @nb_Read16(i8 zeroext %0) {
%2 = tail call zeroext i16 @vx86_NBSB_Read16(i32 0, i8 zeroext %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ sio_read_reg(int, unsigned long *);
int /*<<< orphan*/ sio_write_reg(int, unsigned long);
int FS460_set_bridge_bypass(int bypass) {
  unsigned long reg;
  sio_read_reg(0x0A, &reg);
  if (bypass)
    reg |= 0x0001;
  else
    reg &= ~(0x0001);
  sio_write_reg(0x0A, reg);
  return 0;
}


x86 assembly (clang, -O0):
<FS460_set_bridge_bypass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xa,%edi
lea    -0x10(%rbp),%rsi
call   1040 <sio_read_reg@plt>
cmpl   $0x0,-0x4(%rbp)
je     1154 <FS460_set_bridge_bypass+0x34>
mov    -0x10(%rbp),%rax
or     $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1160 <FS460_set_bridge_bypass+0x40>
mov    -0x10(%rbp),%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0xa,%edi
call   1030 <sio_write_reg@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FS460_set_bridge_bypass>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0x8(%rsp),%rsi
mov    $0xa,%edi
call   1040 <sio_read_reg@plt>
xor    %esi,%esi
test   %ebx,%ebx
setne  %sil
mov    0x8(%rsp),%rax
and    $0xfffffffffffffffe,%rax
or     %rax,%rsi
mov    %rsi,0x8(%rsp)
mov    $0xa,%edi
call   1030 <sio_write_reg@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @FS460_set_bridge_bypass(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = call i32 @sio_read_reg(i32 10, i64* %3)
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i64, i64* %3
%9 = or i64 %8, 1
store i64 %9, i64* %3
br label %13
10: ; preds = %1
%11 = load i64, i64* %3
%12 = and i64 %11, -2
store i64 %12, i64* %3
br label %13
13: ; preds = %10, %7
%14 = load i64, i64* %3
%15 = call i32 @sio_write_reg(i32 10, i64 %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @FS460_set_bridge_bypass(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 @sio_read_reg(i32 10, i64* %2)
%5 = icmp ne i32 %0, 0
%6 = load i64, i64* %2
%7 = and i64 %6, -2
%8 = zext i1 %5 to i64
%9 = or i64 %7, %8
store i64 %9, i64* %2
%10 = call i32 @sio_write_reg(i32 10, i64 %9)
ret i32 0
}
void todo_size(int rows, int cols) {}


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

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

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

LLVM IR (-O2):
define void @todo_size(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
struct cvmx_shmem_dscptr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __cvmx_shmem_unmap_standalone(struct cvmx_shmem_dscptr *);
void cvmx_shmem_unmap(struct cvmx_shmem_dscptr *dscptr) {
  __cvmx_shmem_unmap_standalone(dscptr);
}


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

x86 assembly (clang, -O2):
<cvmx_shmem_unmap>:
jmp    1030 <__cvmx_shmem_unmap_standalone@plt>

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

LLVM IR (-O2):
%struct.cvmx_shmem_dscptr = type { i32 }
define void @cvmx_shmem_unmap(%struct.cvmx_shmem_dscptr* %0) {
%2 = tail call i32 @__cvmx_shmem_unmap_standalone(%struct.cvmx_shmem_dscptr* %0)
ret void
}
void __attribute__((no, noclone)) set_float_imm0(float *a) {
  for (int i = 0; i < (1024 / sizeof(float)); i++)
    a[i] = 0;
}


x86 assembly (clang, -O0):
<set_float_imm0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x100,%rax
jae    113d <set_float_imm0+0x3d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <set_float_imm0+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_float_imm0>:
push   %rax
mov    $0x400,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @set_float_imm0(float* %0) {
%2 = alloca float*
%3 = alloca i32
store float* %0, float** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = icmp ult i64 %6, 256
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load float*, float** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds float, float* %9, i64 %11
store float 0.000000e+00, float* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @set_float_imm0(float* nocapture writeonly %0) {
%2 = bitcast float* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char **);
void deallocateStrings(char **array) {
  char **element = array;
  while (*element)
    free(*element++);
  free(array);
}


x86 assembly (clang, -O0):
<deallocateStrings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114e <deallocateStrings+0x3e>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rdi
call   1030 <free@plt>
jmp    1124 <deallocateStrings+0x14>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deallocateStrings>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <deallocateStrings+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <deallocateStrings+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @deallocateStrings(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %10, %4 ], [ %2, %1 ]
%6 = phi i8** [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = bitcast i8* %5 to i8**
%9 = tail call i32 @free(i8** %8)
%10 = load i8*, i8** %7
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @free(i8** %0)
ret void
}