	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xadc_read_raw
_xadc_read_raw:                         ## @xadc_read_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r12
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_iio_priv
	addq	$-138, %r14
	cmpq	$3, %r14
	ja	LBB0_5
## %bb.1:
	movq	%rax, %r15
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r14,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movl	4(%r13), %eax
	cmpl	$137, %eax
	je	LBB0_17
## %bb.3:
	cmpl	$136, %eax
	jne	LBB0_5
## %bb.4:
	movl	(%r13), %eax
	andl	$-8, %eax
	cmpl	$128, %eax
	movl	$3000, %eax                     ## imm = 0xBB8
	movl	$1000, %ecx                     ## imm = 0x3E8
	cmovel	%eax, %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	jmp	LBB0_18
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_6:
	movq	_XADC_REG_CONF2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_xadc_read_adc_reg
	testl	%eax, %eax
	jne	LBB0_20
## %bb.7:
	movq	_XADC_CONF2_DIV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	movq	_XADC_CONF2_DIV_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	cmpl	$3, %eax
	movl	$2, %ebx
	cmovael	%eax, %ebx
	movq	%r15, %rdi
	callq	_xadc_get_dclk_rate
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
	imulq	$1321528399, %rax, %rax         ## imm = 0x4EC4EC4F
	shrq	$35, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_12
LBB0_8:
	movq	%rbx, %rdi
	callq	_iio_buffer_enabled
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$-2219, (%rax)                  ## imm = 0xF755
LBB0_12:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_13:
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_xadc_read_adc_reg
	testl	%eax, %eax
	js	LBB0_20
## %bb.14:
	movl	-44(%rbp), %eax
	sarl	$4, %eax
	movl	%eax, -44(%rbp)
	cmpb	$117, 8(%r13)
	je	LBB0_16
## %bb.15:
	movl	%eax, %edi
	movl	$11, %esi
	callq	_sign_extend32
LBB0_16:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_12
LBB0_17:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$503975, (%rax)                 ## imm = 0x7B0A7
LBB0_18:
	movl	$12, (%r12)
	movq	_IIO_VAL_FRACTIONAL_LOG2@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %eax
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_8
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ## @IIO_VAL_FRACTIONAL_LOG2
	.comm	_EINVAL,4,2                     ## @EINVAL
	.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_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xadc_read_raw
_xadc_read_raw:                         ; @xadc_read_raw
	.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	x24, x4
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x23, x0
	bl	_iio_priv
	sub	x8, x24, #138
	cmp	x8, #3
	b.hi	LBB0_5
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w8, [x21, #4]
	cmp	w8, #137
	b.eq	LBB0_17
; %bb.3:
	cmp	w8, #136
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x21]
	and	w8, w8, #0xfffffff8
	mov	w9, #1000
	mov	w10, #3000
	cmp	w8, #128
	csel	w8, w10, w9, eq
	b	LBB0_18
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
Lloh4:
	adrp	x8, _XADC_REG_CONF2@GOTPAGE
Lloh5:
	ldr	x8, [x8, _XADC_REG_CONF2@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_xadc_read_adc_reg
	cbnz	w0, LBB0_20
; %bb.7:
	ldr	w8, [sp, #12]
Lloh7:
	adrp	x9, _XADC_CONF2_DIV_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _XADC_CONF2_DIV_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _XADC_CONF2_DIV_OFFSET@GOTPAGE
Lloh11:
	ldr	x10, [x10, _XADC_CONF2_DIV_OFFSET@GOTPAGEOFF]
	and	w8, w9, w8
Lloh12:
	ldr	w9, [x10]
	asr	w8, w8, w9
	mov	w9, #2
	cmp	w8, #2
	csel	w21, w8, w9, hi
	mov	x0, x20
	bl	_xadc_get_dclk_rate
	udiv	w8, w0, w21
	mov	w9, #60495
	movk	w9, #20164, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #35
	str	w8, [x19]
	b	LBB0_12
LBB0_8:
	mov	x0, x23
	bl	_iio_buffer_enabled
	cbz	w0, LBB0_13
; %bb.9:
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_11:
	mov	w8, #-2219
	str	w8, [x19]
LBB0_12:
Lloh15:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
	b	LBB0_19
LBB0_13:
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_xadc_read_adc_reg
	tbnz	w0, #31, LBB0_20
; %bb.14:
	ldr	w8, [sp, #12]
	asr	w0, w8, #4
	str	w0, [sp, #12]
	ldrb	w8, [x21, #8]
	cmp	w8, #117
	b.eq	LBB0_16
; %bb.15:
	mov	w1, #11
	bl	_sign_extend32
LBB0_16:
	str	w0, [x19]
	b	LBB0_12
LBB0_17:
	mov	w8, #45223
	movk	w8, #7, lsl #16
LBB0_18:
	str	w8, [x19]
	mov	w8, #12
	str	w8, [x22]
Lloh17:
	adrp	x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGEOFF]
LBB0_19:
	ldr	w0, [x8]
LBB0_20:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ; @IIO_VAL_FRACTIONAL_LOG2
	.comm	_EINVAL,4,2                     ; @EINVAL
	.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_read_raw
.subsections_via_symbols
