	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psmouse_attr_set_helper        ## -- Begin function psmouse_attr_set_helper
	.p2align	4, 0x90
_psmouse_attr_set_helper:               ## @psmouse_attr_set_helper
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r15
	callq	_to_serio_port
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_to_psmouse_attr
	movq	%rax, %r14
	movq	_psmouse_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.1:
	movq	%rbx, %r13
	movq	%rbx, %rdi
	callq	_serio_get_drvdata
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	(%rax), %rax
	cmpq	_psmouse_attr_protocol@GOTPCREL(%rip), %r15
	je	LBB0_5
## %bb.2:
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_5:
	cmpq	$0, 8(%r14)
	je	LBB0_6
## %bb.7:
	movq	(%rbx), %rcx
	movq	_PSMOUSE_IGNORE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_21:
	movq	_psmouse_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_22:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_15
LBB0_9:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.11:
	movq	8(%r13), %rcx
	movq	_SERIO_PS_PSTHRU@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.12:
	callq	_serio_get_drvdata
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_psmouse_deactivate
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	jmp	LBB0_13
LBB0_10:
	xorl	%ecx, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
LBB0_13:
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_psmouse_deactivate
LBB0_15:
	movl	16(%r14), %esi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	*(%r14)
	movl	%eax, %r13d
	cmpq	$0, 8(%r14)
	je	LBB0_21
## %bb.16:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	je	LBB0_19
## %bb.17:
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	jne	LBB0_19
## %bb.18:
	movq	%rbx, %rdi
	callq	_psmouse_activate
LBB0_19:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.20:
	callq	_psmouse_activate
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_psmouse_mutex,4,2              ## @psmouse_mutex
	.comm	_psmouse_attr_protocol,4,2      ## @psmouse_attr_protocol
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_PSMOUSE_IGNORE,8,3             ## @PSMOUSE_IGNORE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SERIO_PS_PSTHRU,8,3            ## @SERIO_PS_PSTHRU
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psmouse_attr_set_helper        ; -- Begin function psmouse_attr_set_helper
	.p2align	2
_psmouse_attr_set_helper:               ; @psmouse_attr_set_helper
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x25, x1
	bl	_to_serio_port
	mov	x23, x0
	mov	x0, x25
	bl	_to_psmouse_attr
	mov	x21, x0
Lloh0:
	adrp	x0, _psmouse_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _psmouse_mutex@GOTPAGEOFF]
	bl	_mutex_lock_interruptible
	mov	x24, x0
	cbnz	w0, LBB0_8
; %bb.1:
	mov	x0, x23
	bl	_serio_get_drvdata
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
Lloh2:
	adrp	x9, _psmouse_attr_protocol@GOTPAGE
Lloh3:
	ldr	x9, [x9, _psmouse_attr_protocol@GOTPAGEOFF]
	cmp	x25, x9
	ccmp	x8, #0, #4, ne
	b.ne	LBB0_5
; %bb.2:
	mov	x22, x0
	ldr	x9, [x21, #8]
	cbz	x9, LBB0_9
; %bb.3:
	ldr	x9, [x22]
Lloh4:
	adrp	x10, _PSMOUSE_IGNORE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _PSMOUSE_IGNORE@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_10
; %bb.4:
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_7:
Lloh11:
	adrp	x0, _psmouse_mutex@GOTPAGE
Lloh12:
	ldr	x0, [x0, _psmouse_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_8:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x23, #0
	b	LBB0_16
LBB0_10:
	ldr	x0, [x23]
	cbz	x0, LBB0_13
; %bb.11:
	ldr	x9, [x23, #8]
Lloh13:
	adrp	x10, _SERIO_PS_PSTHRU@GOTPAGE
Lloh14:
	ldr	x10, [x10, _SERIO_PS_PSTHRU@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_13
; %bb.12:
	bl	_serio_get_drvdata
	mov	x23, x0
	bl	_psmouse_deactivate
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	b	LBB0_14
LBB0_13:
	mov	x23, #0
LBB0_14:
	cbnz	x8, LBB0_16
; %bb.15:
	mov	x0, x22
	bl	_psmouse_deactivate
LBB0_16:
	ldr	x8, [x21]
	ldr	w1, [x21, #16]
	mov	x0, x22
	mov	x2, x20
	mov	x3, x19
	blr	x8
	mov	x24, x0
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_7
; %bb.17:
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmn	w24, w8
	b.eq	LBB0_20
; %bb.18:
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	cbnz	x8, LBB0_20
; %bb.19:
	mov	x0, x22
	bl	_psmouse_activate
LBB0_20:
	cbz	x23, LBB0_7
; %bb.21:
	mov	x0, x23
	bl	_psmouse_activate
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_psmouse_mutex,4,2              ; @psmouse_mutex
	.comm	_psmouse_attr_protocol,4,2      ; @psmouse_attr_protocol
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_PSMOUSE_IGNORE,8,3             ; @PSMOUSE_IGNORE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SERIO_PS_PSTHRU,8,3            ; @SERIO_PS_PSTHRU
.subsections_via_symbols
