	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7606_spi_reg_read
_ad7606_spi_reg_read:                   ## @ad7606_spi_reg_read
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	16(%rdi), %edi
	callq	_to_spi_device
	movq	%rax, %r14
	movl	$2, -96(%rbp)
	movq	$0, -88(%rbp)
	movl	$0, -80(%rbp)
	movq	(%rbx), %rax
	movq	%rax, -72(%rbp)
	movl	$2, -64(%rbp)
	addq	$4, %rax
	movq	%rax, -56(%rbp)
	movl	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	8(%rbx), %rax
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	*(%rax)
	shll	$8, %eax
	movl	%eax, %edi
	callq	_cpu_to_be16
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	leaq	-96(%rbp), %r15
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_spi_sync_transfer
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movl	4(%rax), %edi
	callq	_be16_to_cpu
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ad7606_spi_reg_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7606_spi_reg_read
_ad7606_spi_reg_read:                   ; @ad7606_spi_reg_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	w0, [x0, #16]
	bl	_to_spi_device
	mov	x21, x0
	mov	w8, #2
	str	w8, [sp, #8]
	str	xzr, [sp, #16]
	str	wzr, [sp, #24]
	ldp	x9, x10, [x19]
	str	x9, [sp, #32]
	str	w8, [sp, #40]
	add	x8, x9, #4
	str	x8, [sp, #48]
	str	wzr, [sp, #56]
	str	xzr, [sp, #64]
	ldr	x8, [x10]
	mov	x0, x20
	mov	w1, #0
	blr	x8
	lsl	w0, w0, #8
	bl	_cpu_to_be16
	ldr	x8, [x19]
	str	w0, [x8]
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x21
	bl	_spi_sync_transfer
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	bl	_be16_to_cpu
LBB0_2:
	ldur	x8, [x29, #-40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ad7606_spi_reg_read
.subsections_via_symbols
