	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spu_read
_spu_read:                              ## @spu_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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	_IF_SPI_READ_OPERATION_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	%esi, %edi
	callq	_cpu_to_le16
	movl	%eax, -52(%rbp)
	movl	%ebx, %edi
	andl	$1, %edi
	callq	_BUG_ON
	movq	%r14, %rdi
	callq	_spu_transaction_init
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	callq	_spi_message_init
	leaq	-128(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	leaq	-160(%rbp), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	leaq	-52(%rbp), %rax
	movq	%rax, -104(%rbp)
	movl	$4, -128(%rbp)
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_spi_message_add_tail
	movl	%r12d, %edi
	callq	_spu_reg_is_port_reg
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movl	(%r14,%rcx,4), %eax
	cmpq	$0, 16(%r14)
	je	LBB0_2
## %bb.1:
	shrl	$3, %eax
	movl	%eax, -160(%rbp)
	leaq	-160(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_spi_message_add_tail
	jmp	LBB0_3
LBB0_2:
	leal	(%rax,%rax,4), %eax
	leal	(%rax,%rax), %edi
	addl	$100, %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_UP
	movl	%eax, -112(%rbp)
LBB0_3:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -88(%rbp)
	movl	%ebx, -96(%rbp)
	leaq	-96(%rbp), %rdi
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_spi_message_add_tail
	movl	8(%r14), %edi
	movq	%rbx, %rsi
	callq	_spi_sync
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_spu_transaction_finish
	movl	%ebx, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IF_SPI_READ_OPERATION_MASK,4,2 ## @IF_SPI_READ_OPERATION_MASK
	.no_dead_strip	_spu_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spu_read
_spu_read:                              ; @spu_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _IF_SPI_READ_OPERATION_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IF_SPI_READ_OPERATION_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w0, w8, w1
	bl	_cpu_to_le16
	stur	w0, [x29, #-36]
	and	w0, w20, #0x1
	bl	_BUG_ON
	mov	x0, x19
	bl	_spu_transaction_init
	sub	x0, x29, #40
	bl	_spi_message_init
	add	x0, sp, #72
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	sub	x8, x29, #36
	str	x8, [sp, #96]
	mov	w8, #4
	str	w8, [sp, #72]
	add	x0, sp, #72
	sub	x1, x29, #40
	bl	_spi_message_add_tail
	mov	x0, x22
	bl	_spu_reg_is_port_reg
	cmp	x0, #0
	cset	w8, eq
	ldr	w8, [x19, w8, uxtw #2]
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_2
; %bb.1:
	lsr	w8, w8, #3
	str	w8, [sp, #40]
	add	x0, sp, #40
	sub	x1, x29, #40
	bl	_spi_message_add_tail
	b	LBB0_3
LBB0_2:
	mov	w9, #10
	mul	w8, w8, w9
	add	w0, w8, #100
	mov	w1, #1000
	bl	_DIV_ROUND_UP
	str	w0, [sp, #88]
LBB0_3:
	str	x21, [sp, #16]
	str	w20, [sp, #8]
	add	x0, sp, #8
	sub	x1, x29, #40
	bl	_spi_message_add_tail
	ldr	w0, [x19, #8]
	sub	x1, x29, #40
	bl	_spi_sync
	mov	x20, x0
	mov	x0, x19
	bl	_spu_transaction_finish
	mov	x0, x20
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IF_SPI_READ_OPERATION_MASK,4,2 ; @IF_SPI_READ_OPERATION_MASK
	.no_dead_strip	_spu_read
.subsections_via_symbols
