	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm97xx_acc_startup
_wm97xx_acc_startup:                    ## @wm97xx_acc_startup
	.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
	cmpq	$0, 32(%rdi)
	je	LBB0_23
## %bb.1:
	movq	%rdi, %r15
	movq	_cinfo@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	movl	$8, %r12d
	xorl	%ebx, %ebx
	movq	_cont_rate@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	addq	$24, %r12
	cmpq	%rax, %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	(%r14), %rdi
	cmpq	-8(%rdi,%r12), %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_sp_idx@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	(%r13), %rax
	cmpq	(%rdi,%r12), %rax
	jg	LBB0_5
LBB0_6:
	movq	(%r14), %rax
	movq	_sp_idx@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %edx
	movl	%edx, 24(%r15)
	movq	_ac97_touch_slot@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 20(%r15)
	movl	8(%r15), %edi
	movq	8(%rax,%rcx,8), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	xorl	%eax, %eax
	callq	_machine_is_palmt5
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	xorl	%eax, %eax
	callq	_machine_is_palmtx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_machine_is_palmld
	testq	%rax, %rax
	je	LBB0_10
LBB0_9:
	movq	_pen_int@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_irq@GOTPCREL(%rip), %rax
	movl	$27, (%rax)
	movq	_WM97xx_WM1613@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movl	$27, %edi
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	callq	_gpio_request
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_22
## %bb.15:
	movq	_irq@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_gpio_direction_input
	movl	(%rbx), %edi
	testl	%eax, %eax
	je	LBB0_18
## %bb.16:
	movl	%eax, %r14d
	callq	_gpio_free
	jmp	LBB0_22
LBB0_23:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_22:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	_gpio_to_irq
	movl	%eax, 12(%r15)
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_irq_set_irq_type
	movq	_pen_int@GOTPCREL(%rip), %rbx
	xorl	%r14d, %r14d
	cmpl	$0, (%rbx)
	je	LBB0_22
## %bb.19:
	movq	(%r15), %rax
	leaq	-128(%rax), %rcx
	cmpq	$2, %rcx
	jae	LBB0_20
## %bb.24:
	movq	_WM97XX_GPIO_13@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WM97XX_GPIO_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_WM97XX_GPIO_POL_HIGH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movq	_WM97XX_GPIO_STICKY@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_WM97XX_GPIO_WAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r15, %rdi
	callq	_wm97xx_config_gpio
	movq	_WM97XX_GPIO_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WM97XX_GPIO_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%rbx), %ecx
	movq	_WM97XX_GPIO_NOTSTICKY@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_WM97XX_GPIO_NOWAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r15, %rdi
	callq	_wm97xx_config_gpio
	jmp	LBB0_22
LBB0_10:
	xorl	%eax, %eax
	callq	_machine_is_mainstone
	movq	_pen_int@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	cmpl	$0, (%rcx)
	je	LBB0_13
## %bb.12:
	movq	_irq@GOTPCREL(%rip), %rax
	movl	$4, (%rax)
	movl	$4, %edi
	jmp	LBB0_14
LBB0_20:
	cmpq	$130, %rax
	je	LBB0_22
## %bb.21:
	movl	8(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movl	$0, (%rbx)
	jmp	LBB0_22
LBB0_13:
	movq	_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%edi, %edi
	jne	LBB0_14
## %bb.17:
	movl	$0, (%rcx)
	xorl	%r14d, %r14d
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_cinfo,8,3                      ## @cinfo
	.comm	_sp_idx,8,3                     ## @sp_idx
	.comm	_cont_rate,8,3                  ## @cont_rate
	.comm	_ac97_touch_slot,4,2            ## @ac97_touch_slot
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mainstone accelerated touchscreen driver, %d samples/sec\n"

	.comm	_pen_int,4,2                    ## @pen_int
	.comm	_irq,4,2                        ## @irq
	.comm	_WM97xx_WM1613,4,2              ## @WM97xx_WM1613
L_.str.1:                               ## @.str.1
	.asciz	"Touchscreen IRQ"

	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_WM97XX_GPIO_13,4,2             ## @WM97XX_GPIO_13
	.comm	_WM97XX_GPIO_IN,4,2             ## @WM97XX_GPIO_IN
	.comm	_WM97XX_GPIO_POL_HIGH,4,2       ## @WM97XX_GPIO_POL_HIGH
	.comm	_WM97XX_GPIO_STICKY,4,2         ## @WM97XX_GPIO_STICKY
	.comm	_WM97XX_GPIO_WAKE,4,2           ## @WM97XX_GPIO_WAKE
	.comm	_WM97XX_GPIO_2,4,2              ## @WM97XX_GPIO_2
	.comm	_WM97XX_GPIO_OUT,4,2            ## @WM97XX_GPIO_OUT
	.comm	_WM97XX_GPIO_NOTSTICKY,4,2      ## @WM97XX_GPIO_NOTSTICKY
	.comm	_WM97XX_GPIO_NOWAKE,4,2         ## @WM97XX_GPIO_NOWAKE
L_.str.2:                               ## @.str.2
	.asciz	"pen down irq not supported on this device\n"

	.no_dead_strip	_wm97xx_acc_startup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm97xx_acc_startup
_wm97xx_acc_startup:                    ; @wm97xx_acc_startup
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_13
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x20, _cinfo@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cinfo@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
Lloh2:
	adrp	x21, _sp_idx@GOTPAGE
Lloh3:
	ldr	x21, [x21, _sp_idx@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x22, #0
	mov	x23, #0
Lloh4:
	adrp	x24, _cont_rate@GOTPAGE
Lloh5:
	ldr	x24, [x24, _cont_rate@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	add	x22, x22, #24
	cmp	x23, w0, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x0, [x20]
	ldr	x9, [x0, x22]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x23, [x21]
	ldr	x8, [x24]
	add	x9, x0, x22
	ldr	x9, [x9, #8]
	cmp	x8, x9
	b.gt	LBB0_3
LBB0_6:
	ldr	x8, [x20]
	ldr	x9, [x21]
	mov	w10, #24
	madd	x8, x9, x10, x8
Lloh6:
	adrp	x9, _ac97_touch_slot@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ac97_touch_slot@GOTPAGEOFF]
	ldr	w10, [x8, #16]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w10, [x19, #20]
	ldr	w0, [x19, #8]
	ldr	x2, [x8, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	bl	_machine_is_palmt5
Lloh11:
	adrp	x22, _irq@GOTPAGE
Lloh12:
	ldr	x22, [x22, _irq@GOTPAGEOFF]
Lloh13:
	adrp	x21, _pen_int@GOTPAGE
Lloh14:
	ldr	x21, [x21, _pen_int@GOTPAGEOFF]
	cbnz	x0, LBB0_9
; %bb.7:
	bl	_machine_is_palmtx
	cbnz	x0, LBB0_9
; %bb.8:
	bl	_machine_is_palmld
	cbz	x0, LBB0_18
LBB0_9:
	mov	w8, #1
	str	w8, [x21]
	mov	w0, #27
	str	w0, [x22]
Lloh15:
	adrp	x8, _WM97xx_WM1613@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WM97xx_WM1613@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #16]
LBB0_10:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_gpio_request
	mov	x20, x0
	cbnz	w0, LBB0_14
; %bb.11:
	ldr	w0, [x22]
	bl	_gpio_direction_input
	mov	x20, x0
	ldr	w0, [x22]
	cbz	w20, LBB0_15
; %bb.12:
	bl	_gpio_free
	b	LBB0_14
LBB0_13:
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_14:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	_gpio_to_irq
	str	w0, [x19, #12]
Lloh23:
	adrp	x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_irq_set_irq_type
	ldr	w8, [x21]
	cbz	w8, LBB0_22
; %bb.16:
	ldr	x8, [x19]
	sub	x9, x8, #128
	cmp	x9, #2
	b.hs	LBB0_21
; %bb.17:
Lloh26:
	adrp	x8, _WM97XX_GPIO_13@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WM97XX_GPIO_13@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _WM97XX_GPIO_IN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WM97XX_GPIO_IN@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
Lloh32:
	adrp	x20, _WM97XX_GPIO_POL_HIGH@GOTPAGE
Lloh33:
	ldr	x20, [x20, _WM97XX_GPIO_POL_HIGH@GOTPAGEOFF]
	ldr	w3, [x20]
Lloh34:
	adrp	x8, _WM97XX_GPIO_STICKY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _WM97XX_GPIO_STICKY@GOTPAGEOFF]
Lloh36:
	ldr	w4, [x8]
Lloh37:
	adrp	x8, _WM97XX_GPIO_WAKE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _WM97XX_GPIO_WAKE@GOTPAGEOFF]
Lloh39:
	ldr	w5, [x8]
	mov	x0, x19
	bl	_wm97xx_config_gpio
Lloh40:
	adrp	x8, _WM97XX_GPIO_2@GOTPAGE
Lloh41:
	ldr	x8, [x8, _WM97XX_GPIO_2@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x8, _WM97XX_GPIO_OUT@GOTPAGE
Lloh44:
	ldr	x8, [x8, _WM97XX_GPIO_OUT@GOTPAGEOFF]
Lloh45:
	ldr	w2, [x8]
	ldr	w3, [x20]
Lloh46:
	adrp	x8, _WM97XX_GPIO_NOTSTICKY@GOTPAGE
Lloh47:
	ldr	x8, [x8, _WM97XX_GPIO_NOTSTICKY@GOTPAGEOFF]
Lloh48:
	ldr	w4, [x8]
Lloh49:
	adrp	x8, _WM97XX_GPIO_NOWAKE@GOTPAGE
Lloh50:
	ldr	x8, [x8, _WM97XX_GPIO_NOWAKE@GOTPAGEOFF]
Lloh51:
	ldr	w5, [x8]
	mov	x0, x19
	bl	_wm97xx_config_gpio
	mov	w20, #0
	b	LBB0_14
LBB0_18:
	bl	_machine_is_mainstone
	cbz	x0, LBB0_23
; %bb.19:
	ldr	w8, [x21]
	cbz	w8, LBB0_23
; %bb.20:
	mov	w0, #4
	str	w0, [x22]
	b	LBB0_10
LBB0_21:
	cmp	x8, #130
	b.ne	LBB0_24
LBB0_22:
	mov	w20, #0
	b	LBB0_14
LBB0_23:
	ldr	w0, [x22]
	cbnz	w0, LBB0_10
	b	LBB0_25
LBB0_24:
	ldr	w0, [x19, #8]
Lloh52:
	adrp	x1, l_.str.2@PAGE
Lloh53:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_25:
	mov	w20, #0
	str	wzr, [x21]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_cinfo,8,3                      ; @cinfo
	.comm	_sp_idx,8,3                     ; @sp_idx
	.comm	_cont_rate,8,3                  ; @cont_rate
	.comm	_ac97_touch_slot,4,2            ; @ac97_touch_slot
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mainstone accelerated touchscreen driver, %d samples/sec\n"

	.comm	_pen_int,4,2                    ; @pen_int
	.comm	_irq,4,2                        ; @irq
	.comm	_WM97xx_WM1613,4,2              ; @WM97xx_WM1613
l_.str.1:                               ; @.str.1
	.asciz	"Touchscreen IRQ"

	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_WM97XX_GPIO_13,4,2             ; @WM97XX_GPIO_13
	.comm	_WM97XX_GPIO_IN,4,2             ; @WM97XX_GPIO_IN
	.comm	_WM97XX_GPIO_POL_HIGH,4,2       ; @WM97XX_GPIO_POL_HIGH
	.comm	_WM97XX_GPIO_STICKY,4,2         ; @WM97XX_GPIO_STICKY
	.comm	_WM97XX_GPIO_WAKE,4,2           ; @WM97XX_GPIO_WAKE
	.comm	_WM97XX_GPIO_2,4,2              ; @WM97XX_GPIO_2
	.comm	_WM97XX_GPIO_OUT,4,2            ; @WM97XX_GPIO_OUT
	.comm	_WM97XX_GPIO_NOTSTICKY,4,2      ; @WM97XX_GPIO_NOTSTICKY
	.comm	_WM97XX_GPIO_NOWAKE,4,2         ; @WM97XX_GPIO_NOWAKE
l_.str.2:                               ; @.str.2
	.asciz	"pen down irq not supported on this device\n"

	.no_dead_strip	_wm97xx_acc_startup
.subsections_via_symbols
