#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*/ floatarrcpy(float *, size_t, float **);
int /*<<< orphan*/ removemasked(float **, size_t, unsigned char *, size_t *);
void floatarrcpymask(float *in, size_t size, unsigned char *mask, size_t *nsize,
                     float **out) {
  floatarrcpy(in, size, out);
  if (mask == NULL) {
    *nsize = size;
    return;
  } else
    removemasked(out, size, mask, nsize);
}


x86 assembly (clang, -O0):
<floatarrcpymask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <floatarrcpy@plt>
cmpq   $0x0,-0x18(%rbp)
jne    1168 <floatarrcpymask+0x48>
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
jmp    117d <floatarrcpymask+0x5d>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <removemasked@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floatarrcpymask>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r15
mov    %rcx,%r14
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %r8,%rdx
call   1030 <floatarrcpy@plt>
test   %r12,%r12
je     115d <floatarrcpymask+0x3d>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <removemasked@plt>
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @floatarrcpymask(float* %0, i64 %1, i8* %2, i64* %3, float** %4) {
%6 = alloca float*
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i64*
%10 = alloca float**
store float* %0, float** %6
store i64 %1, i64* %7
store i8* %2, i8** %8
store i64* %3, i64** %9
store float** %4, float*** %10
%11 = load float*, float** %6
%12 = load i64, i64* %7
%13 = load float**, float*** %10
%14 = call i32 @floatarrcpy(float* %11, i64 %12, float** %13)
%15 = load i8*, i8** %8
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %20
17: ; preds = %5
%18 = load i64, i64* %7
%19 = load i64*, i64** %9
store i64 %18, i64* %19
br label %26
20: ; preds = %5
%21 = load float**, float*** %10
%22 = load i64, i64* %7
%23 = load i8*, i8** %8
%24 = load i64*, i64** %9
%25 = call i32 @removemasked(float** %21, i64 %22, i8* %23, i64* %24)
br label %26
26: ; preds = %17, %20
ret void
}

LLVM IR (-O2):
define void @floatarrcpymask(float* %0, i64 %1, i8* %2, i64* %3, float** %4) {
%6 = tail call i32 @floatarrcpy(float* %0, i64 %1, float** %4)
%7 = icmp eq i8* %2, null
br i1 %7, label %8, label %9
8: ; preds = %5
store i64 %1, i64* %3
br label %11
9: ; preds = %5
%10 = tail call i32 @removemasked(float** %4, i64 %1, i8* %2, i64* %3)
br label %11
11: ; preds = %8, %9
ret void
}