	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7780_write_raw
_ad7780_write_raw:                      ## @ad7780_write_raw
	.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	%r8, %rbx
	movl	%ecx, %r15d
	movl	%edx, %r13d
	callq	_iio_priv
	movq	%rax, %r12
	movq	24(%rax), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	cmpq	$129, %rbx
	je	LBB0_6
## %bb.3:
	cmpq	$128, %rbx
	jne	LBB0_8
## %bb.4:
	testl	%r13d, %r13d
	je	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_6:
	imull	$1000, %r13d, %eax              ## imm = 0x3E8
	movslq	%r15d, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	addl	%eax, %ecx
	movq	_AD7780_FILTER_MIDPOINT@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	cmpl	(%rax), %ecx
	setge	%sil
	movq	_ad778x_odr_avail@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rsi,4), %eax
	movl	%eax, 16(%r12)
	movl	12(%r12), %edi
                                        ## kill: def $esi killed $esi killed $rsi
	jmp	LBB0_7
LBB0_5:
	imulq	$1000000, (%r12), %rdi          ## imm = 0xF4240
	movb	(%rax), %cl
	decb	%cl
	movl	$1, %esi
	shll	%cl, %esi
	callq	_DIV_ROUND_CLOSEST_ULL
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, 8(%r12)
	movq	_AD7780_GAIN_MIDPOINT@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpl	(%rcx), %eax
	setae	%sil
	movl	20(%r12), %edi
LBB0_7:
	callq	_gpiod_set_value
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AD7780_GAIN_MIDPOINT,4,2       ## @AD7780_GAIN_MIDPOINT
	.comm	_AD7780_FILTER_MIDPOINT,4,2     ## @AD7780_FILTER_MIDPOINT
	.comm	_ad778x_odr_avail,8,3           ## @ad778x_odr_avail
	.no_dead_strip	_ad7780_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7780_write_raw
_ad7780_write_raw:                      ; @ad7780_write_raw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x4
	mov	x20, x3
	mov	x21, x2
	bl	_iio_priv
	ldr	x8, [x0, #24]
	ldr	w9, [x8, #4]
	cbz	w9, LBB0_4
; %bb.1:
	mov	x19, x0
	cmp	x22, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	x22, #128
	b.ne	LBB0_8
; %bb.3:
	cbz	w21, LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	mov	w8, #1000
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x9, w20, w9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	madd	w8, w21, w8, w9
Lloh3:
	adrp	x9, _AD7780_FILTER_MIDPOINT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AD7780_FILTER_MIDPOINT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
Lloh6:
	adrp	x8, _ad778x_odr_avail@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ad778x_odr_avail@GOTPAGEOFF]
	cset	w1, ge
Lloh8:
	ldr	x8, [x8]
	ldr	w8, [x8, w1, uxtw #2]
	str	w8, [x19, #16]
	ldr	w0, [x19, #12]
	b	LBB0_7
LBB0_6:
	ldr	x9, [x19]
	mov	w10, #16960
	movk	w10, #15, lsl #16
	mul	x0, x9, x10
	ldr	w8, [x8]
	sub	w8, w8, #1
	mov	w9, #1
	lsl	w1, w9, w8
	bl	_DIV_ROUND_CLOSEST_ULL
	mov	x1, x20
	bl	_DIV_ROUND_CLOSEST
	str	w0, [x19, #8]
Lloh9:
	adrp	x8, _AD7780_GAIN_MIDPOINT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AD7780_GAIN_MIDPOINT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w1, hs
	ldr	w0, [x19, #20]
LBB0_7:
	bl	_gpiod_set_value
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AD7780_GAIN_MIDPOINT,4,2       ; @AD7780_GAIN_MIDPOINT
	.comm	_AD7780_FILTER_MIDPOINT,4,2     ; @AD7780_FILTER_MIDPOINT
	.comm	_ad778x_odr_avail,8,3           ; @ad778x_odr_avail
	.no_dead_strip	_ad7780_write_raw
.subsections_via_symbols
