	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1271_record_ap_key
_wl1271_record_ap_key:                  ## @wl1271_record_ap_key
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, %r13
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	_DEBUG_CRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wl1271_debug
	movq	_MAX_KEY_SIZE@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jge	LBB0_1
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_1:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_MAX_NUM_KEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_2
## %bb.8:
	movq	(%r14), %rcx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%r12,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%rbx, (%rdx)
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%r12
	cmpq	%r12, %rax
	jne	LBB0_9
	jmp	LBB0_13
LBB0_2:
	xorl	%r12d, %r12d
LBB0_3:
	cmpl	%eax, %r12d
	jne	LBB0_4
LBB0_13:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.14:
	movq	%rax, %r15
	movq	%rbx, (%rax)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%r15)
	movq	%r13, 32(%r15)
	movl	24(%r15), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_memcpy
	movq	16(%rbp), %rax
	movq	%rax, 16(%r15)
	movl	24(%rbp), %eax
	movl	%eax, 12(%r15)
	movl	32(%rbp), %eax
	movl	%eax, 8(%r15)
	movq	(%r14), %rax
	movl	%r12d, %ecx
	movq	%r15, (%rax,%rcx,8)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	callq	_wl1271_warning
	jmp	LBB0_6
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_CRYPT,4,2                ## @DEBUG_CRYPT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"record ap key id %d"

	.comm	_MAX_KEY_SIZE,8,3               ## @MAX_KEY_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAX_NUM_KEYS,4,2               ## @MAX_NUM_KEYS
L_.str.1:                               ## @.str.1
	.asciz	"trying to record key replacement"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_wl1271_record_ap_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1271_record_ap_key
_wl1271_record_ap_key:                  ; @wl1271_record_ap_key
	.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
	mov	x19, x7
	mov	x20, x6
	mov	x23, x5
	mov	x22, x4
	mov	x24, x3
	mov	x25, x2
	mov	x21, x1
Lloh0:
	adrp	x8, _DEBUG_CRYPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_CRYPT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wl1271_debug
Lloh5:
	adrp	x8, _MAX_KEY_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_KEY_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x8, x22
	b.ge	LBB0_2
LBB0_1:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
Lloh10:
	adrp	x8, _MAX_NUM_KEYS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MAX_NUM_KEYS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x27, #0
	ldr	x9, [x21]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x27, lsl #3]
	cbz	x10, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x10]
	cmp	x10, x25
	b.eq	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
	cmp	x8, x27
	b.ne	LBB0_4
	b	LBB0_9
LBB0_7:
	mov	w27, #0
LBB0_8:
	cmp	w27, w8
	b.ne	LBB0_12
LBB0_9:
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
LBB0_12:
Lloh15:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_15
; %bb.13:
	mov	x26, x0
	ldr	w28, [x29, #16]
	str	x25, [x0]
	stp	x22, x24, [x0, #32]
	ldr	w0, [x0, #24]
	mov	x1, x23
	mov	x2, x22
	bl	_memcpy
	mov	w0, #0
	str	x20, [x26, #16]
	stp	w28, w19, [x26, #8]
	ldr	x8, [x21]
	str	x26, [x8, w27, uxtw #3]
	b	LBB0_11
LBB0_14:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_wl1271_warning
	b	LBB0_1
LBB0_15:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_CRYPT,4,2                ; @DEBUG_CRYPT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"record ap key id %d"

	.comm	_MAX_KEY_SIZE,8,3               ; @MAX_KEY_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAX_NUM_KEYS,4,2               ; @MAX_NUM_KEYS
l_.str.1:                               ; @.str.1
	.asciz	"trying to record key replacement"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_wl1271_record_ap_key
.subsections_via_symbols
