	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm9712_poll_sample
_wm9712_poll_sample:                    ## @wm9712_poll_sample
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	_delay@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_WM97XX_PEN_DOWN@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	testl	%esi, %ebx
	je	LBB0_4
## %bb.1:
	cmpl	$0, (%r13)
	jne	LBB0_4
## %bb.2:
	movq	_AC97_WM97XX_DIGITISER_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_wm97xx_reg_read
	testl	%eax, (%r14)
	je	LBB0_28
## %bb.3:
	movl	$1, (%r13)
LBB0_4:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	8(%r13), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	%r12d, %edi
	movq	%r15, %rbx
	callq	*%rax
LBB0_7:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	leal	(%r15,%r15,4), %r14d
	movq	_AC97_WM97XX_DIGITISER1@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_WM97XX_ADCSEL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	andl	%r12d, %ebx
	movq	_WM97XX_POLL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_delay@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_WM97XX_DELAY
	orl	%eax, %ebx
	movq	%r13, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_wm97xx_reg_write
	movl	(%r12), %edi
	callq	_poll_delay
	movl	(%r15), %esi
	movq	%r13, %r12
	movq	%r13, %rdi
	callq	_wm97xx_reg_read
	movq	_WM97XX_POLL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.9:
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.11:
	movq	%rcx, %r13
	movq	_AC97_LINK_FRAME@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_udelay
	leal	-1(%r14), %r15d
	movq	_AC97_WM97XX_DIGITISER1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_wm97xx_reg_read
	testl	%eax, (%r13)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$1, %r14d
	movl	%r15d, %r14d
	jne	LBB0_12
	jmp	LBB0_14
LBB0_8:
	movl	%r14d, %r15d
LBB0_14:
	testl	%r15d, %r15d
	jle	LBB0_15
LBB0_18:
	movq	_AC97_WM97XX_DIGITISER_RD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %r13
	movq	%r12, %rdi
	callq	_wm97xx_reg_read
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, (%r15)
	movq	8(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_19
## %bb.20:
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_22
## %bb.21:
	movl	%ebx, %edi
	callq	*%rcx
	movl	(%r15), %eax
	jmp	LBB0_22
LBB0_10:
	movl	%r14d, %r15d
	testl	%r15d, %r15d
	jg	LBB0_18
LBB0_15:
	movq	%r12, %rdi
	callq	_is_pden
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movl	$0, (%r12)
	jmp	LBB0_28
LBB0_19:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_22:
	movl	%eax, %edx
	xorl	%ebx, %edx
	movq	_WM97XX_ADCSEL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %edx
	je	LBB0_24
## %bb.23:
	movl	4(%r13), %edi
	andl	%ecx, %ebx
	andl	%ecx, %eax
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_RC_AGAIN@GOTPCREL(%rip), %r12
	jmp	LBB0_29
LBB0_24:
	movq	_RC_VALID@GOTPCREL(%rip), %r12
	testl	%ebx, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_29
## %bb.25:
	movq	_WM97XX_PEN_DOWN@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	jne	LBB0_29
## %bb.26:
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_wm97xx_reg_read
	movl	%eax, (%r15)
	testl	%eax, (%rbx)
	jne	LBB0_29
## %bb.27:
	movl	$0, (%r13)
	jmp	LBB0_28
LBB0_17:
	movl	4(%r12), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_28:
	movq	_RC_PENUP@GOTPCREL(%rip), %r12
LBB0_29:
	movl	(%r12), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_delay,4,2                      ## @delay
	.comm	_WM97XX_PEN_DOWN,4,2            ## @WM97XX_PEN_DOWN
	.comm	_AC97_WM97XX_DIGITISER_RD,4,2   ## @AC97_WM97XX_DIGITISER_RD
	.comm	_RC_PENUP,4,2                   ## @RC_PENUP
	.comm	_AC97_WM97XX_DIGITISER1,4,2     ## @AC97_WM97XX_DIGITISER1
	.comm	_WM97XX_ADCSEL_MASK,4,2         ## @WM97XX_ADCSEL_MASK
	.comm	_WM97XX_POLL,4,2                ## @WM97XX_POLL
	.comm	_AC97_LINK_FRAME,4,2            ## @AC97_LINK_FRAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adc sample timeout\n"

L_.str.1:                               ## @.str.1
	.asciz	"adc wrong sample, wanted %x got %x\n"

	.comm	_RC_AGAIN,4,2                   ## @RC_AGAIN
	.comm	_RC_VALID,4,2                   ## @RC_VALID
	.no_dead_strip	_wm9712_poll_sample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm9712_poll_sample
_wm9712_poll_sample:                    ; @wm9712_poll_sample
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x28, _delay@GOTPAGE
Lloh1:
	ldr	x28, [x28, _delay@GOTPAGEOFF]
	ldr	w27, [x28]
Lloh2:
	adrp	x22, _WM97XX_PEN_DOWN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _WM97XX_PEN_DOWN@GOTPAGEOFF]
	ldr	w8, [x22]
	ands	w8, w8, w1
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	b.eq	LBB0_4
; %bb.1:
	ldr	w8, [x19]
	cbnz	w8, LBB0_4
; %bb.2:
Lloh4:
	adrp	x8, _AC97_WM97XX_DIGITISER_RD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AC97_WM97XX_DIGITISER_RD@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wm97xx_reg_read
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_24
; %bb.3:
	mov	w8, #1
	str	w8, [x19]
LBB0_4:
	add	w26, w27, w27, lsl #2
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x21
	blr	x8
LBB0_7:
Lloh7:
	adrp	x23, _AC97_WM97XX_DIGITISER1@GOTPAGE
Lloh8:
	ldr	x23, [x23, _AC97_WM97XX_DIGITISER1@GOTPAGEOFF]
	ldr	w22, [x23]
Lloh9:
	adrp	x8, _WM97XX_ADCSEL_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WM97XX_ADCSEL_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh12:
	adrp	x24, _WM97XX_POLL@GOTPAGE
Lloh13:
	ldr	x24, [x24, _WM97XX_POLL@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w25, w8, w9
	ldr	w0, [x28]
	bl	_WM97XX_DELAY
	orr	w2, w25, w0
	mov	x0, x19
	mov	x1, x22
	bl	_wm97xx_reg_write
	ldr	w0, [x28]
	bl	_poll_delay
	ldr	w1, [x23]
	mov	x0, x19
	bl	_wm97xx_reg_read
	ldr	w8, [x24]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w27, #0, #4, ne
	b.ne	LBB0_9
; %bb.8:
	mov	x27, x26
	b	LBB0_11
LBB0_9:
Lloh14:
	adrp	x22, _AC97_LINK_FRAME@GOTPAGE
Lloh15:
	ldr	x22, [x22, _AC97_LINK_FRAME@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_udelay
	sub	w27, w26, #1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_wm97xx_reg_read
	ldr	w8, [x24]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w26, #1, #4, ne
	mov	x26, x27
	b.ne	LBB0_10
LBB0_11:
	cmp	w27, #0
	b.le	LBB0_17
; %bb.12:
Lloh16:
	adrp	x22, _AC97_WM97XX_DIGITISER_RD@GOTPAGE
Lloh17:
	ldr	x22, [x22, _AC97_WM97XX_DIGITISER_RD@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_wm97xx_reg_read
	str	w0, [x20]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_15
; %bb.13:
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.14:
	mov	x0, x21
	blr	x8
	ldr	w0, [x20]
LBB0_15:
	eor	w8, w0, w21
Lloh18:
	adrp	x9, _WM97XX_ADCSEL_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _WM97XX_ADCSEL_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_19
; %bb.16:
	ldr	w8, [x19, #4]
	and	w10, w9, w21
	and	w9, w9, w0
	stp	x10, x9, [sp]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_dev_dbg
Lloh23:
	adrp	x8, _RC_AGAIN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RC_AGAIN@GOTPAGEOFF]
	b	LBB0_25
LBB0_17:
	mov	x0, x19
	bl	_is_pden
	cbz	x0, LBB0_23
LBB0_18:
	str	wzr, [x19]
	b	LBB0_24
LBB0_19:
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_22
; %bb.20:
Lloh25:
	adrp	x21, _WM97XX_PEN_DOWN@GOTPAGE
Lloh26:
	ldr	x21, [x21, _WM97XX_PEN_DOWN@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_22
; %bb.21:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_wm97xx_reg_read
	str	w0, [x20]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_18
LBB0_22:
Lloh27:
	adrp	x8, _RC_VALID@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RC_VALID@GOTPAGEOFF]
	b	LBB0_25
LBB0_23:
	ldr	w0, [x19, #4]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_24:
Lloh31:
	adrp	x8, _RC_PENUP@GOTPAGE
Lloh32:
	ldr	x8, [x8, _RC_PENUP@GOTPAGEOFF]
LBB0_25:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_delay,4,2                      ; @delay
	.comm	_WM97XX_PEN_DOWN,4,2            ; @WM97XX_PEN_DOWN
	.comm	_AC97_WM97XX_DIGITISER_RD,4,2   ; @AC97_WM97XX_DIGITISER_RD
	.comm	_RC_PENUP,4,2                   ; @RC_PENUP
	.comm	_AC97_WM97XX_DIGITISER1,4,2     ; @AC97_WM97XX_DIGITISER1
	.comm	_WM97XX_ADCSEL_MASK,4,2         ; @WM97XX_ADCSEL_MASK
	.comm	_WM97XX_POLL,4,2                ; @WM97XX_POLL
	.comm	_AC97_LINK_FRAME,4,2            ; @AC97_LINK_FRAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adc sample timeout\n"

l_.str.1:                               ; @.str.1
	.asciz	"adc wrong sample, wanted %x got %x\n"

	.comm	_RC_AGAIN,4,2                   ; @RC_AGAIN
	.comm	_RC_VALID,4,2                   ; @RC_VALID
	.no_dead_strip	_wm9712_poll_sample
.subsections_via_symbols
