	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___serio_register_driver        ## -- Begin function __serio_register_driver
	.p2align	4, 0x90
___serio_register_driver:               ## @__serio_register_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	%rdi, %rbx
	movl	(%rdi), %r12d
	leaq	8(%rdi), %r14
	movq	_serio_bus@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rdi)
	movq	%rsi, 24(%rdi)
	movq	%rdx, 8(%rdi)
	movl	$1, (%rdi)
	movq	%r14, %rdi
	callq	_driver_register
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	movl	16(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	callq	_pr_err
	jmp	LBB0_5
LBB0_2:
	xorl	%r15d, %r15d
	testl	%r12d, %r12d
	jne	LBB0_5
## %bb.3:
	movl	$0, (%rbx)
	movq	_SERIO_ATTACH_DRIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_serio_queue_event
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_driver_unregister
	movl	%ebx, %r15d
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_serio_bus,4,2                  ## @serio_bus
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"driver_register() failed for %s, error: %d\n"

	.comm	_SERIO_ATTACH_DRIVER,4,2        ## @SERIO_ATTACH_DRIVER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___serio_register_driver        ; -- Begin function __serio_register_driver
	.p2align	2
___serio_register_driver:               ; @__serio_register_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, x0
	ldr	w22, [x0]
	mov	x19, x0
	str	x2, [x19, #8]!
Lloh0:
	adrp	x8, _serio_bus@GOTPAGE
Lloh1:
	ldr	x8, [x8, _serio_bus@GOTPAGEOFF]
	stp	x1, x8, [x0, #24]
	mov	w8, #1
	str	w8, [x0]
	mov	x0, x19
	bl	_driver_register
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w1, [x21, #16]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_pr_err
	b	LBB0_6
LBB0_2:
	cbz	w22, LBB0_4
; %bb.3:
	mov	w20, #0
	b	LBB0_6
LBB0_4:
	str	wzr, [x21]
Lloh4:
	adrp	x8, _SERIO_ATTACH_DRIVER@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SERIO_ATTACH_DRIVER@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, #0
	bl	_serio_queue_event
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_driver_unregister
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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_serio_bus,4,2                  ; @serio_bus
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"driver_register() failed for %s, error: %d\n"

	.comm	_SERIO_ATTACH_DRIVER,4,2        ; @SERIO_ATTACH_DRIVER
.subsections_via_symbols
