	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function serio_bind_driver
_serio_bind_driver:                     ## @serio_bind_driver
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	8(%rsi), %edi
	movq	%rbx, %rsi
	callq	_serio_match_port
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	leaq	4(%r14), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_serio_connect_driver
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	$0, (%rbx)
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_5
LBB0_3:
	movq	%rbx, %rdi
	callq	_device_bind_driver
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r12d
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	movl	(%r14), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %r9d
	callq	_dev_warn
	movq	%rbx, %rdi
	callq	_serio_disconnect_driver
	movq	$0, (%rbx)
	movl	%r12d, %r15d
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device_bind_driver() failed for %s (%s) and %s, error: %d\n"

	.no_dead_strip	_serio_bind_driver
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function serio_bind_driver
_serio_bind_driver:                     ; @serio_bind_driver
	.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	x21, x1
	mov	x19, x0
	ldr	w0, [x1, #8]
	mov	x1, x19
	bl	_serio_match_port
	cbz	x0, LBB0_3
; %bb.1:
	add	x8, x21, #4
	str	x8, [x19]
	mov	x0, x19
	mov	x1, x21
	bl	_serio_connect_driver
	cbz	x0, LBB0_4
; %bb.2:
	str	xzr, [x19]
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_3:
	mov	w20, #0
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_device_bind_driver
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.5:
	ldp	w3, w2, [x19, #8]
	ldr	w4, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x5, x20
	bl	_dev_warn
	mov	x0, x19
	bl	_serio_disconnect_driver
	str	xzr, [x19]
LBB0_6:
	mov	x0, x20
	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	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device_bind_driver() failed for %s (%s) and %s, error: %d\n"

	.no_dead_strip	_serio_bind_driver
.subsections_via_symbols
