xunge/DecIR huggingface dataset:
__attribute__((no, noclone)) signed __int128 t170_3sub(unsigned __int128 y) {
  signed __int128 r;
  if (__builtin_sub_overflow((unsigned __int128)(0), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t170_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rax
xor    %ecx,%ecx
neg    %rdx
mov    %ecx,%edi
mov    %rdi,%rcx
sbb    %rax,%rcx
mov    %rdi,%rsi
sbb    %rsi,%rsi
sbb    %rdi,%rdi
mov    %esi,%eax
and    $0x1,%eax
neg    %rax
mov    %rax,%r8
xor    %rdi,%r8
xor    %rsi,%rax
or     %r8,%rax
mov    %rcx,%r8
sar    $0x3f,%r8
xor    %r8,%rsi
xor    %r8,%rdi
or     %rdi,%rsi
or     %rsi,%rax
setne  %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    118d <t170_3sub+0x7d>
jmp    1194 <t170_3sub+0x84>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t170_3sub>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
mov    %rdi,%rbx
neg    %rbx
sbb    %rsi,%r14
cmp    $0x1,%rdi
movabs $0x8000000000000000,%rax
sbb    %rax,%rsi
jb     113a <t170_3sub+0x2a>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t170_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = zext i128 %11 to i129
%13 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 0, i129 %12)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = sext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t170_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = sub nsw i129 0, %7
%9 = icmp ult i128 %6, -170141183460469231731687303715884105727
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
int numdb_cmp(struct dbt *table, void *a, void *b) {
  int ia, ib;
  ia = (int)a;
  ib = (int)b;
  if ((ia ^ ib) & 0x80000000)
    return ia < 0 ? -1 : 1;
  return ia - ib;
}


x86 assembly (clang, -O0):
<numdb_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
xor    -0x28(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     114d <numdb_cmp+0x4d>
mov    -0x24(%rbp),%edx
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <numdb_cmp+0x56>
mov    -0x24(%rbp),%eax
sub    -0x28(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numdb_cmp>:
mov    %edx,%ecx
xor    %esi,%ecx
mov    %esi,%eax
sar    $0x1f,%eax
or     $0x1,%eax
sub    %edx,%esi
test   $0x80000000,%ecx
cmove  %esi,%eax
ret

LLVM IR (-O0):
%struct.dbt = type opaque
define i32 @numdb_cmp(%struct.dbt* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.dbt*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store %struct.dbt* %0, %struct.dbt** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%10 = load i8*, i8** %6
%11 = ptrtoint i8* %10 to i32
store i32 %11, i32* %8
%12 = load i8*, i8** %7
%13 = ptrtoint i8* %12 to i32
store i32 %13, i32* %9
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = xor i32 %14, %15
%17 = and i32 %16, -2147483648
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %3
%20 = load i32, i32* %8
%21 = icmp slt i32 %20, 0
%22 = zext i1 %21 to i64
%23 = select i1 %21, i32 -1, i32 1
store i32 %23, i32* %4
br label %28
24: ; preds = %3
%25 = load i32, i32* %8
%26 = load i32, i32* %9
%27 = sub nsw i32 %25, %26
store i32 %27, i32* %4
br label %28
28: ; preds = %24, %19
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
%struct.dbt = type opaque
define i32 @numdb_cmp(%struct.dbt* nocapture readnone %0, i8* %1, i8* %2) {
%4 = ptrtoint i8* %1 to i64
%5 = trunc i64 %4 to i32
%6 = ptrtoint i8* %2 to i64
%7 = xor i64 %6, %4
%8 = and i64 %7, 2147483648
%9 = icmp eq i64 %8, 0
%10 = icmp sgt i32 %5, -1
%11 = select i1 %10, i32 1, i32 -1
%12 = trunc i64 %6 to i32
%13 = sub nsw i32 %5, %12
%14 = select i1 %9, i32 %13, i32 %11
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *xrealloc(void *ptr, size_t size) {
  void *t;
  t = realloc(ptr, size);
  if (t == NULL) {
    fprintf(stderr, "Could not allocate memory\n");
    exit(1);
  }
  return t;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117b <xrealloc+0x4b>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <xrealloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Could not allocate memory\0A\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Could not allocate memory\0A\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i8* %3
}
int test_01(unsigned int a) { return !(a > 0x7FFFFFFF) ? -5 : 10; }


x86 assembly (clang, -O0):
<test_01>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x7fffffff,-0x4(%rbp)
seta   %dl
xor    $0xff,%dl
mov    $0xa,%eax
mov    $0xfffffffb,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_01>:
test   %edi,%edi
mov    $0xfffffffb,%ecx
mov    $0xa,%eax
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_01(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 2147483647
%5 = xor i1 %4, true
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -5, i32 10
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_01(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = select i1 %2, i32 -5, i32 10
ret i32 %3
}
void si2cMasterSetMode(char *byte, int bit) {
  printf("%s 0x%1x %i\n", __FUNCTION__, *byte, bit);
  if (bit == 1) {
    *byte |= 1;
  } else {
    *byte &= ~(1 << 0);
  }
}


x86 assembly (clang, -O0):
<si2cMasterSetMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
mov    -0xc(%rbp),%ecx
lea    0xed0(%rip),%rdi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0xc(%rbp)
jne    1159 <si2cMasterSetMode+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
or     $0x1,%ecx
mov    %cl,(%rax)
jmp    1165 <si2cMasterSetMode+0x55>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<si2cMasterSetMode>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
movsbl (%rdi),%edx
lea    0xede(%rip),%rdi
lea    0xee4(%rip),%rsi
mov    %ebp,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x1,%ebp
sete   %al
mov    (%rbx),%cl
and    $0xfe,%cl
or     %al,%cl
mov    %cl,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%s 0x%1x %i\0A\00"
@__FUNCTION__.si2cMasterSetMode = [18 x i8] c"si2cMasterSetMode\00"
define void @si2cMasterSetMode(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i32, i32* %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.si2cMasterSetMode, i64 0, i64 0), i32 %7, i32 %8)
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = or i32 %15, 1
%17 = trunc i32 %16 to i8
store i8 %17, i8* %13
br label %24
18: ; preds = %2
%19 = load i8*, i8** %3
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = and i32 %21, -2
%23 = trunc i32 %22 to i8
store i8 %23, i8* %19
br label %24
24: ; preds = %18, %12
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s 0x%1x %i\0A\00"
@__FUNCTION__.si2cMasterSetMode = [18 x i8] c"si2cMasterSetMode\00"
define void @si2cMasterSetMode(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.si2cMasterSetMode, i64 0, i64 0), i32 %4, i32 %1)
%6 = icmp eq i32 %1, 1
%7 = load i8, i8* %0
%8 = and i8 %7, -2
%9 = zext i1 %6 to i8
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
float const fasterlog2(float);
float fasterinverseerf(float x) {
  static const float invk = 0.30004578719350504f;
  return invk * fasterlog2((1.0f + x) / (1.0f - x));
}


x86 assembly (clang, -O0):
<fasterinverseerf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedf(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  0xed2(%rip),%xmm1
subss  -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
call   1030 <fasterlog2@plt>
movaps %xmm0,%xmm1
movss  0xeb5(%rip),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fasterinverseerf>:
push   %rax
movss  0xee7(%rip),%xmm2
movaps %xmm0,%xmm1
addss  %xmm2,%xmm1
subss  %xmm0,%xmm2
divss  %xmm2,%xmm1
movaps %xmm1,%xmm0
call   1030 <fasterlog2@plt>
mulss  0xecc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@fasterinverseerf.invk = internal constant float 0x3FD333F340000000
define float @fasterinverseerf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float 1.000000e+00, %3
%5 = load float, float* %2
%6 = fsub float 1.000000e+00, %5
%7 = fdiv float %4, %6
%8 = call float @fasterlog2(float %7)
%9 = fmul float 0x3FD333F340000000, %8
ret float %9
}

LLVM IR (-O2):
define float @fasterinverseerf(float %0) {
%2 = fadd float %0, 1.000000e+00
%3 = fsub float 1.000000e+00, %0
%4 = fdiv float %2, %3
%5 = tail call float @fasterlog2(float %4)
%6 = fmul float %5, 0x3FD333F340000000
ret float %6
}
int Q_isalpha(int c) {
  if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<Q_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     111b <Q_isalpha+0x1b>
cmpl   $0x7a,-0x8(%rbp)
jle    112f <Q_isalpha+0x2f>
cmpl   $0x41,-0x8(%rbp)
jl     113b <Q_isalpha+0x3b>
cmpl   $0x5a,-0x8(%rbp)
jg     113b <Q_isalpha+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <Q_isalpha+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @Q_isalpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %15, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 65
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 90
br i1 %14, label %15, label %16
15: ; preds = %12, %6
store i32 1, i32* %2
br label %17
16: ; preds = %12, %9
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @Q_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ load_game_board();
int main(int argc, char **argv) {
  load_game_board();
  return 0;
}


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)
mov    $0x0,%al
call   1030 <load_game_board@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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
%6 = call i32 (...) @load_game_board()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @load_game_board()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SSL_library_init();
int /*<<< orphan*/ SSL_load_error_strings();
void SSL_init() {
  SSL_library_init();
  SSL_load_error_strings();
}


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

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

LLVM IR (-O0):
define void @SSL_init() {
%1 = call i32 (...) @SSL_library_init()
%2 = call i32 (...) @SSL_load_error_strings()
ret void
}

LLVM IR (-O2):
define void @SSL_init() {
%1 = tail call i32 (...) @SSL_library_init()
%2 = tail call i32 (...) @SSL_load_error_strings()
ret void
}
void ClientConnect() {}


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

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

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

LLVM IR (-O2):
define void @ClientConnect() {
ret void
}
/* Variables and functions */
char *dirname(char *);
int /*<<< orphan*/ printf(char *, char *);
char *strdup(char *);
int main(void) {
  char *s = "/root/asdasd/asdasd/aaa";
  char *b = strdup(s);
  char *ss = dirname(b);
  printf("%s\n", ss);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <dirname@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <strdup@plt>
mov    %rax,%rdi
call   1040 <dirname@plt>
lea    0xecc(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"/root/asdasd/asdasd/aaa\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strdup(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i8* @dirname(i8* %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"/root/asdasd/asdasd/aaa\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(24) i8* @strdup(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @dirname(i8* %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
int main() {
  float d, f = 3.1415;
  d = f * 2.1;
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movss  0xef5(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed7(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 0x400921CAC0000000, float* %3
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fmul double %5, 2.100000e+00
%7 = fptrunc double %6 to float
store float %7, float* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gets(char **);
int /*<<< orphan*/ puts(char **);
int main(void) {
  char *s[100];
  gets(s);
  puts(s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x330,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x330(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x330(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x330,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x320,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x320,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8*]
store i32 0, i32* %1
%3 = getelementptr inbounds [100 x i8*], [100 x i8*]* %2, i64 0, i64 0
%4 = call i32 @gets(i8** %3)
%5 = getelementptr inbounds [100 x i8*], [100 x i8*]* %2, i64 0, i64 0
%6 = call i32 @puts(i8** %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i8*]
%2 = bitcast [100 x i8*]* %1 to i8*
%3 = getelementptr inbounds [100 x i8*], [100 x i8*]* %1, i64 0, i64 0
%4 = call i32 @gets(i8** %3)
%5 = call i32 @puts(i8** %3)
ret i32 0
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int CompChemElemLex(const void *a1, const void *a2) {
  return memcmp(a1, a2, 2);
}


x86 assembly (clang, -O0):
<CompChemElemLex>:
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    $0x2,%edx
call   1030 <memcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CompChemElemLex>:
mov    $0x2,%edx
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
define i32 @CompChemElemLex(i8* %0, i8* %1) {
%3 = tail call i32 @memcmp(i8* %0, i8* %1, i32 2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_version(void) { printf("Version: %d \n", 10000); }


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

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
mov    $0x2710,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Version: %d \0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 10000)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Version: %d \0A\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 10000)
ret void
}
/* Type definitions */
typedef double uint32_t;

/* Variables and functions */
double lcg_rand(double *);
double lcg_urand(uint32_t *seed, double a, double b) {
  return a + lcg_rand(seed) * (b - a) / ((uint32_t)-1);
}


x86 assembly (clang, -O0):
<lcg_urand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <lcg_rand@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xea9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcg_urand>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <lcg_rand@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @lcg_urand(double* %0, double %1, double %2) {
%4 = alloca double*
%5 = alloca double
%6 = alloca double
store double* %0, double** %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double*, double** %4
%9 = call double @lcg_rand(double* %8)
%10 = load double, double* %6
%11 = load double, double* %5
%12 = fsub double %10, %11
%13 = fmul double %9, %12
%14 = fdiv double %13, -1.000000e+00
%15 = fadd double %7, %14
ret double %15
}

LLVM IR (-O2):
define double @lcg_urand(double* %0, double %1, double %2) {
%4 = tail call double @lcg_rand(double* %0)
%5 = fsub double %2, %1
%6 = fmul double %5, %4
%7 = fsub double %1, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void funchelp(void) {
  printf(
      "Functions: (case insensitive)\n\n    SIN         math sinus             "
      " COS        math cos   \n    ATAN        math atan               LOG    "
      "    math log   \n    LOG10       math log10              EXP        "
      "math exp   \n    SQRT        math sqrt               INT        math "
      "int   \n    ABS         math abs                                      "
      "\n\n    F2C         converting temperature -> fahrenheit to celsius \n  "
      "  C2F         converting temperature -> celsius to fahrenheit \n    "
      "IN2MM       converting length      -> inches to millimeter \n    MM2IN  "
      "     converting length      -> millimeter to inches\n    PO2KG       "
      "converting mass        -> pounds to kilogram\n    KG2PO       "
      "converting mass        -> kilogram to pounds\n\n");
}


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

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

LLVM IR (-O0):
@.str = [728 x i8] c"Functions: (case insensitive)\0A\0A SIN math sinus COS math cos \0A ATAN math atan LOG math log \0A LOG10 math log10 EXP math exp \0A SQRT math sqrt INT math int \0A ABS math abs \0A\0A F2C converting temperature -> fahrenheit to celsius \0A C2F converting temperature -> celsius to fahrenheit \0A IN2MM converting length -> inches to millimeter \0A MM2IN converting length -> millimeter to inches\0A PO2KG converting mass -> pounds to kilogram\0A KG2PO converting mass -> kilogram to pounds\0A\0A\00"
define void @funchelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([728 x i8], [728 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [727 x i8] c"Functions: (case insensitive)\0A\0A SIN math sinus COS math cos \0A ATAN math atan LOG math log \0A LOG10 math log10 EXP math exp \0A SQRT math sqrt INT math int \0A ABS math abs \0A\0A F2C converting temperature -> fahrenheit to celsius \0A C2F converting temperature -> celsius to fahrenheit \0A IN2MM converting length -> inches to millimeter \0A MM2IN converting length -> millimeter to inches\0A PO2KG converting mass -> pounds to kilogram\0A KG2PO converting mass -> kilogram to pounds\0A\00"
define void @funchelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([727 x i8], [727 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int fseek(void *, long, int /*<<< orphan*/);
int dumb_stdfile_skip(void *f, long n) { return fseek(f, n, SEEK_CUR); }


x86 assembly (clang, -O0):
<dumb_stdfile_skip>:
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    0x2eb9(%rip),%rax
mov    (%rax),%edx
call   1030 <fseek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumb_stdfile_skip>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <fseek@plt>

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define i32 @dumb_stdfile_skip(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 = load i32, i32* @SEEK_CUR
%8 = call i32 @fseek(i8* %5, i64 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define i32 @dumb_stdfile_skip(i8* nocapture %0, i64 %1) {
%3 = load i32, i32* @SEEK_CUR
%4 = tail call i32 @fseek(i8* %0, i64 %1, i32 %3)
ret i32 %4
}
void I422ToARGBRow_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @I422ToARGBRow_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cpuhead(int osvers, int osrel, int ossub) {
  printf("cpu  %%usr %%nice %%sys %%irq %%softirq  %%steal %%guest "
         " %%wait %%idle  _cpu_");
}


x86 assembly (clang, -O0):
<cpuhead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [79 x i8] c"cpu %%usr %%nice %%sys %%irq %%softirq %%steal %%guest %%wait %%idle _cpu_\00"
define void @cpuhead(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 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [79 x i8] c"cpu %%usr %%nice %%sys %%irq %%softirq %%steal %%guest %%wait %%idle _cpu_\00"
define void @cpuhead(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __le16;

/* Variables and functions */
int /*<<< orphan*/ BUG();
int /*<<< orphan*/ cpu_to_le16(unsigned int);
__le16 next3_rec_len_to_disk(unsigned len) {
  if (len == (1 << 16))
    return cpu_to_le16(((1 << 16) - 1));
  else if (len > (1 << 16))
    BUG();
  return cpu_to_le16(len);
}


x86 assembly (clang, -O0):
<next3_rec_len_to_disk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x10000,-0x8(%rbp)
jne    114a <next3_rec_len_to_disk+0x2a>
mov    $0xffff,%edi
call   1040 <cpu_to_le16@plt>
mov    %eax,-0x4(%rbp)
jmp    116e <next3_rec_len_to_disk+0x4e>
cmpl   $0x10000,-0x8(%rbp)
jbe    115e <next3_rec_len_to_disk+0x3e>
mov    $0x0,%al
call   1030 <BUG@plt>
jmp    1163 <next3_rec_len_to_disk+0x43>
mov    -0x8(%rbp),%edi
call   1040 <cpu_to_le16@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next3_rec_len_to_disk>:
push   %rbx
mov    %edi,%ebx
mov    $0xffff,%edi
cmp    $0x10000,%ebx
je     113b <next3_rec_len_to_disk+0x1b>
jbe    1139 <next3_rec_len_to_disk+0x19>
xor    %eax,%eax
call   1030 <BUG@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <cpu_to_le16@plt>

LLVM IR (-O0):
define i32 @next3_rec_len_to_disk(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 65536
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @cpu_to_le16(i32 65535)
store i32 %7, i32* %2
br label %17
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp ugt i32 %9, 65536
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @BUG()
br label %13
13: ; preds = %11, %8
br label %14
14: ; preds = %13
%15 = load i32, i32* %3
%16 = call i32 @cpu_to_le16(i32 %15)
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @next3_rec_len_to_disk(i32 %0) {
%2 = icmp eq i32 %0, 65536
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = icmp ugt i32 %0, 65536
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 (...) @BUG()
br label %7
7: ; preds = %5, %3, %1
%8 = phi i32 [ 65535, %1 ], [ %0, %3 ], [ %0, %5 ]
%9 = tail call i32 @cpu_to_le16(i32 %8)
ret i32 %9
}
/* Variables and functions */
scalar_t__ a(void *);
void *foo(void *arg) { return (void *)(long)a(arg); }


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

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <a@plt>

LLVM IR (-O0):
define i8* @foo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @a(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @foo(i8* %0) {
%2 = tail call i64 @a(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
void gtk_window_move() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_move() {
ret void
}
double Sleef_hypot_u35(double x, double y) { return __builtin_hypot(x, y); }


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

x86 assembly (clang, -O2):
<Sleef_hypot_u35>:
jmp    1030 <hypot@plt>

LLVM IR (-O0):
define double @Sleef_hypot_u35(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* %4
%7 = call double @hypot(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @Sleef_hypot_u35(double %0, double %1) {
%3 = tail call double @hypot(double %0, double %1)
ret double %3
}
int test_imm_18uint16_reg(unsigned short val) {
  return ((val) & (-0x18 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_18uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffffe8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_18uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -24
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_alrm(int signo) { printf("in sig_alrm:\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"in sig_alrm:\0A\00"
define void @sig_alrm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"in sig_alrm:\00"
define void @sig_alrm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
long long dr_max_count(long long x, long long y) { return (x < y ? y : x); }


x86 assembly (clang, -O0):
<dr_max_count>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <dr_max_count+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <dr_max_count+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dr_max_count>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @dr_max_count(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
int read_dup3_flags(char *str) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @read_dup3_flags(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ time_t;
struct timespec {
  long tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void delay(unsigned int millis) {
  struct timespec sleeper;
  sleeper.tv_sec = (time_t)(millis / 1000);
  sleeper.tv_nsec = (long)(millis % 1000) * 1000000;
  nanosleep(&sleeper, NULL);
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%eax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
imul   $0xf4240,%rax,%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
sub    $0x18,%rsp
mov    %edi,%eax
imul   $0x10624dd3,%rax,%rax
shr    $0x26,%rax
mov    %rax,0x10(%rsp)
imul   $0x3e8,%eax,%eax
sub    %eax,%edi
imul   $0xf4240,%edi,%eax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define void @delay(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = udiv i32 %4, 1000
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 %6, i64* %7
%8 = load i32, i32* %2
%9 = urem i32 %8, 1000
%10 = zext i32 %9 to i64
%11 = mul nsw i64 %10, 1000000
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i64 %11, i64* %12
%13 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define void @delay(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = udiv i32 %0, 1000
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 %5, i64* %6
%7 = urem i32 %0, 1000
%8 = mul nuw nsw i32 %7, 1000000
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i64 %9, i64* %10
%11 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
__attribute__((section(".after_vectors"))) void SVCall_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<SVCall_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SVCall_Handler+0x9>
jmp    1109 <SVCall_Handler+0x9>

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

LLVM IR (-O0):
define void @SVCall_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @SVCall_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
int getchannum(char *chan) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @getchannum(i8* nocapture readnone %0) {
ret i32 0
}
long min_l(long n1, long n2) {
  if (n1 < n2)
    return n1;
  else
    return n2;
}


x86 assembly (clang, -O0):
<min_l>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1127 <min_l+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <min_l+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_l>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @min_l(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void log(p, a, s) struct h8_opcode *p;
char *a;
int s;
{ printf("dst = srcb %s srca;\n", a); }


x86 assembly (clang, -O0):
<log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.h8_opcode = type opaque
@.str = [21 x i8] c"dst = srcb %s srca;\0A\00"
define void @log(%struct.h8_opcode* %0, i8* %1, i32 %2) {
%4 = alloca %struct.h8_opcode*
%5 = alloca i8*
%6 = alloca i32
store %struct.h8_opcode* %0, %struct.h8_opcode** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
%struct.h8_opcode = type opaque
@.str = [21 x i8] c"dst = srcb %s srca;\0A\00"
define void @log(%struct.h8_opcode* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
int __main(int ac, char **av) { return 0; }


x86 assembly (clang, -O0):
<__main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void c128acia(void) { return; }


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

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

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

LLVM IR (-O2):
define void @c128acia() {
ret void
}
int f(int a, int b, int c) {
  a -= (short)b * (short)c;
  if (!a)
    return 10;
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
movswl %ax,%ecx
mov    -0x10(%rbp),%eax
cwtl
imul   %eax,%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1138 <f+0x38>
movl   $0xa,-0x4(%rbp)
jmp    113e <f+0x3e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movswl %si,%eax
movswl %dx,%ecx
imul   %eax,%ecx
sub    %ecx,%edi
mov    $0xa,%eax
cmovne %edi,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %6
%9 = trunc i32 %8 to i16
%10 = sext i16 %9 to i32
%11 = load i32, i32* %7
%12 = trunc i32 %11 to i16
%13 = sext i16 %12 to i32
%14 = mul nsw i32 %10, %13
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, %14
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %3
store i32 10, i32* %4
br label %22
20: ; preds = %3
%21 = load i32, i32* %5
store i32 %21, i32* %4
br label %22
22: ; preds = %20, %19
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 16
%5 = ashr exact i32 %4, 16
%6 = shl i32 %2, 16
%7 = ashr exact i32 %6, 16
%8 = mul nsw i32 %7, %5
%9 = sub nsw i32 %0, %8
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 10, i32 %9
ret i32 %11
}
int kol_buffer_open(char name[], int mode, int size, char **buf) {
  int error;
  asm volatile("int $0x40"
               : "=a"(*buf), "=d"(error)
               : "a"(68), "b"(22), "c"(name), "d"(size), "S"(mode));
  return error;
}


x86 assembly (clang, -O0):
<kol_buffer_open>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%esi
mov    $0x44,%eax
mov    $0x16,%ebx
int    $0x40
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
mov    %rcx,(%rax)
mov    %edx,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_buffer_open>:
push   %rbx
mov    %rcx,%r8
mov    %rdi,%rcx
mov    $0x44,%eax
mov    $0x16,%ebx
int    $0x40
mov    %rax,(%r8)
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @kol_buffer_open(i8* %0, i32 %1, i32 %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%10 = load i8**, i8*** %8
%11 = load i8*, i8** %5
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = call { i8*, i32 } asm sideeffect "int $$0x40", "={ax},={dx},{ax},{bx},{cx},{dx},{si},~{dirflag},~{fpsr},~{flags}"(i32 68, i32 22, i8* %11, i32 %12, i32 %13)
%15 = extractvalue { i8*, i32 } %14, 0
%16 = extractvalue { i8*, i32 } %14, 1
store i8* %15, i8** %10
store i32 %16, i32* %9
%17 = load i32, i32* %9
ret i32 %17
}

LLVM IR (-O2):
define i32 @kol_buffer_open(i8* %0, i32 %1, i32 %2, i8** nocapture writeonly %3) {
%5 = tail call { i8*, i32 } asm sideeffect "int $$0x40", "={ax},={dx},{ax},{bx},{cx},{dx},{si},~{dirflag},~{fpsr},~{flags}"(i32 68, i32 22, i8* %0, i32 %2, i32 %1)
%6 = extractvalue { i8*, i32 } %5, 0
%7 = extractvalue { i8*, i32 } %5, 1
store i8* %6, i8** %3
ret i32 %7
}
const char *WavpackGetLibraryVersionString(void) { return "4.60.1"; }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"4.60.1\00"
define i8* @WavpackGetLibraryVersionString() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
void test_one(int x) {
#pragma omp target teams distribute parallel for simd
  for (int i = 0; i < x; i++)
    ;
}


x86 assembly (clang, -O0):
<test_one>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <test_one+0x2d>
jmp    111f <test_one+0x1f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <test_one+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_one(i32 %0) {
ret void
}