xunge/DecIR huggingface dataset:
int min_i(int a, int b) {
  if (a >= b)
    return b;
  return a;
}


x86 assembly (clang, -O0):
<min_i>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1121 <min_i+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min_i+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_i>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min_i(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void f29(void) {
  ({
    a:
      ({
        goto a;
        0;
      });
      ({ 0; });
      0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f29>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <f29+0x4>

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

LLVM IR (-O0):
define void @f29() {
%1 = alloca i32
%2 = alloca i32
br label %3
3: ; preds = %3, %0
br label %3
}

LLVM IR (-O2):
define void @f29() {
br label %1
1: ; preds = %1, %0
br label %1
}
short int InterruptEvent() {
  0;
  return 0;
}


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

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

LLVM IR (-O0):
define signext i16 @InterruptEvent() {
ret i16 0
}

LLVM IR (-O2):
define signext i16 @InterruptEvent() {
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ puts(char *);
int main(void) {
  int i = 9;
  assert(i == 8);
  puts("\nNu  a mai ajuns aici!");
  perror("heroare");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x9,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
lea    0xead(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <assert@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"\0ANu a mai ajuns aici!\00"
@.str.1 = [8 x i8] c"heroare\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 9, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 8
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"\0ANu a mai ajuns aici!\00"
@.str.1 = [8 x i8] c"heroare\00"
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _output_centroids(int /*<<< orphan*/);
void output_centroids() {
  _output_centroids(0);
  return;
}


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

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

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

LLVM IR (-O2):
define void @output_centroids() {
%1 = tail call i32 @_output_centroids(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ basic_xattr_test(char *);
int main(int argc, char *argv[]) { basic_xattr_test("/mnt/"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <basic_xattr_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"/mnt/\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @basic_xattr_test(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"/mnt/\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @basic_xattr_test(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
long AT_calcAllocatedSize();
long SG_Allocated(void) {
  static long allocated = 0L;
  long tmp;
  tmp = allocated;
  allocated = AT_calcAllocatedSize();
  return allocated - tmp;
}


x86 assembly (clang, -O0):
<SG_Allocated>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2f11(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <AT_calcAllocatedSize@plt>
mov    %rax,0x2eff(%rip)
mov    0x2ef8(%rip),%rax
sub    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SG_Allocated>:
push   %rbx
mov    0x2f18(%rip),%rbx
xor    %eax,%eax
call   1030 <AT_calcAllocatedSize@plt>
mov    %rax,0x2f0a(%rip)
sub    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@SG_Allocated.allocated = internal global i64 0
define i64 @SG_Allocated() {
%1 = alloca i64
%2 = load i64, i64* @SG_Allocated.allocated
store i64 %2, i64* %1
%3 = call i64 (...) @AT_calcAllocatedSize()
store i64 %3, i64* @SG_Allocated.allocated
%4 = load i64, i64* @SG_Allocated.allocated
%5 = load i64, i64* %1
%6 = sub nsw i64 %4, %5
ret i64 %6
}

LLVM IR (-O2):
@SG_Allocated.allocated = internal unnamed_addr global i64 0
define i64 @SG_Allocated() {
%1 = load i64, i64* @SG_Allocated.allocated
%2 = tail call i64 (...) @AT_calcAllocatedSize()
store i64 %2, i64* @SG_Allocated.allocated
%3 = sub nsw i64 %2, %1
ret i64 %3
}
void gdk_screen_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_screen_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_memory(char *, int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  char *str = NULL;
  printf("Memory leak test!\n");
  for (int i = 0; i < 10; i++) {
    get_memory(str, 100);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1170 <main+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x64,%esi
call   1040 <get_memory@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114a <main+0x2a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1040 <get_memory@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1040 <get_memory@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1040 <get_memory@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1040 <get_memory@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1040 <get_memory@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1040 <get_memory@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1040 <get_memory@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1040 <get_memory@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1040 <get_memory@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1040 <get_memory@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Memory leak test!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1
store i8* null, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %5
5: ; preds = %11, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = load i8*, i8** %2
%10 = call i32 @get_memory(i8* %9, i32 100)
br label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %5
14: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"Memory leak test!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @get_memory(i8* null, i32 100)
%3 = tail call i32 @get_memory(i8* null, i32 100)
%4 = tail call i32 @get_memory(i8* null, i32 100)
%5 = tail call i32 @get_memory(i8* null, i32 100)
%6 = tail call i32 @get_memory(i8* null, i32 100)
%7 = tail call i32 @get_memory(i8* null, i32 100)
%8 = tail call i32 @get_memory(i8* null, i32 100)
%9 = tail call i32 @get_memory(i8* null, i32 100)
%10 = tail call i32 @get_memory(i8* null, i32 100)
%11 = tail call i32 @get_memory(i8* null, i32 100)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int close(int);
int fclose(FILE *fp) { return close(((int)fp)); }


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

x86 assembly (clang, -O2):
<fclose>:
jmp    1030 <close@plt>

LLVM IR (-O0):
define i32 @fclose(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i32
%5 = call i32 @close(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @fclose(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @close(i32 %3)
ret i32 %4
}
/* Variables and functions */
int fc8080_video_deselect(void *, unsigned char, unsigned char, unsigned char);
int bbm_com_video_deselect(void *handle, unsigned char subch_id,
                           unsigned char buf_id, unsigned char cdi_id) {
  int res;
  res = fc8080_video_deselect(handle, subch_id, buf_id, cdi_id);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_video_deselect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %rdi,-0x8(%rbp)
mov    %dl,-0x9(%rbp)
mov    %cl,-0xa(%rbp)
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%cl
mov    -0xa(%rbp),%al
movzbl %cl,%esi
movzbl %al,%edx
movzbl -0xb(%rbp),%ecx
call   1030 <fc8080_video_deselect@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_video_deselect>:
jmp    1030 <fc8080_video_deselect@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_video_deselect(i8* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = tail call i32 @fc8080_video_deselect(i8* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3)
ret i32 %5
}
void error_print() {}


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

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

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

LLVM IR (-O2):
define void @error_print() {
ret void
}
void test1(void) {
  int i;
  i++;
  return;
}


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

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

LLVM IR (-O0):
define void @test1() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
ret void
}

LLVM IR (-O2):
define void @test1() {
ret void
}
unsigned *fn1(void) {
  int (*fpi)(int);
  int (*fpd)(double) = fpi;
  fpi = fpd;
  char *di;
  float *dp = &di;
  di = dp;
  fn2(dp, di);
  return dp;
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <fn2@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,0x8(%rsp)
mov    %rbx,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <fn2@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32* @fn1() {
%1 = alloca i32 (i32)*
%2 = alloca i32 (double)*
%3 = alloca i8*
%4 = alloca float*
%5 = load i32 (i32)*, i32 (i32)** %1
%6 = bitcast i32 (i32)* %5 to i32 (double)*
store i32 (double)* %6, i32 (double)** %2
%7 = load i32 (double)*, i32 (double)** %2
%8 = bitcast i32 (double)* %7 to i32 (i32)*
store i32 (i32)* %8, i32 (i32)** %1
%9 = bitcast i8** %3 to float*
store float* %9, float** %4
%10 = load float*, float** %4
%11 = bitcast float* %10 to i8*
store i8* %11, i8** %3
%12 = load float*, float** %4
%13 = load i8*, i8** %3
%14 = call i32 (float*, i8*, ...) bitcast (i32 (...)* @fn2 to i32 (float*, i8*, ...)*)(float* %12, i8* %13)
%15 = load float*, float** %4
%16 = bitcast float* %15 to i32*
ret i32* %16
}

LLVM IR (-O2):
define i32* @fn1() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = bitcast i8** %1 to float*
%4 = bitcast i8** %1 to i8***
store i8** %1, i8*** %4
%5 = call i32 (float*, i8*, ...) bitcast (i32 (...)* @fn2 to i32 (float*, i8*, ...)*)(float* %3, i8* %2)
%6 = bitcast i8** %1 to i32*
ret i32* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void test_section(const char *section) {
  printf("\r\n"
         "\x1b[97m"
         "%s"
         "\x1b[0m"
         "\r\n",
         section);
}


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

x86 assembly (clang, -O2):
<test_section>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\0D\0A\1B[97m%s\1B[0m\0D\0A\00"
define void @test_section(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0D\0A\1B[97m%s\1B[0m\0D\0A\00"
define void @test_section(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
float __nv_asinhf(float);
float asinhf(float __a) { return __nv_asinhf(__a); }


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

x86 assembly (clang, -O2):
<asinhf>:
jmp    1030 <__nv_asinhf@plt>

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

LLVM IR (-O2):
define float @asinhf(float %0) {
%2 = tail call float @__nv_asinhf(float %0)
ret float %2
}
void VIM_MAPI_ISR_OneFrameDone(void) {}


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

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

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

LLVM IR (-O2):
define void @VIM_MAPI_ISR_OneFrameDone() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int errno;
int /*<<< orphan*/ perror(char *);
void catch_error(int err) {
  if (err) {
    if (err != -1) {
      errno = err;
    }
    perror("PThread error");
    abort();
  }
}


x86 assembly (clang, -O0):
<catch_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115e <catch_error+0x3e>
cmpl   $0xffffffff,-0x4(%rbp)
je     114b <catch_error+0x2b>
mov    -0x4(%rbp),%ecx
mov    0x2e97(%rip),%rax
mov    %ecx,(%rax)
lea    0xeae(%rip),%rdi
call   1040 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catch_error>:
test   %edi,%edi
jne    1125 <catch_error+0x5>
ret
push   %rax
cmp    $0xffffffff,%edi
je     1134 <catch_error+0x14>
mov    0x2eae(%rip),%rax
mov    %edi,(%rax)
lea    0xec5(%rip),%rdi
call   1040 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@errno = global i32 0
@.str = [14 x i8] c"PThread error\00"
define void @catch_error(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = load i32, i32* %2
store i32 %9, i32* @errno
br label %10
10: ; preds = %8, %5
%11 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %1
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [14 x i8] c"PThread error\00"
define void @catch_error(i32 %0) {
switch i32 %0, label %2 [
i32 0, label %6
i32 -1, label %3
]
2: ; preds = %1
store i32 %0, i32* @errno
br label %3
3: ; preds = %1, %2
%4 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
/* Type definitions */
struct trienode {
  int dummy;
};

/* Variables and functions */
struct trienode *make_trienode();
void init_trie_root(struct trienode **root) {
  if (!root) {
    return;
  }
  *root = make_trienode();
}


x86 assembly (clang, -O0):
<init_trie_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <init_trie_root+0x1c>
jmp    113d <init_trie_root+0x2d>
mov    $0x0,%al
call   1030 <make_trienode@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_trie_root>:
test   %rdi,%rdi
je     1124 <init_trie_root+0x14>
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <make_trienode@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.trienode = type { i32 }
define void @init_trie_root(%struct.trienode** %0) {
%2 = alloca %struct.trienode**
store %struct.trienode** %0, %struct.trienode*** %2
%3 = load %struct.trienode**, %struct.trienode*** %2
%4 = icmp ne %struct.trienode** %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = call %struct.trienode* (...) @make_trienode()
%8 = load %struct.trienode**, %struct.trienode*** %2
store %struct.trienode* %7, %struct.trienode** %8
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.trienode = type { i32 }
define void @init_trie_root(%struct.trienode** writeonly %0) {
%2 = icmp eq %struct.trienode** %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call %struct.trienode* (...) @make_trienode()
store %struct.trienode* %4, %struct.trienode** %0
br label %5
5: ; preds = %1, %3
ret void
}
/* Type definitions */
struct percpu_counter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ percpu_counter_add(struct percpu_counter *, int);
__attribute__((always_)) void percpu_counter_dec(struct percpu_counter *fbc) {
  percpu_counter_add(fbc, -1);
}


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

x86 assembly (clang, -O2):
<percpu_counter_dec>:
mov    $0xffffffff,%esi
jmp    1030 <percpu_counter_add@plt>

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

LLVM IR (-O2):
%struct.percpu_counter = type { i32 }
define void @percpu_counter_dec(%struct.percpu_counter* %0) {
%2 = tail call i32 @percpu_counter_add(%struct.percpu_counter* %0, i32 -1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *, char *);
void print_error(char *msg) {
  printf("\n Error: %s \n", msg);
  abort();
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<print_error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"\0A Error: %s \0A\00"
define void @print_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"\0A Error: %s \0A\00"
define void @print_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *str_free(char *str) {
  if (str)
    free(str);
  return NULL;
}


x86 assembly (clang, -O0):
<str_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <str_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_free>:
test   %rdi,%rdi
je     111f <str_free+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @str_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret i8* null
}
/* Type definitions */
struct mtop {
  int mt_count;
  int /*<<< orphan*/ mt_op;
};

/* Variables and functions */
int /*<<< orphan*/ MTIOCTOP;
int /*<<< orphan*/ MTTELL;
int ioctl(int, int /*<<< orphan*/, struct mtop *);
int tell_tape(int fd) {
  struct mtop mtop;
  mtop.mt_op = MTTELL;
  mtop.mt_count = 1;
  return ioctl(fd, MTIOCTOP, &mtop);
}


x86 assembly (clang, -O0):
<tell_tape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tell_tape>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
movl   $0x1,(%rsp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.mtop = type { i32, i32 }
@MTTELL = global i32 0
@MTIOCTOP = global i32 0
define i32 @tell_tape(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.mtop
store i32 %0, i32* %2
%4 = load i32, i32* @MTTELL
%5 = getelementptr inbounds %struct.mtop, %struct.mtop* %3, i32 0, i32 1
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.mtop, %struct.mtop* %3, i32 0, i32 0
store i32 1, i32* %6
%7 = load i32, i32* %2
%8 = load i32, i32* @MTIOCTOP
%9 = call i32 @ioctl(i32 %7, i32 %8, %struct.mtop* %3)
ret i32 %9
}

LLVM IR (-O2):
%struct.mtop = type { i32, i32 }
@MTTELL = global i32 0
@MTIOCTOP = global i32 0
define i32 @tell_tape(i32 %0) {
%2 = alloca %struct.mtop
%3 = bitcast %struct.mtop* %2 to i8*
%4 = load i32, i32* @MTTELL
%5 = getelementptr inbounds %struct.mtop, %struct.mtop* %2, i64 0, i32 1
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.mtop, %struct.mtop* %2, i64 0, i32 0
store i32 1, i32* %6
%7 = load i32, i32* @MTIOCTOP
%8 = call i32 @ioctl(i32 %0, i32 %7, %struct.mtop* %2)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *name) {
  printf("Warning : This program will work only on Valleyview\n"
         "Usage: %s <port> <reg>\n"
         "\t port/reg : in 0xXXXX format\n",
         name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [106 x i8] c"Warning : This program will work only on Valleyview\0AUsage: %s <port> <reg>\0A\09 port/reg : in 0xXXXX format\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [106 x i8] c"Warning : This program will work only on Valleyview\0AUsage: %s <port> <reg>\0A\09 port/reg : in 0xXXXX format\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xd7() {
  Assert_real((isupper(215) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              1080, ("isupper should be 0 for 0xd7"));
}


x86 assembly (clang, -O0):
<t_isupper_0xd7>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd7,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x438,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0xd7>:
push   %rax
mov    $0xd7,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x438,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xd7\00"
define void @t_isupper_0xd7() {
%1 = call i64 @isupper(i32 215)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1080, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xd7\00"
define void @t_isupper_0xd7() {
%1 = tail call i64 @isupper(i32 215)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1080, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fabs(double);
int is_valid_lnglat(double lng, double lat) {
  return fabs(lat) <= 90. && fabs(lng) <= 180.;
}


x86 assembly (clang, -O0):
<is_valid_lnglat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
xor    %eax,%eax
movsd  0xec6(%rip),%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jb     1167 <is_valid_lnglat+0x57>
movsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xeab(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_lnglat>:
push   %rax
movsd  %xmm0,(%rsp)
movaps %xmm1,%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x5a,%ecx
jg     113e <is_valid_lnglat+0x2e>
movsd  (%rsp),%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xb5,%ecx
setl   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_valid_lnglat(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = call i32 @fabs(double %5)
%7 = sitofp i32 %6 to double
%8 = fcmp ole double %7, 9.000000e+01
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load double, double* %3
%11 = call i32 @fabs(double %10)
%12 = sitofp i32 %11 to double
%13 = fcmp ole double %12, 1.800000e+02
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ false, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_valid_lnglat(double %0, double %1) {
%3 = tail call i32 @fabs(double %1)
%4 = icmp slt i32 %3, 91
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @fabs(double %0)
%7 = icmp slt i32 %6, 181
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
scalar_t__ WOMallocShouldFail();
int /*<<< orphan*/ errno;
void *malloc(size_t);
void *WOMalloc(size_t size) {
  if (WOMallocShouldFail()) {
    errno = ENOMEM;
    return NULL;
  }
  return malloc(size);
}


x86 assembly (clang, -O0):
<WOMalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <WOMallocShouldFail@plt>
cmp    $0x0,%rax
je     115c <WOMalloc+0x3c>
mov    0x2e9c(%rip),%rax
mov    (%rax),%ecx
mov    0x2e8b(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    1169 <WOMalloc+0x49>
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WOMalloc>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <WOMallocShouldFail@plt>
test   %rax,%rax
je     1146 <WOMalloc+0x26>
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    0x2e98(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <malloc@plt>

LLVM IR (-O0):
@ENOMEM = global i32 0
@errno = global i32 0
define i8* @WOMalloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
store i64 %0, i64* %3
%4 = call i64 (...) @WOMallocShouldFail()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* @ENOMEM
store i32 %7, i32* @errno
store i8* null, i8** %2
br label %11
8: ; preds = %1
%9 = load i64, i64* %3
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %2
br label %11
11: ; preds = %8, %6
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
define noalias i8* @WOMalloc(i64 %0) {
%2 = tail call i64 (...) @WOMallocShouldFail()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = load i32, i32* @ENOMEM
store i32 %5, i32* @errno
br label %8
6: ; preds = %1
%7 = tail call i8* @malloc(i64 %0)
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ null, %4 ], [ %7, %6 ]
ret i8* %9
}
int dd_gt_dd_d(const double *a, double b) {
  return (a[0] > b || (a[0] == b && a[1] > 0.0)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<dd_gt_dd_d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x1,%al
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x11(%rbp)
ja     115f <dd_gt_dd_d+0x5f>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x12(%rbp)
jne    1159 <dd_gt_dd_d+0x59>
jp     1159 <dd_gt_dd_d+0x59>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_gt_dd_d>:
movsd  (%rdi),%xmm1
mov    $0x1,%eax
ucomisd %xmm0,%xmm1
ja     1129 <dd_gt_dd_d+0x29>
ucomisd %xmm0,%xmm1
jne    112a <dd_gt_dd_d+0x2a>
jp     112a <dd_gt_dd_d+0x2a>
movsd  0x8(%rdi),%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @dd_gt_dd_d(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 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double, double* %4
%9 = fcmp ogt double %7, %8
br i1 %9, label %23, label %10
10: ; preds = %2
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = load double, double* %4
%15 = fcmp oeq double %13, %14
br i1 %15, label %16, label %21
16: ; preds = %10
%17 = load double*, double** %3
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = fcmp ogt double %19, 0.000000e+00
br label %21
21: ; preds = %16, %10
%22 = phi i1 [ false, %10 ], [ %20, %16 ]
br label %23
23: ; preds = %21, %2
%24 = phi i1 [ true, %2 ], [ %22, %21 ]
%25 = zext i1 %24 to i64
%26 = select i1 %24, i32 1, i32 0
ret i32 %26
}

LLVM IR (-O2):
define i32 @dd_gt_dd_d(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = fcmp ogt double %3, %1
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = fcmp oeq double %3, %1
br i1 %6, label %7, label %12
7: ; preds = %5
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = fcmp ogt double %9, 0.000000e+00
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %5, %7, %2
%13 = phi i32 [ 1, %2 ], [ 0, %5 ], [ %11, %7 ]
ret i32 %13
}
/* Type definitions */
struct sigaction {
  int /*<<< orphan*/ sa_handler;
};

/* Variables and functions */
int /*<<< orphan*/ SIGTSTP;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sigaction(int /*<<< orphan*/, struct sigaction *,
                             struct sigaction *);
void stop_process(void) {
  struct sigaction new, old;
  new.sa_handler = SIG_DFL;
  sigaction(SIGTSTP, &new, &old);
  kill(0, SIGTSTP);
  sigaction(SIGTSTP, &old, NULL);
}


x86 assembly (clang, -O0):
<stop_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <sigaction@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1040 <kill@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_process>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x8(%rsp)
mov    0x2ead(%rip),%rbx
mov    (%rbx),%edi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdx
call   1030 <sigaction@plt>
mov    (%rbx),%esi
xor    %edi,%edi
call   1040 <kill@plt>
mov    (%rbx),%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sigaction = type { i32 }
@SIG_DFL = global i32 0
@SIGTSTP = global i32 0
define void @stop_process() {
%1 = alloca %struct.sigaction
%2 = alloca %struct.sigaction
%3 = load i32, i32* @SIG_DFL
%4 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i32 0, i32 0
store i32 %3, i32* %4
%5 = load i32, i32* @SIGTSTP
%6 = call i32 @sigaction(i32 %5, %struct.sigaction* %1, %struct.sigaction* %2)
%7 = load i32, i32* @SIGTSTP
%8 = call i32 @kill(i32 0, i32 %7)
%9 = load i32, i32* @SIGTSTP
%10 = call i32 @sigaction(i32 %9, %struct.sigaction* %2, %struct.sigaction* null)
ret void
}

LLVM IR (-O2):
%struct.sigaction = type { i32 }
@SIG_DFL = global i32 0
@SIGTSTP = global i32 0
define void @stop_process() {
%1 = alloca %struct.sigaction
%2 = alloca %struct.sigaction
%3 = bitcast %struct.sigaction* %1 to i8*
%4 = bitcast %struct.sigaction* %2 to i8*
%5 = load i32, i32* @SIG_DFL
%6 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 0
store i32 %5, i32* %6
%7 = load i32, i32* @SIGTSTP
%8 = call i32 @sigaction(i32 %7, %struct.sigaction* %1, %struct.sigaction* %2)
%9 = load i32, i32* @SIGTSTP
%10 = call i32 @kill(i32 0, i32 %9)
%11 = load i32, i32* @SIGTSTP
%12 = call i32 @sigaction(i32 %11, %struct.sigaction* %2, %struct.sigaction* null)
ret void
}
/* Type definitions */
struct kdtree {
  int dummy;
};
struct kdres {
  int dummy;
};

/* Variables and functions */
struct kdres *kd_nearest_range(struct kdtree *, double *, double);
struct kdres *kd_nearest_range2(struct kdtree *tree, double x, double y,
                                double range) {
  double pos[2];
  pos[0] = x;
  pos[1] = y;
  return kd_nearest_range(tree, pos, range);
}


x86 assembly (clang, -O0):
<kd_nearest_range2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
movsd  -0x20(%rbp),%xmm0
call   1030 <kd_nearest_range@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kd_nearest_range2>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
movsd  %xmm1,0x8(%rsp)
mov    %rsp,%rsi
movaps %xmm2,%xmm0
call   1030 <kd_nearest_range@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.kdres = type { i32 }
%struct.kdtree = type { i32 }
define %struct.kdres* @kd_nearest_range2(%struct.kdtree* %0, double %1, double %2, double %3) {
%5 = alloca %struct.kdtree*
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca [2 x double]
store %struct.kdtree* %0, %struct.kdtree** %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%10 = load double, double* %6
%11 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
store double %10, double* %11
%12 = load double, double* %7
%13 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 1
store double %12, double* %13
%14 = load %struct.kdtree*, %struct.kdtree** %5
%15 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%16 = load double, double* %8
%17 = call %struct.kdres* @kd_nearest_range(%struct.kdtree* %14, double* %15, double %16)
ret %struct.kdres* %17
}

LLVM IR (-O2):
%struct.kdres = type { i32 }
%struct.kdtree = type { i32 }
define %struct.kdres* @kd_nearest_range2(%struct.kdtree* %0, double %1, double %2, double %3) {
%5 = alloca [2 x double]
%6 = bitcast [2 x double]* %5 to i8*
%7 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
store double %1, double* %7
%8 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 1
store double %2, double* %8
%9 = call %struct.kdres* @kd_nearest_range(%struct.kdtree* %0, double* %7, double %3)
ret %struct.kdres* %9
}
/* Variables and functions */
int /*<<< orphan*/ cwrapper_q_sort_int(int *, int /*<<< orphan*/, int);
void quicksort_int_(int numbers[], int *array_size) {
  cwrapper_q_sort_int(numbers, 0, (*array_size) - 1);
}


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

x86 assembly (clang, -O2):
<quicksort_int_>:
mov    (%rsi),%edx
add    $0xffffffff,%edx
xor    %esi,%esi
jmp    1030 <cwrapper_q_sort_int@plt>

LLVM IR (-O0):
define void @quicksort_int_(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 = load i32, i32* %6
%8 = sub nsw i32 %7, 1
%9 = call i32 @cwrapper_q_sort_int(i32* %5, i32 0, i32 %8)
ret void
}

LLVM IR (-O2):
define void @quicksort_int_(i32* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = add nsw i32 %3, -1
%5 = tail call i32 @cwrapper_q_sort_int(i32* %0, i32 0, i32 %4)
ret void
}
void ori_accelerate(const struct ori_dis *d1, const struct ori_dis *d2,
                    struct ori_dis *d3) {}


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

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

LLVM IR (-O0):
%struct.ori_dis = type opaque
define void @ori_accelerate(%struct.ori_dis* %0, %struct.ori_dis* %1, %struct.ori_dis* %2) {
%4 = alloca %struct.ori_dis*
%5 = alloca %struct.ori_dis*
%6 = alloca %struct.ori_dis*
store %struct.ori_dis* %0, %struct.ori_dis** %4
store %struct.ori_dis* %1, %struct.ori_dis** %5
store %struct.ori_dis* %2, %struct.ori_dis** %6
ret void
}

LLVM IR (-O2):
%struct.ori_dis = type opaque
define void @ori_accelerate(%struct.ori_dis* nocapture %0, %struct.ori_dis* nocapture %1, %struct.ori_dis* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
void *handler1(void *arg) {
  int *num = (int *)arg;
  while (1) {
    printf("handler1 is running:%d\n", *num);
    sleep(1);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<handler1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1134 <handler1+0x14>

x86 assembly (clang, -O2):
<handler1>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%r14
xchg   %ax,%ax
mov    (%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <handler1+0x10>

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

LLVM IR (-O2):
@.str = [24 x i8] c"handler1 is running:%d\0A\00"
define noalias i8* @handler1(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
br label %3
3: ; preds = %3, %1
%4 = load i32, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @sleep(i32 1)
br label %3
}
void ff_hevc_put_hevc_bi_w_qpel_h32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_h32_10_sse4() {
ret void
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
int8_t bmax_int8(int8_t a, int8_t b) { return (a > b ? a : b); }


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

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

LLVM IR (-O0):
define i64 @bmax_int8(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 sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @bmax_int8(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void D13(void) { printf("Test4\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"Test4\00"
define void @D13() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct inode_type {
  int dummy;
};
typedef int int32_t;

/* Variables and functions */
int32_t romfs_make_inode(struct inode_type *dir_inode,
                         struct inode_type **new_inode) {
  return -30;
}


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

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

LLVM IR (-O0):
%struct.inode_type = type { i32 }
define i32 @romfs_make_inode(%struct.inode_type* %0, %struct.inode_type** %1) {
%3 = alloca %struct.inode_type*
%4 = alloca %struct.inode_type**
store %struct.inode_type* %0, %struct.inode_type** %3
store %struct.inode_type** %1, %struct.inode_type*** %4
ret i32 -30
}

LLVM IR (-O2):
%struct.inode_type = type { i32 }
define i32 @romfs_make_inode(%struct.inode_type* nocapture readnone %0, %struct.inode_type** nocapture readnone %1) {
ret i32 -30
}