	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orinoco_ioctl_set_genie
_orinoco_ioctl_set_genie:               ## @orinoco_ioctl_set_genie
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r12
	callq	_ndev_priv
	movq	%rax, %r14
	movq	(%r12), %rsi
	movq	_IEEE80211_MAX_DATA_LEN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jg	LBB0_3
## %bb.1:
	testq	%rbx, %rbx
	jne	LBB0_5
## %bb.2:
	testq	%rsi, %rsi
	je	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.9:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_kmemdup
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_7
## %bb.10:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_6:
	xorl	%r15d, %r15d
LBB0_7:
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_orinoco_lock
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%r15, %rdi
	callq	_kfree
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_11:
	movq	8(%r14), %rdi
	callq	_kfree
	movq	%r15, 8(%r14)
	movq	(%r12), %rax
	movq	%rax, (%r14)
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_orinoco_unlock
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_MAX_DATA_LEN,8,3     ## @IEEE80211_MAX_DATA_LEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_orinoco_ioctl_set_genie
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orinoco_ioctl_set_genie
_orinoco_ioctl_set_genie:               ; @orinoco_ioctl_set_genie
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x3
	mov	x19, x2
	bl	_ndev_priv
	ldr	x1, [x19]
Lloh0:
	adrp	x8, _IEEE80211_MAX_DATA_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_MAX_DATA_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, x8
	b.gt	LBB0_3
; %bb.1:
	mov	x20, x0
	cbnz	x21, LBB0_6
; %bb.2:
	cbz	x1, LBB0_6
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	add	sp, sp, #64
	ret
LBB0_6:
	cbz	x1, LBB0_9
; %bb.7:
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_kmemdup
	mov	x21, x0
	cbnz	x0, LBB0_10
; %bb.8:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_9:
	mov	x21, #0
LBB0_10:
	add	x1, sp, #8
	mov	x0, x20
	bl	_orinoco_lock
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x21
	bl	_kfree
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_12:
	ldr	x0, [x20, #8]
	bl	_kfree
	str	x21, [x20, #8]
	ldr	x8, [x19]
	str	x8, [x20]
	add	x1, sp, #8
	mov	x0, x20
	bl	_orinoco_unlock
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_MAX_DATA_LEN,8,3     ; @IEEE80211_MAX_DATA_LEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_orinoco_ioctl_set_genie
.subsections_via_symbols
