	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad5791_spi_read
_ad5791_spi_read:                       ## @ad5791_spi_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	%r12
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movabsq	$12884901896, %rax              ## imm = 0x300000008
	movq	%rax, -112(%rbp)
	movl	$1, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	(%rdi), %rcx
	movq	8(%rcx), %rdx
	addq	$4, %rdx
	movq	%rdx, -88(%rbp)
	movq	%rax, -80(%rbp)
	movl	$0, -72(%rbp)
	movq	40(%rcx), %rax
	addq	$4, %rax
	movq	%rax, -64(%rbp)
	movq	24(%rcx), %rax
	addq	$4, %rax
	movq	%rax, -56(%rbp)
	movq	_AD5791_CMD_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%esi, %edi
	callq	_AD5791_ADDR
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	(%r12), %rcx
	movq	%rax, (%rcx)
	movq	_AD5791_ADDR_NOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AD5791_ADDR
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	(%r12), %rcx
	movq	%rax, 16(%rcx)
	movl	8(%r12), %ebx
	leaq	-112(%rbp), %r15
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_spi_sync_transfer
	movl	%eax, %r15d
	movq	(%r12), %rax
	movq	32(%rax), %rdi
	callq	_be32_to_cpu
	movl	%eax, (%r14)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	movl	%r15d, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AD5791_CMD_READ,4,2            ## @AD5791_CMD_READ
	.comm	_AD5791_ADDR_NOOP,4,2           ## @AD5791_ADDR_NOOP
	.no_dead_strip	_ad5791_spi_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ad5791_spi_read
lCPI0_0:
	.long	8                               ; 0x8
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ad5791_spi_read:                       ; @ad5791_spi_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	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #8]
	mov	w8, #1
	str	w8, [sp, #16]
	str	xzr, [sp, #24]
	ldr	x8, [x0]
	ldr	x9, [x8, #8]
	add	x9, x9, #4
	str	x9, [sp, #32]
	str	d0, [sp, #40]
	str	wzr, [sp, #48]
	ldr	x9, [x8, #40]
	add	x9, x9, #4
	str	x9, [sp, #56]
	ldr	x8, [x8, #24]
	add	x8, x8, #4
	str	x8, [sp, #64]
Lloh5:
	adrp	x8, _AD5791_CMD_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AD5791_CMD_READ@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	mov	x0, x1
	bl	_AD5791_ADDR
	orr	w0, w0, w21
	bl	_cpu_to_be32
	ldr	x8, [x20]
	str	x0, [x8]
Lloh8:
	adrp	x8, _AD5791_ADDR_NOOP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AD5791_ADDR_NOOP@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_AD5791_ADDR
	bl	_cpu_to_be32
	ldr	x8, [x20]
	str	x0, [x8, #16]
	ldr	w21, [x20, #8]
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x21
	bl	_spi_sync_transfer
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x0, [x8, #32]
	bl	_be32_to_cpu
	str	w0, [x19]
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x21
	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_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AD5791_CMD_READ,4,2            ; @AD5791_CMD_READ
	.comm	_AD5791_ADDR_NOOP,4,2           ; @AD5791_ADDR_NOOP
	.no_dead_strip	_ad5791_spi_read
.subsections_via_symbols
