	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1271_ap_init_hwenc
_wl1271_ap_init_hwenc:                  ## @wl1271_ap_init_hwenc
	.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, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_MAX_NUM_KEYS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_1
## %bb.2:
	movq	8(%r15), %rax
	movq	(%rax), %r14
	testq	%r14, %r14
	je	LBB0_3
## %bb.4:
	xorl	%ebx, %ebx
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	_WL12XX_INVALID_LINK_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15), %rax
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_KEY_ADD_OR_REPLACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	32(%r14), %ecx
	movq	8(%r14), %r8
	movl	28(%r14), %r9d
	movl	24(%r14), %r10d
	movl	20(%r14), %r11d
	movl	16(%r14), %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	pushq	%r13
	pushq	%r11
	pushq	%rax
	pushq	%r10
	callq	_wl1271_cmd_set_ap_key
	addq	$32, %rsp
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r14), %rax
	movq	_KEY_WEP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$1, %eax
	cmovel	%eax, %ebx
	movq	_MAX_NUM_KEYS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jge	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%r12,8), %r14
	incq	%r12
	testq	%r14, %r14
	jne	LBB0_6
LBB0_10:
	testl	%ebx, %ebx
	sete	%al
	testb	%al, %al
	je	LBB0_12
	jmp	LBB0_13
LBB0_1:
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_3:
	movb	$1, %al
	xorl	%r13d, %r13d
	testb	%al, %al
	jne	LBB0_13
LBB0_12:
	movl	16(%r15), %esi
	movq	(%r15), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_wl12xx_cmd_set_default_wep_key
	movl	%eax, %r13d
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_wl1271_free_ap_keys
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_NUM_KEYS,4,2               ## @MAX_NUM_KEYS
	.comm	_WL12XX_INVALID_LINK_ID,8,3     ## @WL12XX_INVALID_LINK_ID
	.comm	_KEY_ADD_OR_REPLACE,4,2         ## @KEY_ADD_OR_REPLACE
	.comm	_KEY_WEP,8,3                    ## @KEY_WEP
	.no_dead_strip	_wl1271_ap_init_hwenc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1271_ap_init_hwenc
_wl1271_ap_init_hwenc:                  ; @wl1271_ap_init_hwenc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _MAX_NUM_KEYS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_NUM_KEYS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x28, [x8]
	cbz	x28, LBB0_10
; %bb.2:
	mov	w23, #0
	mov	w24, #1
Lloh2:
	adrp	x25, _WL12XX_INVALID_LINK_ID@GOTPAGE
Lloh3:
	ldr	x25, [x25, _WL12XX_INVALID_LINK_ID@GOTPAGEOFF]
Lloh4:
	adrp	x26, _KEY_ADD_OR_REPLACE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _KEY_ADD_OR_REPLACE@GOTPAGEOFF]
Lloh6:
	adrp	x27, _KEY_WEP@GOTPAGE
Lloh7:
	ldr	x27, [x27, _KEY_WEP@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x7, [x28]
	ldr	x8, [x25]
	cmp	x7, x8
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x7, [x19]
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x26]
	ldp	w5, w3, [x28, #28]
	ldr	x4, [x28, #8]
	ldp	w8, w6, [x28, #20]
	ldr	w9, [x28, #16]
	stp	w8, w9, [sp]
	mov	x0, x20
	mov	x1, x19
	bl	_wl1271_cmd_set_ap_key
	mov	x21, x0
	tbnz	w0, #31, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x28, #8]
	ldr	x9, [x27]
	cmp	x8, x9
	csinc	w23, w23, wzr, ne
	ldrsw	x8, [x22]
	cmp	x24, x8
	b.ge	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	x28, [x8, x24, lsl #3]
	add	x24, x24, #1
	cbnz	x28, LBB0_3
LBB0_8:
	cmp	w23, #0
	cset	w8, eq
	tbz	w8, #0, LBB0_11
	b	LBB0_12
LBB0_9:
	mov	w21, #0
	b	LBB0_12
LBB0_10:
	mov	w21, #0
	mov	w8, #1
	tbnz	w8, #0, LBB0_12
LBB0_11:
	ldr	w1, [x19, #16]
	ldr	x2, [x19]
	mov	x0, x20
	bl	_wl12xx_cmd_set_default_wep_key
	mov	x21, x0
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_wl1271_free_ap_keys
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_NUM_KEYS,4,2               ; @MAX_NUM_KEYS
	.comm	_WL12XX_INVALID_LINK_ID,8,3     ; @WL12XX_INVALID_LINK_ID
	.comm	_KEY_ADD_OR_REPLACE,4,2         ; @KEY_ADD_OR_REPLACE
	.comm	_KEY_WEP,8,3                    ; @KEY_WEP
	.no_dead_strip	_wl1271_ap_init_hwenc
.subsections_via_symbols
