	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm9712_phy_init
_wm9712_phy_init:                       ## @wm9712_phy_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	%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
	movq	%rdi, %r14
	movq	_WM97XX_RPR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$1, %edi
	callq	_WM9712_RPU
	movl	%eax, %r12d
	orl	%ebx, %r12d
	movq	_rpu@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_2
## %bb.1:
	andl	$65472, %r12d                   ## imm = 0xFFC0
	callq	_WM9712_RPU
	orl	%eax, %r12d
	movl	(%r14), %edi
	movl	$64000, %eax                    ## imm = 0xFA00
	xorl	%edx, %edx
	idivl	(%rbx)
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_2:
	movq	_five_wire@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_WM9712_45W@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_pil@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_10
## %bb.4:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
	movl	$0, (%rbx)
	jmp	LBB0_10
LBB0_5:
	movq	_pil@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	cmpl	$2, %eax
	jne	LBB0_7
## %bb.8:
	movq	_WM9712_PIL@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str.4(%rip), %rsi
LBB0_9:
	movl	(%r14), %edi
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	$0, (%rbx)
	jne	LBB0_11
LBB0_10:
	movq	_pressure@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_11:
	movq	_delay@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	cmpl	$16, %edi
	jb	LBB0_13
## %bb.12:
	movl	(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$4, (%rbx)
	movl	$4, %edi
LBB0_13:
	callq	_WM97XX_DELAY
	movl	%eax, %r15d
	movl	(%r14), %edi
	movq	_delay_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str.6(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.14:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	_AC97_MISC_AFE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_wm97xx_reg_read
	movl	(%r15), %esi
	movq	_WM97XX_GPIO_4@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_wm97xx_reg_write
	movq	_AC97_GPIO_CFG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_wm97xx_reg_read
	movl	(%r15), %esi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	_WM97XX_GPIO_4@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_wm97xx_reg_write
LBB0_15:
	shll	$6, %ebx
	movzbl	%bl, %ebx
	orl	%r12d, %ebx
	movq	_coord@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
## %bb.16:
	movq	_WM9712_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_17:
	orl	%r13d, %ebx
	movq	_AC97_WM97XX_DIGITISER1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_wm97xx_reg_write
	movq	_AC97_WM97XX_DIGITISER2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wm97xx_reg_write               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WM97XX_RPR,4,2                 ## @WM97XX_RPR
	.comm	_rpu,4,2                        ## @rpu
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting pen detect pull-up to %d Ohms\n"

	.comm	_five_wire,8,3                  ## @five_wire
	.comm	_WM9712_45W,4,2                 ## @WM9712_45W
L_.str.1:                               ## @.str.1
	.asciz	"setting 5-wire touchscreen mode.\n"

	.comm	_pil,4,2                        ## @pil
L_.str.2:                               ## @.str.2
	.asciz	"pressure measurement is not supported in 5-wire mode\n"

	.comm	_WM9712_PIL,4,2                 ## @WM9712_PIL
L_.str.3:                               ## @.str.3
	.asciz	"setting pressure measurement current to 400uA.\n"

L_.str.4:                               ## @.str.4
	.asciz	"setting pressure measurement current to 200uA.\n"

	.comm	_pressure,8,3                   ## @pressure
	.comm	_delay,4,2                      ## @delay
L_.str.5:                               ## @.str.5
	.asciz	"supplied delay out of range.\n"

L_.str.6:                               ## @.str.6
	.asciz	"setting adc sample delay to %d u Secs.\n"

	.comm	_delay_table,8,3                ## @delay_table
	.comm	_mask,4,2                       ## @mask
	.comm	_AC97_MISC_AFE,4,2              ## @AC97_MISC_AFE
	.comm	_WM97XX_GPIO_4,4,2              ## @WM97XX_GPIO_4
	.comm	_AC97_GPIO_CFG,4,2              ## @AC97_GPIO_CFG
	.comm	_coord,8,3                      ## @coord
	.comm	_WM9712_WAIT,4,2                ## @WM9712_WAIT
	.comm	_AC97_WM97XX_DIGITISER1,4,2     ## @AC97_WM97XX_DIGITISER1
	.comm	_AC97_WM97XX_DIGITISER2,4,2     ## @AC97_WM97XX_DIGITISER2
	.no_dead_strip	_wm9712_phy_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm9712_phy_init
_wm9712_phy_init:                       ; @wm9712_phy_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _WM97XX_RPR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WM97XX_RPR@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	w0, #1
	bl	_WM9712_RPU
	orr	w21, w0, w20
Lloh3:
	adrp	x20, _rpu@GOTPAGE
Lloh4:
	ldr	x20, [x20, _rpu@GOTPAGEOFF]
	ldr	w0, [x20]
	cbz	w0, LBB0_2
; %bb.1:
	and	w21, w21, #0xffc0
	bl	_WM9712_RPU
	orr	w21, w0, w21
	ldr	w0, [x19]
	ldr	w8, [x20]
	mov	w9, #64000
	sdiv	w8, w9, w8
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_2:
Lloh7:
	adrp	x8, _five_wire@GOTPAGE
Lloh8:
	ldr	x8, [x8, _five_wire@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
Lloh10:
	adrp	x8, _WM9712_45W@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WM9712_45W@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w21, w8, w21
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
Lloh15:
	adrp	x20, _pil@GOTPAGE
Lloh16:
	ldr	x20, [x20, _pil@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_10
; %bb.4:
	ldr	w0, [x19]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
	str	wzr, [x20]
	b	LBB0_10
LBB0_5:
Lloh19:
	adrp	x20, _pil@GOTPAGE
Lloh20:
	ldr	x20, [x20, _pil@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_10
; %bb.6:
	cmp	w8, #2
	b.ne	LBB0_8
; %bb.7:
Lloh21:
	adrp	x8, _WM9712_PIL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WM9712_PIL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	orr	w21, w8, w21
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_9:
	ldr	w0, [x19]
	bl	_dev_dbg
	ldr	w8, [x20]
	cbnz	w8, LBB0_11
LBB0_10:
Lloh28:
	adrp	x8, _pressure@GOTPAGE
Lloh29:
	ldr	x8, [x8, _pressure@GOTPAGEOFF]
Lloh30:
	str	xzr, [x8]
LBB0_11:
Lloh31:
	adrp	x22, _delay@GOTPAGE
Lloh32:
	ldr	x22, [x22, _delay@GOTPAGEOFF]
	ldr	w0, [x22]
	cmp	w0, #16
	b.lo	LBB0_13
; %bb.12:
	ldr	w0, [x19]
Lloh33:
	adrp	x1, l_.str.5@PAGE
Lloh34:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	mov	w0, #4
	str	w0, [x22]
LBB0_13:
	bl	_WM97XX_DELAY
	mov	x20, x0
	ldr	w0, [x19]
Lloh35:
	adrp	x8, _delay_table@GOTPAGE
Lloh36:
	ldr	x8, [x8, _delay_table@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	ldrsw	x9, [x22]
	ldr	w8, [x8, x9, lsl #2]
	str	x8, [sp]
Lloh38:
	adrp	x1, l_.str.6@PAGE
Lloh39:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
Lloh40:
	adrp	x8, _mask@GOTPAGE
Lloh41:
	ldr	x8, [x8, _mask@GOTPAGEOFF]
Lloh42:
	ldr	w22, [x8]
	cbz	w22, LBB0_15
; %bb.14:
Lloh43:
	adrp	x23, _AC97_MISC_AFE@GOTPAGE
Lloh44:
	ldr	x23, [x23, _AC97_MISC_AFE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_wm97xx_reg_read
	ldr	w1, [x23]
Lloh45:
	adrp	x23, _WM97XX_GPIO_4@GOTPAGE
Lloh46:
	ldr	x23, [x23, _WM97XX_GPIO_4@GOTPAGEOFF]
	ldr	w8, [x23]
	orr	w2, w8, w0
	mov	x0, x19
	bl	_wm97xx_reg_write
Lloh47:
	adrp	x24, _AC97_GPIO_CFG@GOTPAGE
Lloh48:
	ldr	x24, [x24, _AC97_GPIO_CFG@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_wm97xx_reg_read
	ldr	w1, [x24]
	ldr	w8, [x23]
	orr	w2, w8, w0
	mov	x0, x19
	bl	_wm97xx_reg_write
LBB0_15:
	ubfiz	w8, w22, #6, #2
	orr	w8, w8, w21
Lloh49:
	adrp	x9, _coord@GOTPAGE
Lloh50:
	ldr	x9, [x9, _coord@GOTPAGEOFF]
Lloh51:
	ldr	x9, [x9]
Lloh52:
	adrp	x10, _WM9712_WAIT@GOTPAGE
Lloh53:
	ldr	x10, [x10, _WM9712_WAIT@GOTPAGEOFF]
Lloh54:
	ldr	w10, [x10]
	cmp	x9, #0
	csel	w9, wzr, w10, eq
	orr	w21, w8, w9
Lloh55:
	adrp	x8, _AC97_WM97XX_DIGITISER1@GOTPAGE
Lloh56:
	ldr	x8, [x8, _AC97_WM97XX_DIGITISER1@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_wm97xx_reg_write
Lloh58:
	adrp	x8, _AC97_WM97XX_DIGITISER2@GOTPAGE
Lloh59:
	ldr	x8, [x8, _AC97_WM97XX_DIGITISER2@GOTPAGEOFF]
Lloh60:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_wm97xx_reg_write
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_WM97XX_RPR,4,2                 ; @WM97XX_RPR
	.comm	_rpu,4,2                        ; @rpu
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting pen detect pull-up to %d Ohms\n"

	.comm	_five_wire,8,3                  ; @five_wire
	.comm	_WM9712_45W,4,2                 ; @WM9712_45W
l_.str.1:                               ; @.str.1
	.asciz	"setting 5-wire touchscreen mode.\n"

	.comm	_pil,4,2                        ; @pil
l_.str.2:                               ; @.str.2
	.asciz	"pressure measurement is not supported in 5-wire mode\n"

	.comm	_WM9712_PIL,4,2                 ; @WM9712_PIL
l_.str.3:                               ; @.str.3
	.asciz	"setting pressure measurement current to 400uA.\n"

l_.str.4:                               ; @.str.4
	.asciz	"setting pressure measurement current to 200uA.\n"

	.comm	_pressure,8,3                   ; @pressure
	.comm	_delay,4,2                      ; @delay
l_.str.5:                               ; @.str.5
	.asciz	"supplied delay out of range.\n"

l_.str.6:                               ; @.str.6
	.asciz	"setting adc sample delay to %d u Secs.\n"

	.comm	_delay_table,8,3                ; @delay_table
	.comm	_mask,4,2                       ; @mask
	.comm	_AC97_MISC_AFE,4,2              ; @AC97_MISC_AFE
	.comm	_WM97XX_GPIO_4,4,2              ; @WM97XX_GPIO_4
	.comm	_AC97_GPIO_CFG,4,2              ; @AC97_GPIO_CFG
	.comm	_coord,8,3                      ; @coord
	.comm	_WM9712_WAIT,4,2                ; @WM9712_WAIT
	.comm	_AC97_WM97XX_DIGITISER1,4,2     ; @AC97_WM97XX_DIGITISER1
	.comm	_AC97_WM97XX_DIGITISER2,4,2     ; @AC97_WM97XX_DIGITISER2
	.no_dead_strip	_wm9712_phy_init
.subsections_via_symbols
