	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_sar_adc_lock
_meson_sar_adc_lock:                    ## @meson_sar_adc_lock
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_iio_priv
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	movq	_MESON_SAR_ADC_DELAY@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_MESON_SAR_ADC_DELAY_KERNEL_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movl	$10000, %r14d                   ## imm = 0x2710
	leaq	-48(%rbp), %r12
	movq	_MESON_SAR_ADC_DELAY_BL30_BUSY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_udelay
	movl	(%rbx), %edi
	movl	(%r13), %esi
	movq	%r12, %rdx
	callq	_regmap_read
	movl	(%r15), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	$-1, %r14d
	jb	LBB0_3
	jmp	LBB0_6
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_7
LBB0_5:
	testl	%r14d, %r14d
	jns	LBB0_7
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
LBB0_7:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MESON_SAR_ADC_DELAY,4,2        ## @MESON_SAR_ADC_DELAY
	.comm	_MESON_SAR_ADC_DELAY_KERNEL_BUSY,4,2 ## @MESON_SAR_ADC_DELAY_KERNEL_BUSY
	.comm	_MESON_SAR_ADC_DELAY_BL30_BUSY,4,2 ## @MESON_SAR_ADC_DELAY_BL30_BUSY
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_meson_sar_adc_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_sar_adc_lock
_meson_sar_adc_lock:                    ; @meson_sar_adc_lock
	.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
	bl	_iio_priv
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w0, [x20]
Lloh0:
	adrp	x21, _MESON_SAR_ADC_DELAY@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MESON_SAR_ADC_DELAY@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _MESON_SAR_ADC_DELAY_KERNEL_BUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MESON_SAR_ADC_DELAY_KERNEL_BUSY@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	mov	w22, #10000
Lloh5:
	adrp	x23, _MESON_SAR_ADC_DELAY_BL30_BUSY@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MESON_SAR_ADC_DELAY_BL30_BUSY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w0, [x20]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w22, w22, #1
	cmn	w22, #1
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	tbnz	w22, #31, LBB0_6
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
Lloh7:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MESON_SAR_ADC_DELAY,4,2        ; @MESON_SAR_ADC_DELAY
	.comm	_MESON_SAR_ADC_DELAY_KERNEL_BUSY,4,2 ; @MESON_SAR_ADC_DELAY_KERNEL_BUSY
	.comm	_MESON_SAR_ADC_DELAY_BL30_BUSY,4,2 ; @MESON_SAR_ADC_DELAY_BL30_BUSY
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_meson_sar_adc_lock
.subsections_via_symbols
