#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 */

/* Variables and functions */
int /*<<< orphan*/ is_floating_point(float const);
int colect_round(const float *str, int size, float destiantion[]) {
  int i, counter = 0;
  for (i = 0; i < size; i++) {
    if (!is_floating_point(str[i])) {
      destiantion[counter] = str[i];
      counter++;
      if (counter < size) {
        destiantion[counter] = 0.0;
      }
    }
  }
  return counter;
}


x86 assembly (clang, -O0):
<colect_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11af <colect_round+0x9f>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1030 <is_floating_point@plt>
cmp    $0x0,%eax
jne    119c <colect_round+0x8c>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1197 <colect_round+0x87>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
jmp    119c <colect_round+0x8c>
jmp    11a1 <colect_round+0x91>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1131 <colect_round+0x21>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<colect_round>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    117e <colect_round+0x6e>
mov    %rdx,%r15
mov    %esi,%r14d
mov    %rdi,%r13
mov    %esi,%r12d
xor    %ebp,%ebp
xor    %ebx,%ebx
jmp    1149 <colect_round+0x39>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%r12
je     1180 <colect_round+0x70>
movss  0x0(%r13,%rbp,4),%xmm0
call   1030 <is_floating_point@plt>
test   %eax,%eax
jne    1140 <colect_round+0x30>
movss  0x0(%r13,%rbp,4),%xmm0
movslq %ebx,%rbx
movss  %xmm0,(%r15,%rbx,4)
add    $0x1,%ebx
cmp    %r14d,%ebx
jge    1140 <colect_round+0x30>
movslq %ebx,%rax
movl   $0x0,(%r15,%rax,4)
jmp    1140 <colect_round+0x30>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @colect_round(float* %0, i32 %1, float* %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca float*
%7 = alloca i32
%8 = alloca i32
store float* %0, float** %4
store i32 %1, i32* %5
store float* %2, float** %6
store i32 0, i32* %8
store i32 0, i32* %7
br label %9
9: ; preds = %43, %3
%10 = load i32, i32* %7
%11 = load i32, i32* %5
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %46
13: ; preds = %9
%14 = load float*, float** %4
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %14, i64 %16
%18 = load float, float* %17
%19 = call i32 @is_floating_point(float %18)
%20 = icmp ne i32 %19, 0
br i1 %20, label %42, label %21
21: ; preds = %13
%22 = load float*, float** %4
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds float, float* %22, i64 %24
%26 = load float, float* %25
%27 = load float*, float** %6
%28 = load i32, i32* %8
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds float, float* %27, i64 %29
store float %26, float* %30
%31 = load i32, i32* %8
%32 = add nsw i32 %31, 1
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = load i32, i32* %5
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %41
36: ; preds = %21
%37 = load float*, float** %6
%38 = load i32, i32* %8
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds float, float* %37, i64 %39
store float 0.000000e+00, float* %40
br label %41
41: ; preds = %36, %21
br label %42
42: ; preds = %41, %13
br label %43
43: ; preds = %42
%44 = load i32, i32* %7
%45 = add nsw i32 %44, 1
store i32 %45, i32* %7
br label %9
46: ; preds = %9
%47 = load i32, i32* %8
ret i32 %47
}

LLVM IR (-O2):
define i32 @colect_round(float* nocapture %0, i32 %1, float* nocapture writeonly %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %27
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %23
%8 = phi i64 [ 0, %5 ], [ %25, %23 ]
%9 = phi i32 [ 0, %5 ], [ %24, %23 ]
%10 = getelementptr inbounds float, float* %0, i64 %8
%11 = load float, float* %10
%12 = tail call i32 @is_floating_point(float %11)
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %23
14: ; preds = %7
%15 = load float, float* %10
%16 = sext i32 %9 to i64
%17 = getelementptr inbounds float, float* %2, i64 %16
store float %15, float* %17
%18 = add nsw i32 %9, 1
%19 = icmp slt i32 %18, %1
br i1 %19, label %20, label %23
20: ; preds = %14
%21 = sext i32 %18 to i64
%22 = getelementptr inbounds float, float* %2, i64 %21
store float 0.000000e+00, float* %22
br label %23
23: ; preds = %7, %20, %14
%24 = phi i32 [ %9, %7 ], [ %18, %20 ], [ %18, %14 ]
%25 = add nuw nsw i64 %8, 1
%26 = icmp eq i64 %25, %6
br i1 %26, label %27, label %7
27: ; preds = %23, %3
%28 = phi i32 [ 0, %3 ], [ %24, %23 ]
ret i32 %28
}