	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ad_sigma_delta_single_conversion ## -- Begin function ad_sigma_delta_single_conversion
	.p2align	4, 0x90
_ad_sigma_delta_single_conversion:      ## @ad_sigma_delta_single_conversion
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_iio_device_get_drvdata
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_iio_buffer_enabled
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_2:
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	8(%r15), %esi
	movq	%r13, %rdi
	callq	_ad_sigma_delta_set_channel
	movq	16(%r13), %rax
	movl	(%rax), %edi
	callq	_spi_bus_lock
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%r13)
	movq	%r13, %rbx
	addq	$32, %rbx
	movq	%rbx, %rdi
	callq	_reinit_completion
	movq	_AD_SD_MODE_SINGLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ad_sigma_delta_set_mode
	movl	$0, 8(%r13)
	movq	16(%r13), %rax
	movl	4(%rax), %edi
	callq	_enable_irq
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wait_for_completion_interruptible_timeout
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	testl	%eax, %eax
	cmovnel	%eax, %ebx
	testl	%ebx, %ebx
	js	LBB0_6
## %bb.3:
	movq	24(%r13), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.4:
	movq	_AD_SD_REG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movl	4(%r15), %edi
	addl	(%r15), %edi
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	leaq	-44(%rbp), %rcx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_ad_sd_read_reg
	movl	%eax, %ebx
LBB0_6:
	cmpl	$0, 8(%r13)
	jne	LBB0_8
## %bb.7:
	movq	16(%r13), %rax
	movl	4(%rax), %edi
	callq	_disable_irq_nosync
	movl	$1, 8(%r13)
LBB0_8:
	movl	$0, 4(%r13)
	movq	_AD_SD_MODE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ad_sigma_delta_set_mode
	movl	$0, (%r13)
	movq	16(%r13), %rax
	movl	(%rax), %edi
	callq	_spi_bus_unlock
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.9:
	movl	-44(%rbp), %esi
	movb	(%r15), %al
	movb	4(%r15), %cl
	movl	%esi, %edx
	shrl	%cl, %edx
	movl	$-1, %edi
	movl	%eax, %ecx
	shll	%cl, %edi
	notl	%edi
	andl	%edx, %edi
	movl	%edi, (%r14)
	movq	%r13, %rdi
	callq	_ad_sigma_delta_postprocess_sample
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_AD_SD_MODE_SINGLE,4,2          ## @AD_SD_MODE_SINGLE
	.comm	_HZ,4,2                         ## @HZ
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AD_SD_REG_DATA,4,2             ## @AD_SD_REG_DATA
	.comm	_AD_SD_MODE_IDLE,4,2            ## @AD_SD_MODE_IDLE
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ad_sigma_delta_single_conversion ; -- Begin function ad_sigma_delta_single_conversion
	.p2align	2
_ad_sigma_delta_single_conversion:      ; @ad_sigma_delta_single_conversion
	.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, x2
	mov	x21, x1
	mov	x22, x0
	bl	_iio_device_get_drvdata
	mov	x20, x0
	mov	x0, x22
	bl	_iio_buffer_enabled
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_8
LBB0_2:
	mov	x0, x22
	bl	_mutex_lock
	ldr	w1, [x21, #8]
	mov	x0, x20
	bl	_ad_sigma_delta_set_channel
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_spi_bus_lock
	movi.2s	v0, #1
	str	d0, [x20]
	add	x23, x20, #32
	mov	x0, x23
	bl	_reinit_completion
Lloh3:
	adrp	x8, _AD_SD_MODE_SINGLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AD_SD_MODE_SINGLE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ad_sigma_delta_set_mode
	str	wzr, [x20, #8]
	ldr	x8, [x20, #16]
	ldr	w0, [x8, #4]
	bl	_enable_irq
Lloh6:
	adrp	x8, _HZ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_wait_for_completion_interruptible_timeout
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w23, w0, w8, ne
	tbnz	w23, #31, LBB0_4
; %bb.3:
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _AD_SD_REG_DATA@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AD_SD_REG_DATA@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w23, w9, w8, eq
	ldp	w8, w9, [x21]
	add	w0, w9, w8
	mov	w1, #8
	bl	_DIV_ROUND_UP
	mov	x2, x0
	add	x3, sp, #12
	mov	x0, x20
	mov	x1, x23
	bl	_ad_sd_read_reg
	mov	x23, x0
LBB0_4:
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_6
; %bb.5:
	ldr	x8, [x20, #16]
	ldr	w0, [x8, #4]
	bl	_disable_irq_nosync
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_6:
	str	wzr, [x20, #4]
Lloh15:
	adrp	x8, _AD_SD_MODE_IDLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AD_SD_MODE_IDLE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ad_sigma_delta_set_mode
	str	wzr, [x20]
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_spi_bus_unlock
	mov	x0, x22
	bl	_mutex_unlock
	cbnz	w23, LBB0_8
; %bb.7:
	ldr	w1, [sp, #12]
	ldp	w9, w8, [x21]
	lsr	w8, w1, w8
	mov	w10, #-1
	lsl	w9, w10, w9
	bic	w8, w8, w9
	str	w8, [x19]
	mov	x0, x20
	bl	_ad_sigma_delta_postprocess_sample
Lloh18:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w23, w8, w0, eq
LBB0_8:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_AD_SD_MODE_SINGLE,4,2          ; @AD_SD_MODE_SINGLE
	.comm	_HZ,4,2                         ; @HZ
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AD_SD_REG_DATA,4,2             ; @AD_SD_REG_DATA
	.comm	_AD_SD_MODE_IDLE,4,2            ; @AD_SD_MODE_IDLE
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
.subsections_via_symbols
