xunge/DecIR huggingface dataset:
double pathcon_nm8_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<pathcon_nm8_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <pathcon_nm8_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <pathcon_nm8_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <pathcon_nm8_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <pathcon_nm8_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm8_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @pathcon_nm8_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @pathcon_nm8_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clear_screen(void) { printf("\e[2J"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
define void @clear_screen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @clear_screen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void girlfriend(void) { printf("Freston needs a girlfriend!\n"); }


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"Freston needs a girlfriend!\0A\00"
define void @girlfriend() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"Freston needs a girlfriend!\00"
define void @girlfriend() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *malloc(int /*<<< orphan*/);
void *mem_alloc(void) { return malloc(0); }


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

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

LLVM IR (-O0):
define i8* @mem_alloc() {
%1 = call i8* @malloc(i32 0)
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @mem_alloc() {
%1 = tail call i8* @malloc(i32 0)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ output_byte(char);
void output_label_prefix(void) { output_byte('_'); }


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

x86 assembly (clang, -O2):
<output_label_prefix>:
mov    $0x5f,%edi
jmp    1030 <output_byte@plt>

LLVM IR (-O0):
define void @output_label_prefix() {
%1 = call i32 @output_byte(i8 signext 95)
ret void
}

LLVM IR (-O2):
define void @output_label_prefix() {
%1 = tail call i32 @output_byte(i8 signext 95)
ret void
}
void EVP_PKEY_cmp(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_cmp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mainUsage(void) {
  printf("MapRead Usage:\n");
  printf("  cmd <db.fa> <read.fq>\n");
  printf("\n  get help by 'cmd -h'\n");
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"MapRead Usage:\0A\00"
@.str.1 = [25 x i8] c" cmd <db.fa> <read.fq>\0A\00"
@.str.2 = [25 x i8] c"\0A get help by 'cmd -h'\0A\00"
define void @mainUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"MapRead Usage:\00"
@str.3 = [24 x i8] c" cmd <db.fa> <read.fq>\00"
@str.4 = [24 x i8] c"\0A get help by 'cmd -h'\00"
define void @mainUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.4, i64 0, i64 0))
ret void
}
int fun1337() { return 1337; }


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

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

LLVM IR (-O0):
define i32 @fun1337() {
ret i32 1337
}

LLVM IR (-O2):
define i32 @fun1337() {
ret i32 1337
}
void dummyvideo_ProcessRDPList(void) {}


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

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

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

LLVM IR (-O2):
define void @dummyvideo_ProcessRDPList() {
ret void
}
long _calcPower(long EV_base, long EV_exp) {
  long EV_result;
  EV_result = 1;
  while ((EV_exp > 0)) {
    EV_result = (EV_result * EV_base);
    EV_exp = (EV_exp - 1);
  }
  return EV_result;
}


x86 assembly (clang, -O0):
<_calcPower>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    113d <_calcPower+0x3d>
mov    -0x18(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1114 <_calcPower+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_calcPower>:
test   %rsi,%rsi
jle    111b <_calcPower+0x1b>
lea    -0x1(%rsi),%rax
mov    %esi,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    1121 <_calcPower+0x21>
mov    $0x1,%eax
jmp    1156 <_calcPower+0x56>
mov    $0x1,%eax
ret
and    $0xfffffffffffffff8,%rsi
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
add    $0xfffffffffffffff8,%rsi
jne    1130 <_calcPower+0x30>
test   %rcx,%rcx
je     116a <_calcPower+0x6a>
nopl   0x0(%rax,%rax,1)
imul   %rdi,%rax
add    $0xffffffffffffffff,%rcx
jne    1160 <_calcPower+0x60>
ret

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

LLVM IR (-O2):
define i64 @_calcPower(i64 %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = add i64 %1, -1
%6 = and i64 %1, 7
%7 = icmp ult i64 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i64 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi i64 [ 1, %8 ], [ %20, %10 ]
%12 = phi i64 [ 0, %8 ], [ %21, %10 ]
%13 = mul nsw i64 %11, %0
%14 = mul nsw i64 %13, %0
%15 = mul nsw i64 %14, %0
%16 = mul nsw i64 %15, %0
%17 = mul nsw i64 %16, %0
%18 = mul nsw i64 %17, %0
%19 = mul nsw i64 %18, %0
%20 = mul nsw i64 %19, %0
%21 = add i64 %12, 8
%22 = icmp eq i64 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi i64 [ undef, %4 ], [ %20, %10 ]
%25 = phi i64 [ 1, %4 ], [ %20, %10 ]
%26 = icmp eq i64 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi i64 [ %30, %27 ], [ %25, %23 ]
%29 = phi i64 [ %31, %27 ], [ 0, %23 ]
%30 = mul nsw i64 %28, %0
%31 = add i64 %29, 1
%32 = icmp eq i64 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi i64 [ 1, %2 ], [ %24, %23 ], [ %30, %27 ]
ret i64 %34
}
/* Variables and functions */
int downcase(int);
int uppercasep(int c) { return downcase(c) != c; }


x86 assembly (clang, -O0):
<uppercasep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <downcase@plt>
cmp    -0x4(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uppercasep>:
push   %rbx
mov    %edi,%ebx
call   1030 <downcase@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @uppercasep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @downcase(i32 %3)
%5 = load i32, i32* %2
%6 = icmp ne i32 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @uppercasep(i32 %0) {
%2 = tail call i32 @downcase(i32 %0)
%3 = icmp ne i32 %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned int bcma_core_irq(struct bcma_device *core) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.bcma_device = type opaque
define i32 @bcma_core_irq(%struct.bcma_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help_eopt(void) {
  printf(" -E, --eopt=[section][@file]\n      Read additional opts from "
         "section in ini-File.\n");
}


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

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

LLVM IR (-O0):
@.str = [83 x i8] c" -E, --eopt=[section][@file]\0A Read additional opts from section in ini-File.\0A\00"
define void @print_help_eopt() {
%1 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [82 x i8] c" -E, --eopt=[section][@file]\0A Read additional opts from section in ini-File.\00"
define void @print_help_eopt() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str, i64 0, i64 0))
ret void
}
void avpriv_register_devices() {}


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

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

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

LLVM IR (-O2):
define void @avpriv_register_devices() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cwdbuf;

/* Variables and functions */
int /*<<< orphan*/ getcwd(char *, int);
char *strdup(char *);
char *file_GetCwd() {
  char cwdbuf[2048] = "";
  if (!getcwd(cwdbuf, sizeof(cwdbuf))) {
    return 0;
  }
  return strdup(cwdbuf);
}


x86 assembly (clang, -O0):
<file_GetCwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
lea    -0x810(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1030 <memset@plt>
lea    -0x810(%rbp),%rdi
mov    $0x800,%esi
call   1040 <getcwd@plt>
cmp    $0x0,%eax
jne    1175 <file_GetCwd+0x45>
movq   $0x0,-0x8(%rbp)
jmp    1185 <file_GetCwd+0x55>
lea    -0x810(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_GetCwd>:
push   %r14
push   %rbx
sub    $0x808,%rsp
mov    %rsp,%r14
xor    %ebx,%ebx
mov    $0x800,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %r14,%rdi
mov    $0x800,%esi
call   1040 <getcwd@plt>
test   %eax,%eax
je     116a <file_GetCwd+0x3a>
mov    %rsp,%rdi
call   1050 <strdup@plt>
mov    %rax,%rbx
mov    %rbx,%rax
add    $0x808,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @file_GetCwd() {
%1 = alloca i8*
%2 = alloca [2048 x i8]
%3 = bitcast [2048 x i8]* %2 to i8*
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%5 = call i32 @getcwd(i8* %4, i32 2048)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %0
store i8* null, i8** %1
br label %11
8: ; preds = %0
%9 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%10 = call i8* @strdup(i8* %9)
store i8* %10, i8** %1
br label %11
11: ; preds = %8, %7
%12 = load i8*, i8** %1
ret i8* %12
}

LLVM IR (-O2):
define noalias i8* @file_GetCwd() {
%1 = alloca [2048 x i8]
%2 = getelementptr inbounds [2048 x i8], [2048 x i8]* %1, i64 0, i64 0
%3 = call i32 @getcwd(i8* %2, i32 2048)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i8* @strdup(i8* %2)
br label %7
7: ; preds = %0, %5
%8 = phi i8* [ %6, %5 ], [ null, %0 ]
ret i8* %8
}
void TPS_ADC_SAR_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @TPS_ADC_SAR_SaveConfig() {
ret void
}
/* Variables and functions */
char toupper(char);
int isalphaul(char c) {
  c = toupper(c);
  return ('A' <= c && c <= 'Z') || c == '_';
}


x86 assembly (clang, -O0):
<isalphaul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     114d <isalphaul+0x3d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    115a <isalphaul+0x4a>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalphaul>:
push   %rax
call   1030 <toupper@plt>
lea    -0x41(%rax),%ecx
cmp    $0x1a,%cl
setb   %cl
cmp    $0x5f,%al
sete   %al
or     %cl,%al
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isalphaul(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call signext i8 @toupper(i8 signext %3)
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sle i32 65, %6
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 90
br i1 %11, label %16, label %12
12: ; preds = %8, %1
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 95
br label %16
16: ; preds = %12, %8
%17 = phi i1 [ true, %8 ], [ %15, %12 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @isalphaul(i8 signext %0) {
%2 = tail call signext i8 @toupper(i8 signext %0)
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = icmp eq i8 %2, 95
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int isatty(int);
__attribute__((__weak__, __always___)) int softboundmpx_isatty(int desc) {
  return isatty(desc);
}


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

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

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

LLVM IR (-O2):
define weak i32 @softboundmpx_isatty(i32 %0) {
%2 = tail call i32 @isatty(i32 %0)
ret i32 %2
}
void f(void) {
  int a[100], b[100];
  int t;
#pragma hlt distribute expand(t)
  for (int i = 0; i < 100; i++) {
    t = a[i] + 1;
    b[i] = t * 2;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2b0,%rsp
movl   $0x0,-0x328(%rbp)
cmpl   $0x64,-0x328(%rbp)
jge    1164 <f+0x64>
movslq -0x328(%rbp),%rax
mov    -0x190(%rbp,%rax,4),%eax
add    $0x1,%eax
mov    %eax,-0x324(%rbp)
mov    -0x324(%rbp),%ecx
shl    $0x1,%ecx
movslq -0x328(%rbp),%rax
mov    %ecx,-0x320(%rbp,%rax,4)
mov    -0x328(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x328(%rbp)
jmp    1115 <f+0x15>
add    $0x2b0,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
scalar_t__ isascii(int);
scalar_t__ isupper(int);
int tolower(int);
int lowerit(int a) { return (isascii(a) && isupper(a)) ? tolower(a) : a; }


x86 assembly (clang, -O0):
<lowerit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <isascii@plt>
cmp    $0x0,%rax
je     116f <lowerit+0x3f>
mov    -0x4(%rbp),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
je     116f <lowerit+0x3f>
mov    -0x4(%rbp),%edi
call   1030 <tolower@plt>
mov    %eax,-0x8(%rbp)
jmp    1175 <lowerit+0x45>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lowerit>:
push   %rbx
mov    %edi,%ebx
call   1050 <isascii@plt>
test   %rax,%rax
je     1151 <lowerit+0x21>
mov    %ebx,%edi
call   1040 <isupper@plt>
test   %rax,%rax
je     1151 <lowerit+0x21>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <tolower@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @lowerit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isascii(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @isupper(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @tolower(i32 %11)
br label %15
13: ; preds = %6, %1
%14 = load i32, i32* %2
br label %15
15: ; preds = %13, %10
%16 = phi i32 [ %12, %10 ], [ %14, %13 ]
ret i32 %16
}

LLVM IR (-O2):
define i32 @lowerit(i32 %0) {
%2 = tail call i64 @isascii(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i64 @isupper(i32 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @tolower(i32 %0)
br label %9
9: ; preds = %1, %4, %7
%10 = phi i32 [ %8, %7 ], [ %0, %4 ], [ %0, %1 ]
ret i32 %10
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, ...);
void process(void) {
  printf("\xD\xA");
  printf("Process %d waits for someone to send it SIGSEGV\n", getpid());
  while (1) {
  };
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1149 <process+0x29>

x86 assembly (clang, -O2):
<process>:
push   %rax
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1160 <process+0x30>

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
@.str.1 = [49 x i8] c"Process %d waits for someone to send it SIGSEGV\0A\00"
define void @process() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @getpid()
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 %2)
br label %4
4: ; preds = %0, %4
br label %4
}

LLVM IR (-O2):
@.str.1 = [49 x i8] c"Process %d waits for someone to send it SIGSEGV\0A\00"
@str = [2 x i8] c"\0D\00"
define void @process() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 %2)
br label %4
4: ; preds = %0, %4
br label %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_value;
typedef int /*<<< orphan*/ sqlite3_context;

/* Variables and functions */
int /*<<< orphan*/ EVP_md5();
int /*<<< orphan*/ sqlite3_digest_type(int /*<<< orphan*/ *, int,
                                       int /*<<< orphan*/ **,
                                       int /*<<< orphan*/);
void sqlite3_digest_md5(sqlite3_context *context, int argc,
                        sqlite3_value **argv) {
  sqlite3_digest_type(context, argc, argv, EVP_md5());
}


x86 assembly (clang, -O0):
<sqlite3_digest_md5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <EVP_md5@plt>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1040 <sqlite3_digest_type@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlite3_digest_md5>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <EVP_md5@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <sqlite3_digest_type@plt>

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

LLVM IR (-O2):
define void @sqlite3_digest_md5(i32* %0, i32 %1, i32** %2) {
%4 = tail call i32 (...) @EVP_md5()
%5 = tail call i32 @sqlite3_digest_type(i32* %0, i32 %1, i32** %2, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void xerror(const char *s) {
  perror(s);
  exit(1);
}


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

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

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

LLVM IR (-O2):
define void @xerror(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
void sysfsparser_closedir(DIR *dirp) { closedir(dirp); }


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

x86 assembly (clang, -O2):
<sysfsparser_closedir>:
jmp    1030 <closedir@plt>

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

LLVM IR (-O2):
define void @sysfsparser_closedir(i32* nocapture %0) {
%2 = tail call i32 @closedir(i32* %0)
ret void
}
float f1(float x) { return -7.5 * __builtin_copysignf(2.0, x); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xefb(%rip),%xmm1
pand   %xmm1,%xmm0
movaps 0xf00(%rip),%xmm1
por    %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed0(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
andps  0xef9(%rip),%xmm0
orps   0xf02(%rip),%xmm0
mulss  0xf0a(%rip),%xmm0
ret

LLVM IR (-O0):
define float @f1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.copysign.f32(float 2.000000e+00, float %3)
%5 = fpext float %4 to double
%6 = fmul double -7.500000e+00, %5
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @f1(float %0) {
%2 = tail call float @llvm.copysign.f32(float 2.000000e+00, float %0)
%3 = fmul float %2, -7.500000e+00
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void printFullPattern(char *code, int size) {
  int i;
  for (i = 0; i < size; ++i) {
    printf("%d", code[i]);
  }
}


x86 assembly (clang, -O0):
<printFullPattern>:
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    1158 <printFullPattern+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xebf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printFullPattern+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printFullPattern>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <printFullPattern+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printFullPattern+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @printFullPattern(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %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 slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %15)
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
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printFullPattern(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
struct Player {
  int dummy;
};
struct Hand {
  int dummy;
};
struct Game {
  int dummy;
};

/* Variables and functions */
int findAllowedCard(struct Player *, struct Game *, struct Hand *, int, int);
int game_findPreviousAllowedCard(struct Player *player, struct Game *game,
                                 struct Hand *hand, int currentCard) {
  return findAllowedCard(player, game, hand, currentCard, -1);
}


x86 assembly (clang, -O0):
<game_findPreviousAllowedCard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%r8d
call   1030 <findAllowedCard@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<game_findPreviousAllowedCard>:
mov    $0xffffffff,%r8d
jmp    1030 <findAllowedCard@plt>

LLVM IR (-O0):
%struct.Player = type { i32 }
%struct.Game = type { i32 }
%struct.Hand = type { i32 }
define i32 @game_findPreviousAllowedCard(%struct.Player* %0, %struct.Game* %1, %struct.Hand* %2, i32 %3) {
%5 = alloca %struct.Player*
%6 = alloca %struct.Game*
%7 = alloca %struct.Hand*
%8 = alloca i32
store %struct.Player* %0, %struct.Player** %5
store %struct.Game* %1, %struct.Game** %6
store %struct.Hand* %2, %struct.Hand** %7
store i32 %3, i32* %8
%9 = load %struct.Player*, %struct.Player** %5
%10 = load %struct.Game*, %struct.Game** %6
%11 = load %struct.Hand*, %struct.Hand** %7
%12 = load i32, i32* %8
%13 = call i32 @findAllowedCard(%struct.Player* %9, %struct.Game* %10, %struct.Hand* %11, i32 %12, i32 -1)
ret i32 %13
}

LLVM IR (-O2):
%struct.Player = type { i32 }
%struct.Game = type { i32 }
%struct.Hand = type { i32 }
define i32 @game_findPreviousAllowedCard(%struct.Player* %0, %struct.Game* %1, %struct.Hand* %2, i32 %3) {
%5 = tail call i32 @findAllowedCard(%struct.Player* %0, %struct.Game* %1, %struct.Hand* %2, i32 %3, i32 -1)
ret i32 %5
}
void avgAssign() {}


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

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

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

LLVM IR (-O2):
define void @avgAssign() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  while (true) {
    printf("looping!\n");
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [10 x i8] c"looping!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %2, %6
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @sleep(i32 1)
br label %6
}

LLVM IR (-O2):
@str = [9 x i8] c"looping!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
br label %3
}
/* Type definitions */
struct hashtable {
  int dummy;
};

/* Variables and functions */
int del(struct hashtable *, int, int /*<<< orphan*/);
int ht_del(struct hashtable *ht, int i) { return del(ht, i, 0); }


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

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

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

LLVM IR (-O2):
%struct.hashtable = type { i32 }
define i32 @ht_del(%struct.hashtable* %0, i32 %1) {
%3 = tail call i32 @del(%struct.hashtable* %0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
long long lldiv(long long, long long);
void check(long long num, long long expected) {
  long long res = lldiv(num, 0LL);
  if (res != expected)
    abort();
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <lldiv@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1156 <check+0x36>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %rbx
mov    %rsi,%rbx
xor    %esi,%esi
call   1040 <lldiv@plt>
cmp    %rbx,%rax
jne    1132 <check+0x12>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @check(i64 %0, i64 %1) {
%3 = tail call i64 @lldiv(i64 %0, i64 0)
%4 = icmp eq i64 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret void
}
int is_restricted(name)
char *name;
{
  char *p;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @is_restricted(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char *getResponse(int /*<<< orphan*/);
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ printf(char *, ...);
void response_handler(int n) {
  printf("server response arrived\n");
  printf("%s\n", getResponse(getpid()));
}


x86 assembly (clang, -O0):
<response_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
call   1050 <getResponse@plt>
mov    %rax,%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<response_handler>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <getpid@plt>
mov    %eax,%edi
call   1050 <getResponse@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"server response arrived\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @response_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @getpid()
%5 = call i8* @getResponse(i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"server response arrived\00"
define void @response_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @getpid()
%4 = tail call i8* @getResponse(i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret void
}
/* Variables and functions */
int deltas_get_count(int);
int /*<<< orphan*/ usleep(int);
int deltas_wait_read_finished() {
  int num_deltas, ret_deltas = 0;
  num_deltas = deltas_get_count(0);
  while ((num_deltas = deltas_get_count(num_deltas)) >= 0) {
    ret_deltas = num_deltas;
    usleep(500);
  }
  return ret_deltas;
}


x86 assembly (clang, -O0):
<deltas_wait_read_finished>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
xor    %edi,%edi
call   1030 <deltas_get_count@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <deltas_get_count@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jl     1162 <deltas_wait_read_finished+0x42>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x1f4,%edi
call   1040 <usleep@plt>
jmp    1139 <deltas_wait_read_finished+0x19>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deltas_wait_read_finished>:
push   %rbx
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <deltas_get_count@plt>
mov    %eax,%edi
nopl   0x0(%rax)
call   1030 <deltas_get_count@plt>
test   %eax,%eax
js     1149 <deltas_wait_read_finished+0x29>
mov    %eax,%ebx
mov    $0x1f4,%edi
call   1040 <usleep@plt>
mov    %ebx,%edi
jmp    1130 <deltas_wait_read_finished+0x10>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @deltas_wait_read_finished() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
%3 = call i32 @deltas_get_count(i32 0)
store i32 %3, i32* %1
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* %1
%6 = call i32 @deltas_get_count(i32 %5)
store i32 %6, i32* %1
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %1
store i32 %9, i32* %2
%10 = call i32 @usleep(i32 500)
br label %4
11: ; preds = %4
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @deltas_wait_read_finished() {
%1 = tail call i32 @deltas_get_count(i32 0)
%2 = tail call i32 @deltas_get_count(i32 %1)
%3 = icmp sgt i32 %2, -1
br i1 %3, label %4, label %9
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ %2, %0 ]
%6 = tail call i32 @usleep(i32 500)
%7 = tail call i32 @deltas_get_count(i32 %5)
%8 = icmp sgt i32 %7, -1
br i1 %8, label %4, label %9
9: ; preds = %4, %0
%10 = phi i32 [ 0, %0 ], [ %5, %4 ]
ret i32 %10
}
/* Variables and functions */
int __SIGRTMIN;
int __is_internal_signal(int sig) {
  return (sig == __SIGRTMIN) || (sig == __SIGRTMIN) ||
         (sig == (__SIGRTMIN + 1));
}


x86 assembly (clang, -O0):
<__is_internal_signal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2ed5(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     114c <__is_internal_signal+0x4c>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2ebe(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     114c <__is_internal_signal+0x4c>
mov    -0x4(%rbp),%eax
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__is_internal_signal>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
cmp    %edi,%eax
sete   %cl
add    $0x1,%eax
cmp    %edi,%eax
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
@__SIGRTMIN = global i32 0
define i32 @__is_internal_signal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @__SIGRTMIN
%5 = icmp eq i32 %3, %4
br i1 %5, label %15, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @__SIGRTMIN
%9 = icmp eq i32 %7, %8
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = load i32, i32* @__SIGRTMIN
%13 = add nsw i32 %12, 1
%14 = icmp eq i32 %11, %13
br label %15
15: ; preds = %10, %6, %1
%16 = phi i1 [ true, %6 ], [ true, %1 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
@__SIGRTMIN = global i32 0
define i32 @__is_internal_signal(i32 %0) {
%2 = load i32, i32* @__SIGRTMIN
%3 = icmp eq i32 %2, %0
%4 = add nsw i32 %2, 1
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ ushort;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_usvector(ushort *v, long nl, long nh) { free((char *)(v + nl - 0)); }


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

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

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

LLVM IR (-O2):
define void @free_usvector(i32* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
%5 = bitcast i32* %4 to i8*
%6 = tail call i32 @free(i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wifidirect_cfg_listen_channel_usage(void) {
  printf("Usage : wifidirect_cfg_listen_channel [ListenChannel]\n");
  printf("If ListenChannel parameter is provided, 'set' is performed otherwise "
         "'get' is performed.\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [55 x i8] c"Usage : wifidirect_cfg_listen_channel [ListenChannel]\0A\00"
@.str.1 = [90 x i8] c"If ListenChannel parameter is provided, 'set' is performed otherwise 'get' is performed.\0A\00"
define void @print_wifidirect_cfg_listen_channel_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [54 x i8] c"Usage : wifidirect_cfg_listen_channel [ListenChannel]\00"
@str.2 = [89 x i8] c"If ListenChannel parameter is provided, 'set' is performed otherwise 'get' is performed.\00"
define void @print_wifidirect_cfg_listen_channel_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int gridInqTrunc(int);
int /*<<< orphan*/ spcut(double *, double *, int, int *);
void speccut(int gridIDin, double *arrayIn, double *arrayOut, int *waves) {
  int ntr;
  ntr = gridInqTrunc(gridIDin);
  spcut(arrayIn, arrayOut, ntr, waves);
}


x86 assembly (clang, -O0):
<speccut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <gridInqTrunc@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <spcut@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<speccut>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
call   1040 <gridInqTrunc@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %eax,%edx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <spcut@plt>

LLVM IR (-O0):
define void @speccut(i32 %0, double* %1, double* %2, i32* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32*
%9 = alloca i32
store i32 %0, i32* %5
store double* %1, double** %6
store double* %2, double** %7
store i32* %3, i32** %8
%10 = load i32, i32* %5
%11 = call i32 @gridInqTrunc(i32 %10)
store i32 %11, i32* %9
%12 = load double*, double** %6
%13 = load double*, double** %7
%14 = load i32, i32* %9
%15 = load i32*, i32** %8
%16 = call i32 @spcut(double* %12, double* %13, i32 %14, i32* %15)
ret void
}

LLVM IR (-O2):
define void @speccut(i32 %0, double* %1, double* %2, i32* %3) {
%5 = tail call i32 @gridInqTrunc(i32 %0)
%6 = tail call i32 @spcut(double* %1, double* %2, i32 %5, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vec3_scale2(double *, double);
void vec3_invert(double *v1) { vec3_scale2(v1, -1.0); }


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

x86 assembly (clang, -O2):
<vec3_invert>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <vec3_scale2@plt>

LLVM IR (-O0):
define void @vec3_invert(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @vec3_scale2(double* %3, double -1.000000e+00)
ret void
}

LLVM IR (-O2):
define void @vec3_invert(double* %0) {
%2 = tail call i32 @vec3_scale2(double* %0, double -1.000000e+00)
ret void
}