	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1271_convert_wowlan_pattern_to_rx_filter
_wl1271_convert_wowlan_pattern_to_rx_filter: ## @wl1271_convert_wowlan_pattern_to_rx_filter
	.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	%rsi, %rbx
	movq	%rdi, %r12
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_wl1271_rx_filter_alloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r12)
	jle	LBB0_13
## %bb.2:
	movq	_WL1271_RX_FILTER_ETH_HEADER_SIZE@GOTPCREL(%rip), %r14
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r13d
	movl	%r13d, %ebx
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %r13d
	cmpl	(%r12), %ebx
	jge	LBB0_13
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	16(%r12), %rsi
	movl	%r13d, %edi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %ebx
	cmpl	(%r12), %r13d
	jl	LBB0_5
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	incl	%ebx
	cmpl	(%r12), %ebx
	jge	LBB0_9
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r12), %rsi
	movl	%ebx, %edi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	(%r14), %eax
	cmpl	%eax, %r13d
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpl	%eax, %ebx
	jl	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %eax
	cmpl	%eax, %r13d
	movl	$0, %ecx
	cmovll	%ecx, %eax
	movq	_WL1271_RX_FILTER_FLAG_IP_HEADER@GOTPCREL(%rip), %rcx
	cmovlq	_WL1271_RX_FILTER_FLAG_ETHERNET_HEADER@GOTPCREL(%rip), %rcx
	movl	%r13d, %esi
	subl	%eax, %esi
	movl	(%rcx), %edx
	movl	%ebx, %r8d
	subl	%r13d, %r8d
	movslq	%r13d, %rcx
	shlq	$2, %rcx
	addq	8(%r12), %rcx
	movq	%r15, %rdi
	callq	_wl1271_rx_filter_alloc_field
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movl	%eax, %r13d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_13:
	movq	_FILTER_SIGNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_14:
	leaq	L_.str(%rip), %rdi
	callq	_wl1271_warning
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_15:
	movq	%r15, %rdi
	callq	_wl1271_rx_filter_free
	xorl	%r15d, %r15d
LBB0_16:
	movq	%r15, (%rbx)
	movl	%r13d, %eax
	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	"Failed to alloc rx filter"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_WL1271_RX_FILTER_ETH_HEADER_SIZE,4,2 ## @WL1271_RX_FILTER_ETH_HEADER_SIZE
	.comm	_WL1271_RX_FILTER_FLAG_ETHERNET_HEADER,4,2 ## @WL1271_RX_FILTER_FLAG_ETHERNET_HEADER
	.comm	_WL1271_RX_FILTER_FLAG_IP_HEADER,4,2 ## @WL1271_RX_FILTER_FLAG_IP_HEADER
	.comm	_FILTER_SIGNAL,4,2              ## @FILTER_SIGNAL
	.no_dead_strip	_wl1271_convert_wowlan_pattern_to_rx_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1271_convert_wowlan_pattern_to_rx_filter
_wl1271_convert_wowlan_pattern_to_rx_filter: ; @wl1271_convert_wowlan_pattern_to_rx_filter
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_wl1271_rx_filter_alloc
	mov	x20, x0
	cbz	x0, LBB0_12
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.2:
	mov	w22, #0
Lloh0:
	adrp	x24, _WL1271_RX_FILTER_ETH_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _WL1271_RX_FILTER_ETH_HEADER_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x25, _WL1271_RX_FILTER_FLAG_ETHERNET_HEADER@GOTPAGE
Lloh3:
	ldr	x25, [x25, _WL1271_RX_FILTER_FLAG_ETHERNET_HEADER@GOTPAGEOFF]
Lloh4:
	adrp	x26, _WL1271_RX_FILTER_FLAG_IP_HEADER@GOTPAGE
Lloh5:
	ldr	x26, [x26, _WL1271_RX_FILTER_FLAG_IP_HEADER@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
	cmp	w22, w8
	csel	w8, wzr, w8, lt
	csel	x9, x25, x26, lt
	sub	w1, w22, w8
	ldr	w2, [x9]
	sub	w4, w23, w22
	ldr	x8, [x21, #8]
	add	x3, x8, w22, sxtw #2
	mov	x0, x20
	bl	_wl1271_rx_filter_alloc_field
	cbnz	w0, LBB0_13
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	mov	x22, x23
	cmp	w23, w8
	b.ge	LBB0_11
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x1, [x21, #16]
	mov	x0, x22
	bl	_test_bit
	cbz	w0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	mov	x23, x22
	cmp	w22, w8
	b.ge	LBB0_3
LBB0_7:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x21, #16]
	mov	x0, x23
	bl	_test_bit
	cbz	w0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w8, [x24]
	cmp	w22, w8
	ccmp	w23, w8, #8, lt
	b.ge	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	add	w23, w23, #1
	ldr	w8, [x21]
	cmp	w23, w8
	b.lt	LBB0_7
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w23, w22, #1
	b	LBB0_4
LBB0_11:
	mov	w22, #0
Lloh6:
	adrp	x8, _FILTER_SIGNAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FILTER_SIGNAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_15
LBB0_12:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_wl1271_warning
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_13:
	mov	x22, x0
LBB0_14:
	mov	x0, x20
	bl	_wl1271_rx_filter_free
	mov	x20, #0
LBB0_15:
	str	x20, [x19]
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to alloc rx filter"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_WL1271_RX_FILTER_ETH_HEADER_SIZE,4,2 ; @WL1271_RX_FILTER_ETH_HEADER_SIZE
	.comm	_WL1271_RX_FILTER_FLAG_ETHERNET_HEADER,4,2 ; @WL1271_RX_FILTER_FLAG_ETHERNET_HEADER
	.comm	_WL1271_RX_FILTER_FLAG_IP_HEADER,4,2 ; @WL1271_RX_FILTER_FLAG_IP_HEADER
	.comm	_FILTER_SIGNAL,4,2              ; @FILTER_SIGNAL
	.no_dead_strip	_wl1271_convert_wowlan_pattern_to_rx_filter
.subsections_via_symbols
