	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1271_validate_wowlan_pattern
_wl1271_validate_wowlan_pattern:        ## @wl1271_validate_wowlan_pattern
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rsi
	movq	_EINVAL@GOTPCREL(%rip), %rbx
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	cmpl	$0, (%rdi)
	jle	LBB0_3
## %bb.4:
	xorl	%r12d, %r12d
	movl	$1, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%r15), %ebx
	movl	%ebx, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, %eax
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_WL1271_RX_FILTER_ETH_HEADER_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	-48(%rbp)                       ## 4-byte Folded Spill
	addl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movq	_RX_FILTER_FIELD_OVERHEAD@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r12d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	$1, %r12d
	cmpl	(%r14), %r15d
	jl	LBB0_21
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	testl	%r13d, %r13d
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addl	%r12d, %ecx
	movq	_RX_FILTER_FIELD_OVERHEAD@GOTPCREL(%rip), %rdx
	addl	(%rdx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	incl	-48(%rbp)                       ## 4-byte Folded Spill
	cmpl	(%r14), %r15d
	jl	LBB0_21
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, %r12d
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	(%r14), %r15d
	jge	LBB0_14
LBB0_21:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r14), %rsi
	incl	%r15d
	movl	%eax, %r13d
	jmp	LBB0_5
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	incl	%r12d
	cmpl	(%r14), %r15d
	jl	LBB0_21
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rbx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_15
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_19
LBB0_3:
	xorl	%esi, %esi
	xorl	%eax, %eax
	xorl	%edx, %edx
	xorl	%r12d, %r12d
LBB0_15:
	addl	%eax, %esi
	movq	_WL1271_RX_FILTER_MAX_FIELDS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jle	LBB0_17
## %bb.16:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_19
LBB0_17:
	movq	_RX_FILTER_FIELD_OVERHEAD@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r12d
	testl	%eax, %eax
	cmovel	%eax, %r12d
	addl	%edx, %r12d
	movq	_WL1271_RX_FILTER_MAX_FIELDS_SIZE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %r12d
	jle	LBB0_20
## %bb.18:
	movq	_E2BIG@GOTPCREL(%rip), %rbx
	leaq	L_.str.2(%rip), %rdi
LBB0_19:
	callq	_wl1271_warning
	xorl	%eax, %eax
	subl	(%rbx), %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No mask in WoWLAN pattern"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WL1271_RX_FILTER_ETH_HEADER_SIZE,4,2 ## @WL1271_RX_FILTER_ETH_HEADER_SIZE
	.comm	_RX_FILTER_FIELD_OVERHEAD,8,3   ## @RX_FILTER_FIELD_OVERHEAD
	.comm	_WL1271_RX_FILTER_MAX_FIELDS,4,2 ## @WL1271_RX_FILTER_MAX_FIELDS
L_.str.1:                               ## @.str.1
	.asciz	"RX Filter too complex. Too many segments"

	.comm	_WL1271_RX_FILTER_MAX_FIELDS_SIZE,4,2 ## @WL1271_RX_FILTER_MAX_FIELDS_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"RX filter pattern is too big"

	.comm	_E2BIG,4,2                      ## @E2BIG
	.no_dead_strip	_wl1271_validate_wowlan_pattern
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1271_validate_wowlan_pattern
_wl1271_validate_wowlan_pattern:        ; @wl1271_validate_wowlan_pattern
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x1, [x0, #8]
	cbz	x1, LBB0_13
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x21, _RX_FILTER_FIELD_OVERHEAD@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RX_FILTER_FIELD_OVERHEAD@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.2:
	mov	w24, #0
	mov	w22, #0
	mov	w25, #0
	mov	w23, #0
	mov	w26, #1
Lloh2:
	adrp	x27, _WL1271_RX_FILTER_ETH_HEADER_SIZE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _WL1271_RX_FILTER_ETH_HEADER_SIZE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w20, w26, #1
	mov	x0, x20
	bl	_test_bit
	cbz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w25, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27]
	cmp	w20, w8
	b.ne	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	ldr	w8, [x21]
	add	w9, w24, w22
	add	w22, w9, w8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w25, #1
	mov	w24, #1
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	w25, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w25, #0
	ldr	w8, [x21]
	add	w9, w24, w22
	add	w22, w9, w8
	add	w23, w23, #1
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w24, #1
	mov	w25, #1
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19]
	cmp	w26, w8
	b.ge	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x19, #8]
	add	w26, w26, #1
	b	LBB0_3
LBB0_13:
Lloh4:
	adrp	x19, _EINVAL@GOTPAGE
Lloh5:
	ldr	x19, [x19, _EINVAL@GOTPAGEOFF]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_19
LBB0_14:
	mov	w23, #0
	mov	w25, #0
	mov	w22, #0
	mov	w24, #0
LBB0_15:
Lloh8:
	adrp	x8, _WL1271_RX_FILTER_MAX_FIELDS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WL1271_RX_FILTER_MAX_FIELDS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	add	w9, w23, w25
	cmp	w9, w8
	b.le	LBB0_17
; %bb.16:
Lloh11:
	adrp	x19, _EINVAL@GOTPAGE
Lloh12:
	ldr	x19, [x19, _EINVAL@GOTPAGEOFF]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_19
LBB0_17:
	mov	w0, #0
	ldr	w8, [x21]
	add	w8, w24, w8
	cmp	w25, #0
	csel	w8, wzr, w8, eq
Lloh15:
	adrp	x9, _WL1271_RX_FILTER_MAX_FIELDS_SIZE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _WL1271_RX_FILTER_MAX_FIELDS_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	add	w8, w8, w22
	cmp	w8, w9
	b.le	LBB0_20
; %bb.18:
Lloh18:
	adrp	x19, _E2BIG@GOTPAGE
Lloh19:
	ldr	x19, [x19, _E2BIG@GOTPAGEOFF]
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_19:
	bl	_wl1271_warning
	ldr	w8, [x19]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No mask in WoWLAN pattern"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WL1271_RX_FILTER_ETH_HEADER_SIZE,4,2 ; @WL1271_RX_FILTER_ETH_HEADER_SIZE
	.comm	_RX_FILTER_FIELD_OVERHEAD,8,3   ; @RX_FILTER_FIELD_OVERHEAD
	.comm	_WL1271_RX_FILTER_MAX_FIELDS,4,2 ; @WL1271_RX_FILTER_MAX_FIELDS
l_.str.1:                               ; @.str.1
	.asciz	"RX Filter too complex. Too many segments"

	.comm	_WL1271_RX_FILTER_MAX_FIELDS_SIZE,4,2 ; @WL1271_RX_FILTER_MAX_FIELDS_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"RX filter pattern is too big"

	.comm	_E2BIG,4,2                      ; @E2BIG
	.no_dead_strip	_wl1271_validate_wowlan_pattern
.subsections_via_symbols
