	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p54_set_key
_p54_set_key:                           ## @p54_set_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	_modparam_nohwcrypt@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	%r8, %r13
	movq	_IEEE80211_KEY_FLAG_RX_MGMT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r8)
	je	LBB0_3
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_25:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rcx, %r12
	movl	%esi, %ebx
	movq	(%rdi), %r15
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_SET_KEY@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_16
## %bb.4:
	movl	4(%r13), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_9
## %bb.5:
	cmpl	$131, %eax
	je	LBB0_11
## %bb.6:
	cmpl	$130, %eax
	jne	LBB0_26
## %bb.7:
	movq	_BR_DESC_PRIV_CAP_MICHAEL@GOTPCREL(%rip), %rax
	movq	_BR_DESC_PRIV_CAP_TKIP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%r15)
	je	LBB0_26
## %bb.8:
	movq	_P54_CRYPTO_TKIPMICHAEL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_16:
	movl	8(%r13), %r14d
	xorl	%ebx, %ebx
	cmpl	$255, %r14d
	je	LBB0_24
## %bb.17:
	movl	8(%r15), %edi
	xorl	%ebx, %ebx
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_bitmap_release_region
	testq	%r12, %r12
	je	LBB0_19
LBB0_20:
	movq	(%r12), %r9
	jmp	LBB0_21
LBB0_9:
	movq	_BR_DESC_PRIV_CAP_WEP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_26
## %bb.10:
	movq	_P54_CRYPTO_WEP@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_BR_DESC_PRIV_CAP_AESCCMP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_26
## %bb.12:
	movq	_P54_CRYPTO_AESCCMP@GOTPCREL(%rip), %rax
LBB0_13:
	movq	_IEEE80211_KEY_FLAG_GENERATE_IV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r13)
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	8(%r15), %edi
	movl	12(%r15), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_bitmap_find_free_region
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	movl	%eax, %r14d
	movq	_IEEE80211_KEY_FLAG_RESERVE_TAILROOM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testq	%r12, %r12
	jne	LBB0_20
LBB0_19:
	xorl	%r9d, %r9d
LBB0_21:
	movl	20(%r13), %ecx
	movl	12(%r13), %eax
	movl	16(%r13), %r8d
	movl	%eax, (%rsp)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_p54_upload_key
	testl	%eax, %eax
	je	LBB0_23
## %bb.22:
	movl	8(%r15), %edi
	xorl	%ebx, %ebx
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_bitmap_release_region
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_26:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_23:
	movl	%r14d, 8(%r13)
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_14:
	movl	$255, 8(%r13)
LBB0_24:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_modparam_nohwcrypt,8,3         ## @modparam_nohwcrypt
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_IEEE80211_KEY_FLAG_RX_MGMT,4,2 ## @IEEE80211_KEY_FLAG_RX_MGMT
	.comm	_SET_KEY,4,2                    ## @SET_KEY
	.comm	_BR_DESC_PRIV_CAP_MICHAEL,4,2   ## @BR_DESC_PRIV_CAP_MICHAEL
	.comm	_BR_DESC_PRIV_CAP_TKIP,4,2      ## @BR_DESC_PRIV_CAP_TKIP
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ## @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_P54_CRYPTO_TKIPMICHAEL,8,3     ## @P54_CRYPTO_TKIPMICHAEL
	.comm	_BR_DESC_PRIV_CAP_WEP,4,2       ## @BR_DESC_PRIV_CAP_WEP
	.comm	_P54_CRYPTO_WEP,8,3             ## @P54_CRYPTO_WEP
	.comm	_BR_DESC_PRIV_CAP_AESCCMP,4,2   ## @BR_DESC_PRIV_CAP_AESCCMP
	.comm	_P54_CRYPTO_AESCCMP,8,3         ## @P54_CRYPTO_AESCCMP
	.comm	_IEEE80211_KEY_FLAG_RESERVE_TAILROOM,4,2 ## @IEEE80211_KEY_FLAG_RESERVE_TAILROOM
	.no_dead_strip	_p54_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p54_set_key
_p54_set_key:                           ; @p54_set_key
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _modparam_nohwcrypt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _modparam_nohwcrypt@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x20, x4
	ldr	w8, [x4]
Lloh3:
	adrp	x9, _IEEE80211_KEY_FLAG_RX_MGMT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_RX_MGMT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x22, x3
	mov	x23, x1
	ldr	x21, [x0]
	add	x19, x21, #4
	mov	x0, x19
	bl	_mutex_lock
Lloh9:
	adrp	x8, _SET_KEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SET_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_10
; %bb.5:
	ldr	w8, [x20, #4]
	sub	w9, w8, #128
	cmp	w9, #2
	b.lo	LBB0_14
; %bb.6:
	cmp	w8, #131
	b.eq	LBB0_16
; %bb.7:
	cmp	w8, #130
	b.ne	LBB0_23
; %bb.8:
	ldr	w8, [x21]
Lloh12:
	adrp	x9, _BR_DESC_PRIV_CAP_MICHAEL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BR_DESC_PRIV_CAP_MICHAEL@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _BR_DESC_PRIV_CAP_TKIP@GOTPAGE
Lloh16:
	ldr	x10, [x10, _BR_DESC_PRIV_CAP_TKIP@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_23
; %bb.9:
Lloh18:
	adrp	x8, _P54_CRYPTO_TKIPMICHAEL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _P54_CRYPTO_TKIPMICHAEL@GOTPAGEOFF]
	b	LBB0_18
LBB0_10:
	ldr	w23, [x20, #8]
	cmp	w23, #255
	b.ne	LBB0_12
; %bb.11:
	mov	w21, #0
	b	LBB0_26
LBB0_12:
	ldr	w0, [x21, #8]
	mov	x1, x23
	mov	w2, #0
	bl	_bitmap_release_region
	mov	x24, #0
	cbz	x22, LBB0_20
LBB0_13:
	ldr	x5, [x22]
	b	LBB0_21
LBB0_14:
	ldr	w8, [x21]
Lloh20:
	adrp	x9, _BR_DESC_PRIV_CAP_WEP@GOTPAGE
Lloh21:
	ldr	x9, [x9, _BR_DESC_PRIV_CAP_WEP@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_23
; %bb.15:
Lloh23:
	adrp	x8, _P54_CRYPTO_WEP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _P54_CRYPTO_WEP@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:
	ldr	w8, [x21]
Lloh25:
	adrp	x9, _BR_DESC_PRIV_CAP_AESCCMP@GOTPAGE
Lloh26:
	ldr	x9, [x9, _BR_DESC_PRIV_CAP_AESCCMP@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_23
; %bb.17:
Lloh28:
	adrp	x8, _P54_CRYPTO_AESCCMP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _P54_CRYPTO_AESCCMP@GOTPAGEOFF]
LBB0_18:
Lloh30:
	adrp	x9, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	ldr	w10, [x20]
	orr	w9, w10, w9
	str	w9, [x20]
	ldr	x24, [x8]
	ldp	w0, w1, [x21, #8]
	mov	w2, #0
	bl	_bitmap_find_free_region
	tbnz	w0, #31, LBB0_25
; %bb.19:
	mov	x23, x0
Lloh33:
	adrp	x8, _IEEE80211_KEY_FLAG_RESERVE_TAILROOM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IEEE80211_KEY_FLAG_RESERVE_TAILROOM@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	cbnz	x22, LBB0_13
LBB0_20:
	mov	x5, #0
LBB0_21:
	ldp	w4, w3, [x20, #16]
	ldr	w6, [x20, #12]
	mov	x0, x21
	mov	x1, x24
	mov	x2, x23
	bl	_p54_upload_key
	cbz	w0, LBB0_24
; %bb.22:
	ldr	w0, [x21, #8]
	mov	x1, x23
	mov	w2, #0
	bl	_bitmap_release_region
LBB0_23:
Lloh36:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_26
LBB0_24:
	mov	w21, #0
	str	w23, [x20, #8]
	b	LBB0_26
LBB0_25:
	mov	w21, #0
	mov	w8, #255
	str	w8, [x20, #8]
LBB0_26:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_modparam_nohwcrypt,8,3         ; @modparam_nohwcrypt
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_IEEE80211_KEY_FLAG_RX_MGMT,4,2 ; @IEEE80211_KEY_FLAG_RX_MGMT
	.comm	_SET_KEY,4,2                    ; @SET_KEY
	.comm	_BR_DESC_PRIV_CAP_MICHAEL,4,2   ; @BR_DESC_PRIV_CAP_MICHAEL
	.comm	_BR_DESC_PRIV_CAP_TKIP,4,2      ; @BR_DESC_PRIV_CAP_TKIP
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ; @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_P54_CRYPTO_TKIPMICHAEL,8,3     ; @P54_CRYPTO_TKIPMICHAEL
	.comm	_BR_DESC_PRIV_CAP_WEP,4,2       ; @BR_DESC_PRIV_CAP_WEP
	.comm	_P54_CRYPTO_WEP,8,3             ; @P54_CRYPTO_WEP
	.comm	_BR_DESC_PRIV_CAP_AESCCMP,4,2   ; @BR_DESC_PRIV_CAP_AESCCMP
	.comm	_P54_CRYPTO_AESCCMP,8,3         ; @P54_CRYPTO_AESCCMP
	.comm	_IEEE80211_KEY_FLAG_RESERVE_TAILROOM,4,2 ; @IEEE80211_KEY_FLAG_RESERVE_TAILROOM
	.no_dead_strip	_p54_set_key
.subsections_via_symbols
