	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atkbd_reconnect
_atkbd_reconnect:                       ## @atkbd_reconnect
	.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
	callq	_serio_get_drvdata
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_atkbd_disable
	cmpq	$0, 16(%r12)
	je	LBB0_8
## %bb.4:
	movq	%r12, %rdi
	callq	_atkbd_probe
	movl	$-1, %r15d
	testq	%rax, %rax
	jne	LBB0_10
## %bb.5:
	movq	(%r12), %rbx
	movl	44(%r12), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_atkbd_select_set
	cmpq	%rax, %rbx
	jne	LBB0_10
## %bb.6:
	movq	%r12, %rdi
	callq	_atkbd_set_leds
	cmpl	$0, 40(%r12)
	jne	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_atkbd_set_repeat_rate
LBB0_8:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r12)
	movq	%r12, %rdi
	callq	_atkbd_enable
	xorl	%r15d, %r15d
	cmpq	$0, 16(%r12)
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	callq	_atkbd_activate
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_11
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	movl	$-1, %r15d
LBB0_11:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reconnect request, but serio is disconnected, ignoring...\n"

	.no_dead_strip	_atkbd_reconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atkbd_reconnect
_atkbd_reconnect:                       ; @atkbd_reconnect
	.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	x19, x0
	bl	_serio_get_drvdata
	cbz	x0, LBB0_10
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.2:
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	bl	_atkbd_disable
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_7
; %bb.3:
	mov	x0, x20
	bl	_atkbd_probe
	cbnz	x0, LBB0_11
; %bb.4:
	ldr	x21, [x20]
	ldr	w2, [x20, #44]
	mov	x0, x20
	mov	x1, x21
	bl	_atkbd_select_set
	cmp	x21, x0
	b.ne	LBB0_11
; %bb.5:
	mov	x0, x20
	bl	_atkbd_set_leds
	ldr	w8, [x20, #40]
	cbnz	w8, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_atkbd_set_repeat_rate
LBB0_7:
	stp	xzr, xzr, [x20, #24]
	mov	x0, x20
	bl	_atkbd_enable
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_atkbd_activate
LBB0_9:
	mov	w20, #0
	b	LBB0_12
LBB0_10:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w20, #-1
	b	LBB0_13
LBB0_11:
	mov	w20, #-1
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reconnect request, but serio is disconnected, ignoring...\n"

	.no_dead_strip	_atkbd_reconnect
.subsections_via_symbols
