	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7949_spi_read_channel
_ad7949_spi_read_channel:               ## @ad7949_spi_read_channel
	.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
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_ad7949_spi_bits_per_word
	movl	%eax, %r13d
	movl	12(%rbx), %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, %r15d
	movq	%rbx, -64(%rbp)
	movq	_AD7949_OFFSET_CHANNEL_SEL@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r12d, %esi
	shll	%cl, %esi
	movl	$4, -56(%rbp)
	movl	%r13d, -52(%rbp)
	movq	_AD7949_MASK_CHANNEL_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ad7949_spi_write_cfg
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	$0, (%rbx)
	leaq	-72(%rbp), %r13
	leaq	-64(%rbp), %rsi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_spi_message_init_with_transfers
	movl	8(%rbx), %edi
	movq	%r13, %rsi
	callq	_spi_sync
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movl	$2, %edi
	callq	_udelay
	movl	%r12d, 4(%rbx)
	movq	%rbx, %rdi
	callq	_ad7949_spi_cfg_is_read_back
	movq	%rax, %rdx
	xorl	%eax, %eax
	movl	(%rbx), %esi
	movl	$0, %ecx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.3:
	movq	_AD7949_CFG_REG_SIZE_BITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %esi
	andl	%r15d, %esi
	movl	%esi, (%r14)
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AD7949_OFFSET_CHANNEL_SEL,4,2  ## @AD7949_OFFSET_CHANNEL_SEL
	.comm	_AD7949_MASK_CHANNEL_SEL,4,2    ## @AD7949_MASK_CHANNEL_SEL
	.comm	_AD7949_CFG_REG_SIZE_BITS,4,2   ## @AD7949_CFG_REG_SIZE_BITS
	.no_dead_strip	_ad7949_spi_read_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7949_spi_read_channel
_ad7949_spi_read_channel:               ; @ad7949_spi_read_channel
	.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	x21, x2
	mov	x19, x1
	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]
	bl	_ad7949_spi_bits_per_word
	mov	x23, x0
	ldr	w0, [x20, #12]
	mov	w1, #0
	bl	_GENMASK
	mov	x22, x0
	str	x20, [sp, #8]
	mov	w8, #4
Lloh3:
	adrp	x9, _AD7949_OFFSET_CHANNEL_SEL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AD7949_OFFSET_CHANNEL_SEL@GOTPAGEOFF]
	stp	w8, w23, [sp, #16]
Lloh5:
	ldr	w8, [x9]
	lsl	w1, w21, w8
Lloh6:
	adrp	x8, _AD7949_MASK_CHANNEL_SEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AD7949_MASK_CHANNEL_SEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_ad7949_spi_write_cfg
	cbnz	w0, LBB0_3
; %bb.1:
	str	wzr, [x20]
	mov	x0, sp
	add	x1, sp, #8
	mov	w2, #1
	bl	_spi_message_init_with_transfers
	ldr	w0, [x20, #8]
	mov	x1, sp
	bl	_spi_sync
	cbnz	w0, LBB0_3
; %bb.2:
	mov	w0, #2
	bl	_udelay
	str	w21, [x20, #4]
	mov	x0, x20
	bl	_ad7949_spi_cfg_is_read_back
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x20]
Lloh9:
	adrp	x10, _AD7949_CFG_REG_SIZE_BITS@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AD7949_CFG_REG_SIZE_BITS@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	x8, #0
	csel	w8, wzr, w10, eq
	asr	w8, w9, w8
	and	w8, w8, w22
	str	w8, [x19]
LBB0_3:
	ldr	x8, [sp, #24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	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_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7949_OFFSET_CHANNEL_SEL,4,2  ; @AD7949_OFFSET_CHANNEL_SEL
	.comm	_AD7949_MASK_CHANNEL_SEL,4,2    ; @AD7949_MASK_CHANNEL_SEL
	.comm	_AD7949_CFG_REG_SIZE_BITS,4,2   ; @AD7949_CFG_REG_SIZE_BITS
	.no_dead_strip	_ad7949_spi_read_channel
.subsections_via_symbols
