xunge/DecIR huggingface dataset:
int ret_timeslot_sens(float timeslot) {
  if (timeslot > 0 && timeslot < 10)
    return 19;
  if (timeslot >= 10 && timeslot < 60)
    return 18;
  if (timeslot >= 60 && timeslot < 3600)
    return 16;
}


x86 assembly (clang, -O0):
<ret_timeslot_sens>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1138 <ret_timeslot_sens+0x38>
movss  0xede(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1138 <ret_timeslot_sens+0x38>
movl   $0x13,-0x4(%rbp)
jmp    119b <ret_timeslot_sens+0x9b>
movss  -0x8(%rbp),%xmm0
movss  0xebb(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     116c <ret_timeslot_sens+0x6c>
movss  0xeae(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    116c <ret_timeslot_sens+0x6c>
movl   $0x12,-0x4(%rbp)
jmp    119b <ret_timeslot_sens+0x9b>
movss  -0x8(%rbp),%xmm0
movss  0xe8b(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     119b <ret_timeslot_sens+0x9b>
movss  0xe7e(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    119b <ret_timeslot_sens+0x9b>
movl   $0x10,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ret_timeslot_sens>:
movss  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
movss  0xeec(%rip),%xmm1
ucomiss %xmm1,%xmm0
lea    0x10(%rax,%rax,1),%eax
mov    $0x10,%ecx
cmovae %eax,%ecx
ucomiss %xmm0,%xmm1
mov    $0x13,%eax
cmovbe %ecx,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ret_timeslot_sens(float %0) {
%2 = alloca i32
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ogt float %4, 0.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load float, float* %3
%8 = fcmp olt float %7, 1.000000e+01
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 19, i32* %2
br label %24
10: ; preds = %6, %1
%11 = load float, float* %3
%12 = fcmp oge float %11, 1.000000e+01
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load float, float* %3
%15 = fcmp olt float %14, 6.000000e+01
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 18, i32* %2
br label %24
17: ; preds = %13, %10
%18 = load float, float* %3
%19 = fcmp oge float %18, 6.000000e+01
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load float, float* %3
%22 = fcmp olt float %21, 3.600000e+03
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 16, i32* %2
br label %24
24: ; preds = %9, %16, %23, %20, %17
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @ret_timeslot_sens(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = fcmp olt float %0, 1.000000e+01
%4 = and i1 %2, %3
%5 = fcmp oge float %0, 1.000000e+01
%6 = fcmp olt float %0, 6.000000e+01
%7 = and i1 %5, %6
%8 = select i1 %7, i32 18, i32 16
%9 = select i1 %4, i32 19, i32 %8
ret i32 %9
}
/* Variables and functions */
double strtod(char const *, char **);
double _mesa_strtod(const char *s, char **end) { return strtod(s, end); }


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

x86 assembly (clang, -O2):
<_mesa_strtod>:
jmp    1030 <strtod@plt>

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

LLVM IR (-O2):
define double @_mesa_strtod(i8* %0, i8** nocapture %1) {
%3 = tail call double @strtod(i8* %0, i8** %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void gui_gotoxy(int x, int y) { printf("%c[%u;%uH", 27, y, x); }


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

x86 assembly (clang, -O2):
<gui_gotoxy>:
mov    %esi,%edx
mov    %edi,%ecx
lea    0xee5(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%c[%u;%uH\00"
define void @gui_gotoxy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c[%u;%uH\00"
define void @gui_gotoxy(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 %1, i32 %0)
ret void
}
void sysfs_remove_group(struct kobject *k, const struct attribute_group *g) {
  ;
}


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

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

LLVM IR (-O0):
%struct.kobject = type opaque
%struct.attribute_group = type opaque
define void @sysfs_remove_group(%struct.kobject* %0, %struct.attribute_group* %1) {
%3 = alloca %struct.kobject*
%4 = alloca %struct.attribute_group*
store %struct.kobject* %0, %struct.kobject** %3
store %struct.attribute_group* %1, %struct.attribute_group** %4
ret void
}

LLVM IR (-O2):
%struct.kobject = type opaque
%struct.attribute_group = type opaque
define void @sysfs_remove_group(%struct.kobject* nocapture %0, %struct.attribute_group* nocapture %1) {
ret void
}
/* Variables and functions */
int odd(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  int number = 23945;
  if (odd(number) == 1)
    printf("%d is odd\n", number);
  else
    printf("%d is even\n", number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5d89,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <odd@plt>
cmp    $0x1,%eax
jne    1162 <main+0x42>
mov    -0x14(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    1171 <main+0x51>
mov    -0x14(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5d89,%edi
call   1040 <odd@plt>
cmp    $0x1,%eax
lea    0xecb(%rip),%rax
lea    0xecf(%rip),%rdi
cmove  %rax,%rdi
mov    $0x5d89,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%d is odd\0A\00"
@.str.1 = [12 x i8] c"%d is even\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 23945, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @odd(i32 %7)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %16
13: ; preds = %2
%14 = load i32, i32* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %13, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d is odd\0A\00"
@.str.1 = [12 x i8] c"%d is even\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @odd(i32 23945)
%4 = icmp eq i32 %3, 1
%5 = select i1 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @printf(i8* %5, i32 23945)
ret i32 0
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int getpid();
int /*<<< orphan*/ printf(char *, int);
int waitpid(int, int *, int /*<<< orphan*/);
void sig_child(int sign) {
  printf("pid:%d\n", getpid());
  pid_t pid;
  int stat;
  while ((pid = waitpid(-1, &stat, WNOHANG)) > 0) {
    printf("child %d terminated.\n", pid);
    return;
  }
}


x86 assembly (clang, -O0):
<sig_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1050 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1182 <sig_child+0x52>
mov    -0x8(%rbp),%esi
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_child>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rsi
mov    $0xffffffff,%edi
call   1050 <waitpid@plt>
test   %eax,%eax
jle    1170 <sig_child+0x40>
lea    0xe9f(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"pid:%d\0A\00"
@WNOHANG = global i32 0
@.str.1 = [22 x i8] c"child %d terminated.\0A\00"
define void @sig_child(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 (...) @getpid()
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %1
%8 = load i32, i32* @WNOHANG
%9 = call i32 @waitpid(i32 -1, i32* %4, i32 %8)
store i32 %9, i32* %3
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"pid:%d\0A\00"
@WNOHANG = global i32 0
@.str.1 = [22 x i8] c"child %d terminated.\0A\00"
define void @sig_child(i32 %0) {
%2 = alloca i32
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = bitcast i32* %2 to i8*
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* %2, i32 %6)
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %11
11: ; preds = %1, %9
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *, int);
int waitpid(int, int *, int /*<<< orphan*/);
void sig_chld(int signo) {
  pid_t pid;
  int stat;
  while ((pid = waitpid(-1, &stat, WNOHANG)) > 0) {
    printf("child %d terminate.\n", pid);
  }
  return;
}


x86 assembly (clang, -O0):
<sig_chld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1040 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1162 <sig_chld+0x42>
mov    -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    112b <sig_chld+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_chld>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2eb8(%rip),%r15
mov    (%r15),%edx
lea    0xc(%rsp),%rsi
mov    $0xffffffff,%edi
call   1040 <waitpid@plt>
test   %eax,%eax
jle    117e <sig_chld+0x5e>
lea    0xeb3(%rip),%r14
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    (%r15),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1040 <waitpid@plt>
test   %eax,%eax
jg     1160 <sig_chld+0x40>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [21 x i8] c"child %d terminate.\0A\00"
define void @sig_chld(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* %4, i32 %6)
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@.str = [21 x i8] c"child %d terminate.\0A\00"
define void @sig_chld(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @WNOHANG
%5 = call i32 @waitpid(i32 -1, i32* %2, i32 %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1, %7
%8 = phi i32 [ %11, %7 ], [ %5, %1 ]
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @WNOHANG
%11 = call i32 @waitpid(i32 -1, i32* %2, i32 %10)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %7, label %13
13: ; preds = %7, %1
ret void
}
__attribute__((always_)) int init_part_stats(struct hd_struct *part) {
  return 1;
}


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

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

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

LLVM IR (-O2):
%struct.hd_struct = type opaque
define i32 @init_part_stats(%struct.hd_struct* nocapture readnone %0) {
ret i32 1
}
int fun802() { return 802; }


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

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

LLVM IR (-O0):
define i32 @fun802() {
ret i32 802
}

LLVM IR (-O2):
define i32 @fun802() {
ret i32 802
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, unsigned int);
int bh_memzcpy(char *dest, const char *src, unsigned numtocopy,
               unsigned maxdestlen) {
  int ret = 0;
  if (numtocopy > maxdestlen - 1) {
    ret = numtocopy - (maxdestlen - 1);
    numtocopy = maxdestlen - 1;
  }
  memcpy(dest, src, numtocopy);
  dest[numtocopy] = '\0';
  return ret;
}


x86 assembly (clang, -O0):
<bh_memzcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jbe    1155 <bh_memzcpy+0x45>
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bh_memzcpy>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
add    $0xffffffff,%ecx
cmp    %edx,%ecx
mov    %edx,%ebx
cmovb  %ecx,%ebx
xor    %ebp,%ebp
sub    %ecx,%edx
cmovae %edx,%ebp
mov    %ebx,%edx
call   1030 <memcpy@plt>
movb   $0x0,(%r14,%rbx,1)
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @bh_memzcpy(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = sub i32 %11, 1
%13 = icmp ugt i32 %10, %12
br i1 %13, label %14, label %21
14: ; preds = %4
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = sub i32 %16, 1
%18 = sub i32 %15, %17
store i32 %18, i32* %9
%19 = load i32, i32* %8
%20 = sub i32 %19, 1
store i32 %20, i32* %7
br label %21
21: ; preds = %14, %4
%22 = load i8*, i8** %5
%23 = load i8*, i8** %6
%24 = load i32, i32* %7
%25 = call i32 @memcpy(i8* %22, i8* %23, i32 %24)
%26 = load i8*, i8** %5
%27 = load i32, i32* %7
%28 = zext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
store i8 0, i8* %29
%30 = load i32, i32* %9
ret i32 %30
}

LLVM IR (-O2):
define i32 @bh_memzcpy(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = add i32 %3, -1
%6 = icmp ult i32 %5, %2
%7 = select i1 %6, i32 %5, i32 %2
%8 = tail call i32 @llvm.usub.sat.i32(i32 %2, i32 %5)
%9 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %7)
%10 = zext i32 %7 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
store i8 0, i8* %11
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ xml_deinit();
void hiketech_rd_deinit(void) { xml_deinit(); }


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

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

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

LLVM IR (-O2):
define void @hiketech_rd_deinit() {
%1 = tail call i32 (...) @xml_deinit()
ret void
}
void gtk_about_dialog_set_artists() {}


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

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

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

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

/* Variables and functions */
int server_microtcp(uint16_t listen_port, const char *file) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @server_microtcp(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
double __nv_ddiv_rn(double, double);
double __ddiv_rn(double __a, double __b) { return __nv_ddiv_rn(__a, __b); }


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

x86 assembly (clang, -O2):
<__ddiv_rn>:
jmp    1030 <__nv_ddiv_rn@plt>

LLVM IR (-O0):
define double @__ddiv_rn(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @__nv_ddiv_rn(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @__ddiv_rn(double %0, double %1) {
%3 = tail call double @__nv_ddiv_rn(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x9c() {
  Assert_real((isalnum(156) == 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_isalnum.c",
              785, ("isalnum should be 0 for 0x9c"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x9c>:
push   %rax
mov    $0x9c,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x311,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x9c\00"
define void @t_isalnum_0x9c() {
%1 = call i64 @isalnum(i32 156)
%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 785, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x9c\00"
define void @t_isalnum_0x9c() {
%1 = tail call i64 @isalnum(i32 156)
%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 785, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int is_whitespace(char c) {
  return c == 0x20 || c == 0x09 || c == 0x0A || c == 0x0D;
}


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_whitespace>:
cmp    $0x20,%dil
ja     1120 <is_whitespace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <is_whitespace+0x20>
ret
xor    %eax,%eax
cmp    $0xd,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_whitespace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void destroy(int *a) { free(a); }


x86 assembly (clang, -O0):
<destroy>:
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):
<destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @destroy(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
unsigned long LONG_MAX;
int /*<<< orphan*/ abort();
void testl(unsigned long l, int ok) {
  if ((l >= 1) && (l <= LONG_MAX)) {
    if (!ok)
      abort();
  } else if (ok)
    abort();
}


x86 assembly (clang, -O0):
<testl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x1,-0x8(%rbp)
jb     1154 <testl+0x44>
mov    -0x8(%rbp),%rax
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
ja     1154 <testl+0x44>
cmpl   $0x0,-0xc(%rbp)
jne    114f <testl+0x3f>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    116a <testl+0x5a>
cmpl   $0x0,-0xc(%rbp)
je     1165 <testl+0x55>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    116a <testl+0x5a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testl>:
push   %rax
test   %rdi,%rdi
je     1128 <testl+0x18>
mov    0x2ec3(%rip),%rax
cmp    %rdi,(%rax)
jb     1128 <testl+0x18>
test   %esi,%esi
je     112c <testl+0x1c>
pop    %rax
ret
test   %esi,%esi
je     1126 <testl+0x16>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@LONG_MAX = global i64 0
define void @testl(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = icmp uge i64 %5, 1
br i1 %6, label %7, label %17
7: ; preds = %2
%8 = load i64, i64* %3
%9 = load i64, i64* @LONG_MAX
%10 = icmp ule i64 %8, %9
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
br label %23
17: ; preds = %7, %2
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 (...) @abort()
unreachable
22: ; preds = %17
br label %23
23: ; preds = %22, %16
ret void
}

LLVM IR (-O2):
@LONG_MAX = global i64 0
define void @testl(i64 %0, i32 %1) {
%3 = icmp eq i64 %0, 0
%4 = load i64, i64* @LONG_MAX
%5 = icmp ult i64 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = icmp eq i32 %1, 0
br i1 %6, label %11, label %8
8: ; preds = %2
br i1 %7, label %9, label %14
9: ; preds = %8
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %2
br i1 %7, label %14, label %12
12: ; preds = %11
%13 = tail call i32 (...) @abort()
unreachable
14: ; preds = %11, %8
ret void
}
void __sig_handler(int sig) {
  (void)sig;
  return;
}


x86 assembly (clang, -O0):
<__sig_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @__sig_handler(i32 %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ white_pixel;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
unsigned long get_Screen_white_pixel(void *_p) {
  return (unsigned long)((Screen *)_p)->white_pixel;
}


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

x86 assembly (clang, -O2):
<get_Screen_white_pixel>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_Screen_white_pixel(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
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_Screen_white_pixel(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
scalar_t__ islessequal(long double, long double);
scalar_t__ isnan(long double);
long double __fminl(long double x, long double y) {
  return (islessequal(x, y) || isnan(y)) ? x : y;
}


x86 assembly (clang, -O0):
<__fminl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <islessequal@plt>
cmp    $0x0,%rax
jne    1168 <__fminl+0x48>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     1173 <__fminl+0x53>
fldt   -0x10(%rbp)
fstpt  -0x2c(%rbp)
jmp    1179 <__fminl+0x59>
fldt   -0x20(%rbp)
fstpt  -0x2c(%rbp)
fldt   -0x2c(%rbp)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fminl>:
sub    $0x38,%rsp
fldt   0x50(%rsp)
fldt   0x40(%rsp)
fld    %st(1)
fstpt  0x20(%rsp)
fxch   %st(1)
fstpt  0x10(%rsp)
fld    %st(0)
fstpt  0x2c(%rsp)
fstpt  (%rsp)
call   1030 <islessequal@plt>
test   %rax,%rax
je     1154 <__fminl+0x34>
fldt   0x2c(%rsp)
add    $0x38,%rsp
ret
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1040 <isnan@plt>
test   %rax,%rax
fldt   0x2c(%rsp)
fldt   0x20(%rsp)
fxch   %st(1)
fcmove %st(1),%st
fstp   %st(1)
add    $0x38,%rsp
ret

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

LLVM IR (-O2):
define x86_fp80 @__fminl(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @islessequal(x86_fp80 %0, x86_fp80 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @isnan(x86_fp80 %1)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, x86_fp80 %1, x86_fp80 %0
br label %9
9: ; preds = %5, %2
%10 = phi x86_fp80 [ %0, %2 ], [ %8, %5 ]
ret x86_fp80 %10
}
void gtk_text_view_set_editable() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_set_editable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage:  matteblend.flt\n"
                  "no params at the moment - color saturation falloff or such "
                  "has to be implemented\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [105 x i8] c"usage: matteblend.flt\0Ano params at the moment - color saturation falloff or such has to be implemented\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [105 x i8] c"usage: matteblend.flt\0Ano params at the moment - color saturation falloff or such has to be implemented\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void SIGHandler(int s) {
  printf("\nCaught signal: %d\nShutting down server.\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<SIGHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<SIGHandler>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"\0ACaught signal: %d\0AShutting down server.\0A\00"
define void @SIGHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"\0ACaught signal: %d\0AShutting down server.\0A\00"
define void @SIGHandler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ value;

/* Variables and functions */
long getxattr(char const *, char const *, int **, int, int /*<<< orphan*/,
              int /*<<< orphan*/);
int main(int argc, const char *argv[]) {
  const char *path = argv[2];
  const char *name = argv[1];
  int value[1];
  long rval = 0;
  rval = getxattr(path, name, &value, sizeof(value), 0, 0);
  if (rval != -1) {
    return 0;
  } else {
    return 1;
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x24(%rbp),%rdx
mov    $0x4,%ecx
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1030 <getxattr@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0xffffffffffffffff,-0x30(%rbp)
je     117d <main+0x6d>
movl   $0x0,-0x4(%rbp)
jmp    1184 <main+0x74>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rax
mov    0x10(%rsi),%rdi
lea    0x4(%rsp),%rdx
mov    %rax,%rsi
mov    $0x4,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <getxattr@plt>
xor    %ecx,%ecx
cmp    $0xffffffffffffffff,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca [1 x i32]
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
store i8* %12, i8** %6
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
store i8* %15, i8** %7
store i64 0, i64* %9
%16 = load i8*, i8** %6
%17 = load i8*, i8** %7
%18 = bitcast [1 x i32]* %8 to i32**
%19 = call i64 @getxattr(i8* %16, i8* %17, i32** %18, i32 4, i32 0, i32 0)
store i64 %19, i64* %9
%20 = load i64, i64* %9
%21 = icmp ne i64 %20, -1
br i1 %21, label %22, label %23
22: ; preds = %2
store i32 0, i32* %3
br label %24
23: ; preds = %2
store i32 1, i32* %3
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1 x i32]
%4 = getelementptr inbounds i8*, i8** %1, i64 2
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = bitcast [1 x i32]* %3 to i8*
%9 = bitcast [1 x i32]* %3 to i32**
%10 = call i64 @getxattr(i8* %5, i8* %7, i32** %9, i32 4, i32 0, i32 0)
%11 = icmp eq i64 %10, -1
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn94() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn94");
  return result;
}


x86 assembly (clang, -O0):
<fn94>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn94>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn94\00"
define i8* @fn94() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn94\00"
define i8* @fn94() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ WDIOC_SETTIMEOUT;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
void set_timeout_watchdog(int fd, int timeout) {
  ioctl(fd, WDIOC_SETTIMEOUT, &timeout);
}


x86 assembly (clang, -O0):
<set_timeout_watchdog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_timeout_watchdog>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
pop    %rax
ret

LLVM IR (-O0):
@WDIOC_SETTIMEOUT = global i32 0
define void @set_timeout_watchdog(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* @WDIOC_SETTIMEOUT
%7 = call i32 @ioctl(i32 %5, i32 %6, i32* %4)
ret void
}

LLVM IR (-O2):
@WDIOC_SETTIMEOUT = global i32 0
define void @set_timeout_watchdog(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @WDIOC_SETTIMEOUT
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %3)
ret void
}
void INT2_intr(void) {}


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

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

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

LLVM IR (-O2):
define void @INT2_intr() {
ret void
}
/* Variables and functions */
int sum(int, int, int, int, int, int, int);
int main() { return sum(1, 2, 4, 8, 16, 32, 64); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
mov    $0x10,%r8d
mov    $0x20,%r9d
movl   $0x40,(%rsp)
call   1030 <sum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x40,(%rsp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
mov    $0x10,%r8d
mov    $0x20,%r9d
call   1030 <sum@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sum(i32 1, i32 2, i32 4, i32 8, i32 16, i32 32, i32 64)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sum(i32 1, i32 2, i32 4, i32 8, i32 16, i32 32, i32 64)
ret i32 %1
}
/* Variables and functions */
int shared_init(int);
int shared_initDefault() { return shared_init(32 * 1024 * 1024); }


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

x86 assembly (clang, -O2):
<shared_initDefault>:
mov    $0x2000000,%edi
jmp    1030 <shared_init@plt>

LLVM IR (-O0):
define i32 @shared_initDefault() {
%1 = call i32 @shared_init(i32 33554432)
ret i32 %1
}

LLVM IR (-O2):
define i32 @shared_initDefault() {
%1 = tail call i32 @shared_init(i32 33554432)
ret i32 %1
}
/* Variables and functions */
int strlen(char const *);
int /*<<< orphan*/ strlwr_(char *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
void get_ext(const char *file, char *ext) {
  const char *p;
  p = file + strlen(file) - 4;
  if (p < file)
    p = file;
  strncpy(ext, p, 4);
  ext[4] = 0;
  strlwr_(ext);
}


x86 assembly (clang, -O0):
<get_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    117b <get_ext+0x4b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x4,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
movb   $0x0,0x4(%rax)
mov    -0x10(%rbp),%rdi
call   1050 <strlwr_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ext>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
cltq
lea    (%rbx,%rax,1),%rsi
add    $0xfffffffffffffffc,%rsi
cmp    %rbx,%rsi
cmovb  %rbx,%rsi
mov    %r14,%rdi
mov    $0x4,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x4(%r14)
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <strlwr_@plt>

LLVM IR (-O0):
define void @get_ext(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = getelementptr inbounds i8, i8* %10, i64 -4
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = load i8*, i8** %3
%14 = icmp ult i8* %12, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i8*, i8** %3
store i8* %16, i8** %5
br label %17
17: ; preds = %15, %2
%18 = load i8*, i8** %4
%19 = load i8*, i8** %5
%20 = call i32 @strncpy(i8* %18, i8* %19, i32 4)
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 4
store i8 0, i8* %22
%23 = load i8*, i8** %4
%24 = call i32 @strlwr_(i8* %23)
ret void
}

LLVM IR (-O2):
define void @get_ext(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = getelementptr inbounds i8, i8* %5, i64 -4
%7 = icmp ult i8* %6, %0
%8 = select i1 %7, i8* %0, i8* %6
%9 = tail call i32 @strncpy(i8* %1, i8* %8, i32 4)
%10 = getelementptr inbounds i8, i8* %1, i64 4
store i8 0, i8* %10
%11 = tail call i32 @strlwr_(i8* %1)
ret void
}
int test_imm_19int16_mem(short *val) {
  return ((*val) & (-0x19 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_19int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffffe7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_19int16_mem>:
movzwl (%rdi),%eax
test   $0xffe7,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_19int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -25
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
void strcmp_0() {
  char *x = "123";
  char *y = "123";
  if (strcmp(x, y) != 0)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strcmp_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed6(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1145 <strcmp_0+0x35>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
define void @strcmp_0() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strcmp(i8* %3, i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i8, i8* null
br label %9
9: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
define void @strcmp_0() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t base16_decode_size(size_t);
size_t decode_size_base16(size_t in_len) { return base16_decode_size(in_len); }


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

x86 assembly (clang, -O2):
<decode_size_base16>:
jmp    1030 <base16_decode_size@plt>

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

LLVM IR (-O2):
define i64 @decode_size_base16(i64 %0) {
%2 = tail call i64 @base16_decode_size(i64 %0)
ret i64 %2
}
int main(void) {
  int *const b;
  int a;
  if (!b)
    return 1;
  if (!a)
    return 2;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1122 <main+0x22>
movl   $0x1,-0x4(%rbp)
jmp    113f <main+0x3f>
cmpl   $0x0,-0x14(%rbp)
jne    1138 <main+0x38>
movl   $0x2,-0x4(%rbp)
jmp    113f <main+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ htole32(int /*<<< orphan*/);
void st_i32_le(void *x, int32_t i) { ((int32_t *)x)[0] = htole32(i); }


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

x86 assembly (clang, -O2):
<st_i32_le>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htole32@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @st_i32_le(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @htole32(i32 %1)
%4 = bitcast i8* %0 to i32*
store i32 %3, i32* %4
ret void
}