	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elan_input_configured
_elan_input_configured:                 ## @elan_input_configured
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_hid_get_drvdata
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_is_not_elan_touchpad
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movq	%r12, %rdi
	callq	_elan_get_device_params
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r12, %rdi
	callq	_devm_input_allocate_device
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r15)
	movl	24(%r12), %eax
	movl	%eax, 44(%r15)
	movl	20(%r12), %eax
	movl	%eax, 40(%r15)
	movups	4(%r12), %xmm0
	movups	%xmm0, 24(%r15)
	movq	%r12, 16(%r15)
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%r14), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_MT_POSITION_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r14), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_ABS_MT_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ELAN_MAX_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r15), %esi
	callq	___set_bit
	movq	_INPUT_PROP_BUTTONPAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %esi
	callq	___set_bit
	movq	_ELAN_MAX_FINGERS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_INPUT_MT_POINTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_input_mt_init_slots
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_hid_err
	jmp	LBB0_9
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_6:
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r14), %edx
	movq	%r15, %rdi
	callq	_input_abs_set_res
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%r15, %rdi
	callq	_input_abs_set_res
	movq	%r15, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_hid_err
	movq	%r15, %rdi
	callq	_input_free_device
	jmp	LBB0_9
LBB0_8:
	movq	%r15, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Elan Touchpad"

	.comm	_ABS_MT_POSITION_X,4,2          ## @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ## @ABS_MT_POSITION_Y
	.comm	_ABS_MT_PRESSURE,4,2            ## @ABS_MT_PRESSURE
	.comm	_ELAN_MAX_PRESSURE,4,2          ## @ELAN_MAX_PRESSURE
	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_INPUT_PROP_BUTTONPAD,4,2       ## @INPUT_PROP_BUTTONPAD
	.comm	_ELAN_MAX_FINGERS,4,2           ## @ELAN_MAX_FINGERS
	.comm	_INPUT_MT_POINTER,4,2           ## @INPUT_MT_POINTER
L_.str.1:                               ## @.str.1
	.asciz	"Failed to init elan MT slots: %d\n"

	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
L_.str.2:                               ## @.str.2
	.asciz	"Failed to register elan input device: %d\n"

	.no_dead_strip	_elan_input_configured
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function elan_input_configured
_elan_input_configured:                 ; @elan_input_configured
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_hid_get_drvdata
	mov	x20, x0
	mov	x0, x19
	bl	_is_not_elan_touchpad
	cbz	x0, LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_elan_get_device_params
	mov	x22, x0
	cbz	w0, LBB0_4
LBB0_3:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	bl	_devm_input_allocate_device
	cbz	x0, LBB0_7
; %bb.5:
	mov	x21, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x0]
	ldur	d0, [x19, #20]
	str	d0, [x0, #40]
	ldur	q0, [x19, #4]
	stur	q0, [x0, #24]
	str	x19, [x0, #16]
Lloh2:
	adrp	x8, _ABS_MT_POSITION_X@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ABS_MT_POSITION_X@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w3, [x20, #20]
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh5:
	adrp	x8, _ABS_MT_POSITION_Y@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ABS_MT_POSITION_Y@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w3, [x20, #16]
	mov	x0, x21
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh8:
	adrp	x8, _ABS_MT_PRESSURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ABS_MT_PRESSURE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _ELAN_MAX_PRESSURE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ELAN_MAX_PRESSURE@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x21
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
Lloh14:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w1, [x21, #12]
	bl	___set_bit
Lloh17:
	adrp	x8, _INPUT_PROP_BUTTONPAD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _INPUT_PROP_BUTTONPAD@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w1, [x21, #8]
	bl	___set_bit
Lloh20:
	adrp	x8, _ELAN_MAX_FINGERS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ELAN_MAX_FINGERS@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _INPUT_MT_POINTER@GOTPAGE
Lloh24:
	ldr	x8, [x8, _INPUT_MT_POINTER@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_input_mt_init_slots
	cbz	w0, LBB0_8
; %bb.6:
	mov	x22, x0
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_hid_err
	b	LBB0_3
LBB0_7:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_3
LBB0_8:
Lloh31:
	adrp	x8, _ABS_X@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	ldr	w2, [x20, #12]
	mov	x0, x21
	bl	_input_abs_set_res
Lloh34:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
	mov	x0, x21
	bl	_input_abs_set_res
	mov	x0, x21
	bl	_input_register_device
	mov	x22, x0
	cbz	w0, LBB0_10
; %bb.9:
Lloh37:
	adrp	x1, l_.str.2@PAGE
Lloh38:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_hid_err
	mov	x0, x21
	bl	_input_free_device
	b	LBB0_3
LBB0_10:
	str	x21, [x20]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Elan Touchpad"

	.comm	_ABS_MT_POSITION_X,4,2          ; @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ; @ABS_MT_POSITION_Y
	.comm	_ABS_MT_PRESSURE,4,2            ; @ABS_MT_PRESSURE
	.comm	_ELAN_MAX_PRESSURE,4,2          ; @ELAN_MAX_PRESSURE
	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_INPUT_PROP_BUTTONPAD,4,2       ; @INPUT_PROP_BUTTONPAD
	.comm	_ELAN_MAX_FINGERS,4,2           ; @ELAN_MAX_FINGERS
	.comm	_INPUT_MT_POINTER,4,2           ; @INPUT_MT_POINTER
l_.str.1:                               ; @.str.1
	.asciz	"Failed to init elan MT slots: %d\n"

	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
l_.str.2:                               ; @.str.2
	.asciz	"Failed to register elan input device: %d\n"

	.no_dead_strip	_elan_input_configured
.subsections_via_symbols
