	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mode_store
_mode_store:                            ## @mode_store
	.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	%rcx, %r13
	movq	%rdx, %rbx
	movq	%rdi, %r15
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	_CAP_SYS_RAWIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	movl	$10, %esi
	movq	%r13, %rdx
	callq	_memchr
	movq	%rax, %rsi
	subq	%rbx, %rsi
	testq	%rax, %rax
	cmoveq	%r13, %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_kstrndup
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %r12
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	_msc_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_match_string
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_kfree
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_msc_buffer_unlocked_free_unless_used
	testl	%eax, %eax
	je	LBB0_14
## %bb.4:
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%r15d, %r13d
	jmp	LBB0_8
LBB0_5:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_9:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	cmpl	$0, 24(%r14)
	je	LBB0_16
## %bb.10:
	movq	%r12, %rdi
	callq	_msu_buffer_get
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_kfree
	testq	%rbx, %rbx
	je	LBB0_17
## %bb.11:
	movq	%r14, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	cmpq	8(%r14), %rbx
	je	LBB0_18
## %bb.12:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_msc_buffer_unlocked_free_unless_used
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_19
LBB0_13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_msu_buffer_put
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %r13d
	jmp	LBB0_8
LBB0_14:
	movq	%rbx, %rdi
	callq	_msc_buffer_unassign
	movl	%r14d, (%rbx)
LBB0_15:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
LBB0_16:
	movq	%r12, %rdi
	callq	_kfree
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_8:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%rbx, %rdi
	callq	_msu_buffer_put
	jmp	LBB0_15
LBB0_19:
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	callq	*(%r15)
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_msc_buffer_unassign
	movq	%rbx, 16(%r14)
	movq	%r15, 8(%r14)
	movl	-44(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_15
LBB0_21:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.22:
	negl	%ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_CAP_SYS_RAWIO,4,2              ## @CAP_SYS_RAWIO
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_msc_mode,4,2                   ## @msc_mode
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mode_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mode_store
_mode_store:                            ; @mode_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x21, x0
	bl	_dev_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _CAP_SYS_RAWIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_SYS_RAWIO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x22
	mov	w1, #10
	mov	x2, x19
	bl	_memchr
	sub	x8, x0, x22
	cmp	x0, #0
	csel	x1, x19, x8, eq
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_kstrndup
	cbz	x0, LBB0_6
; %bb.2:
	mov	x22, x0
Lloh6:
	adrp	x8, _msc_mode@GOTPAGE
Lloh7:
	ldr	x8, [x8, _msc_mode@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_ARRAY_SIZE
	mov	x1, x0
	mov	x0, x23
	mov	x2, x22
	bl	_match_string
	str	w0, [sp, #12]
	tbnz	w0, #31, LBB0_7
; %bb.3:
	mov	x23, x0
	mov	x0, x22
	bl	_kfree
	add	x22, x20, #4
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x20
	bl	_msc_buffer_unlocked_free_unless_used
	cbz	w0, LBB0_12
; %bb.4:
	mov	x21, x0
	mov	x0, x22
	bl	_mutex_unlock
	mov	w19, w21
	b	LBB0_17
LBB0_5:
Lloh9:
	adrp	x8, _EPERM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_16
LBB0_6:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_16
LBB0_7:
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_14
; %bb.8:
	mov	x0, x22
	bl	_msu_buffer_get
	mov	x23, x0
	mov	x0, x22
	bl	_kfree
	cbz	x23, LBB0_15
; %bb.9:
	add	x22, x20, #4
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x20, #8]
	cmp	x23, x8
	b.eq	LBB0_18
; %bb.10:
	mov	x0, x20
	bl	_msc_buffer_unlocked_free_unless_used
	mov	x24, x0
	cbz	w0, LBB0_19
LBB0_11:
	mov	x0, x23
	bl	_msu_buffer_put
	mov	x0, x22
	bl	_mutex_unlock
	mov	w19, w24
	b	LBB0_17
LBB0_12:
	mov	x0, x20
	bl	_msc_buffer_unassign
	str	w23, [x20]
LBB0_13:
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_17
LBB0_14:
	mov	x0, x22
	bl	_kfree
LBB0_15:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_17:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
LBB0_18:
	mov	x0, x23
	bl	_msu_buffer_put
	b	LBB0_13
LBB0_19:
	ldr	x8, [x23]
	add	x1, sp, #12
	mov	x0, x21
	blr	x8
	cbz	x0, LBB0_21
; %bb.20:
	mov	x21, x0
	mov	x0, x20
	bl	_msc_buffer_unassign
	stp	x23, x21, [x20, #8]
	ldr	w8, [sp, #12]
	str	w8, [x20]
	b	LBB0_13
LBB0_21:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cbz	w8, LBB0_13
; %bb.22:
	neg	w24, w8
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CAP_SYS_RAWIO,4,2              ; @CAP_SYS_RAWIO
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_msc_mode,4,2                   ; @msc_mode
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mode_store
.subsections_via_symbols
