	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orinoco_set_key
_orinoco_set_key:                       ## @orinoco_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	%r9, %r12
	movl	%r8d, %r14d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movslq	%esi, %r13
	shlq	$5, %r13
	movq	16(%rax,%r13), %rdi
	callq	_kzfree
	movq	(%rbx), %rax
	movq	24(%rax,%r13), %rdi
	callq	_kzfree
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.1:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_kzalloc
	movq	(%rbx), %rcx
	movq	%rax, 16(%rcx,%r13)
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_2
LBB0_3:
	movq	(%rbx), %rcx
	movq	$0, 16(%rcx,%r13)
LBB0_4:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %r12d
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.5:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_kzalloc
	movq	(%rbx), %rcx
	movq	%rax, 24(%rcx,%r13)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	16(%rcx,%r13), %rdi
	callq	_kfree
	movq	(%rbx), %rcx
	movq	$0, 16(%rcx,%r13)
LBB0_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rcx,%r13)
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_7:
	movq	$0, 24(%rcx,%r13)
LBB0_8:
	movl	%r14d, (%rcx,%r13)
	movl	%r12d, 4(%rcx,%r13)
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:
	movq	16(%rcx,%r13), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
LBB0_10:
	testl	%r12d, %r12d
	je	LBB0_12
## %bb.11:
	movq	(%rbx), %rax
	movq	24(%rax,%r13), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_memcpy
LBB0_12:
	cmpl	$128, %r15d
	je	LBB0_15
## %bb.13:
	cmpl	$129, %r15d
	jne	LBB0_19
## %bb.14:
	movq	_WLAN_CIPHER_SUITE_TKIP@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_15:
	movq	_SMALL_KEY_SIZE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jge	LBB0_16
## %bb.17:
	movq	_WLAN_CIPHER_SUITE_WEP104@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_19:
	movq	(%rbx), %rax
	movq	$0, 8(%rax,%r13)
	jmp	LBB0_20
LBB0_16:
	movq	_WLAN_CIPHER_SUITE_WEP40@GOTPCREL(%rip), %rax
LBB0_18:
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movq	%rax, 8(%rcx,%r13)
LBB0_20:
	xorl	%eax, %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_WLAN_CIPHER_SUITE_TKIP,8,3     ## @WLAN_CIPHER_SUITE_TKIP
	.comm	_SMALL_KEY_SIZE,4,2             ## @SMALL_KEY_SIZE
	.comm	_WLAN_CIPHER_SUITE_WEP104,8,3   ## @WLAN_CIPHER_SUITE_WEP104
	.comm	_WLAN_CIPHER_SUITE_WEP40,8,3    ## @WLAN_CIPHER_SUITE_WEP40
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_orinoco_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orinoco_set_key
_orinoco_set_key:                       ; @orinoco_set_key
	.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	x22, x6
	mov	x23, x5
	mov	x20, x4
	mov	x24, x3
	mov	x21, x2
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
	ldr	x8, [x0]
	sxtw	x25, w1
	sbfiz	x26, x1, #5, #32
	add	x8, x8, x26
	ldr	x0, [x8, #16]
	bl	_kzfree
	ldr	x8, [x19]
	add	x8, x8, x26
	ldr	x0, [x8, #24]
	bl	_kzfree
Lloh0:
	adrp	x26, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x26, [x26, _GFP_ATOMIC@GOTPAGEOFF]
	cbz	w20, LBB0_6
; %bb.1:
	ldr	w1, [x26]
	mov	x0, x20
	bl	_kzalloc
	ldr	x8, [x19]
	add	x9, x8, x25, lsl #5
	str	x0, [x9, #16]
	cbz	x0, LBB0_5
; %bb.2:
	cbz	w22, LBB0_7
LBB0_3:
	ldr	w1, [x26]
	mov	x0, x22
	bl	_kzalloc
	ldr	x8, [x19]
	add	x9, x8, x25, lsl #5
	str	x0, [x9, #24]
	cbnz	x0, LBB0_8
; %bb.4:
	lsl	x20, x25, #5
	add	x8, x8, x20
	ldr	x0, [x8, #16]
	bl	_kfree
	ldr	x8, [x19]
	add	x9, x8, x20
	str	xzr, [x9, #16]
LBB0_5:
	add	x8, x8, x25, lsl #5
	stp	xzr, xzr, [x8]
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_6:
	ldr	x8, [x19]
	add	x9, x8, x25, lsl #5
	str	xzr, [x9, #16]
	cbnz	w22, LBB0_3
LBB0_7:
	add	x9, x8, x25, lsl #5
	str	xzr, [x9, #24]
LBB0_8:
	add	x8, x8, x25, lsl #5
	stp	w20, w22, [x8]
	cbz	w20, LBB0_10
; %bb.9:
	ldr	x0, [x8, #16]
	mov	x1, x24
	mov	x2, x20
	bl	_memcpy
LBB0_10:
	cbz	w22, LBB0_12
; %bb.11:
	ldr	x8, [x19]
	add	x8, x8, x25, lsl #5
	ldr	x0, [x8, #24]
	mov	x1, x23
	mov	x2, x22
	bl	_memcpy
LBB0_12:
	cmp	w21, #128
	b.eq	LBB0_15
; %bb.13:
	cmp	w21, #129
	b.ne	LBB0_17
; %bb.14:
	mov	w0, #0
Lloh5:
	adrp	x8, _WLAN_CIPHER_SUITE_TKIP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WLAN_CIPHER_SUITE_TKIP@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
	mov	w0, #0
Lloh7:
	adrp	x8, _SMALL_KEY_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SMALL_KEY_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _WLAN_CIPHER_SUITE_WEP104@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WLAN_CIPHER_SUITE_WEP104@GOTPAGEOFF]
Lloh12:
	adrp	x10, _WLAN_CIPHER_SUITE_WEP40@GOTPAGE
Lloh13:
	ldr	x10, [x10, _WLAN_CIPHER_SUITE_WEP40@GOTPAGEOFF]
	cmp	w8, w20
	csel	x8, x9, x10, lt
LBB0_16:
	ldr	x8, [x8]
	ldr	x9, [x19]
	add	x9, x9, x25, lsl #5
	str	x8, [x9, #8]
	b	LBB0_18
LBB0_17:
	mov	w0, #0
	ldr	x8, [x19]
	add	x8, x8, x25, lsl #5
	str	xzr, [x8, #8]
LBB0_18:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_WLAN_CIPHER_SUITE_TKIP,8,3     ; @WLAN_CIPHER_SUITE_TKIP
	.comm	_SMALL_KEY_SIZE,4,2             ; @SMALL_KEY_SIZE
	.comm	_WLAN_CIPHER_SUITE_WEP104,8,3   ; @WLAN_CIPHER_SUITE_WEP104
	.comm	_WLAN_CIPHER_SUITE_WEP40,8,3    ; @WLAN_CIPHER_SUITE_WEP40
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_orinoco_set_key
.subsections_via_symbols
