	.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
	pushq	%rax
	.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, %r13
	movq	%rdi, %r15
	movl	%edx, %edi
	callq	_mousedev_reserve_minor
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_17
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$88, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	leaq	84(%rax), %rdi
	callq	_INIT_LIST_HEAD
	leaq	80(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	76(%rbx), %rdi
	callq	_spin_lock_init
	leaq	72(%rbx), %r13
	movq	%r13, %rdi
	callq	_mutex_init
	movl	%r14d, %esi
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.4:
	movq	_SINGLE_DEPTH_NESTING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_5:
	movq	%r13, %rdi
	callq	_lockdep_set_subclass
	leaq	68(%rbx), %rdi
	callq	_init_waitqueue_head
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	leaq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_set_name
	movq	_mixdev_close_devices@GOTPCREL(%rip), %rax
	movq	_mixdev_open_devices@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_16
LBB0_7:
	movq	_MOUSEDEV_MINOR_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MOUSEDEV_MINORS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	xorl	%edx, %edx
	cmpl	%ecx, %r12d
	cmovgel	%edx, %eax
	movl	%r12d, %edx
	subl	%eax, %edx
	leaq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_set_name
	movq	_mousedev_close_device@GOTPCREL(%rip), %rax
	movq	_mousedev_open_device@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rax), %eax
	movl	(%rcx), %ecx
	movl	%ecx, 64(%rbx)
	movl	%eax, 60(%rbx)
	movl	$1, (%rbx)
	movq	%r15, %rdi
	callq	_input_get_device
	movl	%eax, 52(%rbx)
	leaq	8(%rbx), %r13
	movq	%r13, %rdi
	callq	_dev_name
	movl	%eax, 48(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%rbx)
	movq	%rbx, 32(%rbx)
	movq	_input_class@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	movq	%r15, 16(%rbx)
LBB0_10:
	leaq	32(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_INPUT_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_MKDEV
	movl	%eax, 12(%rbx)
	movq	_mousedev_free@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r13, %rdi
	callq	_device_initialize
	testl	%r14d, %r14d
	je	LBB0_11
LBB0_12:
	movq	%rbx, %r15
	addq	$56, %r15
	movq	_mousedev_fops@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_cdev_init
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_cdev_device_add
	testl	%eax, %eax
	je	LBB0_18
## %bb.13:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_mousedev_cleanup
	testl	%r14d, %r14d
	jne	LBB0_15
## %bb.14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_input_unregister_handle
	jmp	LBB0_15
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_input_register_handle
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_12
LBB0_15:
	movq	%r13, %rdi
	callq	_put_device
LBB0_16:
	movl	%r12d, %edi
	callq	_input_free_minor
	movl	%r15d, %r12d
LBB0_17:
	movl	%r12d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_18:
	movq	%rbx, %rax
	addq	$8, %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	_SINGLE_DEPTH_NESTING,4,2       ## @SINGLE_DEPTH_NESTING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mice"

	.comm	_mixdev_open_devices,4,2        ## @mixdev_open_devices
	.comm	_mixdev_close_devices,4,2       ## @mixdev_close_devices
	.comm	_MOUSEDEV_MINOR_BASE,4,2        ## @MOUSEDEV_MINOR_BASE
	.comm	_MOUSEDEV_MINORS,4,2            ## @MOUSEDEV_MINORS
L_.str.1:                               ## @.str.1
	.asciz	"mouse%d"

	.comm	_mousedev_open_device,4,2       ## @mousedev_open_device
	.comm	_mousedev_close_device,4,2      ## @mousedev_close_device
	.comm	_input_class,4,2                ## @input_class
	.comm	_INPUT_MAJOR,4,2                ## @INPUT_MAJOR
	.comm	_mousedev_free,4,2              ## @mousedev_free
	.comm	_mousedev_fops,4,2              ## @mousedev_fops
	.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	x20, x2
	mov	x23, x1
	mov	x22, x0
	mov	x0, x2
	bl	_mousedev_reserve_minor
	mov	x19, x0
	tbnz	w0, #31, LBB0_15
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #88
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
	add	x0, x0, #84
	bl	_INIT_LIST_HEAD
	add	x0, x21, #80
	bl	_INIT_LIST_HEAD
	add	x0, x21, #76
	bl	_spin_lock_init
	add	x24, x21, #72
	mov	x0, x24
	bl	_mutex_init
Lloh3:
	adrp	x8, _SINGLE_DEPTH_NESTING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SINGLE_DEPTH_NESTING@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w20, #0
	csel	w1, wzr, w8, eq
	mov	x0, x24
	bl	_lockdep_set_subclass
	add	x0, x21, #68
	bl	_init_waitqueue_head
	cbz	w20, LBB0_5
; %bb.3:
	add	x0, x21, #8
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_set_name
Lloh8:
	adrp	x8, _mixdev_close_devices@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mixdev_close_devices@GOTPAGEOFF]
Lloh10:
	adrp	x9, _mixdev_open_devices@GOTPAGE
Lloh11:
	ldr	x9, [x9, _mixdev_open_devices@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_5:
Lloh15:
	adrp	x8, _MOUSEDEV_MINOR_BASE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MOUSEDEV_MINOR_BASE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _MOUSEDEV_MINORS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MOUSEDEV_MINORS@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	add	w9, w9, w8
	cmp	w19, w9
	csel	w8, w8, wzr, lt
	sub	w8, w19, w8
	add	x0, x21, #8
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_set_name
Lloh23:
	adrp	x8, _mousedev_close_device@GOTPAGE
Lloh24:
	ldr	x8, [x8, _mousedev_close_device@GOTPAGEOFF]
Lloh25:
	adrp	x9, _mousedev_open_device@GOTPAGE
Lloh26:
	ldr	x9, [x9, _mousedev_open_device@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	ldr	w9, [x9]
	stp	w8, w9, [x21, #60]
	mov	w8, #1
	str	w8, [x21]
	mov	x0, x22
	bl	_input_get_device
	add	x25, x21, #32
	str	w0, [x21, #52]
	add	x24, x21, #8
	mov	x0, x24
	bl	_dev_name
	str	w0, [x21, #48]
	str	x23, [x21, #40]
Lloh27:
	adrp	x8, _input_class@GOTPAGE
Lloh28:
	ldr	x8, [x8, _input_class@GOTPAGEOFF]
	stp	x8, x21, [x21, #24]
	cbz	x22, LBB0_8
; %bb.7:
	str	x22, [x21, #16]
LBB0_8:
Lloh29:
	adrp	x8, _INPUT_MAJOR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _INPUT_MAJOR@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_MKDEV
Lloh32:
	adrp	x8, _mousedev_free@GOTPAGE
Lloh33:
	ldr	x8, [x8, _mousedev_free@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	stp	w8, w0, [x21, #8]
	mov	x0, x24
	bl	_device_initialize
	cbz	w20, LBB0_12
LBB0_9:
	add	x22, x21, #56
Lloh35:
	adrp	x1, _mousedev_fops@GOTPAGE
Lloh36:
	ldr	x1, [x1, _mousedev_fops@GOTPAGEOFF]
	mov	x0, x22
	bl	_cdev_init
	mov	x0, x22
	mov	x1, x24
	bl	_cdev_device_add
	cbz	w0, LBB0_16
; %bb.10:
	mov	x22, x0
	mov	x0, x21
	bl	_mousedev_cleanup
	cbnz	w20, LBB0_13
; %bb.11:
	mov	x0, x25
	bl	_input_unregister_handle
	b	LBB0_13
LBB0_12:
	mov	x0, x25
	bl	_input_register_handle
	mov	x22, x0
	cbz	w0, LBB0_9
LBB0_13:
	mov	x0, x24
	bl	_put_device
LBB0_14:
	mov	x0, x19
	bl	_input_free_minor
	mov	x19, x22
LBB0_15:
	mov	x0, x19
	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, x21
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SINGLE_DEPTH_NESTING,4,2       ; @SINGLE_DEPTH_NESTING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mice"

	.comm	_mixdev_open_devices,4,2        ; @mixdev_open_devices
	.comm	_mixdev_close_devices,4,2       ; @mixdev_close_devices
	.comm	_MOUSEDEV_MINOR_BASE,4,2        ; @MOUSEDEV_MINOR_BASE
	.comm	_MOUSEDEV_MINORS,4,2            ; @MOUSEDEV_MINORS
l_.str.1:                               ; @.str.1
	.asciz	"mouse%d"

	.comm	_mousedev_open_device,4,2       ; @mousedev_open_device
	.comm	_mousedev_close_device,4,2      ; @mousedev_close_device
	.comm	_input_class,4,2                ; @input_class
	.comm	_INPUT_MAJOR,4,2                ; @INPUT_MAJOR
	.comm	_mousedev_free,4,2              ; @mousedev_free
	.comm	_mousedev_fops,4,2              ; @mousedev_fops
	.no_dead_strip	_mousedev_create
.subsections_via_symbols
