xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint32_t USBDMANumChannels(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x40050000);
  return ((*((volatile uint32_t *)(ui32Base + 0x00000079))) >> 4);
}


x86 assembly (clang, -O0):
<USBDMANumChannels>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x79,%eax
cltq
mov    (%rax),%eax
sar    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDMANumChannels>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
mov    0x79(%rax),%eax
sar    $0x4,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @USBDMANumChannels(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074069504
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 121
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = ashr i32 %11, 4
ret i32 %12
}

LLVM IR (-O2):
define i32 @USBDMANumChannels(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 121
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = ashr i32 %8, 4
ret i32 %9
}
/* Variables and functions */
char *strchr(char *, char);
void delete_comments(char *buff) {
  char *p;
  if ((p = strchr(buff, '#')) != NULL) {
    *p = '\0';
  }
}


x86 assembly (clang, -O0):
<delete_comments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x23,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     113f <delete_comments+0x2f>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_comments>:
push   %rax
mov    $0x23,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1123 <delete_comments+0x13>
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @delete_comments(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 35)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8*, i8** %3
store i8 0, i8* %8
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @delete_comments(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 35)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}
int mint_string_numlen(int n) {
  if (n < 10)
    return 1;
  return 1 + mint_string_numlen(n / 10);
}


x86 assembly (clang, -O0):
<mint_string_numlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1131 <mint_string_numlen+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1149 <mint_string_numlen+0x39>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <mint_string_numlen@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mint_string_numlen>:
mov    $0x1,%eax
cmp    $0xa,%edi
jl     1134 <mint_string_numlen+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <mint_string_numlen+0x20>
ret

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

LLVM IR (-O2):
define i32 @mint_string_numlen(i32 %0) {
%2 = icmp slt i32 %0, 10
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 0, %1 ]
%6 = udiv i32 %4, 10
%7 = add nuw nsw i32 %5, 1
%8 = icmp ult i32 %4, 100
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = add nuw i32 %5, 2
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ 1, %1 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int itex2MML_do_html_filter(char const *, size_t, int);
int itex2MML_strict_html_filter(const char *buffer, size_t length) {
  return itex2MML_do_html_filter(buffer, length, 1);
}


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

x86 assembly (clang, -O2):
<itex2MML_strict_html_filter>:
mov    $0x1,%edx
jmp    1030 <itex2MML_do_html_filter@plt>

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

LLVM IR (-O2):
define i32 @itex2MML_strict_html_filter(i8* %0, i64 %1) {
%3 = tail call i32 @itex2MML_do_html_filter(i8* %0, i64 %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ show();
int Mshow(int nargs, int *args) { show(); }


x86 assembly (clang, -O0):
<Mshow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <show@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mshow>:
xor    %eax,%eax
jmp    1030 <show@plt>

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

LLVM IR (-O2):
define i32 @Mshow(i32 %0, i32* nocapture readnone %1) {
%3 = tail call i32 (...) @show()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ pow(double, double);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main() {
  double a = 0;
  double b = 0;
  scanf("%lf %lf", &a, &b);
  printf("%.1lf\n", pow(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1050 <pow@plt>
mov    %eax,%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0xeb3(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <pow@plt>
lea    0xe94(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [7 x i8] c"%.1lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%4 = bitcast double* %2 to i8*
store double 0.000000e+00, double* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %1
%7 = load double, double* %2
%8 = call i32 @pow(double %6, double %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int _response(char const *);
int /*<<< orphan*/ write_log(char *, int /*<<< orphan*/);
int do_syst(void) {
  const char wel[] = "215 UNIX Type: L8\r\n";
  if (_response(wel) == -1) {
    write_log("write error in do_syst()", 0);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<do_syst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <_response@plt>
cmp    $0xffffffff,%eax
jne    1173 <do_syst+0x53>
lea    0xeb4(%rip),%rdi
xor    %esi,%esi
call   1040 <write_log@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    117a <do_syst+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_syst>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0xa0d38,0x10(%rsp)
mov    %rsp,%rdi
call   1030 <_response@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     114d <do_syst+0x2d>
add    $0x18,%rsp
ret
lea    0xec0(%rip),%rdi
xor    %esi,%esi
call   1040 <write_log@plt>
mov    $0xffffffff,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.do_syst.wel = [20 x i8] c"215 UNIX Type: L8\0D\0A\00"
@.str = [25 x i8] c"write error in do_syst()\00"
define i32 @do_syst() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = bitcast [20 x i8]* %2 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @_response(i8* %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @write_log(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 0)
store i32 -1, i32* %1
br label %10
9: ; preds = %0
store i32 0, i32* %1
br label %10
10: ; preds = %9, %7
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@__const.do_syst.wel = [20 x i8] c"215 UNIX Type: L8\0D\0A\00"
@.str = [25 x i8] c"write error in do_syst()\00"
define i32 @do_syst() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @_response(i8* %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @write_log(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 0)
br label %7
7: ; preds = %0, %5
%8 = phi i32 [ -1, %5 ], [ 0, %0 ]
ret i32 %8
}
int is_negative(int x) {
  if (__builtin_expect((x < 0), 0)) {
    return -42;
  } else {
    return 42;
  }
}


x86 assembly (clang, -O0):
<is_negative>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
cltq
cmp    $0x0,%rax
je     112b <is_negative+0x2b>
movl   $0xffffffd6,-0x4(%rbp)
jmp    1132 <is_negative+0x32>
movl   $0x2a,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_negative>:
test   %edi,%edi
js     110a <is_negative+0xa>
mov    $0x2a,%eax
ret
mov    $0xffffffd6,%eax
ret

LLVM IR (-O0):
define i32 @is_negative(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
%6 = zext i1 %5 to i32
%7 = sext i32 %6 to i64
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -42, i32* %2
br label %11
10: ; preds = %1
store i32 42, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_negative(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 -42, i32 42
ret i32 %3
}
void insb(int port, void *addr, unsigned long count) {
  __asm__ __volatile__("rep; ins"
                       "b"
                       : "+D"(addr), "+c"(count)
                       : "d"(port));
}


x86 assembly (clang, -O0):
<insb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    -0x4(%rbp),%edx
rep insb (%dx),%es:(%rdi)
mov    %rdi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insb>:
mov    %rdx,%rcx
mov    %edi,%edx
mov    %rsi,%rdi
rep insb (%dx),%es:(%rdi)
ret

LLVM IR (-O0):
define void @insb(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i64, i64* %6
%9 = load i32, i32* %4
%10 = call { i8*, i64 } asm sideeffect "rep; insb", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %9, i8* %7, i64 %8)
%11 = extractvalue { i8*, i64 } %10, 0
%12 = extractvalue { i8*, i64 } %10, 1
store i8* %11, i8** %5
store i64 %12, i64* %6
ret void
}

LLVM IR (-O2):
define void @insb(i32 %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i64 } asm sideeffect "rep; insb", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* %1, i64 %2)
ret void
}
double new_double(void) { return 0.; }


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

x86 assembly (clang, -O2):
<new_double>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @new_double() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @new_double() {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int /*<<< orphan*/ test45_M_bar__E();
void test45_Test7_test__I() {
  foo();
  test45_M_bar__E();
}


x86 assembly (clang, -O0):
<test45_Test7_test__I>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <foo@plt>
mov    $0x0,%al
call   1030 <test45_M_bar__E@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test45_Test7_test__I>:
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test45_M_bar__E@plt>

LLVM IR (-O0):
define void @test45_Test7_test__I() {
%1 = call i32 (...) @foo()
%2 = call i32 (...) @test45_M_bar__E()
ret void
}

LLVM IR (-O2):
define void @test45_Test7_test__I() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @test45_M_bar__E()
ret void
}
int ChkArcKeyLen(unsigned long len) {
  return len < (1) || len > (16) ? (0) : (1);
}


x86 assembly (clang, -O0):
<ChkArcKeyLen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x1,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jb     1123 <ChkArcKeyLen+0x23>
cmpq   $0x10,-0x8(%rbp)
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%dl
mov    $0x1,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChkArcKeyLen>:
add    $0xffffffffffffffff,%rdi
xor    %eax,%eax
cmp    $0x10,%rdi
setb   %al
ret

LLVM IR (-O0):
define i32 @ChkArcKeyLen(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ult i64 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp ugt i64 %6, 16
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 0, i32 1
ret i32 %11
}

LLVM IR (-O2):
define i32 @ChkArcKeyLen(i64 %0) {
%2 = add i64 %0, -1
%3 = icmp ult i64 %2, 16
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int x(char *);
main() {
  if (x("") != 1)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <x@plt>
cmp    $0x1,%eax
je     115b <main+0x2b>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <x@plt>
cmp    $0x1,%eax
jne    1149 <main+0x19>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @x(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 @x(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
unsigned hash_unsigned_pair(unsigned i, unsigned j) {
  return ((i + j) * (i + j + 1u) / 2u) + i;
}


x86 assembly (clang, -O0):
<hash_unsigned_pair>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
shr    $0x1,%eax
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_unsigned_pair>:
lea    (%rsi,%rdi,1),%ecx
lea    (%rsi,%rdi,1),%eax
add    $0x1,%eax
imul   %ecx,%eax
shr    %eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @hash_unsigned_pair(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 = add i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add i32 %8, %9
%11 = add i32 %10, 1
%12 = mul i32 %7, %11
%13 = udiv i32 %12, 2
%14 = load i32, i32* %3
%15 = add i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @hash_unsigned_pair(i32 %0, i32 %1) {
%3 = add i32 %1, %0
%4 = add i32 %3, 1
%5 = mul i32 %4, %3
%6 = lshr i32 %5, 1
%7 = add i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int mipsim_open(int cxt, const char *path, int flags) {
  (void)cxt;
  (void)path;
  (void)flags;
  printf("Unexpected gateway open\n");
  return 0;
}


x86 assembly (clang, -O0):
<mipsim_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mipsim_open>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Unexpected gateway open\0A\00"
define i32 @mipsim_open(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"Unexpected gateway open\00"
define i32 @mipsim_open(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct item {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort_crypto_lib(char *);
int /*<<< orphan*/ is_symmetric_key(struct item *);
void check_is_symmetric_key(struct item *item) {
  if (!is_symmetric_key(item))
    abort_crypto_lib("Presented item is not a symmetric key");
}


x86 assembly (clang, -O0):
<check_is_symmetric_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <is_symmetric_key@plt>
cmp    $0x0,%eax
jne    114a <check_is_symmetric_key+0x2a>
lea    0xebb(%rip),%rdi
call   1040 <abort_crypto_lib@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_is_symmetric_key>:
push   %rax
call   1030 <is_symmetric_key@plt>
test   %eax,%eax
je     112c <check_is_symmetric_key+0xc>
pop    %rax
ret
lea    0xecd(%rip),%rdi
pop    %rax
jmp    1040 <abort_crypto_lib@plt>

LLVM IR (-O0):
%struct.item = type { i32 }
@.str = [38 x i8] c"Presented item is not a symmetric key\00"
define void @check_is_symmetric_key(%struct.item* %0) {
%2 = alloca %struct.item*
store %struct.item* %0, %struct.item** %2
%3 = load %struct.item*, %struct.item** %2
%4 = call i32 @is_symmetric_key(%struct.item* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @abort_crypto_lib(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.item = type { i32 }
@.str = [38 x i8] c"Presented item is not a symmetric key\00"
define void @check_is_symmetric_key(%struct.item* %0) {
%2 = tail call i32 @is_symmetric_key(%struct.item* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @abort_crypto_lib(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mkdir(char *, int);
scalar_t__ stat(char *, struct stat *);
void imkdir(char *name) {
  struct stat buf;
  if (!*name || stat(name, &buf) == 0)
    return;
  mkdir(name, 0775);
}


x86 assembly (clang, -O0):
<imkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1150 <imkdir+0x30>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jne    1155 <imkdir+0x35>
jmp    1163 <imkdir+0x43>
mov    -0x8(%rbp),%rdi
mov    $0x1fd,%esi
call   1030 <mkdir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imkdir>:
push   %rbx
sub    $0x10,%rsp
cmpb   $0x0,(%rdi)
je     1149 <imkdir+0x29>
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <stat@plt>
test   %rax,%rax
je     1149 <imkdir+0x29>
mov    %rbx,%rdi
mov    $0x1fd,%esi
call   1030 <mkdir@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define void @imkdir(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i64 @stat(i8* %8, %struct.stat* %3)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7, %1
br label %15
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = call i32 @mkdir(i8* %13, i32 509)
br label %15
15: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define void @imkdir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = call i64 @stat(i8* %0, %struct.stat* %2)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = call i32 @mkdir(i8* %0, i32 509)
br label %11
11: ; preds = %1, %6, %9
ret void
}
int start_connection_monitor(void) { return (1); }


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

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

LLVM IR (-O0):
define i32 @start_connection_monitor() {
ret i32 1
}

LLVM IR (-O2):
define i32 @start_connection_monitor() {
ret i32 1
}
/* Type definitions */
struct RNAaliduplex_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
RNAaliduplex_cmdline_parser_release(struct RNAaliduplex_args_info *);
void RNAaliduplex_cmdline_parser_free(
    struct RNAaliduplex_args_info *args_info) {
  RNAaliduplex_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<RNAaliduplex_cmdline_parser_free>:
jmp    1030 <RNAaliduplex_cmdline_parser_release@plt>

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

LLVM IR (-O2):
%struct.RNAaliduplex_args_info = type { i32 }
define void @RNAaliduplex_cmdline_parser_free(%struct.RNAaliduplex_args_info* %0) {
%2 = tail call i32 @RNAaliduplex_cmdline_parser_release(%struct.RNAaliduplex_args_info* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ sg_put_unaligned_be32(scalar_t__, void *);
void sg_nz_put_unaligned_be32(uint32_t val, void *p) {
  if (val)
    sg_put_unaligned_be32(val, p);
}


x86 assembly (clang, -O0):
<sg_nz_put_unaligned_be32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <sg_nz_put_unaligned_be32+0x28>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <sg_put_unaligned_be32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sg_nz_put_unaligned_be32>:
test   %rdi,%rdi
je     111a <sg_nz_put_unaligned_be32+0xa>
jmp    1030 <sg_put_unaligned_be32@plt>
ret

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

LLVM IR (-O2):
define void @sg_nz_put_unaligned_be32(i64 %0, i8* %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @sg_put_unaligned_be32(i64 %0, i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
int msm_watchdog_suspend_deferred(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @msm_watchdog_suspend_deferred() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ progress_bar(int);
int /*<<< orphan*/ progress_bar_init(char *, int);
int /*<<< orphan*/ usleep(int);
int main() {
  int i;
  progress_bar_init("demo", 100);
  for (i = 1; i <= 100; i++) {
    progress_bar(i);
    usleep(10000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x64,%esi
call   1030 <progress_bar_init@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1181 <main+0x51>
mov    -0x8(%rbp),%edi
call   1040 <progress_bar@plt>
mov    $0x2710,%edi
call   1050 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <main+0x27>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
mov    $0x64,%esi
call   1030 <progress_bar_init@plt>
mov    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1040 <progress_bar@plt>
mov    $0x2710,%edi
call   1050 <usleep@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"demo\00"
define i32 @main() {
%1 = tail call i32 @progress_bar_init(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 100)
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 1, %0 ], [ %6, %2 ]
%4 = tail call i32 @progress_bar(i32 %3)
%5 = tail call i32 @usleep(i32 10000)
%6 = add nuw nsw i32 %3, 1
%7 = icmp eq i32 %6, 101
br i1 %7, label %8, label %2
8: ; preds = %2
ret i32 0
}
/* Variables and functions */
scalar_t__ isnan(double);
void defaultsd(double *who, double def) {
  if (isnan(*who))
    *who = def;
}


x86 assembly (clang, -O0):
<defaultsd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     1145 <defaultsd+0x35>
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defaultsd>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
call   1030 <isnan@plt>
test   %rax,%rax
je     1136 <defaultsd+0x26>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @defaultsd(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = tail call i64 @isnan(double %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %2
store double %1, double* %0
br label %7
7: ; preds = %6, %2
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRF6_get(void) { return U_WMRCORENONE_get("U_WMRF6"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRF6\00"
define i32 @U_WMRF6_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRF6\00"
define i32 @U_WMRF6_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int rom_present(char *);
int tvga8900d_available() { return rom_present("trident.bin"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"trident.bin\00"
define i32 @tvga8900d_available() {
%1 = call i32 @rom_present(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [12 x i8] c"trident.bin\00"
define i32 @tvga8900d_available() {
%1 = tail call i32 @rom_present(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
double pow(double, double);
double phih_dyer(double zeta, double L) {
  double phih;
  phih = pow((1.0 - 16.0 * zeta), -0.5);
  return (phih);
}


x86 assembly (clang, -O0):
<phih_dyer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phih_dyer>:
mulsd  0xee8(%rip),%xmm0
addsd  0xee8(%rip),%xmm0
movsd  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @phih_dyer(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = call double @llvm.fmuladd.f64(double -1.600000e+01, double %6, double 1.000000e+00)
%8 = call double @pow(double %7, double -5.000000e-01)
store double %8, double* %5
%9 = load double, double* %5
ret double %9
}

LLVM IR (-O2):
define double @phih_dyer(double %0, double %1) {
%3 = tail call double @llvm.fmuladd.f64(double %0, double -1.600000e+01, double 1.000000e+00)
%4 = tail call double @pow(double %3, double -5.000000e-01)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void or_reg64_reg64(unsigned int reg1, unsigned int reg2) {
  put8(0x48);
  put8(0x09);
  put8(0xC0 | (reg2 << 3) | reg1);
}


x86 assembly (clang, -O0):
<or_reg64_reg64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x9,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x4(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<or_reg64_reg64>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x9,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0xc0,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @or_reg64_reg64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @put8(i32 72)
%6 = call i32 @put8(i32 9)
%7 = load i32, i32* %4
%8 = shl i32 %7, 3
%9 = or i32 192, %8
%10 = load i32, i32* %3
%11 = or i32 %9, %10
%12 = call i32 @put8(i32 %11)
ret void
}

LLVM IR (-O2):
define void @or_reg64_reg64(i32 %0, i32 %1) {
%3 = tail call i32 @put8(i32 72)
%4 = tail call i32 @put8(i32 9)
%5 = shl i32 %1, 3
%6 = or i32 %5, %0
%7 = or i32 %6, 192
%8 = tail call i32 @put8(i32 %7)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int cmpstr(const void *va, const void *vb) {
  const char **a = (const char **)va;
  const char **b = (const char **)vb;
  return (strcmp(*a, *b));
}


x86 assembly (clang, -O0):
<cmpstr>:
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
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpstr>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @cmpstr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @cmpstr(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ close(int const);
int /*<<< orphan*/ printf(char *);
int tcc_video_scaler_close(const int fd) {
  if (fd >= 0) {
    close(fd);
    printf("video scaler close succeed\n");
    return 0;
  } else
    printf("video scaler close error\n");
  return -1;
}


x86 assembly (clang, -O0):
<tcc_video_scaler_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1155 <tcc_video_scaler_close+0x35>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1168 <tcc_video_scaler_close+0x48>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcc_video_scaler_close>:
push   %rbx
test   %edi,%edi
js     1135 <tcc_video_scaler_close+0x15>
call   1040 <close@plt>
xor    %ebx,%ebx
lea    0xee6(%rip),%rdi
jmp    1141 <tcc_video_scaler_close+0x21>
mov    $0xffffffff,%ebx
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"video scaler close succeed\0A\00"
@.str.1 = [26 x i8] c"video scaler close error\0A\00"
define i32 @tcc_video_scaler_close(i32 %0) {
%2 = alloca i32
%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 %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 @close(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %13
10: ; preds = %1
%11 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10
store i32 -1, i32* %2
br label %13
13: ; preds = %12, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@str = [25 x i8] c"video scaler close error\00"
@str.2 = [27 x i8] c"video scaler close succeed\00"
define i32 @tcc_video_scaler_close(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ getelementptr inbounds ([27 x i8], [27 x i8]* @str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0), %1 ]
%7 = phi i32 [ 0, %3 ], [ -1, %1 ]
%8 = tail call i32 @puts(i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ im_a_dummy();
int /*<<< orphan*/ im_a_minion_01();
int testFuncNotReturn(int a, int b) {
  int sum = 0U;
  sum = a + b;
  if (10U == sum) {
    return (sum);
  } else {
    im_a_dummy();
  }
  im_a_minion_01();
  return (sum);
}


x86 assembly (clang, -O0):
<testFuncNotReturn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0xa,%eax
cmp    -0x10(%rbp),%eax
jne    1157 <testFuncNotReturn+0x37>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116b <testFuncNotReturn+0x4b>
mov    $0x0,%al
call   1040 <im_a_dummy@plt>
mov    $0x0,%al
call   1030 <im_a_minion_01@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testFuncNotReturn>:
push   %rbx
mov    %edi,%ebx
add    %esi,%ebx
cmp    $0xa,%ebx
je     1138 <testFuncNotReturn+0x18>
xor    %eax,%eax
call   1040 <im_a_dummy@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @testFuncNotReturn(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp eq i32 10, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* %6
store i32 %13, i32* %3
br label %19
14: ; preds = %2
%15 = call i32 (...) @im_a_dummy()
br label %16
16: ; preds = %14
%17 = call i32 (...) @im_a_minion_01()
%18 = load i32, i32* %6
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %12
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @testFuncNotReturn(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = icmp eq i32 %3, 10
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 (...) @im_a_dummy()
%7 = tail call i32 (...) @im_a_minion_01()
br label %8
8: ; preds = %2, %5
ret i32 %3
}
void cmp_shape_segment_deinit(struct CmpShape *segment) { (void)segment; }


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

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

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

LLVM IR (-O2):
%struct.CmpShape = type opaque
define void @cmp_shape_segment_deinit(%struct.CmpShape* nocapture %0) {
ret void
}
/* Type definitions */
struct vec3i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec3i_normalize(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
__attribute__((always_)) struct vec3i *psvec3i_normalize(struct vec3i *result,
                                                         struct vec3i *a) {
  vec3i_normalize((int32_t *)result, (int32_t *)a);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec3i_normalize>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3i_normalize@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_normalize(%struct.vec3i* %0, %struct.vec3i* %1) {
%3 = alloca %struct.vec3i*
%4 = alloca %struct.vec3i*
store %struct.vec3i* %0, %struct.vec3i** %3
store %struct.vec3i* %1, %struct.vec3i** %4
%5 = load %struct.vec3i*, %struct.vec3i** %3
%6 = bitcast %struct.vec3i* %5 to i32*
%7 = load %struct.vec3i*, %struct.vec3i** %4
%8 = bitcast %struct.vec3i* %7 to i32*
%9 = call i32 @vec3i_normalize(i32* %6, i32* %8)
%10 = load %struct.vec3i*, %struct.vec3i** %3
ret %struct.vec3i* %10
}

LLVM IR (-O2):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_normalize(%struct.vec3i* returned %0, %struct.vec3i* %1) {
%3 = getelementptr %struct.vec3i, %struct.vec3i* %0, i64 0, i32 0
%4 = getelementptr %struct.vec3i, %struct.vec3i* %1, i64 0, i32 0
%5 = tail call i32 @vec3i_normalize(i32* %3, i32* %4)
ret %struct.vec3i* %0
}
zystt() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @zystt() {
ret i32 0
}
const char *regex_Version(void) { return "regex_Ver20160426"; }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"regex_Ver20160426\00"
define i8* @regex_Version() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [18 x i8] c"regex_Ver20160426\00"
define i8* @regex_Version() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
int ares_capabilities(int capmask) {
  static int ares_caps = 0;
  return (capmask & ares_caps);
}


x86 assembly (clang, -O0):
<ares_capabilities>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    0x2f14(%rip),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@ares_capabilities.ares_caps = internal global i32 0
define i32 @ares_capabilities(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @ares_capabilities.ares_caps
%5 = and i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @ares_capabilities(i32 %0) {
ret i32 0
}
/* Variables and functions */
void frssort(unsigned char **, size_t);
void forward16(unsigned char **strings, size_t n) {
  return frssort(strings, n);
}


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

x86 assembly (clang, -O2):
<forward16>:
jmp    1030 <frssort@plt>

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

LLVM IR (-O2):
define void @forward16(i8** %0, i64 %1) {
tail call void @frssort(i8** %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ dummy();
f1(unsigned int x, unsigned int y) {
  if (x == 0)
    dummy();
  x -= y;
  if (x < ~(~(unsigned int)0 >> 1))
    abort();
  return x;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113f <f1+0x1f>
mov    $0x0,%al
call   1030 <dummy@plt>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x80000000,-0x4(%rbp)
jae    115e <f1+0x3e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
test   %edi,%edi
jne    1132 <f1+0x12>
xor    %eax,%eax
call   1030 <dummy@plt>
sub    %ebp,%ebx
jns    113f <f1+0x1f>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @f1(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 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @dummy()
br label %9
9: ; preds = %7, %2
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = sub i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = icmp ult i32 %13, -2147483648
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %9
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @dummy()
br label %6
6: ; preds = %4, %2
%7 = sub i32 %0, %1
%8 = icmp sgt i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %6
ret i32 %7
}