	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function userio_device_write
_userio_device_write:                   ## @userio_device_write
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	(%rdi), %rbx
	leaq	24(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movb	%r15b, (%rax,%rcx)
	movq	8(%rbx), %rax
	incq	%rax
	movq	_USERIO_BUFSIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	movq	%rdx, 8(%rbx)
	movslq	16(%rbx), %rax
	cmpq	%rax, %rdx
	jne	LBB0_5
## %bb.4:
	movq	_userio_misc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_5:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	addq	$20, %rbx
	movq	%rbx, %rdi
	callq	_wake_up_interruptible
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USERIO_BUFSIZE,4,2             ## @USERIO_BUFSIZE
	.comm	_userio_misc,4,2                ## @userio_misc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Buffer overflowed, userio client isn't keeping up"

	.no_dead_strip	_userio_device_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function userio_device_write
_userio_device_write:                   ; @userio_device_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	ldr	x21, [x0]
	add	x19, x21, #24
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldp	x8, x9, [x21]
	strb	w20, [x8, x9]
	ldr	x8, [x21, #8]
	add	x8, x8, #1
Lloh0:
	adrp	x9, _USERIO_BUFSIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _USERIO_BUFSIZE@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x21, #8]
	ldrsw	x9, [x21, #16]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _userio_misc@GOTPAGE
Lloh4:
	ldr	x8, [x8, _userio_misc@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_2:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	add	x0, x21, #20
	bl	_wake_up_interruptible
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_USERIO_BUFSIZE,4,2             ; @USERIO_BUFSIZE
	.comm	_userio_misc,4,2                ; @userio_misc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Buffer overflowed, userio client isn't keeping up"

	.no_dead_strip	_userio_device_write
.subsections_via_symbols
