	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps2pp_setup_protocol
_ps2pp_setup_protocol:                  ## @ps2pp_setup_protocol
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ps2pp_process_byte@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdi)
	movl	$3, (%rdi)
	movq	(%rsi), %rax
	movq	_PS2PP_KIND_TP3@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movq	_ps2pp_set_resolution@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rdi)
	movq	_ps2pp_disconnect@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movq	8(%rdi), %rdi
	movq	_psmouse_attr_smartscroll@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_psmouse_err
	movl	%r15d, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ps2pp_process_byte,4,2         ## @ps2pp_process_byte
	.comm	_PS2PP_KIND_TP3,8,3             ## @PS2PP_KIND_TP3
	.comm	_ps2pp_set_resolution,4,2       ## @ps2pp_set_resolution
	.comm	_ps2pp_disconnect,4,2           ## @ps2pp_disconnect
	.comm	_psmouse_attr_smartscroll,4,2   ## @psmouse_attr_smartscroll
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create smartscroll sysfs attribute, error: %d\n"

	.no_dead_strip	_ps2pp_setup_protocol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps2pp_setup_protocol
_ps2pp_setup_protocol:                  ; @ps2pp_setup_protocol
	.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
Lloh0:
	adrp	x8, _ps2pp_process_byte@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ps2pp_process_byte@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	mov	w8, #3
	str	w8, [x0]
	ldr	x8, [x1]
Lloh3:
	adrp	x9, _PS2PP_KIND_TP3@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PS2PP_KIND_TP3@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_4
LBB0_2:
	mov	x19, x0
Lloh6:
	adrp	x8, _ps2pp_set_resolution@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ps2pp_set_resolution@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _ps2pp_disconnect@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ps2pp_disconnect@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
	ldr	x0, [x0, #8]
Lloh12:
	adrp	x1, _psmouse_attr_smartscroll@GOTPAGE
Lloh13:
	ldr	x1, [x1, _psmouse_attr_smartscroll@GOTPAGEOFF]
	bl	_device_create_file
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_psmouse_err
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ps2pp_process_byte,4,2         ; @ps2pp_process_byte
	.comm	_PS2PP_KIND_TP3,8,3             ; @PS2PP_KIND_TP3
	.comm	_ps2pp_set_resolution,4,2       ; @ps2pp_set_resolution
	.comm	_ps2pp_disconnect,4,2           ; @ps2pp_disconnect
	.comm	_psmouse_attr_smartscroll,4,2   ; @psmouse_attr_smartscroll
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create smartscroll sysfs attribute, error: %d\n"

	.no_dead_strip	_ps2pp_setup_protocol
.subsections_via_symbols
