	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad714x_spi_read
_ad714x_spi_read:                       ## @ad714x_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	8(%rdi), %edi
	callq	_to_spi_device
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	leaq	-120(%rbp), %r12
	movq	%r12, %rdi
	callq	_spi_message_init
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_AD714x_SPI_CMD_PREFIX@GOTPCREL(%rip), %rax
	orw	(%rax), %r13w
	movq	_AD714x_SPI_READ@GOTPCREL(%rip), %rax
	orw	(%rax), %r13w
	movzwl	%r13w, %edi
	callq	_cpu_to_be16
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	movq	%rcx, -80(%rbp)
	movl	$4, -96(%rbp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	(%r15), %rax
	addq	$4, %rax
	leaq	-72(%rbp), %rdi
	movq	%rax, -64(%rbp)
	leal	(,%r14,4), %eax
	movl	%eax, -72(%rbp)
	movq	%r12, %rsi
	callq	_spi_message_add_tail
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movq	%r12, %rsi
	callq	_spi_sync
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_err
	movl	%r12d, %eax
	jmp	LBB0_5
LBB0_1:
	movq	-104(%rbp), %r13                ## 8-byte Reload
	testq	%r14, %r14
	movl	$0, %eax
	je	LBB0_5
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	leaq	1(%rbx), %r12
	movl	4(%rax,%rbx,4), %edi
	callq	_be16_to_cpu
	movw	%ax, (%r13,%rbx,2)
	movq	%r12, %rbx
	cmpq	%r12, %r14
	jne	LBB0_3
## %bb.4:
	xorl	%eax, %eax
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_8
## %bb.6:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AD714x_SPI_CMD_PREFIX,2,1      ## @AD714x_SPI_CMD_PREFIX
	.comm	_AD714x_SPI_READ,2,1            ## @AD714x_SPI_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SPI read error: %d\n"

	.no_dead_strip	_ad714x_spi_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad714x_spi_read
_ad714x_spi_read:                       ; @ad714x_spi_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x21, x2
	mov	x22, 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, #56]
	ldr	w0, [x0, #8]
	bl	_to_spi_device
	mov	x23, x0
	mov	x0, sp
	bl	_spi_message_init
	add	x24, sp, #8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh3:
	adrp	x8, _AD714x_SPI_CMD_PREFIX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AD714x_SPI_CMD_PREFIX@GOTPAGEOFF]
	ldrh	w8, [x8]
Lloh5:
	adrp	x9, _AD714x_SPI_READ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AD714x_SPI_READ@GOTPAGEOFF]
	ldrh	w9, [x9]
	orr	w8, w8, w22
	orr	w0, w8, w9
	bl	_cpu_to_be16
	ldr	x8, [x20]
	str	w0, [x8]
	str	x8, [sp, #24]
	mov	w8, #4
	str	w8, [sp, #8]
	add	x0, sp, #8
	mov	x1, sp
	bl	_spi_message_add_tail
	ldr	x8, [x20]
	add	x8, x8, #4
	add	x0, x24, #24
	str	x8, [sp, #40]
	lsl	w8, w19, #2
	str	w8, [sp, #32]
	mov	x1, sp
	bl	_spi_message_add_tail
	mov	x1, sp
	mov	x0, x23
	bl	_spi_sync
	mov	x22, x0
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x20, #8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_err
	b	LBB0_6
LBB0_2:
	cbz	x19, LBB0_5
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x23, x22, #1
	add	x8, x8, x22, lsl #2
	ldr	w0, [x8, #4]
	bl	_be16_to_cpu
	strh	w0, [x21, x22, lsl #1]
	mov	x22, x23
	cmp	x19, x23
	b.ne	LBB0_4
LBB0_5:
	mov	w22, #0
LBB0_6:
	ldr	x8, [sp, #56]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AD714x_SPI_CMD_PREFIX,2,1      ; @AD714x_SPI_CMD_PREFIX
	.comm	_AD714x_SPI_READ,2,1            ; @AD714x_SPI_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SPI read error: %d\n"

	.no_dead_strip	_ad714x_spi_read
.subsections_via_symbols
