	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function raid_preresume
_raid_preresume:                        ## @raid_preresume
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	movq	_RT_FLAG_RS_PRERESUMED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_and_set_bit
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_15
## %bb.1:
	movq	_RT_FLAG_UPDATE_SBS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_rs_update_sbs
LBB0_3:
	movq	%r14, %rdi
	callq	___load_dirty_region_bitmap
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_RT_FLAG_RS_BITMAP_LOADED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	cmpq	$0, 32(%r14)
	je	LBB0_9
## %bb.6:
	movq	40(%r14), %r15
	movl	4(%r14), %edi
	callq	_to_bytes
	cmpq	%rax, %r15
	je	LBB0_9
## %bb.7:
	movq	32(%r14), %r15
	movl	4(%r14), %edi
	movl	28(%r14), %r12d
	callq	_to_bytes
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	callq	_md_bitmap_resize
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	callq	_DMERR
	movl	%r15d, %ebx
LBB0_9:
	movq	_MD_RECOVERY_FROZEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r14), %r15
	movq	%r15, %rsi
	callq	_set_bit
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	_MaxSector@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_12
## %bb.11:
	movq	_MD_RECOVERY_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
	movq	8(%r14), %rax
	movq	%rax, 16(%r14)
LBB0_12:
	movq	_RT_FLAG_RESHAPE_RS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	leaq	8(%r14), %rbx
	movq	%r14, %rdi
	callq	_rs_set_rdev_sectors
	movq	%rbx, %rdi
	callq	_mddev_lock_nointr
	movq	%r14, %rdi
	callq	_rs_start_reshape
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mddev_unlock
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	je	LBB0_15
## %bb.14:
	leaq	L_.str.1(%rip), %rdi
	callq	_DMWARN
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_RT_FLAG_RS_PRERESUMED,4,2      ## @RT_FLAG_RS_PRERESUMED
	.comm	_RT_FLAG_UPDATE_SBS,4,2         ## @RT_FLAG_UPDATE_SBS
	.comm	_RT_FLAG_RS_BITMAP_LOADED,4,2   ## @RT_FLAG_RS_BITMAP_LOADED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to resize bitmap"

	.comm	_MD_RECOVERY_FROZEN,4,2         ## @MD_RECOVERY_FROZEN
	.comm	_MaxSector,8,3                  ## @MaxSector
	.comm	_MD_RECOVERY_SYNC,4,2           ## @MD_RECOVERY_SYNC
	.comm	_RT_FLAG_RESHAPE_RS,4,2         ## @RT_FLAG_RESHAPE_RS
L_.str.1:                               ## @.str.1
	.asciz	"Failed to check/start reshape, continuing without change"

	.no_dead_strip	_raid_preresume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function raid_preresume
_raid_preresume:                        ; @raid_preresume
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x19, [x0]
Lloh0:
	adrp	x8, _RT_FLAG_RS_PRERESUMED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RT_FLAG_RS_PRERESUMED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_and_set_bit
	cbz	x0, LBB0_2
LBB0_1:
	mov	w20, #0
	b	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _RT_FLAG_UPDATE_SBS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RT_FLAG_UPDATE_SBS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_rs_update_sbs
LBB0_4:
	mov	x0, x19
	bl	___load_dirty_region_bitmap
	mov	x20, x0
	cbz	w0, LBB0_6
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh6:
	adrp	x8, _RT_FLAG_RS_BITMAP_LOADED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RT_FLAG_RS_BITMAP_LOADED@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_9
; %bb.7:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	x20, [x19, #40]
	ldr	w0, [x19, #4]
	bl	_to_bytes
	cmp	x20, x0
	b.ne	LBB0_16
LBB0_9:
	mov	w20, #0
LBB0_10:
Lloh9:
	adrp	x8, _MD_RECOVERY_FROZEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MD_RECOVERY_FROZEN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	add	x21, x19, #24
	mov	x1, x21
	bl	_set_bit
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_13
; %bb.11:
Lloh12:
	adrp	x9, _MaxSector@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MaxSector@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_13
; %bb.12:
Lloh15:
	adrp	x8, _MD_RECOVERY_SYNC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MD_RECOVERY_SYNC@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_set_bit
	ldr	x8, [x19, #8]
	str	x8, [x19, #16]
LBB0_13:
Lloh18:
	adrp	x8, _RT_FLAG_RESHAPE_RS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RT_FLAG_RESHAPE_RS@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_5
; %bb.14:
	add	x20, x19, #8
	mov	x0, x19
	bl	_rs_set_rdev_sectors
	mov	x0, x20
	bl	_mddev_lock_nointr
	mov	x0, x19
	bl	_rs_start_reshape
	mov	x19, x0
	mov	x0, x20
	bl	_mddev_unlock
	cbz	w19, LBB0_1
; %bb.15:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DMWARN
	b	LBB0_1
LBB0_16:
	ldr	x20, [x19, #32]
	ldr	w21, [x19, #28]
	ldr	w0, [x19, #4]
	bl	_to_bytes
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	bl	_md_bitmap_resize
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.17:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMERR
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_RT_FLAG_RS_PRERESUMED,4,2      ; @RT_FLAG_RS_PRERESUMED
	.comm	_RT_FLAG_UPDATE_SBS,4,2         ; @RT_FLAG_UPDATE_SBS
	.comm	_RT_FLAG_RS_BITMAP_LOADED,4,2   ; @RT_FLAG_RS_BITMAP_LOADED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to resize bitmap"

	.comm	_MD_RECOVERY_FROZEN,4,2         ; @MD_RECOVERY_FROZEN
	.comm	_MaxSector,8,3                  ; @MaxSector
	.comm	_MD_RECOVERY_SYNC,4,2           ; @MD_RECOVERY_SYNC
	.comm	_RT_FLAG_RESHAPE_RS,4,2         ; @RT_FLAG_RESHAPE_RS
l_.str.1:                               ; @.str.1
	.asciz	"Failed to check/start reshape, continuing without change"

	.no_dead_strip	_raid_preresume
.subsections_via_symbols
