	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function falcon_spi_read
_falcon_spi_read:                       ## @falcon_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %r15
	jae	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	subq	%r15, %rdi
	movq	_FALCON_SPI_MAX_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movq	%rax, %r12
	movq	_SPI_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r15,%rax), %r13
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_falcon_spi_munge_command
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r15,4), %r9
	movq	%r12, (%rsp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%eax, %edx
	movq	%r13, %rcx
	xorl	%r8d, %r8d
	callq	_falcon_spi_cmd
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	addq	%r12, %r15
	xorl	%eax, %eax
	callq	_cond_resched
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movq	_EINTR@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_4:
                                        ## kill: def $eax killed $eax def $rax
LBB0_7:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.8:
	movq	%r15, (%rcx)
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALCON_SPI_MAX_LEN,4,2         ## @FALCON_SPI_MAX_LEN
	.comm	_SPI_READ,4,2                   ## @SPI_READ
	.comm	_current,4,2                    ## @current
	.comm	_EINTR,4,2                      ## @EINTR
	.no_dead_strip	_falcon_spi_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function falcon_spi_read
_falcon_spi_read:                       ; @falcon_spi_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x5
	str	x4, [sp, #8]                    ; 8-byte Folded Spill
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	mov	x27, #0
Lloh0:
	adrp	x28, _FALCON_SPI_MAX_LEN@GOTPAGE
Lloh1:
	ldr	x28, [x28, _FALCON_SPI_MAX_LEN@GOTPAGEOFF]
Lloh2:
	adrp	x19, _SPI_READ@GOTPAGE
Lloh3:
	ldr	x19, [x19, _SPI_READ@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x27, x21
	b.hs	LBB0_8
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	x0, x21, x27
	ldr	w1, [x28]
	bl	_min
	mov	x25, x0
	ldr	w1, [x19]
	add	x26, x27, x22
	mov	x0, x23
	mov	x2, x26
	bl	_falcon_spi_munge_command
	mov	x2, x0
	add	x5, x20, x27, lsl #2
	mov	x0, x24
	mov	x1, x23
	mov	x3, x26
	mov	x4, #0
	mov	x6, x25
	bl	_falcon_spi_cmd
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x27, x25, x27
	bl	_cond_resched
Lloh4:
	adrp	x8, _current@GOTPAGE
Lloh5:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_signal_pending
	cbz	x0, LBB0_1
; %bb.4:
Lloh7:
	adrp	x8, _EINTR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cbz	x8, LBB0_7
LBB0_6:
	str	x27, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	mov	w0, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cbnz	x8, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_FALCON_SPI_MAX_LEN,4,2         ; @FALCON_SPI_MAX_LEN
	.comm	_SPI_READ,4,2                   ; @SPI_READ
	.comm	_current,4,2                    ; @current
	.comm	_EINTR,4,2                      ; @EINTR
	.no_dead_strip	_falcon_spi_read
.subsections_via_symbols
