	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtip_ftl_rebuild_poll
_mtip_ftl_rebuild_poll:                 ## @mtip_ftl_rebuild_poll
	.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	%rdi, %r12
	movq	(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_jiffies@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movq	_MTIP_FTL_REBUILD_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r14
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	addq	%rbx, %r14
	leaq	16(%r12), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rbx
	movq	(%r12), %r13
	movq	(%rbx), %rdi
	subq	-48(%rbp), %rdi                 ## 8-byte Folded Reload
	callq	_jiffies_to_msecs
	cltq
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$38, %rdx
	addl	%eax, %edx
	movq	%r13, %rdi
	movq	%rbx, %r13
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_dev_warn
	xorl	%ebx, %ebx
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_ssleep
	movq	(%r13), %rdi
	movq	%r14, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_10
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_MTIP_DDF_REMOVE_PENDING_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_11
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rdi
	callq	_mtip_check_surprise_removal
	testq	%rax, %rax
	jne	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r12), %rdi
	xorl	%esi, %esi
	callq	_mtip_get_identify
	testq	%rax, %rax
	js	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movq	_MTIP_FTL_REBUILD_OFFSET@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_MTIP_FTL_REBUILD_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	callq	_ssleep
	cmpq	$180, %rbx
	jae	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	jmp	LBB0_9
LBB0_10:
	movq	(%r12), %rbx
	movq	(%r13), %rdi
	subq	-48(%rbp), %rdi                 ## 8-byte Folded Reload
	callq	_jiffies_to_msecs
	cltq
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$38, %rdx
	addl	%eax, %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
LBB0_11:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_7:
	movq	(%r12), %r15
	movq	(%r13), %rdi
	subq	-48(%rbp), %rdi                 ## 8-byte Folded Reload
	callq	_jiffies_to_msecs
	cltq
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$38, %rdx
	addl	%eax, %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_dev_warn
	movq	%r12, %rdi
	callq	_mtip_block_initialize
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FTL rebuild in progress. Polling for completion.\n"

	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_MTIP_FTL_REBUILD_TIMEOUT_MS,4,2 ## @MTIP_FTL_REBUILD_TIMEOUT_MS
	.comm	_MTIP_DDF_REMOVE_PENDING_BIT,4,2 ## @MTIP_DDF_REMOVE_PENDING_BIT
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_MTIP_FTL_REBUILD_OFFSET,4,2    ## @MTIP_FTL_REBUILD_OFFSET
	.comm	_MTIP_FTL_REBUILD_MAGIC,8,3     ## @MTIP_FTL_REBUILD_MAGIC
L_.str.1:                               ## @.str.1
	.asciz	"FTL rebuild in progress (%d secs).\n"

L_.str.2:                               ## @.str.2
	.asciz	"FTL rebuild complete (%d secs).\n"

L_.str.3:                               ## @.str.3
	.asciz	"Timed out waiting for FTL rebuild to complete (%d secs).\n"

	.no_dead_strip	_mtip_ftl_rebuild_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtip_ftl_rebuild_poll
_mtip_ftl_rebuild_poll:                 ; @mtip_ftl_rebuild_poll
	.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	x19, x0
	mov	x20, x0
	ldr	x0, [x20], #16
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
Lloh2:
	adrp	x25, _jiffies@GOTPAGE
Lloh3:
	ldr	x25, [x25, _jiffies@GOTPAGEOFF]
	ldr	x24, [x25]
Lloh4:
	adrp	x8, _MTIP_FTL_REBUILD_TIMEOUT_MS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MTIP_FTL_REBUILD_TIMEOUT_MS@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x23, #0
Lloh7:
	adrp	x26, _MTIP_DDF_REMOVE_PENDING_BIT@GOTPAGE
Lloh8:
	ldr	x26, [x26, _MTIP_DDF_REMOVE_PENDING_BIT@GOTPAGEOFF]
Lloh9:
	adrp	x27, _MTIP_FTL_REBUILD_OFFSET@GOTPAGE
Lloh10:
	ldr	x27, [x27, _MTIP_FTL_REBUILD_OFFSET@GOTPAGEOFF]
	add	x21, x0, x24
Lloh11:
	adrp	x28, _MTIP_FTL_REBUILD_MAGIC@GOTPAGE
Lloh12:
	ldr	x28, [x28, _MTIP_FTL_REBUILD_MAGIC@GOTPAGEOFF]
Lloh13:
	adrp	x22, l_.str.1@PAGE
Lloh14:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x23, [x19]
	ldr	x8, [x25]
	sub	x0, x8, x24
	bl	_jiffies_to_msecs
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	str	x8, [sp]
	mov	x0, x23
	mov	x1, x22
	bl	_dev_warn
	mov	x23, #0
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #10
	bl	_ssleep
	ldr	x0, [x25]
	mov	x1, x21
	bl	_time_before
	cbz	x0, LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x26]
	mov	x1, x20
	bl	_test_bit
	bl	_unlikely
	cbnz	x0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19]
	bl	_mtip_check_surprise_removal
	cbnz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19, #8]
	mov	x1, #0
	bl	_mtip_get_identify
	tbnz	x0, #63, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldrsw	x9, [x27]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_ssleep
	cmp	x23, #180
	b.hs	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	b	LBB0_2
LBB0_9:
	ldr	x19, [x19]
	ldr	x8, [x25]
	sub	x0, x8, x24
	bl	_jiffies_to_msecs
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w2, w8, w9
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_10:
Lloh17:
	adrp	x8, _EFAULT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	ldr	x20, [x19]
	ldr	x8, [x25]
	sub	x0, x8, x24
	bl	_jiffies_to_msecs
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	mov	x0, x19
	bl	_mtip_block_initialize
	mov	w0, #0
LBB0_12:
	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
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FTL rebuild in progress. Polling for completion.\n"

	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_MTIP_FTL_REBUILD_TIMEOUT_MS,4,2 ; @MTIP_FTL_REBUILD_TIMEOUT_MS
	.comm	_MTIP_DDF_REMOVE_PENDING_BIT,4,2 ; @MTIP_DDF_REMOVE_PENDING_BIT
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_MTIP_FTL_REBUILD_OFFSET,4,2    ; @MTIP_FTL_REBUILD_OFFSET
	.comm	_MTIP_FTL_REBUILD_MAGIC,8,3     ; @MTIP_FTL_REBUILD_MAGIC
l_.str.1:                               ; @.str.1
	.asciz	"FTL rebuild in progress (%d secs).\n"

l_.str.2:                               ; @.str.2
	.asciz	"FTL rebuild complete (%d secs).\n"

l_.str.3:                               ; @.str.3
	.asciz	"Timed out waiting for FTL rebuild to complete (%d secs).\n"

	.no_dead_strip	_mtip_ftl_rebuild_poll
.subsections_via_symbols
