	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ztest_device_removal           ## -- Begin function ztest_device_removal
	.p2align	4, 0x90
_ztest_device_removal:                  ## @ztest_device_removal
	.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	_ztest_spa@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_ztest_vdev_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_enter
	movq	_ztest_device_removal_active@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_9
## %bb.1:
	movq	_SCL_VDEV@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_FTAG@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_RW_READER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_spa_config_enter
	movq	_B_FALSE@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	%rbx, %rdi
	callq	_ztest_random_vdev_top
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_vdev_lookup_top
	movl	(%rax), %r14d
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_spa_config_exit
	movq	(%r12), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	_ztest_device_removal_active@GOTPCREL(%rip), %r14
	callq	_spa_vdev_remove
	testl	%eax, %eax
	jne	LBB0_9
## %bb.2:
	movq	_B_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	_ztest_vdev_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_exit
	cmpq	$0, (%rbx)
	je	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_spa_get_dsl
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_txg_wait_synced
	cmpq	$0, (%rbx)
	jne	LBB0_3
LBB0_5:
	movq	_POOL_SCAN_SCRUB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_spa_scan
	testl	%eax, %eax
	jne	LBB0_8
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_spa_get_dsl
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_txg_wait_synced
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_spa_get_dsl
	movl	%eax, %edi
	callq	_dsl_scan_scrubbing
	testq	%rax, %rax
	jne	LBB0_6
LBB0_8:
	movq	_ztest_vdev_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_enter
	movq	(%r12), %rax
	movq	%rax, (%r14)
LBB0_9:
	movq	_ztest_vdev_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_exit                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ztest_spa,8,3                  ## @ztest_spa
	.comm	_ztest_vdev_lock,4,2            ## @ztest_vdev_lock
	.comm	_ztest_device_removal_active,8,3 ## @ztest_device_removal_active
	.comm	_SCL_VDEV,4,2                   ## @SCL_VDEV
	.comm	_FTAG,4,2                       ## @FTAG
	.comm	_RW_READER,4,2                  ## @RW_READER
	.comm	_B_FALSE,8,3                    ## @B_FALSE
	.comm	_B_TRUE,8,3                     ## @B_TRUE
	.comm	_POOL_SCAN_SCRUB,4,2            ## @POOL_SCAN_SCRUB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ztest_device_removal           ; -- Begin function ztest_device_removal
	.p2align	2
_ztest_device_removal:                  ; @ztest_device_removal
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, _ztest_spa@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ztest_spa@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
Lloh3:
	adrp	x0, _ztest_vdev_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _ztest_vdev_lock@GOTPAGEOFF]
	bl	_mutex_enter
Lloh5:
	adrp	x21, _ztest_device_removal_active@GOTPAGE
Lloh6:
	ldr	x21, [x21, _ztest_device_removal_active@GOTPAGEOFF]
	ldr	x8, [x21]
	cbnz	x8, LBB0_8
; %bb.1:
Lloh7:
	adrp	x23, _SCL_VDEV@GOTPAGE
Lloh8:
	ldr	x23, [x23, _SCL_VDEV@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh9:
	adrp	x24, _FTAG@GOTPAGE
Lloh10:
	ldr	x24, [x24, _FTAG@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh11:
	adrp	x8, _RW_READER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RW_READER@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_spa_config_enter
Lloh14:
	adrp	x22, _B_FALSE@GOTPAGE
Lloh15:
	ldr	x22, [x22, _B_FALSE@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	x0, x19
	bl	_ztest_random_vdev_top
	mov	x1, x0
	mov	x0, x19
	bl	_vdev_lookup_top
	ldr	w20, [x0]
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_spa_config_exit
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_spa_vdev_remove
	cbnz	w0, LBB0_8
; %bb.2:
Lloh16:
	adrp	x8, _B_TRUE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _B_TRUE@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x21]
Lloh19:
	adrp	x0, _ztest_vdev_lock@GOTPAGE
Lloh20:
	ldr	x0, [x0, _ztest_vdev_lock@GOTPAGEOFF]
	bl	_mutex_exit
	ldr	x8, [x19]
	cbz	x8, LBB0_4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_spa_get_dsl
	mov	w1, #0
	bl	_txg_wait_synced
	ldr	x8, [x19]
	cbnz	x8, LBB0_3
LBB0_4:
Lloh21:
	adrp	x8, _POOL_SCAN_SCRUB@GOTPAGE
Lloh22:
	ldr	x8, [x8, _POOL_SCAN_SCRUB@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_spa_scan
	cbnz	w0, LBB0_7
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_spa_get_dsl
	mov	w1, #0
	bl	_txg_wait_synced
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_spa_get_dsl
	bl	_dsl_scan_scrubbing
	cbnz	x0, LBB0_5
LBB0_7:
Lloh24:
	adrp	x0, _ztest_vdev_lock@GOTPAGE
Lloh25:
	ldr	x0, [x0, _ztest_vdev_lock@GOTPAGEOFF]
	bl	_mutex_enter
	ldr	x8, [x22]
	str	x8, [x21]
LBB0_8:
Lloh26:
	adrp	x0, _ztest_vdev_lock@GOTPAGE
Lloh27:
	ldr	x0, [x0, _ztest_vdev_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mutex_exit
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ztest_spa,8,3                  ; @ztest_spa
	.comm	_ztest_vdev_lock,4,2            ; @ztest_vdev_lock
	.comm	_ztest_device_removal_active,8,3 ; @ztest_device_removal_active
	.comm	_SCL_VDEV,4,2                   ; @SCL_VDEV
	.comm	_FTAG,4,2                       ; @FTAG
	.comm	_RW_READER,4,2                  ; @RW_READER
	.comm	_B_FALSE,8,3                    ; @B_FALSE
	.comm	_B_TRUE,8,3                     ; @B_TRUE
	.comm	_POOL_SCAN_SCRUB,4,2            ; @POOL_SCAN_SCRUB
.subsections_via_symbols
