xunge/DecIR huggingface dataset:
int test_imm_1Bint64_midword_reg(long long val) {
  return ((val >> 16) & (0x1B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Bint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x1b,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Bint64_midword_reg>:
test   $0x1b0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Bint64_midword_reg(i64 %0) {
%2 = and i64 %0, 1769472
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
int /*<<< orphan*/ strlen(char *);
int write(int, char *, int /*<<< orphan*/);
int PWM_SetStartup(int fd, int update) {
  char cmd[100];
  sprintf(cmd, "update: temp %d\r\nupdate: volt %d\r\nupdate: current %d\r\n",
          update, update, update);
  return write(fd, cmd, strlen(cmd));
}


x86 assembly (clang, -O0):
<PWM_SetStartup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0x8(%rbp),%r8d
lea    0xeaa(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x7c(%rbp)
lea    -0x70(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x70(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x7c(%rbp),%edi
mov    -0x78(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWM_SetStartup>:
push   %rbp
push   %rbx
sub    $0x68,%rsp
mov    %esi,%ecx
mov    %edi,%ebp
lea    0xebf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %ecx,%edx
mov    %ecx,%r8d
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [55 x i8] c"update: temp %d\0D\0Aupdate: volt %d\0D\0Aupdate: current %d\0D\0A\00"
define i32 @PWM_SetStartup(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %4
%10 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %3
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%14 = call i32 @strlen(i8* %13)
%15 = call i32 @write(i32 %11, i8* %12, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
@.str = [55 x i8] c"update: temp %d\0D\0Aupdate: volt %d\0D\0Aupdate: current %d\0D\0A\00"
define i32 @PWM_SetStartup(i32 %0, i32 %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %1, i32 %1)
%6 = call i32 @strlen(i8* %4)
%7 = call i32 @write(i32 %0, i8* %4, i32 %6)
ret i32 %7
}
void glmReverseVector4f(float v[4]) {
  v[0] = -v[0];
  v[1] = -v[1];
  v[2] = -v[2];
  v[3] = -v[3];
}


x86 assembly (clang, -O0):
<glmReverseVector4f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmReverseVector4f>:
movups (%rdi),%xmm0
xorps  0xef6(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @glmReverseVector4f(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = fneg float %5
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 0
store float %6, float* %8
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = fneg float %11
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float*, float** %2
%16 = getelementptr inbounds float, float* %15, i64 2
%17 = load float, float* %16
%18 = fneg float %17
%19 = load float*, float** %2
%20 = getelementptr inbounds float, float* %19, i64 2
store float %18, float* %20
%21 = load float*, float** %2
%22 = getelementptr inbounds float, float* %21, i64 3
%23 = load float, float* %22
%24 = fneg float %23
%25 = load float*, float** %2
%26 = getelementptr inbounds float, float* %25, i64 3
store float %24, float* %26
ret void
}

LLVM IR (-O2):
define void @glmReverseVector4f(float* nocapture %0) {
%2 = bitcast float* %0 to <4 x float>*
%3 = load <4 x float>, <4 x float>* %2
%4 = fneg <4 x float> %3
%5 = bitcast float* %0 to <4 x float>*
store <4 x float> %4, <4 x float>* %5
ret void
}
__attribute__((always_)) void SCB_InvalidateDCache(void) {}


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

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

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

LLVM IR (-O2):
define void @SCB_InvalidateDCache() {
ret void
}
int reg_val(reg)
char *reg;
{ return (*reg == 's' ? 7 : atoi(reg + 1)); }


x86 assembly (clang, -O0):
<reg_val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x73,%eax
jne    1139 <reg_val+0x29>
mov    $0x7,%eax
mov    %eax,-0xc(%rbp)
jmp    114b <reg_val+0x3b>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1030 <atoi@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_val>:
cmpb   $0x73,(%rdi)
jne    111b <reg_val+0xb>
mov    $0x7,%eax
ret
add    $0x1,%rdi
xor    %eax,%eax
jmp    1030 <atoi@plt>

LLVM IR (-O0):
define i32 @reg_val(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 115
br i1 %6, label %7, label %8
7: ; preds = %1
br label %12
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %10)
br label %12
12: ; preds = %8, %7
%13 = phi i32 [ 7, %7 ], [ %11, %8 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @reg_val(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 115
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %5)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ 7, %1 ]
ret i32 %8
}
void I2CMasterIntEnableEx(unsigned int baseAdd, unsigned int intFlag) {
  (*((volatile unsigned int *)(baseAdd + (0x2C)))) |= intFlag;
}


x86 assembly (clang, -O0):
<I2CMasterIntEnableEx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x2c,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterIntEnableEx>:
add    $0x2c,%edi
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @I2CMasterIntEnableEx(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 = load i32, i32* %3
%7 = add i32 %6, 44
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = or i32 %10, %5
store volatile i32 %11, i32* %9
ret void
}

LLVM IR (-O2):
define void @I2CMasterIntEnableEx(i32 %0, i32 %1) {
%3 = add i32 %0, 44
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = or i32 %6, %1
store volatile i32 %7, i32* %5
ret void
}
/* Variables and functions */
char *strdup(char const *);
char *skyeye_strdup(const char *s) {
  char *result = strdup(s);
  return result;
}


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

x86 assembly (clang, -O2):
<skyeye_strdup>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @skyeye_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
char toHex(int x) {
  if (x >= 0 && x <= 9)
    return '0' + x;
  else
    return 'a' + x - 10;
}


x86 assembly (clang, -O0):
<toHex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1129 <toHex+0x29>
cmpl   $0x9,-0x8(%rbp)
jg     1129 <toHex+0x29>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1135 <toHex+0x35>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0xa,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toHex>:
cmp    $0xa,%edi
mov    $0x30,%ecx
mov    $0x57,%eax
cmovb  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @toHex(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 9
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 48, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
br label %18
13: ; preds = %6, %1
%14 = load i32, i32* %3
%15 = add nsw i32 97, %14
%16 = sub nsw i32 %15, 10
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
br label %18
18: ; preds = %13, %9
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @toHex(i32 %0) {
%2 = icmp ult i32 %0, 10
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 48, i8 87
%5 = add i8 %4, %3
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float *, int);
float *memory_alloc(long, char *, int);
void *adt_copy_float(const void *data) {
  float *data2;
  ((data2) = memory_alloc((long)sizeof *(data2),
                          "/scratch/repos/new/home/jordi_armengol_estape/"
                          "c-scraper/outputs/2022-01-22/02-19-57/repos/"
                          "Jianlong-Peng/myADT/refs/heads/master/src/mtools.c",
                          32));
  memcpy(data2, (float *)data, sizeof(float));
  return (void *)data2;
}


x86 assembly (clang, -O0):
<adt_copy_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
lea    0xec8(%rip),%rsi
mov    $0x20,%edx
call   1030 <memory_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adt_copy_float>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xed2(%rip),%rsi
mov    $0x4,%edi
mov    $0x20,%edx
call   1030 <memory_alloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Jianlong-Peng/myADT/refs/heads/master/src/mtools.c\00"
define i8* @adt_copy_float(i8* %0) {
%2 = alloca i8*
%3 = alloca float*
store i8* %0, i8** %2
%4 = call float* @memory_alloc(i64 4, i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i32 32)
store float* %4, float** %3
%5 = load float*, float** %3
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to float*
%8 = call i32 @memcpy(float* %5, float* %7, i32 4)
%9 = load float*, float** %3
%10 = bitcast float* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
@.str = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Jianlong-Peng/myADT/refs/heads/master/src/mtools.c\00"
define i8* @adt_copy_float(i8* %0) {
%2 = tail call float* @memory_alloc(i64 4, i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i32 32)
%3 = bitcast i8* %0 to float*
%4 = tail call i32 @memcpy(float* %2, float* %3, i32 4)
%5 = bitcast float* %2 to i8*
ret i8* %5
}
/* Variables and functions */
int listen(int, int);
int _listen(int socket, int backlog) { return listen(socket, backlog); }


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

x86 assembly (clang, -O2):
<_listen>:
jmp    1030 <listen@plt>

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

LLVM IR (-O2):
define i32 @_listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ my_log_error(char *, char const *, double, double);
void my_assert_greaterDouble(const char *description, double actualVal,
                             double refVal) {
  if (actualVal <= refVal)
    my_log_error("assert failed, \"%s\" must be greater than %lf but is %lf\n",
                 description, refVal, actualVal);
}


x86 assembly (clang, -O0):
<my_assert_greaterDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1154 <my_assert_greaterDouble+0x44>
mov    -0x8(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xeb1(%rip),%rdi
call   1030 <my_log_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_assert_greaterDouble>:
ucomisd %xmm0,%xmm1
jae    1117 <my_assert_greaterDouble+0x7>
ret
movapd %xmm0,%xmm2
mov    %rdi,%rsi
lea    0xedb(%rip),%rdi
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
jmp    1030 <my_log_error@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"assert failed, \22%s\22 must be greater than %lf but is %lf\0A\00"
define void @my_assert_greaterDouble(i8* %0, double %1, double %2) {
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
store i8* %0, i8** %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double, double* %6
%9 = fcmp ole double %7, %8
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load double, double* %6
%13 = load double, double* %5
%14 = call i32 @my_log_error(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %11, double %12, double %13)
br label %15
15: ; preds = %10, %3
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"assert failed, \22%s\22 must be greater than %lf but is %lf\0A\00"
define void @my_assert_greaterDouble(i8* %0, double %1, double %2) {
%4 = fcmp ugt double %1, %2
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @my_log_error(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %0, double %2, double %1)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ expint(int, int);
void benchmark(void) { expint(50, 1); }


x86 assembly (clang, -O0):
<benchmark>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
mov    $0x1,%esi
call   1030 <expint@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<benchmark>:
mov    $0x32,%edi
mov    $0x1,%esi
jmp    1030 <expint@plt>

LLVM IR (-O0):
define void @benchmark() {
%1 = call i32 @expint(i32 50, i32 1)
ret void
}

LLVM IR (-O2):
define void @benchmark() {
%1 = tail call i32 @expint(i32 50, i32 1)
ret void
}
int cmp_int_gt(const void *a, const void *b) {
  int a_ = *(int *)a;
  int b_ = *(int *)b;
  if (a_ > b_)
    return -1;
  if (a_ < b_)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp_int_gt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1136 <cmp_int_gt+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <cmp_int_gt+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114e <cmp_int_gt+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <cmp_int_gt+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_int_gt>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_int_gt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int cmp_int(void *pval1, void *pval2) {
  int v1 = (uintptr_t)pval1;
  int v2 = (uintptr_t)pval2;
  return v1 - v2;
}


x86 assembly (clang, -O0):
<cmp_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_int>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @cmp_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %7 to i64
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = ptrtoint i8* %10 to i64
%12 = trunc i64 %11 to i32
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @cmp_int(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
int /*<<< orphan*/ mainserv_bytesin(scalar_t__);
scalar_t__ tcptoread(int, int /*<<< orphan*/ *, int /*<<< orphan*/,
                     int /*<<< orphan*/);
int32_t mainserv_toread(int sock, uint8_t *ptr, uint32_t leng,
                        uint32_t timeout) {
  int32_t r;
  r = tcptoread(sock, ptr, leng, timeout);
  if (r > 0) {
    mainserv_bytesin(r);
  }
  return r;
}


x86 assembly (clang, -O0):
<mainserv_toread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <tcptoread@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jle    115f <mainserv_toread+0x3f>
mov    -0x20(%rbp),%rdi
call   1040 <mainserv_bytesin@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mainserv_toread>:
push   %rbx
call   1030 <tcptoread@plt>
mov    %rax,%rbx
test   %rax,%rax
jle    1136 <mainserv_toread+0x16>
mov    %rbx,%rdi
call   1040 <mainserv_bytesin@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @mainserv_toread(i32 %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i64 @tcptoread(i32 %10, i32* %11, i32 %12, i32 %13)
store i64 %14, i64* %9
%15 = load i64, i64* %9
%16 = icmp sgt i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %4
%18 = load i64, i64* %9
%19 = call i32 @mainserv_bytesin(i64 %18)
br label %20
20: ; preds = %17, %4
%21 = load i64, i64* %9
ret i64 %21
}

LLVM IR (-O2):
define i64 @mainserv_toread(i32 %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i64 @tcptoread(i32 %0, i32* %1, i32 %2, i32 %3)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @mainserv_bytesin(i64 %5)
br label %9
9: ; preds = %7, %4
ret i64 %5
}
void test6_f(a) int (*a)[];
{}


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

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

LLVM IR (-O0):
define void @test6_f([0 x i32]* %0) {
%2 = alloca [0 x i32]*
store [0 x i32]* %0, [0 x i32]** %2
ret void
}

LLVM IR (-O2):
define void @test6_f([0 x i32]* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_common_help(void) {
  printf("Considerations for common errors:\n");
  printf("- Ensure that the control type exists, which may require loading a "
         "kernel module\n");
  printf("- Some files may simply not exist\n");
}


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

x86 assembly (clang, -O2):
<print_common_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf43(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Considerations for common errors:\0A\00"
@.str.1 = [82 x i8] c"- Ensure that the control type exists, which may require loading a kernel module\0A\00"
@.str.2 = [35 x i8] c"- Some files may simply not exist\0A\00"
define void @print_common_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"Considerations for common errors:\00"
@str.3 = [81 x i8] c"- Ensure that the control type exists, which may require loading a kernel module\00"
@str.4 = [34 x i8] c"- Some files may simply not exist\00"
define void @print_common_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
void main() {
  char aString[6] = {'H', 'e', 'l', 'l', 'o'};
  printf("%s", aString);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x6(%rbp)
mov    0xecc(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0x6(%rbp),%rsi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x6f,0x4(%rsp)
movl   $0x6c6c6548,(%rsp)
lea    0xed0(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.main.aString = [6 x i8] c"Hello\00"
@.str = [3 x i8] c"%s\00"
define void @main() {
%1 = alloca [6 x i8]
%2 = bitcast [6 x i8]* %1 to i8*
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@__const.main.aString = [6 x i8] c"Hello\00"
@.str = [3 x i8] c"%s\00"
define void @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 (...) @getchar()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
size_t aeron_hash(int /*<<< orphan*/, size_t);
size_t aeron_int64_to_ptr_hash_map_hash_key(int64_t key, size_t mask) {
  return aeron_hash((uint64_t)key, mask);
}


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

x86 assembly (clang, -O2):
<aeron_int64_to_ptr_hash_map_hash_key>:
jmp    1030 <aeron_hash@plt>

LLVM IR (-O0):
define i64 @aeron_int64_to_ptr_hash_map_hash_key(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
%7 = load i64, i64* %4
%8 = call i64 @aeron_hash(i32 %6, i64 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @aeron_int64_to_ptr_hash_map_hash_key(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = tail call i64 @aeron_hash(i32 %3, i64 %1)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_iochannel_socket_set_rcvbuf() {
  printf("NOT IMPLEMENTED:"
         "pa_iochannel_socket_set_rcvbuf"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"NOT IMPLEMENTED:pa_iochannel_socket_set_rcvbuf\0A\00"
define i32 @pa_iochannel_socket_set_rcvbuf() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [47 x i8] c"NOT IMPLEMENTED:pa_iochannel_socket_set_rcvbuf\00"
define i32 @pa_iochannel_socket_set_rcvbuf() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void bar(double src) {
  double dst;
  asm("movnti %1, %0" : "=m"(dst) : "r"(src));
  asm("sfence" ::: "memory");
  printf("%lf\n", dst);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movnti %rax,-0x10(%rbp)
sfence
movsd  -0x10(%rbp),%xmm0
lea    0xec5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
movq   %xmm0,%rax
movnti %rax,(%rsp)
sfence
movsd  (%rsp),%xmm0
lea    0xed6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%lf\0A\00"
define void @bar(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = load double, double* %2
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void free_matrix(void **ptr, size_t size_y) {
  size_t i;
  for (i = 0; i < size_y; i++) {
    free(ptr[i]);
  }
  free(ptr);
}


x86 assembly (clang, -O0):
<free_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1158 <free_matrix+0x48>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <free_matrix+0x18>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_matrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %rsi,%rsi
je     1142 <free_matrix+0x32>
mov    %rsi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_matrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

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

/* Type definitions */
struct TYPE_2__ {
  int width;
};
typedef TYPE_1__ XGraphicsExposeEvent;

/* Variables and functions */
void set_XGraphicsExposeEvent_width(void *_p, int _v) {
  ((XGraphicsExposeEvent *)_p)->width = (int)_v;
}


x86 assembly (clang, -O0):
<set_XGraphicsExposeEvent_width>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XGraphicsExposeEvent_width>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XGraphicsExposeEvent_width(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XGraphicsExposeEvent_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void mc_scheduler_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @mc_scheduler_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errAbort(char *, char *);
scalar_t__ strtod(char *, char **);
float sqlFloat(char *s) {
  char *end;
  float val = (float)strtod(s, &end);
  if ((end == s) || (*end != '\0'))
    errAbort("invalid float: %s", s);
  return val;
}


x86 assembly (clang, -O0):
<sqlFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <strtod@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     1161 <sqlFloat+0x41>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1171 <sqlFloat+0x51>
mov    -0x8(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1040 <errAbort@plt>
movss  -0x14(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlFloat>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%rsi
call   1030 <strtod@plt>
mov    %rax,%r14
mov    (%rsp),%rax
cmp    %rbx,%rax
je     1140 <sqlFloat+0x20>
cmpb   $0x0,(%rax)
je     114f <sqlFloat+0x2f>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1040 <errAbort@plt>
cvtsi2ss %r14,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"invalid float: %s\00"
define float @sqlFloat(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strtod(i8* %5, i8** %3)
%7 = sitofp i64 %6 to float
store float %7, float* %4
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = icmp eq i8* %8, %9
br i1 %10, label %16, label %11
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %11, %1
%17 = load i8*, i8** %2
%18 = call i32 @errAbort(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %16, %11
%20 = load float, float* %4
ret float %20
}

LLVM IR (-O2):
@.str = [18 x i8] c"invalid float: %s\00"
define float @sqlFloat(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtod(i8* %0, i8** %2)
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, %0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i8, i8* %5
%9 = icmp eq i8 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7, %1
%11 = tail call i32 @errAbort(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %12
12: ; preds = %10, %7
%13 = sitofp i64 %4 to float
ret float %13
}
void free_tmp_pdist(long double **dist, int length) {
  int i;
  for (i = 0; i <= length; i++) {
    free(dist[i]);
  }
  free(dist);
}


x86 assembly (clang, -O0):
<free_tmp_pdist>:
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
jg     1151 <free_tmp_pdist+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_tmp_pdist+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_tmp_pdist>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
js     1142 <free_tmp_pdist+0x32>
mov    %esi,%r15d
add    $0x1,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_tmp_pdist+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

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


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

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

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

LLVM IR (-O2):
define void @ps_print_subtitle() {
ret void
}
void _start(void) {
  asm("    call main;  \n");
  asm("1:  iret;       \n");
  asm("    jmp 1;      \n");
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
call   1030 <main@plt>
iret
jmp    1 <_init-0xfff>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
call   1030 <main@plt>
iret
jmp    1 <_init-0xfff>
ret

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

LLVM IR (-O2):
define void @_start() {
tail call void asm sideeffect " call main; \0A", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "1: iret; \0A", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect " jmp 1; \0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void broker_flapping_data(int type, int flags, int attr, int flapping_type,
                          void *data, double percent_change,
                          double high_threshold, double low_threshold,
                          struct timeval *timestamp) {}


x86 assembly (clang, -O0):
<broker_flapping_data>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.timeval = type opaque
define void @broker_flapping_data(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, double %5, double %6, double %7, %struct.timeval* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca %struct.timeval*
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i8* %4, i8** %14
store double %5, double* %15
store double %6, double* %16
store double %7, double* %17
store %struct.timeval* %8, %struct.timeval** %18
ret void
}

LLVM IR (-O2):
%struct.timeval = type opaque
define void @broker_flapping_data(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, double %5, double %6, double %7, %struct.timeval* nocapture %8) {
ret void
}
int idx_delete_entry() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @idx_delete_entry() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ read_le16(int /*<<< orphan*/ const *);
uint16_t read_at_le16(const void *src, size_t offset) {
  const uint8_t *s = src;
  s += offset;
  return read_le16(s);
}


x86 assembly (clang, -O0):
<read_at_le16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x2,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <read_le16@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_at_le16>:
lea    (%rdi,%rsi,4),%rdi
jmp    1030 <read_le16@plt>

LLVM IR (-O0):
define i32 @read_at_le16(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i64, i64* %4
%9 = load i32*, i32** %5
%10 = getelementptr inbounds i32, i32* %9, i64 %8
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = call i32 @read_le16(i32* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @read_at_le16(i8* %0, i64 %1) {
%3 = bitcast i8* %0 to i32*
%4 = getelementptr inbounds i32, i32* %3, i64 %1
%5 = tail call i32 @read_le16(i32* %4)
ret i32 %5
}
void dummyaudio_ProcessAList(void) { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @nni_stat_sys_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ play();
int /*<<< orphan*/ setup();
main() {
  setup();
  play();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <setup@plt>
xor    %eax,%eax
call   1030 <play@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @setup()
%2 = call i32 (...) @play()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setup()
%2 = tail call i32 (...) @play()
ret i32 0
}
void RTMemEfAllocVar(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemEfAllocVar() {
ret void
}
void minoni(int n, int *v) {
  int *end;
  int min;
  min = -1;
  end = v + n;
  for (; v < end; v++)
    *v |= min;
  return;
}


x86 assembly (clang, -O0):
<minoni>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    114f <minoni+0x4f>
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    1125 <minoni+0x25>
pop    %rbp
ret

x86 assembly (clang, -O2):
<minoni>:
test   %edi,%edi
jle    1149 <minoni+0x39>
push   %rax
mov    %edi,%eax
lea    (%rsi,%rax,4),%rax
lea    0x4(%rsi),%rcx
cmp    %rcx,%rax
cmova  %rax,%rcx
mov    %rsi,%rax
not    %rax
lea    (%rcx,%rax,1),%rdx
add    $0x4,%rdx
and    $0xfffffffffffffffc,%rdx
mov    %rsi,%rdi
mov    $0xff,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @minoni(i32 %0, i32* writeonly %1) {
%3 = ptrtoint i32* %1 to i64
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %16
5: ; preds = %2
%6 = zext i32 %0 to i64
%7 = bitcast i32* %1 to i8*
%8 = shl nuw nsw i64 %6, 2
%9 = add i64 %8, %3
%10 = add i64 %3, 4
%11 = call i64 @llvm.umax.i64(i64 %9, i64 %10)
%12 = xor i64 %3, -1
%13 = add i64 %11, %12
%14 = add i64 %13, 4
%15 = and i64 %14, -4
br label %16
16: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void cv_destroy(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


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

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

LLVM IR (-O0):
define void @cv_destroy() {
%1 = call i32 @nsc_assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @cv_destroy() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}