	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hgpk_get_model
_hgpk_get_model:                        ## @hgpk_get_model
	.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	%rdi, %r14
	movq	_PSMOUSE_CMD_SETSCALE21@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	movl	(%r15), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movl	(%r15), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_PSMOUSE_CMD_GETINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-27(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	je	LBB0_7
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_5:
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str(%rip), %rsi
	leaq	-27(%rbp), %rcx
	movq	%r14, %rdi
	movl	$3, %edx
	callq	_psmouse_dbg
	cmpb	$103, -27(%rbp)
	jne	LBB0_10
## %bb.8:
	cmpb	$0, -26(%rbp)
	jne	LBB0_10
## %bb.9:
	movzbl	-25(%rbp), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_psmouse_info
	movzbl	-25(%rbp), %ebx
	jmp	LBB0_6
LBB0_10:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_CMD_SETSCALE21,4,2     ## @PSMOUSE_CMD_SETSCALE21
	.comm	_PSMOUSE_CMD_GETINFO,4,2        ## @PSMOUSE_CMD_GETINFO
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ID: %*ph\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"OLPC touchpad revision 0x%x\n"

	.no_dead_strip	_hgpk_get_model
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hgpk_get_model
_hgpk_get_model:                        ; @hgpk_get_model
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _PSMOUSE_CMD_SETSCALE21@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PSMOUSE_CMD_SETSCALE21@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x1, #0
	bl	_ps2_command
	cbnz	x0, LBB0_4
; %bb.1:
	ldr	w2, [x20]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	cbnz	x0, LBB0_4
; %bb.2:
	ldr	w2, [x20]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	cbnz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _PSMOUSE_CMD_GETINFO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PSMOUSE_CMD_GETINFO@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x1, sp, #13
	mov	x0, x19
	bl	_ps2_command
	cbz	x0, LBB0_7
LBB0_4:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	add	x3, sp, #13
	mov	x0, x19
	mov	w2, #3
	bl	_psmouse_dbg
	ldrb	w8, [sp, #13]
	cmp	w8, #103
	b.ne	LBB0_10
; %bb.8:
	ldrb	w8, [sp, #14]
	cbnz	w8, LBB0_10
; %bb.9:
	ldrb	w2, [sp, #15]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_psmouse_info
	ldrb	w0, [sp, #15]
	b	LBB0_6
LBB0_10:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_SETSCALE21,4,2     ; @PSMOUSE_CMD_SETSCALE21
	.comm	_PSMOUSE_CMD_GETINFO,4,2        ; @PSMOUSE_CMD_GETINFO
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ID: %*ph\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"OLPC touchpad revision 0x%x\n"

	.no_dead_strip	_hgpk_get_model
.subsections_via_symbols
