	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function serio_handle_event
_serio_handle_event:                    ## @serio_handle_event
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_serio_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	xorl	%eax, %eax
	callq	_serio_get_event
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	leaq	LJTI0_0(%rip), %r14
	jmp	LBB0_2
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	callq	_serio_attach_driver
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_serio_remove_duplicate_events
	movq	%rbx, %rdi
	callq	_serio_free_event
	xorl	%eax, %eax
	callq	_serio_get_event
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r14,%rax,4), %rax
	addq	%r14, %rax
	jmpq	*%rax
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	callq	_serio_disconnect_port
	movl	4(%rbx), %edi
	callq	_serio_find_driver
	jmp	LBB0_9
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	callq	_serio_add_port
	jmp	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	callq	_serio_reconnect_subtree
	jmp	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	callq	_serio_reconnect_port
	jmp	LBB0_9
LBB0_10:
	movq	_serio_mutex@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_5
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_serio_mutex,4,2                ## @serio_mutex
	.no_dead_strip	_serio_handle_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function serio_handle_event
_serio_handle_event:                    ; @serio_handle_event
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x0, _serio_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _serio_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	bl	_serio_get_event
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x20, lJTI0_0@PAGE
Lloh3:
	add	x20, x20, lJTI0_0@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #4]
	bl	_serio_attach_driver
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldp	w1, w0, [x19]
	bl	_serio_remove_duplicate_events
	mov	x0, x19
	bl	_serio_free_event
	bl	_serio_get_event
	mov	x19, x0
	cbz	x0, LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	adr	x9, LBB0_2
	ldrb	w10, [x20, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #4]
	bl	_serio_disconnect_port
	ldr	w0, [x19, #4]
	bl	_serio_find_driver
	b	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #4]
	bl	_serio_add_port
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #4]
	bl	_serio_reconnect_subtree
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #4]
	bl	_serio_reconnect_port
	b	LBB0_3
LBB0_10:
Lloh4:
	adrp	x0, _serio_mutex@GOTPAGE
Lloh5:
	ldr	x0, [x0, _serio_mutex@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_serio_mutex,4,2                ; @serio_mutex
	.no_dead_strip	_serio_handle_event
.subsections_via_symbols
