	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xadc_zynq_read_adc_reg
_xadc_zynq_read_adc_reg:                ## @xadc_zynq_read_adc_reg
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_XADC_ZYNQ_CMD_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_XADC_ZYNQ_CMD
	movl	%eax, -56(%rbp)
	movq	_XADC_ZYNQ_CMD_NOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_XADC_ZYNQ_CMD
	movl	%eax, -52(%rbp)
	leaq	4(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irq
	movq	_XADC_ZYNQ_INT_DFIFO_GTH@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	%edx, %esi
	callq	_xadc_zynq_update_intmsk
	movq	%rbx, %rdi
	callq	_xadc_zynq_drain_fifo
	movq	%rbx, %rdi
	callq	_reinit_completion
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_xadc_zynq_write_fifo
	movq	_XADC_ZYNQ_REG_CFG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-60(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_xadc_read_reg
	movq	_XADC_ZYNQ_CFG_DFIFOTH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-60(%rbp), %edx
	movq	_XADC_ZYNQ_CFG_DFIFOTH_OFFSET@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %edx
	movl	%edx, -60(%rbp)
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_xadc_write_reg
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_xadc_zynq_update_intmsk
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wait_for_completion_interruptible_timeout
	movq	_EIO@GOTPCREL(%rip), %rcx
	subl	(%rcx), %r15d
	testl	%eax, %eax
	cmovnel	%eax, %r15d
	testl	%r15d, %r15d
	js	LBB0_2
## %bb.1:
	movq	_XADC_ZYNQ_REG_DFIFO@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-64(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_xadc_read_reg
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_xadc_read_reg
	movzwl	-64(%rbp), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%r15d, %r15d
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_XADC_ZYNQ_CMD_READ,4,2         ## @XADC_ZYNQ_CMD_READ
	.comm	_XADC_ZYNQ_CMD_NOP,4,2          ## @XADC_ZYNQ_CMD_NOP
	.comm	_XADC_ZYNQ_INT_DFIFO_GTH,4,2    ## @XADC_ZYNQ_INT_DFIFO_GTH
	.comm	_XADC_ZYNQ_REG_CFG,4,2          ## @XADC_ZYNQ_REG_CFG
	.comm	_XADC_ZYNQ_CFG_DFIFOTH_MASK,4,2 ## @XADC_ZYNQ_CFG_DFIFOTH_MASK
	.comm	_XADC_ZYNQ_CFG_DFIFOTH_OFFSET,4,2 ## @XADC_ZYNQ_CFG_DFIFOTH_OFFSET
	.comm	_HZ,4,2                         ## @HZ
	.comm	_EIO,4,2                        ## @EIO
	.comm	_XADC_ZYNQ_REG_DFIFO,4,2        ## @XADC_ZYNQ_REG_DFIFO
	.no_dead_strip	_xadc_zynq_read_adc_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xadc_zynq_read_adc_reg
_xadc_zynq_read_adc_reg:                ; @xadc_zynq_read_adc_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _XADC_ZYNQ_CMD_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XADC_ZYNQ_CMD_READ@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w2, #0
	bl	_XADC_ZYNQ_CMD
	str	w0, [sp, #16]
Lloh6:
	adrp	x8, _XADC_ZYNQ_CMD_NOP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XADC_ZYNQ_CMD_NOP@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #0
	bl	_XADC_ZYNQ_CMD
	str	w0, [sp, #20]
	add	x21, x20, #4
	mov	x0, x21
	bl	_spin_lock_irq
Lloh9:
	adrp	x22, _XADC_ZYNQ_INT_DFIFO_GTH@GOTPAGE
Lloh10:
	ldr	x22, [x22, _XADC_ZYNQ_INT_DFIFO_GTH@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x1
	bl	_xadc_zynq_update_intmsk
	mov	x0, x20
	bl	_xadc_zynq_drain_fifo
	mov	x0, x20
	bl	_reinit_completion
	add	x0, sp, #16
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #16
	mov	x0, x20
	bl	_xadc_zynq_write_fifo
Lloh11:
	adrp	x23, _XADC_ZYNQ_REG_CFG@GOTPAGE
Lloh12:
	ldr	x23, [x23, _XADC_ZYNQ_REG_CFG@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x0, x20
	bl	_xadc_read_reg
Lloh13:
	adrp	x8, _XADC_ZYNQ_CFG_DFIFOTH_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _XADC_ZYNQ_CFG_DFIFOTH_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	bic	w8, w9, w8
Lloh16:
	adrp	x9, _XADC_ZYNQ_CFG_DFIFOTH_OFFSET@GOTPAGE
Lloh17:
	ldr	x9, [x9, _XADC_ZYNQ_CFG_DFIFOTH_OFFSET@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w2, w9, w8
	str	w2, [sp, #8]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_xadc_write_reg
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #0
	bl	_xadc_zynq_update_intmsk
	mov	x0, x21
	bl	_spin_unlock_irq
Lloh19:
	adrp	x8, _HZ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wait_for_completion_interruptible_timeout
Lloh22:
	adrp	x8, _EIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, ne
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh25:
	adrp	x21, _XADC_ZYNQ_REG_DFIFO@GOTPAGE
Lloh26:
	ldr	x21, [x21, _XADC_ZYNQ_REG_DFIFO@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_xadc_read_reg
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_xadc_read_reg
	mov	w0, #0
	ldrh	w8, [sp, #12]
	str	w8, [x19]
LBB0_2:
	ldr	x8, [sp, #24]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_XADC_ZYNQ_CMD_READ,4,2         ; @XADC_ZYNQ_CMD_READ
	.comm	_XADC_ZYNQ_CMD_NOP,4,2          ; @XADC_ZYNQ_CMD_NOP
	.comm	_XADC_ZYNQ_INT_DFIFO_GTH,4,2    ; @XADC_ZYNQ_INT_DFIFO_GTH
	.comm	_XADC_ZYNQ_REG_CFG,4,2          ; @XADC_ZYNQ_REG_CFG
	.comm	_XADC_ZYNQ_CFG_DFIFOTH_MASK,4,2 ; @XADC_ZYNQ_CFG_DFIFOTH_MASK
	.comm	_XADC_ZYNQ_CFG_DFIFOTH_OFFSET,4,2 ; @XADC_ZYNQ_CFG_DFIFOTH_OFFSET
	.comm	_HZ,4,2                         ; @HZ
	.comm	_EIO,4,2                        ; @EIO
	.comm	_XADC_ZYNQ_REG_DFIFO,4,2        ; @XADC_ZYNQ_REG_DFIFO
	.no_dead_strip	_xadc_zynq_read_adc_reg
.subsections_via_symbols
