	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxd2880_io_spi_read_reg
_cxd2880_io_spi_read_reg:               ## @cxd2880_io_spi_read_reg
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	%rcx, %r14
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.2:
	movq	(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_3
## %bb.4:
	movl	%r8d, %ebx
	movl	%edx, %r15d
	leal	(%rbx,%r15), %eax
	cmpl	$257, %eax                      ## imm = 0x101
	jl	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_CXD2880_IO_TGT_SYS@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%esi, (%rax)
	sete	%cl
	orl	$10, %ecx
	movl	%ecx, -80(%rbp)
	movq	$0, -68(%rbp)
	movl	$0, -60(%rbp)
	xorl	%r12d, %r12d
	testl	%ebx, %ebx
	jle	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, -76(%rbp)
	cmpl	$255, %ebx
	movl	$255, %r8d
	cmovbl	%ebx, %r8d
	movl	%r8d, -72(%rbp)
	movq	%r13, %rdi
	leaq	-80(%rbp), %rsi
	movl	$24, %edx
	movq	%r14, %rcx
	callq	*(%r13)
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movslq	-72(%rbp), %rax
	addl	%eax, %r15d
	leaq	(%r14,%rax,4), %r14
	subl	%eax, %ebx
	jg	LBB0_6
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %r12d
	jmp	LBB0_9
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CXD2880_IO_TGT_SYS,4,2         ## @CXD2880_IO_TGT_SYS
	.no_dead_strip	_cxd2880_io_spi_read_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxd2880_io_spi_read_reg
_cxd2880_io_spi_read_reg:               ; @cxd2880_io_spi_read_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x3
	cbz	x3, LBB0_4
; %bb.2:
	ldr	x22, [x0]
	cbz	x22, LBB0_4
; %bb.3:
	mov	x19, x4
	mov	x21, x2
	add	w8, w4, w2
	cmp	w8, #257
	b.lt	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
Lloh9:
	adrp	x8, _CXD2880_IO_TGT_SYS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CXD2880_IO_TGT_SYS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w1
	mov	w8, #10
	cinc	w8, w8, eq
	str	w8, [sp]
	str	wzr, [sp, #12]
	str	xzr, [sp, #16]
	cmp	w19, #1
	b.lt	LBB0_11
; %bb.8:
	mov	w23, #255
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w19, #255
	csel	w4, w19, w23, lo
	stp	w21, w4, [sp, #4]
	ldr	x8, [x22]
	mov	x1, sp
	mov	x0, x22
	mov	w2, #24
	mov	x3, x20
	blr	x8
	cbnz	w0, LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldrsw	x8, [sp, #8]
	add	w21, w8, w21
	add	x20, x20, x8, lsl #2
	sub	w19, w19, w8
	cmp	w19, #0
	b.gt	LBB0_9
LBB0_11:
	mov	w0, #0
	b	LBB0_5
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CXD2880_IO_TGT_SYS,4,2         ; @CXD2880_IO_TGT_SYS
	.no_dead_strip	_cxd2880_io_spi_read_reg
.subsections_via_symbols
