#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct dirent {
  float *d_name;
};

/* Variables and functions */
scalar_t__ isdigit(char);
int fw_filter(const struct dirent *dirent) {
  return dirent->d_name[0] == 'f' && dirent->d_name[1] == 'w' &&
         isdigit(dirent->d_name[2]);
}


x86 assembly (clang, -O0):
<fw_filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movss  (%rax),%xmm0
xor    %eax,%eax
movss  0xecf(%rip),%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    118d <fw_filter+0x7d>
jp     118d <fw_filter+0x7d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movss  0x4(%rax),%xmm0
xor    %eax,%eax
movss  0xeab(%rip),%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    118d <fw_filter+0x7d>
jp     118d <fw_filter+0x7d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movss  0x8(%rax),%xmm0
cvttss2si %xmm0,%eax
movsbl %al,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fw_filter>:
push   %rax
mov    (%rdi),%rcx
movss  (%rcx),%xmm0
xor    %eax,%eax
ucomiss 0xedf(%rip),%xmm0
jne    114d <fw_filter+0x3d>
jp     114d <fw_filter+0x3d>
movss  0x4(%rcx),%xmm0
ucomiss 0xed3(%rip),%xmm0
jne    114d <fw_filter+0x3d>
jp     114d <fw_filter+0x3d>
cvttss2si 0x8(%rcx),%eax
movsbl %al,%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.dirent = type { float* }
define i32 @fw_filter(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = fcmp oeq float %7, 1.020000e+02
br i1 %8, label %9, label %25
9: ; preds = %1
%10 = load %struct.dirent*, %struct.dirent** %2
%11 = getelementptr inbounds %struct.dirent, %struct.dirent* %10, i32 0, i32 0
%12 = load float*, float** %11
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fcmp oeq float %14, 1.190000e+02
br i1 %15, label %16, label %25
16: ; preds = %9
%17 = load %struct.dirent*, %struct.dirent** %2
%18 = getelementptr inbounds %struct.dirent, %struct.dirent* %17, i32 0, i32 0
%19 = load float*, float** %18
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = fptosi float %21 to i8
%23 = call i64 @isdigit(i8 signext %22)
%24 = icmp ne i64 %23, 0
br label %25
25: ; preds = %16, %9, %1
%26 = phi i1 [ false, %9 ], [ false, %1 ], [ %24, %16 ]
%27 = zext i1 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
%struct.dirent = type { float* }
define i32 @fw_filter(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = fcmp oeq float %4, 1.020000e+02
br i1 %5, label %6, label %17
6: ; preds = %1
%7 = getelementptr inbounds float, float* %3, i64 1
%8 = load float, float* %7
%9 = fcmp oeq float %8, 1.190000e+02
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = getelementptr inbounds float, float* %3, i64 2
%12 = load float, float* %11
%13 = fptosi float %12 to i8
%14 = tail call i64 @isdigit(i8 signext %13)
%15 = icmp ne i64 %14, 0
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %10, %6, %1
%18 = phi i32 [ 0, %6 ], [ 0, %1 ], [ %16, %10 ]
ret i32 %18
}