xunge/DecIR huggingface dataset:
int LZ4HC_getSearchNum(int compressionLevel) {
  switch (compressionLevel) {
  default:
    return 0;
  case 11:
    return 128;
  case 12:
    return 1 << 10;
  }
}


x86 assembly (clang, -O0):
<LZ4HC_getSearchNum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xb,%eax
je     1138 <LZ4HC_getSearchNum+0x38>
jmp    111b <LZ4HC_getSearchNum+0x1b>
mov    -0xc(%rbp),%eax
sub    $0xc,%eax
je     1144 <LZ4HC_getSearchNum+0x44>
jmp    112c <LZ4HC_getSearchNum+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    114b <LZ4HC_getSearchNum+0x4b>
movl   $0x80,-0x4(%rbp)
jmp    114b <LZ4HC_getSearchNum+0x4b>
movl   $0x400,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4HC_getSearchNum>:
xor    %ecx,%ecx
cmp    $0xc,%edi
sete   %cl
shl    $0xa,%ecx
cmp    $0xb,%edi
mov    $0x80,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @LZ4HC_getSearchNum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %5 [
i32 11, label %6
i32 12, label %7
]
5: ; preds = %1
store i32 0, i32* %2
br label %8
6: ; preds = %1
store i32 128, i32* %2
br label %8
7: ; preds = %1
store i32 1024, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @LZ4HC_getSearchNum(i32 %0) {
%2 = icmp eq i32 %0, 12
%3 = select i1 %2, i32 1024, i32 0
%4 = icmp eq i32 %0, 11
%5 = select i1 %4, i32 128, i32 %3
ret i32 %5
}
void nand_addr(unsigned char addr) {
  *((unsigned volatile char *)0x7020000C) = addr;
}


x86 assembly (clang, -O0):
<nand_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%cl
mov    $0x7020000c,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nand_addr>:
mov    %dil,0x7020000c
70
ret

LLVM IR (-O0):
define void @nand_addr(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
store volatile i8 %3, i8* inttoptr (i64 1881145356 to i8*)
ret void
}

LLVM IR (-O2):
define void @nand_addr(i8 zeroext %0) {
store volatile i8 %0, i8* inttoptr (i64 1881145356 to i8*)
ret void
}
/* Variables and functions */
unsigned int sqrt(unsigned int);
int isPrime(unsigned int num) {
  unsigned int i;
  for (i = 2; i <= sqrt(num); i++) {
    if (num % i == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
ja     116d <isPrime+0x5d>
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
cmp    $0x0,%edx
jne    115a <isPrime+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1174 <isPrime+0x64>
jmp    115f <isPrime+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <isPrime+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <sqrt@plt>
cmp    $0x2,%eax
jb     114a <isPrime+0x3a>
mov    $0x2,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %ecx,%ecx
mov    %ebx,%eax
xor    %edx,%edx
div    %ebp
test   %edx,%edx
je     114f <isPrime+0x3f>
add    $0x1,%ebp
mov    %ebx,%edi
call   1030 <sqrt@plt>
cmp    %eax,%ebp
jbe    1130 <isPrime+0x20>
mov    $0x1,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isPrime(i32 %0) {
%2 = tail call i32 @sqrt(i32 %0)
%3 = icmp ult i32 %2, 2
br i1 %3, label %12, label %7
4: ; preds = %7
%5 = tail call i32 @sqrt(i32 %0)
%6 = icmp ugt i32 %11, %5
br i1 %6, label %12, label %7
7: ; preds = %1, %4
%8 = phi i32 [ %11, %4 ], [ 2, %1 ]
%9 = urem i32 %0, %8
%10 = icmp eq i32 %9, 0
%11 = add i32 %8, 1
br i1 %10, label %12, label %4
12: ; preds = %7, %4, %1
%13 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %13
}
void yy_4_ValidXmlAttribute(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_4_ValidXmlAttribute(i8* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
struct timeval {
  unsigned int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ select(int /*<<< orphan*/, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          struct timeval *);
void mySleep(unsigned int seconds) {
  struct timeval timeout;
  timeout.tv_sec = seconds;
  timeout.tv_usec = 0;
  select(0, NULL, NULL, NULL, &timeout);
}


x86 assembly (clang, -O0):
<mySleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x18(%rbp),%r8
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <select@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mySleep>:
sub    $0x18,%rsp
mov    %edi,0x8(%rsp)
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%r8
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <select@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define void @mySleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timeval
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
store i64 0, i64* %6
%7 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %3)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define void @mySleep(i32 %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
store i32 %0, i32* %4
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
store i64 0, i64* %5
%6 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %2)
ret void
}
void ARGBToJ420() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToJ420() {
ret void
}
void pathconN_nm5_decref(void) {}


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

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

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

LLVM IR (-O2):
define void @pathconN_nm5_decref() {
ret void
}
/* Variables and functions */
char *es_comment_to_string(const char *comment) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @es_comment_to_string(i8* nocapture readnone %0) {
ret i8* null
}
void sem_up(int sem) { ++sem; }


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

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

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

LLVM IR (-O2):
define void @sem_up(i32 %0) {
ret void
}
long double fun_long_double(void) { return 3.5; }


x86 assembly (clang, -O0):
<fun_long_double>:
push   %rbp
mov    %rsp,%rbp
flds   0xef6(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_long_double>:
flds   0xefa(%rip)
ret

LLVM IR (-O0):
define x86_fp80 @fun_long_double() {
ret x86_fp80 0xK4000E000000000000000
}

LLVM IR (-O2):
define x86_fp80 @fun_long_double() {
ret x86_fp80 0xK4000E000000000000000
}
int main() {
  int a;
  a = 5;
  int b;
  b = 2;
  return (a + 1) % (b + 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
%8 = srem i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void gtk_label_get_selectable() {}


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

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

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

LLVM IR (-O2):
define void @gtk_label_get_selectable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ s3_1();
int /*<<< orphan*/ s3_2();
int /*<<< orphan*/ s3_3();
int /*<<< orphan*/ s3_4();
int /*<<< orphan*/ s3_5();
void test_s3() {
  s3_1();
  s3_2();
  s3_3();
  s3_4();
  s3_5();
}


x86 assembly (clang, -O0):
<test_s3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <s3_1@plt>
mov    $0x0,%al
call   1040 <s3_2@plt>
mov    $0x0,%al
call   1050 <s3_3@plt>
mov    $0x0,%al
call   1030 <s3_4@plt>
mov    $0x0,%al
call   1070 <s3_5@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_s3>:
push   %rax
xor    %eax,%eax
call   1060 <s3_1@plt>
xor    %eax,%eax
call   1040 <s3_2@plt>
xor    %eax,%eax
call   1050 <s3_3@plt>
xor    %eax,%eax
call   1030 <s3_4@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <s3_5@plt>

LLVM IR (-O0):
define void @test_s3() {
%1 = call i32 (...) @s3_1()
%2 = call i32 (...) @s3_2()
%3 = call i32 (...) @s3_3()
%4 = call i32 (...) @s3_4()
%5 = call i32 (...) @s3_5()
ret void
}

LLVM IR (-O2):
define void @test_s3() {
%1 = tail call i32 (...) @s3_1()
%2 = tail call i32 (...) @s3_2()
%3 = tail call i32 (...) @s3_3()
%4 = tail call i32 (...) @s3_4()
%5 = tail call i32 (...) @s3_5()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LPI2C1_DriverIRQHandler();
__attribute__((weak)) void LPI2C1_IRQHandler(void) {
  LPI2C1_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @LPI2C1_IRQHandler() {
%1 = call i32 (...) @LPI2C1_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @LPI2C1_IRQHandler() {
%1 = tail call i32 (...) @LPI2C1_DriverIRQHandler()
ret void
}
/* Variables and functions */
void *fixup_null_alloc(size_t);
void *malloc(size_t);
void *xmalloc(size_t n) {
  void *p;
  p = malloc(n);
  if (p == NULL)
    p = fixup_null_alloc(n);
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1151 <xmalloc+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <fixup_null_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1130 <xmalloc+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fixup_null_alloc@plt>

LLVM IR (-O0):
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i64, i64* %2
%10 = call i8* @fixup_null_alloc(i64 %9)
store i8* %10, i8** %3
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @fixup_null_alloc(i64 %0)
br label %6
6: ; preds = %4, %1
%7 = phi i8* [ %5, %4 ], [ %2, %1 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ init();
int x_get_control(int, int);
int v4l2_get_control(int fd, int id) {
  init();
  return x_get_control(fd, id);
}


x86 assembly (clang, -O0):
<v4l2_get_control>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <init@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <x_get_control@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4l2_get_control>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <init@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <x_get_control@plt>

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

LLVM IR (-O2):
define i32 @v4l2_get_control(i32 %0, i32 %1) {
%3 = tail call i32 (...) @init()
%4 = tail call i32 @x_get_control(i32 %0, i32 %1)
ret i32 %4
}
void devpts_del_ref(struct inode *ptmx_inode) {}


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
define void @devpts_del_ref(%struct.inode* nocapture %0) {
ret void
}
void c_vector3_divide_scalar(float *vector, float scalar) {
  float one_over_scalar = 1.0f / scalar;
  vector[0] *= one_over_scalar;
  vector[1] *= one_over_scalar;
  vector[2] *= one_over_scalar;
}


x86 assembly (clang, -O0):
<c_vector3_divide_scalar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  0xeeb(%rip),%xmm0
divss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulss  (%rax),%xmm0
movss  %xmm0,(%rax)
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
movss  %xmm0,0x4(%rax)
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x8(%rax),%xmm0
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_vector3_divide_scalar>:
movss  0xef8(%rip),%xmm1
divss  %xmm0,%xmm1
movss  (%rdi),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rdi),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,0x4(%rdi)
mulss  0x8(%rdi),%xmm1
movss  %xmm1,0x8(%rdi)
ret

LLVM IR (-O0):
define void @c_vector3_divide_scalar(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
%5 = alloca float
store float* %0, float** %3
store float %1, float* %4
%6 = load float, float* %4
%7 = fdiv float 1.000000e+00, %6
store float %7, float* %5
%8 = load float, float* %5
%9 = load float*, float** %3
%10 = getelementptr inbounds float, float* %9, i64 0
%11 = load float, float* %10
%12 = fmul float %11, %8
store float %12, float* %10
%13 = load float, float* %5
%14 = load float*, float** %3
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %16, %13
store float %17, float* %15
%18 = load float, float* %5
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = fmul float %21, %18
store float %22, float* %20
ret void
}

LLVM IR (-O2):
define void @c_vector3_divide_scalar(float* nocapture %0, float %1) {
%3 = fdiv float 1.000000e+00, %1
%4 = load float, float* %0
%5 = fmul float %3, %4
store float %5, float* %0
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = fmul float %3, %7
store float %8, float* %6
%9 = getelementptr inbounds float, float* %0, i64 2
%10 = load float, float* %9
%11 = fmul float %3, %10
store float %11, float* %9
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *amp_default_alloc(void *dummy_allocator_context, size_t bytes_to_allocate,
                        char const *filename, int line) {
  (void)dummy_allocator_context;
  (void)filename;
  (void)line;
  return malloc(bytes_to_allocate);
}


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

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

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

LLVM IR (-O2):
define noalias i8* @amp_default_alloc(i8* nocapture readnone %0, i64 %1, i8* nocapture readnone %2, i32 %3) {
%5 = tail call i8* @malloc(i64 %1)
ret i8* %5
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int write_multprec_start_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(495, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<write_multprec_start_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1ef,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_multprec_start_solutions>:
mov    $0x1ef,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @write_multprec_start_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 495, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_multprec_start_solutions() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 495, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
void *pvalloc(size_t);
void *__libc_pvalloc(size_t size) { return pvalloc(size); }


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

x86 assembly (clang, -O2):
<__libc_pvalloc>:
jmp    1030 <pvalloc@plt>

LLVM IR (-O0):
define i8* @__libc_pvalloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @pvalloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @__libc_pvalloc(i64 %0) {
%2 = tail call i8* @pvalloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x79() {
  Assert_real((ispunct(121) == 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_ispunct.c",
              610, ("ispunct should be 0 for y"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x79>:
push   %rax
mov    $0x79,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x262,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for y\00"
define void @t_ispunct_0x79() {
%1 = call i64 @ispunct(i32 121)
%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 610, i8* getelementptr inbounds ([26 x i8], [26 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for y\00"
define void @t_ispunct_0x79() {
%1 = tail call i64 @ispunct(i32 121)
%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 610, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int numLength(int num) {
  int count = 0;
  if (num < 0) {
    num *= -1;
  }
  while (num > 0) {
    num /= 10;
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<numLength>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111f <numLength+0x1f>
imul   $0xffffffff,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <numLength+0x24>
cmpl   $0x0,-0x4(%rbp)
jle    114a <numLength+0x4a>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <numLength+0x24>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numLength>:
test   %edi,%edi
je     1135 <numLength+0x35>
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
xor    %eax,%eax
mov    $0xcccccccd,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,%esi
imul   %rdx,%rsi
shr    $0x23,%rsi
add    $0x1,%eax
cmp    $0x9,%ecx
mov    %esi,%ecx
ja     1120 <numLength+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @numLength(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ 0, %3 ]
%7 = phi i32 [ %8, %5 ], [ %4, %3 ]
%8 = udiv i32 %7, 10
%9 = add nuw nsw i32 %6, 1
%10 = icmp ult i32 %7, 10
br i1 %10, label %11, label %5
11: ; preds = %5, %1
%12 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %12
}
/* Variables and functions */
int open(char const *, int /*<<< orphan*/);
int mbox_open_by_name(const char *name) { return open(name, 0); }


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

x86 assembly (clang, -O2):
<mbox_open_by_name>:
xor    %esi,%esi
jmp    1030 <open@plt>

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

LLVM IR (-O2):
define i32 @mbox_open_by_name(i8* nocapture %0) {
%2 = tail call i32 @open(i8* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
double log(double);
int /*<<< orphan*/ printf(char *, double, double);
double tanh(double);
int main() {
  double param, result;
  param = log(2.0);
  result = tanh(param);
  printf("The hyperbolic tangent of %f is %f.\n", param, result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb9(%rip),%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <tanh@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1030 <tanh@plt>
lea    0xedb(%rip),%rdi
movsd  0xecb(%rip),%xmm1
movsd  0xebb(%rip),%xmm0
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"The hyperbolic tangent of %f is %f.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call double @log(double 2.000000e+00)
store double %4, double* %2
%5 = load double, double* %2
%6 = call double @tanh(double %5)
store double %6, double* %3
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double %7, double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"The hyperbolic tangent of %f is %f.\0A\00"
define i32 @main() {
%1 = tail call double @tanh(double 0x3FE62E42FEFA39EF)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double 0x3FE62E42FEFA39EF, double 6.000000e-01)
ret i32 0
}
void gencheck_interupt_reg() {}


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

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

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

LLVM IR (-O2):
define void @gencheck_interupt_reg() {
ret void
}
/* Variables and functions */
size_t spt_min(size_t a, size_t b) { return (((a) < (b)) ? (a) : (b)); }


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

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

LLVM IR (-O0):
define i64 @spt_min(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 ult 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 @spt_min(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      state[local1] *= state[local1];
      local1 += 2UL;
    }
    output[0UL] = state[0UL] - (unsigned short)29594;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x0,%eax
jge    115a <RandomFunc+0x5a>
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp,%rax,2),%edx
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp,%rax,2),%ecx
imul   %edx,%ecx
mov    %cx,-0x12(%rbp,%rax,2)
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
sub    $0x739a,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0xffff97ab,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i32
%11 = add nsw i32 %10, 2885
%12 = trunc i32 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
store i16 0, i16* %6
br label %14
14: ; preds = %18, %2
%15 = load i16, i16* %6
%16 = zext i16 %15 to i32
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %35
18: ; preds = %14
%19 = load i16, i16* %6
%20 = zext i16 %19 to i64
%21 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 %20
%22 = load i16, i16* %21
%23 = zext i16 %22 to i32
%24 = load i16, i16* %6
%25 = zext i16 %24 to i64
%26 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 %25
%27 = load i16, i16* %26
%28 = zext i16 %27 to i32
%29 = mul nsw i32 %28, %23
%30 = trunc i32 %29 to i16
store i16 %30, i16* %26
%31 = load i16, i16* %6
%32 = zext i16 %31 to i64
%33 = add i64 %32, 2
%34 = trunc i64 %33 to i16
store i16 %34, i16* %6
br label %14
35: ; preds = %14
%36 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%37 = load i16, i16* %36
%38 = zext i16 %37 to i32
%39 = sub nsw i32 %38, 29594
%40 = trunc i32 %39 to i16
%41 = load i16*, i16** %4
%42 = getelementptr inbounds i16, i16* %41, i64 0
store i16 %40, i16* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, -26709
store i16 %4, i16* %1
ret void
}
float ReLU(float x) { return x > 0 ? x : 0; }


x86 assembly (clang, -O0):
<ReLU>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1129 <ReLU+0x29>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1136 <ReLU+0x36>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1136 <ReLU+0x36>
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReLU>:
xorps  %xmm1,%xmm1
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @ReLU(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load float, float* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi float [ %6, %5 ], [ 0.000000e+00, %7 ]
ret float %9
}

LLVM IR (-O2):
define float @ReLU(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = select i1 %2, float %0, float 0.000000e+00
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef long __u64;

/* Variables and functions */
int /*<<< orphan*/ F_GET_SEALS;
int /*<<< orphan*/ abort();
long fcntl(int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
__u64 mfd_assert_get_seals(int fd) {
  long r;
  r = fcntl(fd, F_GET_SEALS);
  if (r < 0) {
    printf("GET_SEALS(%d) failed: %m\n", fd);
    abort();
  }
  return r;
}


x86 assembly (clang, -O0):
<mfd_assert_get_seals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
call   1040 <fcntl@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1171 <mfd_assert_get_seals+0x41>
mov    -0x4(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mfd_assert_get_seals>:
push   %rbx
mov    %edi,%ebx
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
call   1040 <fcntl@plt>
test   %rax,%rax
js     1148 <mfd_assert_get_seals+0x18>
pop    %rbx
ret
lea    0xeb1(%rip),%rdi
mov    %ebx,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@F_GET_SEALS = global i32 0
@.str = [26 x i8] c"GET_SEALS(%d) failed: %m\0A\00"
define i64 @mfd_assert_get_seals(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GET_SEALS
%6 = call i64 @fcntl(i32 %4, i32 %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %1
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
@F_GET_SEALS = global i32 0
@.str = [26 x i8] c"GET_SEALS(%d) failed: %m\0A\00"
define i64 @mfd_assert_get_seals(i32 %0) {
%2 = load i32, i32* @F_GET_SEALS
%3 = tail call i64 @fcntl(i32 %0, i32 %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
ret i64 %3
}
void __mwaitx(unsigned long eax, unsigned long ebx, unsigned long ecx) {
  asm volatile(".byte 0x0f, 0x01, 0xfb;" ::"a"(eax), "b"(ebx), "c"(ecx));
}


x86 assembly (clang, -O0):
<__mwaitx>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rbx
mov    -0x20(%rbp),%rcx
mwaitx %eax,%ecx,%ebx
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mwaitx>:
push   %rbx
mov    %rdx,%rcx
mov    %rsi,%rbx
mov    %rdi,%rax
mwaitx %eax,%ecx,%ebx
pop    %rbx
ret

LLVM IR (-O0):
define void @__mwaitx(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
ret void
}

LLVM IR (-O2):
define void @__mwaitx(i64 %0, i64 %1, i64 %2) {
tail call void asm sideeffect ".byte 0x0f, 0x01, 0xfb;", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ _pos_goto(int /*<<< orphan*/, int /*<<< orphan*/);
void pos_straight(int32_t length) { _pos_goto(length, length); }


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

x86 assembly (clang, -O2):
<pos_straight>:
mov    %edi,%esi
jmp    1030 <_pos_goto@plt>

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

LLVM IR (-O2):
define void @pos_straight(i32 %0) {
%2 = tail call i32 @_pos_goto(i32 %0, i32 %0)
ret void
}
void reset_timer(void) {
  *(volatile int *)(((0x10000000 + 0xA100000) + 0x3000) + 0x00) = 0;
}


x86 assembly (clang, -O0):
<reset_timer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1a103000,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_timer>:
movl   $0x0,0x1a103000
ret

LLVM IR (-O0):
define void @reset_timer() {
store volatile i32 0, i32* inttoptr (i64 437268480 to i32*)
ret void
}

LLVM IR (-O2):
define void @reset_timer() {
store volatile i32 0, i32* inttoptr (i64 437268480 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *realloc(void *, long long);
int /*<<< orphan*/ sys_die(char *, void *, long long);
extern void *mem_realloc(void *p, long long nsize) {
  void *res = realloc(p, nsize);
  if (res == NULL) {
    free(p);
    sys_die("OOM: cannot realloc %p nsize=%lld\n", p, nsize);
  }
  return res;
}


x86 assembly (clang, -O0):
<mem_realloc>:
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   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1179 <mem_realloc+0x49>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe8c(%rip),%rdi
call   1040 <sys_die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_realloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1050 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1162 <mem_realloc+0x32>
mov    %r15,%rdi
call   1030 <free@plt>
lea    0xea9(%rip),%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <sys_die@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [35 x i8] c"OOM: cannot realloc %p nsize=%lld\0A\00"
define i8* @mem_realloc(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 %17
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %3
%15 = load i64, i64* %4
%16 = call i32 @sys_die(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %14, i64 %15)
br label %17
17: ; preds = %11, %2
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
@.str = [35 x i8] c"OOM: cannot realloc %p nsize=%lld\0A\00"
define noalias i8* @mem_realloc(i8* %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @free(i8* %0)
%7 = tail call i32 @sys_die(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1)
br label %8
8: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ noinline();
void use99() { noinline(); }


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

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

LLVM IR (-O0):
define void @use99() {
%1 = call i32 (...) @noinline()
ret void
}

LLVM IR (-O2):
define void @use99() {
%1 = tail call i32 (...) @noinline()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ new;
};
typedef TYPE_1__ XColormapEvent;

/* Variables and functions */
int get_XColormapEvent_new(void *_p) {
  return (int)((XColormapEvent *)_p)->new;
}


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

x86 assembly (clang, -O2):
<get_XColormapEvent_new>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XColormapEvent_new(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gtp_printf(char *);
int gtp_finish_response() {
  gtp_printf("\n\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"\0A\0A\00"
define i32 @gtp_finish_response() {
%1 = tail call i32 @gtp_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x08() {
  Assert_real((isbdigit(8) == 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_isbdigit.c",
              45, ("isbdigit should be 0 for 0x08"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x08>:
push   %rax
mov    $0x8,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2d,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x08\00"
define void @t_isbdigit_0x08() {
%1 = call i64 @isbdigit(i32 8)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 45, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x08\00"
define void @t_isbdigit_0x08() {
%1 = tail call i64 @isbdigit(i32 8)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 45, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void terminate(const char *msg, int sock) {
  if (msg != (const char *)NULL)
    perror(msg);
  else
    perror("Erro fatal");
  if (sock)
    close(sock);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<terminate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1158 <terminate+0x28>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
jmp    1164 <terminate+0x34>
lea    0xea1(%rip),%rdi
call   1040 <perror@plt>
cmpl   $0x0,-0xc(%rbp)
je     1176 <terminate+0x46>
mov    -0xc(%rbp),%edi
call   1030 <close@plt>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<terminate>:
push   %rbx
mov    %esi,%ebx
test   %rdi,%rdi
jne    113f <terminate+0xf>
lea    0xec1(%rip),%rdi
call   1040 <perror@plt>
test   %ebx,%ebx
je     114f <terminate+0x1f>
mov    %ebx,%edi
call   1030 <close@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Erro fatal\00"
@EXIT_FAILURE = global i32 0
define void @terminate(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @perror(i8* %8)
br label %12
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %4
%17 = call i32 @close(i32 %16)
br label %18
18: ; preds = %15, %12
%19 = load i32, i32* @EXIT_FAILURE
%20 = call i32 @exit(i32 %19)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"Erro fatal\00"
@EXIT_FAILURE = global i32 0
define void @terminate(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @perror(i8* %0)
br label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = icmp eq i32 %1, 0
br i1 %9, label %12, label %10
10: ; preds = %8
%11 = tail call i32 @close(i32 %1)
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* @EXIT_FAILURE
%14 = tail call i32 @exit(i32 %13)
unreachable
}
long double zsignbit(x)
long double x;
{
  long double y;
  int k;
  k = signbitl(x);
  y = k;
  return (y);
}


x86 assembly (clang, -O0):
<zsignbit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
xor    %eax,%eax
call   1030 <signbitl@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
fildl  -0x28(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zsignbit>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
xor    %eax,%eax
call   1030 <signbitl@plt>
mov    %eax,0x14(%rsp)
fildl  0x14(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @zsignbit(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca i32
store x86_fp80 %0, x86_fp80* %2
%5 = load x86_fp80, x86_fp80* %2
%6 = call i32 (x86_fp80, ...) bitcast (i32 (...)* @signbitl to i32 (x86_fp80, ...)*)(x86_fp80 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to x86_fp80
store x86_fp80 %8, x86_fp80* %3
%9 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @zsignbit(x86_fp80 %0) {
%2 = tail call i32 (x86_fp80, ...) bitcast (i32 (...)* @signbitl to i32 (x86_fp80, ...)*)(x86_fp80 %0)
%3 = sitofp i32 %2 to x86_fp80
ret x86_fp80 %3
}