	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mousedev_create
_mousedev_create:                       ## @mousedev_create
	.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
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$80, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %r12
	leaq	72(%rax), %rdi
	callq	_INIT_LIST_HEAD
	leaq	68(%r15), %rdi
	callq	_INIT_LIST_HEAD
	leaq	64(%r15), %rdi
	callq	_spin_lock_init
	leaq	60(%r15), %rbx
	movq	%rbx, %rdi
	callq	_mutex_init
	movq	_MOUSEDEV_MIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%esi, %esi
	cmpl	%r14d, %eax
	cmovel	%eax, %esi
	movq	%rbx, %rdi
	callq	_lockdep_set_subclass
	leaq	56(%r15), %rdi
	callq	_init_waitqueue_head
	leaq	8(%r15), %r13
	movq	_MOUSEDEV_MIX@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_set_name
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_set_name
LBB0_5:
	movl	%r14d, (%r12)
	movl	$1, 4(%r12)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_input_get_device
	movl	%eax, 52(%r12)
	movq	%r13, %rdi
	callq	_dev_name
	movl	%eax, 48(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%r12)
	movq	%r12, 32(%r12)
	movq	_input_class@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r12)
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.6:
	movq	%rbx, 16(%r12)
LBB0_7:
	addq	$32, %r15
	movq	_INPUT_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MOUSEDEV_MINOR_BASE@GOTPCREL(%rip), %rax
	movslq	%r14d, %rsi
	addq	(%rax), %rsi
	callq	_MKDEV
	movl	%eax, 12(%r12)
	movq	_mousedev_free@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_device_initialize
	movq	_MOUSEDEV_MIX@GOTPCREL(%rip), %r13
	cmpl	%r14d, (%r13)
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_input_register_handle
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
LBB0_9:
	movq	%r12, %rdi
	callq	_mousedev_install_chrdev
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
## %bb.12:
	cmpl	%r14d, (%r13)
	je	LBB0_14
LBB0_13:
	movq	%r15, %rdi
	callq	_input_unregister_handle
LBB0_14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_put_device
LBB0_15:
	movl	%ebx, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_device_add
	testl	%eax, %eax
	je	LBB0_16
## %bb.11:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mousedev_cleanup
	cmpl	%r14d, (%r13)
	jne	LBB0_13
	jmp	LBB0_14
LBB0_16:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MOUSEDEV_MIX,4,2               ## @MOUSEDEV_MIX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mice"

L_.str.1:                               ## @.str.1
	.asciz	"mouse%d"

	.comm	_input_class,4,2                ## @input_class
	.comm	_INPUT_MAJOR,4,2                ## @INPUT_MAJOR
	.comm	_MOUSEDEV_MINOR_BASE,8,3        ## @MOUSEDEV_MINOR_BASE
	.comm	_mousedev_free,4,2              ## @mousedev_free
	.no_dead_strip	_mousedev_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mousedev_create
_mousedev_create:                       ; @mousedev_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #80
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	add	x0, x0, #72
	bl	_INIT_LIST_HEAD
	add	x0, x20, #68
	bl	_INIT_LIST_HEAD
	add	x0, x20, #64
	bl	_spin_lock_init
	add	x21, x20, #60
	mov	x0, x21
	bl	_mutex_init
Lloh3:
	adrp	x25, _MOUSEDEV_MIX@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MOUSEDEV_MIX@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, w19
	csel	w1, w8, wzr, eq
	mov	x0, x21
	bl	_lockdep_set_subclass
	add	x0, x20, #56
	bl	_init_waitqueue_head
	ldr	w8, [x25]
	add	x21, x20, #8
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.2:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_15
LBB0_4:
	str	x19, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x21
	bl	_dev_set_name
	mov	w8, #1
	stp	w19, w8, [x20]
	mov	x0, x22
	bl	_input_get_device
	add	x24, x20, #32
	str	w0, [x20, #52]
	mov	x0, x21
	bl	_dev_name
	str	w0, [x20, #48]
	str	x23, [x20, #40]
Lloh12:
	adrp	x8, _input_class@GOTPAGE
Lloh13:
	ldr	x8, [x8, _input_class@GOTPAGEOFF]
	stp	x8, x20, [x20, #24]
	cbz	x22, LBB0_7
; %bb.6:
	str	x22, [x20, #16]
LBB0_7:
Lloh14:
	adrp	x8, _INPUT_MAJOR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _INPUT_MAJOR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x8, _MOUSEDEV_MINOR_BASE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MOUSEDEV_MINOR_BASE@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	add	x1, x8, w19, sxtw
	bl	_MKDEV
Lloh20:
	adrp	x8, _mousedev_free@GOTPAGE
Lloh21:
	ldr	x8, [x8, _mousedev_free@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	stp	w8, w0, [x20, #8]
	mov	x0, x21
	bl	_device_initialize
	ldr	w8, [x25]
	cmp	w8, w19
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x24
	bl	_input_register_handle
	mov	x22, x0
	cbnz	w0, LBB0_14
LBB0_9:
	mov	x0, x20
	bl	_mousedev_install_chrdev
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.10:
	mov	x0, x21
	bl	_device_add
	cbz	w0, LBB0_16
; %bb.11:
	mov	x22, x0
	mov	x0, x20
	bl	_mousedev_cleanup
LBB0_12:
	ldr	w8, [x25]
	cmp	w8, w19
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x24
	bl	_input_unregister_handle
LBB0_14:
	mov	x0, x21
	bl	_put_device
LBB0_15:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_ERR_PTR
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MOUSEDEV_MIX,4,2               ; @MOUSEDEV_MIX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mice"

l_.str.1:                               ; @.str.1
	.asciz	"mouse%d"

	.comm	_input_class,4,2                ; @input_class
	.comm	_INPUT_MAJOR,4,2                ; @INPUT_MAJOR
	.comm	_MOUSEDEV_MINOR_BASE,8,3        ; @MOUSEDEV_MINOR_BASE
	.comm	_mousedev_free,4,2              ; @mousedev_free
	.no_dead_strip	_mousedev_create
.subsections_via_symbols
