	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function serio_add_port
_serio_add_port:                        ## @serio_add_port
	.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	%rdi, %rbx
	movq	40(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_serio_pause_rx
	leaq	32(%rbx), %rdi
	leaq	28(%r14), %rsi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_serio_continue_rx
LBB0_2:
	leaq	24(%rbx), %rdi
	movq	_serio_list@GOTPCREL(%rip), %rsi
	callq	_list_add_tail
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_4:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_device_add
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %r8d
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_serio_list,4,2                 ## @serio_list
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device_add() failed for %s (%s), error: %d\n"

	.no_dead_strip	_serio_add_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function serio_add_port
_serio_add_port:                        ; @serio_add_port
	.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
	mov	x19, x0
	ldr	x20, [x0, #40]
	cbz	x20, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_serio_pause_rx
	add	x0, x19, #32
	add	x1, x20, #28
	bl	_list_add_tail
	mov	x0, x20
	bl	_serio_continue_rx
LBB0_2:
	add	x0, x19, #24
Lloh0:
	adrp	x1, _serio_list@GOTPAGE
Lloh1:
	ldr	x1, [x1, _serio_list@GOTPAGEOFF]
	bl	_list_add_tail
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	blr	x8
LBB0_4:
	add	x20, x19, #8
	mov	x0, x20
	bl	_device_add
	cbz	w0, LBB0_6
; %bb.5:
	mov	x4, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	ldp	w3, w2, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_err
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_serio_list,4,2                 ; @serio_list
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device_add() failed for %s (%s), error: %d\n"

	.no_dead_strip	_serio_add_port
.subsections_via_symbols
