	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efx_spi_slow_wait
_efx_spi_slow_wait:                     ## @efx_spi_slow_wait
	.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
	movl	%esi, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	8(%rax), %r12
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rax), %rbx
	movl	$40, %r14d
	leaq	-44(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	testl	%r15d, %r15d
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %edi
	callq	___set_current_state
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1717986919, %rax, %rdi         ## imm = 0x66666667
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$34, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_schedule_timeout
	movq	_SPI_RDSR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, (%rsp)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$-1, %ecx
	xorl	%r8d, %r8d
	movq	%r13, %r9
	callq	_falcon_spi_cmd
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SPI_STATUS_NRDY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	%r14d
	jne	LBB0_2
## %bb.9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_8:
	movq	_EINTR@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_HZ,4,2                         ## @HZ
	.comm	_SPI_RDSR,4,2                   ## @SPI_RDSR
	.comm	_SPI_STATUS_NRDY,4,2            ## @SPI_STATUS_NRDY
	.comm	_current,4,2                    ## @current
	.comm	_EINTR,4,2                      ## @EINTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: timed out waiting for %s\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_efx_spi_slow_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efx_spi_slow_wait
_efx_spi_slow_wait:                     ; @efx_spi_slow_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	ldr	x8, [x0, #8]
	ldp	x22, x21, [x8, #8]
	stp	x0, x8, [sp, #8]                ; 16-byte Folded Spill
	mov	w25, #40
Lloh0:
	adrp	x26, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh2:
	adrp	x27, _HZ@GOTPAGE
Lloh3:
	ldr	x27, [x27, _HZ@GOTPAGEOFF]
	mov	w28, #26215
	movk	w28, #26214, lsl #16
Lloh4:
	adrp	x19, _SPI_RDSR@GOTPAGE
Lloh5:
	ldr	x19, [x19, _SPI_RDSR@GOTPAGEOFF]
Lloh6:
	adrp	x23, _SPI_STATUS_NRDY@GOTPAGE
Lloh7:
	ldr	x23, [x23, _SPI_STATUS_NRDY@GOTPAGEOFF]
Lloh8:
	adrp	x24, _current@GOTPAGE
Lloh9:
	ldr	x24, [x24, _current@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w20, #0
Lloh10:
	adrp	x8, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
	csel	x8, x26, x8, eq
	ldr	w0, [x8]
	bl	___set_current_state
	ldrsw	x8, [x27]
	mul	x8, x8, x28
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w0, w8, w9
	bl	_schedule_timeout
	ldr	w2, [x19]
	add	x5, sp, #28
	mov	x0, x22
	mov	x1, x21
	mov	w3, #-1
	mov	x4, #0
	mov	w6, #4
	bl	_falcon_spi_cmd
	cbnz	w0, LBB0_9
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #28]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x24]
	bl	_signal_pending
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	subs	w25, w25, #1
	b.ne	LBB0_1
; %bb.5:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w1, [x8]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	w2, [x8]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
Lloh16:
	adrp	x8, _EINTR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_HZ,4,2                         ; @HZ
	.comm	_SPI_RDSR,4,2                   ; @SPI_RDSR
	.comm	_SPI_STATUS_NRDY,4,2            ; @SPI_STATUS_NRDY
	.comm	_current,4,2                    ; @current
	.comm	_EINTR,4,2                      ; @EINTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: timed out waiting for %s\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_efx_spi_slow_wait
.subsections_via_symbols
