	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sx9500_init_compensation
_sx9500_init_compensation:              ## @sx9500_init_compensation
	.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
	callq	_iio_priv
	movq	%rax, %r14
	movl	(%rax), %edi
	movq	_SX9500_REG_PROX_CTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SX9500_CHAN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	$-11, %r12d
	leaq	-44(%rbp), %r15
	movq	_SX9500_COMPSTAT_MASK@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	movl	(%r14), %edi
	movq	_SX9500_REG_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r13), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%r12d
	jne	LBB0_4
## %bb.6:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	(%r14), %edi
	movq	_SX9500_REG_PROX_CTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SX9500_CHAN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SX9500_REG_PROX_CTRL0,4,2      ## @SX9500_REG_PROX_CTRL0
	.comm	_SX9500_CHAN_MASK,4,2           ## @SX9500_CHAN_MASK
	.comm	_SX9500_REG_STAT,4,2            ## @SX9500_REG_STAT
	.comm	_SX9500_COMPSTAT_MASK,4,2       ## @SX9500_COMPSTAT_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"initial compensation timed out"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_sx9500_init_compensation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sx9500_init_compensation
_sx9500_init_compensation:              ; @sx9500_init_compensation
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	bl	_iio_priv
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x21, _SX9500_REG_PROX_CTRL0@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SX9500_REG_PROX_CTRL0@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _SX9500_CHAN_MASK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SX9500_CHAN_MASK@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x3, x2
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	w23, #-11
Lloh4:
	adrp	x24, _SX9500_REG_STAT@GOTPAGE
Lloh5:
	ldr	x24, [x24, _SX9500_REG_STAT@GOTPAGEOFF]
Lloh6:
	adrp	x25, _SX9500_COMPSTAT_MASK@GOTPAGE
Lloh7:
	ldr	x25, [x25, _SX9500_COMPSTAT_MASK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10000
	mov	w1, #20000
	bl	_usleep_range
	ldr	w0, [x19]
	ldr	w1, [x24]
	add	x2, sp, #12
	bl	_regmap_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #12]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	adds	w23, w23, #1
	b.lo	LBB0_2
; %bb.5:
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	ldr	w0, [x19]
	ldr	w1, [x21]
	ldr	w2, [x22]
	mov	w3, #0
	bl	_regmap_update_bits
	b	LBB0_8
LBB0_7:
	mov	x20, x0
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SX9500_REG_PROX_CTRL0,4,2      ; @SX9500_REG_PROX_CTRL0
	.comm	_SX9500_CHAN_MASK,4,2           ; @SX9500_CHAN_MASK
	.comm	_SX9500_REG_STAT,4,2            ; @SX9500_REG_STAT
	.comm	_SX9500_COMPSTAT_MASK,4,2       ; @SX9500_COMPSTAT_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"initial compensation timed out"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_sx9500_init_compensation
.subsections_via_symbols
