	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xadc_write_raw
_xadc_write_raw:                        ## @xadc_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%edx, %r15d
	callq	_iio_priv
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_xadc_get_dclk_rate
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rcx
	movq	_IIO_CHAN_INFO_SAMP_FREQ@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_10
## %bb.2:
	testl	%r15d, %r15d
	jle	LBB0_10
## %bb.3:
	cmpl	$150000, %r15d                  ## imm = 0x249F0
	movl	$150000, %eax                   ## imm = 0x249F0
	cmovll	%r15d, %eax
	leal	(%rax,%rax,4), %edx
	leal	(%rdx,%rdx,4), %edx
	addl	%eax, %edx
	cmpl	$1000001, %edx                  ## imm = 0xF4241
	movl	$1000000, %esi                  ## imm = 0xF4240
	cmovgel	%edx, %esi
	movq	%rcx, %rdi
	shrq	$32, %rdi
	je	LBB0_4
## %bb.5:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %rsi
	jmp	LBB0_6
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %esi
LBB0_6:
	movl	%esi, %ebx
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.8:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rbx
	jmp	LBB0_9
LBB0_7:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
LBB0_9:
	cmpq	$3900026, %rax                  ## imm = 0x3B827A
	sbbl	$-1, %esi
	cmpl	$255, %esi
	movl	$255, %ecx
	cmovbl	%esi, %ecx
	cmpl	$3, %ecx
	movl	$2, %eax
	cmovael	%ecx, %eax
	movq	_XADC_REG_CONF2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_XADC_CONF2_DIV_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_XADC_CONF2_DIV_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	%r14, %rdi
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xadc_update_adc_reg            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IIO_CHAN_INFO_SAMP_FREQ,8,3    ## @IIO_CHAN_INFO_SAMP_FREQ
	.comm	_XADC_REG_CONF2,4,2             ## @XADC_REG_CONF2
	.comm	_XADC_CONF2_DIV_MASK,4,2        ## @XADC_CONF2_DIV_MASK
	.comm	_XADC_CONF2_DIV_OFFSET,4,2      ## @XADC_CONF2_DIV_OFFSET
	.no_dead_strip	_xadc_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xadc_write_raw
_xadc_write_raw:                        ; @xadc_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	x21, x4
	mov	x20, x2
	bl	_iio_priv
	mov	x19, x0
	bl	_xadc_get_dclk_rate
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _IIO_CHAN_INFO_SAMP_FREQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IIO_CHAN_INFO_SAMP_FREQ@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_4
; %bb.2:
	cmp	w20, #0
	b.le	LBB0_4
; %bb.3:
	mov	w8, #18928
	movk	w8, #2, lsl #16
	cmp	w20, w8
	csel	w8, w20, w8, lt
	mov	w9, #26
	mul	w8, w8, w9
	mov	w9, #16960
	movk	w9, #15, lsl #16
	cmp	w8, w9
	csel	w8, w8, w9, gt
	udiv	x8, x0, x8
	and	x9, x8, #0xffffffff
	udiv	x9, x0, x9
	mov	w10, #33401
	movk	w10, #59, lsl #16
	cmp	x9, x10
	cinc	w8, w8, hi
	mov	w9, #255
	cmp	w8, #255
	csel	w8, w8, w9, lo
	mov	w9, #2
	cmp	w8, #2
	csel	w8, w8, w9, hi
Lloh3:
	adrp	x9, _XADC_REG_CONF2@GOTPAGE
Lloh4:
	ldr	x9, [x9, _XADC_REG_CONF2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
Lloh6:
	adrp	x9, _XADC_CONF2_DIV_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _XADC_CONF2_DIV_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x9]
Lloh9:
	adrp	x9, _XADC_CONF2_DIV_OFFSET@GOTPAGE
Lloh10:
	ldr	x9, [x9, _XADC_CONF2_DIV_OFFSET@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	lsl	w3, w8, w9
	mov	x0, x19
	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
	b	_xadc_update_adc_reg
LBB0_4:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IIO_CHAN_INFO_SAMP_FREQ,8,3    ; @IIO_CHAN_INFO_SAMP_FREQ
	.comm	_XADC_REG_CONF2,4,2             ; @XADC_REG_CONF2
	.comm	_XADC_CONF2_DIV_MASK,4,2        ; @XADC_CONF2_DIV_MASK
	.comm	_XADC_CONF2_DIV_OFFSET,4,2      ; @XADC_CONF2_DIV_OFFSET
	.no_dead_strip	_xadc_write_raw
.subsections_via_symbols
