	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elantech_read_reg
_elantech_read_reg:                     ## @elantech_read_reg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	leal	-39(%rbx), %eax
	movl	$-1, %r15d
	cmpb	$-23, %al
	jb	LBB0_15
## %bb.1:
	leal	-18(%rbx), %eax
	cmpb	$14, %al
	jb	LBB0_15
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movl	(%rax), %eax
	cmpl	$2, %eax
	je	LBB0_7
## %bb.3:
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.4:
	movq	_ETP_REGISTER_READ@GOTPCREL(%rip), %rax
	movzbl	(%rax), %esi
	movq	%r12, %rdi
	callq	_psmouse_sliced_command
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movzbl	%bl, %esi
	movq	%r12, %rdi
	callq	_psmouse_sliced_command
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:
	movq	_PSMOUSE_CMD_GETINFO@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	leaq	-43(%rbp), %rsi
	movq	%r12, %rdi
	callq	_ps2_command
	testl	%eax, %eax
	jne	LBB0_13
LBB0_14:
	movb	-43(%rbp), %al
	movb	%al, (%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_15
LBB0_7:
	movq	_ETP_PS2_CUSTOM_COMMAND@GOTPCREL(%rip), %r13
	movzbl	(%r13), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_elantech_ps2_command
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	movq	_ETP_REGISTER_READ@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_elantech_ps2_command
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movzbl	(%r13), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_elantech_ps2_command
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movzbl	%bl, %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_elantech_ps2_command
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movq	_PSMOUSE_CMD_GETINFO@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	leaq	-43(%rbp), %rsi
	movq	%r12, %rdi
	callq	_elantech_ps2_command
	testl	%eax, %eax
	je	LBB0_14
LBB0_13:
	movzbl	%bl, %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETP_REGISTER_READ,1,0          ## @ETP_REGISTER_READ
	.comm	_PSMOUSE_CMD_GETINFO,1,0        ## @PSMOUSE_CMD_GETINFO
	.comm	_ETP_PS2_CUSTOM_COMMAND,1,0     ## @ETP_PS2_CUSTOM_COMMAND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"elantech.c: failed to read register 0x%02x.\n"

	.no_dead_strip	_elantech_read_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function elantech_read_reg
_elantech_read_reg:                     ; @elantech_read_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	w8, w1, #39
	and	w8, w8, #0xff
	sub	w9, w1, #18
	cmp	w8, #233
	and	w8, w9, #0xff
	ccmp	w8, #14, #0, hs
	b.lo	LBB0_13
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cmp	w8, #2
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _ETP_REGISTER_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETP_REGISTER_READ@GOTPAGEOFF]
	ldrb	w1, [x8]
	mov	x0, x21
	bl	_psmouse_sliced_command
	cbnz	w0, LBB0_12
; %bb.4:
	mov	x0, x21
	mov	x1, x19
	bl	_psmouse_sliced_command
	cbnz	w0, LBB0_12
; %bb.5:
Lloh2:
	adrp	x8, _PSMOUSE_CMD_GETINFO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PSMOUSE_CMD_GETINFO@GOTPAGEOFF]
	ldrb	w2, [x8]
	add	x1, sp, #13
	mov	x0, x21
	bl	_ps2_command
	cbnz	w0, LBB0_12
LBB0_6:
	mov	w0, #0
	ldrb	w8, [sp, #13]
	strb	w8, [x20]
	b	LBB0_14
LBB0_7:
Lloh4:
	adrp	x22, _ETP_PS2_CUSTOM_COMMAND@GOTPAGE
Lloh5:
	ldr	x22, [x22, _ETP_PS2_CUSTOM_COMMAND@GOTPAGEOFF]
	ldrb	w2, [x22]
	mov	x0, x21
	mov	x1, #0
	bl	_elantech_ps2_command
	cbnz	w0, LBB0_12
; %bb.8:
Lloh6:
	adrp	x8, _ETP_REGISTER_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETP_REGISTER_READ@GOTPAGEOFF]
	ldrb	w2, [x8]
	mov	x0, x21
	mov	x1, #0
	bl	_elantech_ps2_command
	cbnz	w0, LBB0_12
; %bb.9:
	ldrb	w2, [x22]
	mov	x0, x21
	mov	x1, #0
	bl	_elantech_ps2_command
	cbnz	w0, LBB0_12
; %bb.10:
	mov	x0, x21
	mov	x1, #0
	mov	x2, x19
	bl	_elantech_ps2_command
	cbnz	w0, LBB0_12
; %bb.11:
Lloh8:
	adrp	x8, _PSMOUSE_CMD_GETINFO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PSMOUSE_CMD_GETINFO@GOTPAGEOFF]
	ldrb	w2, [x8]
	add	x1, sp, #13
	mov	x0, x21
	bl	_elantech_ps2_command
	cbz	w0, LBB0_6
LBB0_12:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_err
LBB0_13:
	mov	w0, #-1
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ETP_REGISTER_READ,1,0          ; @ETP_REGISTER_READ
	.comm	_PSMOUSE_CMD_GETINFO,1,0        ; @PSMOUSE_CMD_GETINFO
	.comm	_ETP_PS2_CUSTOM_COMMAND,1,0     ; @ETP_PS2_CUSTOM_COMMAND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"elantech.c: failed to read register 0x%02x.\n"

	.no_dead_strip	_elantech_read_reg
.subsections_via_symbols
