	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7877_read
_ad7877_read:                           ## @ad7877_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	leaq	4(%rax), %r15
	movq	%r15, %rdi
	callq	_spi_message_init
	movq	_AD7877_REG_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AD7877_WRITEADD
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_AD7877_READADD
	orl	%ebx, %eax
	cltq
	movq	%r13, %rcx
	addq	$16, %rcx
	movq	%rax, 16(%r13)
	movq	8(%r13), %rdi
	movq	%rcx, 16(%rdi)
	movabsq	$4294967298, %rax               ## imm = 0x100000002
	movq	%rax, (%rdi)
	movq	%r13, 32(%rdi)
	movl	$2, 24(%rdi)
	movq	%r15, %rsi
	callq	_spi_message_add_tail
	movq	8(%r13), %rdi
	addq	$24, %rdi
	movq	%r15, %rsi
	callq	_spi_message_add_tail
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_spi_sync
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	(%r13), %ebx
LBB0_4:
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AD7877_REG_CTRL1,4,2           ## @AD7877_REG_CTRL1
	.no_dead_strip	_ad7877_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 ad7877_read
lCPI0_0:
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ad7877_read:                           ; @ad7877_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	add	x22, x0, #4
	mov	x0, x22
	bl	_spi_message_init
Lloh3:
	adrp	x8, _AD7877_REG_CTRL1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AD7877_REG_CTRL1@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_AD7877_WRITEADD
	mov	x23, x0
	mov	x0, x21
	bl	_AD7877_READADD
	orr	w8, w0, w23
	sxtw	x8, w8
	mov	x9, x19
	str	x8, [x9, #16]!
	ldr	x0, [x19, #8]
	str	x9, [x0, #16]
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x0]
	str	x19, [x0, #32]
	mov	w8, #2
	str	w8, [x0, #24]
	mov	x1, x22
	bl	_spi_message_add_tail
	ldr	x8, [x19, #8]
	add	x0, x8, #24
	mov	x1, x22
	bl	_spi_message_add_tail
	mov	x0, x20
	mov	x1, x22
	bl	_spi_sync
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w20, [x19]
LBB0_3:
	mov	x0, x19
	bl	_kfree
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AD7877_REG_CTRL1,4,2           ; @AD7877_REG_CTRL1
	.no_dead_strip	_ad7877_read
.subsections_via_symbols
