	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elantech_init                  ## -- Begin function elantech_init
	.p2align	4, 0x90
_elantech_init:                         ## @elantech_init
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	movq	%rax, 24(%r15)
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_19
## %bb.1:
	movq	%rax, %r12
	movl	$2147483649, %eax               ## imm = 0x80000001
	movq	(%r12), %rcx
	movl	$1, (%rcx)
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%rdx), %esi
	leal	(%rdx,%rax), %edi
	leal	(%rdx,%rax), %ebx
	decl	%ebx
	andl	%esi, %ebx
	movl	(%rcx,%rbx,4), %esi
	xorl	$1, %esi
	movl	%esi, 4(%rcx,%rdx,4)
	leal	2(%rdx), %esi
	andl	%edi, %esi
	movl	(%rcx,%rsi,4), %esi
	xorl	$1, %esi
	movl	%esi, 8(%rcx,%rdx,4)
	leaq	3(%rdx), %rbx
	leal	(%rdx,%rax), %edi
	incl	%edi
	movl	%ebx, %esi
	andl	%edi, %esi
	movl	(%rcx,%rsi,4), %esi
	xorl	$1, %esi
	movl	%esi, 12(%rcx,%rdx,4)
	movq	%rbx, %rdx
	cmpq	$255, %rbx
	jne	LBB0_2
## %bb.3:
	movq	_ETP_FW_VERSION_QUERY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-35(%rbp), %rdx
	movq	%r15, %rdi
	callq	_synaptics_send_cmd
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_5
LBB0_6:
	movzbl	-35(%rbp), %edx
	movb	%dl, 8(%r12)
	movb	-33(%rbp), %al
	movzbl	%al, %ecx
	movb	%cl, 9(%r12)
	movl	$1, %esi
	movl	$1, %edi
	cmpl	$2, %edx
	jb	LBB0_9
## %bb.7:
	cmpb	$48, %al
	jb	LBB0_9
## %bb.8:
	movl	$1, 16(%r12)
	xorl	%edi, %edi
	movl	$2, %esi
LBB0_9:
	movl	%esi, 12(%r12)
	movl	%edi, 20(%r12)
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	movq	_ETP_CAPABILITIES_QUERY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-35(%rbp), %rdx
	movq	%r15, %rdi
	callq	_synaptics_send_cmd
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_5
LBB0_11:
	movzbl	-35(%rbp), %esi
	movzbl	-34(%rbp), %edx
	movzbl	-33(%rbp), %ecx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	movb	-35(%rbp), %al
	movb	%al, 24(%r12)
	cmpb	$2, 8(%r12)
	jne	LBB0_14
## %bb.12:
	cmpb	$34, 9(%r12)
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	movl	$1, 28(%r12)
LBB0_14:
	movq	%r15, %rdi
	callq	_elantech_set_absolute_mode
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.5(%rip), %rdi
LBB0_5:
	xorl	%eax, %eax
	callq	_pr_err
LBB0_18:
	movq	%r12, %rdi
	callq	_kfree
LBB0_19:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%r15, %rdi
	callq	_elantech_set_input_params
	movq	16(%r15), %rdi
	movq	_elantech_attr_group@GOTPCREL(%rip), %rsi
	callq	_sysfs_create_group
	testl	%eax, %eax
	je	LBB0_20
## %bb.17:
	leaq	L_.str.6(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_18
LBB0_20:
	movq	_elantech_process_byte@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	_elantech_disconnect@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	_elantech_reconnect@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	xorl	%eax, %eax
	cmpl	$2, 12(%r12)
	sete	%al
	addl	%eax, %eax
	addl	$4, %eax
	movl	%eax, (%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ETP_FW_VERSION_QUERY,4,2       ## @ETP_FW_VERSION_QUERY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"elantech.c: failed to query firmware version.\n"

L_.str.1:                               ## @.str.1
	.asciz	"elantech.c: assuming hardware version %d, firmware version %d.%d\n"

	.comm	_ETP_CAPABILITIES_QUERY,4,2     ## @ETP_CAPABILITIES_QUERY
L_.str.2:                               ## @.str.2
	.asciz	"elantech.c: failed to query capabilities.\n"

L_.str.3:                               ## @.str.3
	.asciz	"elantech.c: Synaptics capabilities query result 0x%02x, 0x%02x, 0x%02x.\n"

L_.str.4:                               ## @.str.4
	.asciz	"elantech.c: firmware version 2.34 detected, enabling jumpy cursor workaround\n"

L_.str.5:                               ## @.str.5
	.asciz	"elantech.c: failed to put touchpad into absolute mode.\n"

	.comm	_elantech_attr_group,4,2        ## @elantech_attr_group
L_.str.6:                               ## @.str.6
	.asciz	"elantech.c: failed to create sysfs attributes, error: %d.\n"

	.comm	_elantech_process_byte,4,2      ## @elantech_process_byte
	.comm	_elantech_disconnect,4,2        ## @elantech_disconnect
	.comm	_elantech_reconnect,4,2         ## @elantech_reconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elantech_init                  ; -- Begin function elantech_init
	.p2align	2
_elantech_init:                         ; @elantech_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	str	x0, [x20, #24]
	cbz	x0, LBB0_18
; %bb.1:
	mov	x19, x0
	mov	x9, #0
	ldr	x8, [x0]
	mov	w11, #1
	mov	x10, x8
	str	w11, [x10], #4
	mov	w11, #-2147483648
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x12, x9, #1
	add	w13, w9, w11
	and	w13, w13, w12
	ldr	w13, [x8, w13, uxtw #2]
	eor	w13, w13, #0x1
	str	w13, [x10, x9, lsl #2]
	mov	x9, x12
	cmp	x12, #255
	b.ne	LBB0_2
; %bb.3:
Lloh3:
	adrp	x8, _ETP_FW_VERSION_QUERY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ETP_FW_VERSION_QUERY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	sub	x2, x29, #19
	mov	x0, x20
	bl	_synaptics_send_cmd
	cbz	x0, LBB0_5
; %bb.4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_17
LBB0_5:
	ldurb	w8, [x29, #-19]
	strb	w8, [x19, #8]
	ldurb	w9, [x29, #-17]
	strb	w9, [x19, #9]
	mov	w10, #1
	mov	w11, #1
	cmp	w8, #2
	b.lo	LBB0_8
; %bb.6:
	cmp	w9, #48
	b.lo	LBB0_8
; %bb.7:
	mov	w11, #0
	mov	w10, #1
	str	w10, [x19, #16]
	mov	w10, #2
LBB0_8:
	str	w10, [x19, #12]
	str	w11, [x19, #20]
	stp	x8, x9, [sp, #8]
	str	x10, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
Lloh10:
	adrp	x8, _ETP_CAPABILITIES_QUERY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETP_CAPABILITIES_QUERY@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	sub	x2, x29, #19
	mov	x0, x20
	bl	_synaptics_send_cmd
	cbz	x0, LBB0_10
; %bb.9:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_10:
	ldurb	w8, [x29, #-19]
	ldurb	w9, [x29, #-18]
	ldurb	w10, [x29, #-17]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_info
	ldurb	w8, [x29, #-19]
	strb	w8, [x19, #24]
	ldrb	w8, [x19, #8]
	cmp	w8, #2
	b.ne	LBB0_13
; %bb.11:
	ldrb	w8, [x19, #9]
	cmp	w8, #34
	b.ne	LBB0_13
; %bb.12:
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_info
	mov	w8, #1
	str	w8, [x19, #28]
LBB0_13:
	mov	x0, x20
	bl	_elantech_set_absolute_mode
	cbz	x0, LBB0_15
; %bb.14:
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_17
LBB0_15:
	mov	x0, x20
	bl	_elantech_set_input_params
	ldr	x0, [x20, #16]
Lloh21:
	adrp	x1, _elantech_attr_group@GOTPAGE
Lloh22:
	ldr	x1, [x1, _elantech_attr_group@GOTPAGEOFF]
	bl	_sysfs_create_group
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_20
; %bb.16:
	str	x0, [sp]
Lloh23:
	adrp	x0, l_.str.6@PAGE
Lloh24:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_17:
	bl	_pr_err
	mov	x0, x19
	bl	_kfree
LBB0_18:
	mov	w0, #-1
LBB0_19:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_20:
Lloh25:
	adrp	x8, _elantech_process_byte@GOTPAGE
Lloh26:
	ldr	x8, [x8, _elantech_process_byte@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _elantech_disconnect@GOTPAGE
Lloh29:
	ldr	x9, [x9, _elantech_disconnect@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #8]
	ldr	w8, [x19, #12]
	mov	w9, #4
	mov	w10, #6
	cmp	w8, #2
	csel	w8, w10, w9, eq
Lloh31:
	adrp	x9, _elantech_reconnect@GOTPAGE
Lloh32:
	ldr	x9, [x9, _elantech_reconnect@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	stp	w8, w9, [x20]
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ETP_FW_VERSION_QUERY,4,2       ; @ETP_FW_VERSION_QUERY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"elantech.c: failed to query firmware version.\n"

l_.str.1:                               ; @.str.1
	.asciz	"elantech.c: assuming hardware version %d, firmware version %d.%d\n"

	.comm	_ETP_CAPABILITIES_QUERY,4,2     ; @ETP_CAPABILITIES_QUERY
l_.str.2:                               ; @.str.2
	.asciz	"elantech.c: failed to query capabilities.\n"

l_.str.3:                               ; @.str.3
	.asciz	"elantech.c: Synaptics capabilities query result 0x%02x, 0x%02x, 0x%02x.\n"

l_.str.4:                               ; @.str.4
	.asciz	"elantech.c: firmware version 2.34 detected, enabling jumpy cursor workaround\n"

l_.str.5:                               ; @.str.5
	.asciz	"elantech.c: failed to put touchpad into absolute mode.\n"

	.comm	_elantech_attr_group,4,2        ; @elantech_attr_group
l_.str.6:                               ; @.str.6
	.asciz	"elantech.c: failed to create sysfs attributes, error: %d.\n"

	.comm	_elantech_process_byte,4,2      ; @elantech_process_byte
	.comm	_elantech_disconnect,4,2        ; @elantech_disconnect
	.comm	_elantech_reconnect,4,2         ; @elantech_reconnect
.subsections_via_symbols
