	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7768_scan_direct
_ad7768_scan_direct:                    ## @ad7768_scan_direct
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_iio_priv
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_reinit_completion
	movq	_AD7768_ONE_SHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ad7768_set_mode
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_AD7768_REG_ADC_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$3, %edx
	callq	_ad7768_spi_reg_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movq	_AD7768_CONTINUOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ad7768_set_mode
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD7768_ONE_SHOT,4,2            ## @AD7768_ONE_SHOT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_AD7768_REG_ADC_DATA,4,2        ## @AD7768_REG_ADC_DATA
	.comm	_AD7768_CONTINUOUS,4,2          ## @AD7768_CONTINUOUS
	.no_dead_strip	_ad7768_scan_direct
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7768_scan_direct
_ad7768_scan_direct:                    ; @ad7768_scan_direct
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_iio_priv
	mov	x19, x0
	bl	_reinit_completion
Lloh0:
	adrp	x8, _AD7768_ONE_SHOT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AD7768_ONE_SHOT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ad7768_set_mode
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x19
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _AD7768_REG_ADC_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AD7768_REG_ADC_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #3
	bl	_ad7768_spi_reg_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:
Lloh6:
	adrp	x8, _AD7768_CONTINUOUS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AD7768_CONTINUOUS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ad7768_set_mode
	cmp	w0, #0
	csel	w20, w0, w20, lt
	b	LBB0_6
LBB0_4:
	mov	x20, x0
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7768_ONE_SHOT,4,2            ; @AD7768_ONE_SHOT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_AD7768_REG_ADC_DATA,4,2        ; @AD7768_REG_ADC_DATA
	.comm	_AD7768_CONTINUOUS,4,2          ; @AD7768_CONTINUOUS
	.no_dead_strip	_ad7768_scan_direct
.subsections_via_symbols
