	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hot_add_disk
_hot_add_disk:                          ## @hot_add_disk
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BDEVNAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	32(%r15), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	cmpq	$0, (%r15)
	je	LBB0_9
## %bb.2:
	movq	%r15, %rdi
	callq	_mdname
	leaq	L_.str(%rip), %rdi
LBB0_3:
	xorl	%ebx, %ebx
LBB0_4:
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_6:
	subl	(%rax), %ebx
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.8:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpl	$0, (%rax)
	je	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	movl	%r14d, %edi
	movl	$-1, %esi
	xorl	%edx, %edx
	callq	_md_import_device
	movq	%rax, %r13
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	%r14, %rdi
	callq	_PTR_ERR
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
LBB0_12:
	movq	%r15, %rdi
	callq	_mdname
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_3
LBB0_13:
	cmpq	$0, 24(%r15)
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_calc_dev_sboffset
	jmp	LBB0_16
LBB0_15:
	movq	24(%r14), %rax
	movl	(%rax), %edi
	callq	_i_size_read
	movl	%eax, %ecx
	leal	511(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$9, %eax
LBB0_16:
	movl	%eax, (%r14)
	movl	%eax, 4(%r14)
	movq	_Faulty@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$20, %r13
	movq	%r13, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	24(%r14), %rdi
	movq	%r12, %rsi
	callq	_bdevname
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_mdname
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pr_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_18:
	movq	_In_sync@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_clear_bit
	movq	$-1, 8(%r14)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_bind_rdev_to_array
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_20
LBB0_19:
	movq	%r14, %rdi
	callq	_export_rdev
	jmp	LBB0_7
LBB0_20:
	movl	$-1, 16(%r14)
	movq	_MD_SB_CHANGE_DEVS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %rsi
	callq	_set_bit
	cmpl	$0, 8(%r15)
	jne	LBB0_22
## %bb.21:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_md_update_sb
LBB0_22:
	movq	_MD_RECOVERY_NEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r15), %rsi
	callq	_set_bit
	movl	8(%r15), %edi
	callq	_md_wakeup_thread
	movq	%r15, %rdi
	callq	_md_new_event
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BDEVNAME_SIZE,4,2              ## @BDEVNAME_SIZE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: HOT_ADD may only be used with version-0 superblocks.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"%s: personality does not support diskops!\n"

L_.str.2:                               ## @.str.2
	.asciz	"md: error, md_import_device() returned %ld\n"

	.comm	_Faulty,4,2                     ## @Faulty
L_.str.3:                               ## @.str.3
	.asciz	"md: can not hot-add faulty %s disk to %s!\n"

	.comm	_In_sync,4,2                    ## @In_sync
	.comm	_MD_SB_CHANGE_DEVS,4,2          ## @MD_SB_CHANGE_DEVS
	.comm	_MD_RECOVERY_NEEDED,4,2         ## @MD_RECOVERY_NEEDED
	.no_dead_strip	_hot_add_disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hot_add_disk
_hot_add_disk:                          ; @hot_add_disk
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _BDEVNAME_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BDEVNAME_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x9, [x19]
	cbz	x9, LBB0_8
; %bb.2:
	mov	x0, x19
	bl	_mdname
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
LBB0_3:
	bl	_pr_warn
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.7:
	mov	x0, x21
	sub	sp, x29, #32
	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_8:
	ldr	w8, [x8]
	cbz	w8, LBB0_11
; %bb.9:
	mov	x0, x1
	mov	w1, #-1
	mov	w2, #0
	bl	_md_import_device
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.10:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x1, x0
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_11:
	mov	x0, x19
	bl	_mdname
	mov	x1, x0
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_12:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_14
; %bb.13:
	mov	x0, x20
	bl	_calc_dev_sboffset
	b	LBB0_15
LBB0_14:
	ldr	x8, [x20, #24]
	ldr	w0, [x8]
	bl	_i_size_read
	add	w8, w0, #511
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w0, w8, #9
LBB0_15:
	stp	w0, w0, [x20]
Lloh21:
	adrp	x8, _Faulty@GOTPAGE
Lloh22:
	ldr	x8, [x8, _Faulty@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	add	x22, x20, #20
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_17
; %bb.16:
	ldr	x0, [x20, #24]
	mov	x1, x21
	bl	_bdevname
	mov	x21, x0
	mov	x0, x19
	bl	_mdname
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x21
	bl	_pr_warn
	add	sp, sp, #16
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_18
LBB0_17:
Lloh29:
	adrp	x8, _In_sync@GOTPAGE
Lloh30:
	ldr	x8, [x8, _In_sync@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_clear_bit
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x20, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_bind_rdev_to_array
	mov	x21, x0
	cbz	w0, LBB0_19
LBB0_18:
	mov	x0, x20
	bl	_export_rdev
	b	LBB0_6
LBB0_19:
	mov	w8, #-1
	str	w8, [x20, #16]
Lloh32:
	adrp	x8, _MD_SB_CHANGE_DEVS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MD_SB_CHANGE_DEVS@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_set_bit
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_21
; %bb.20:
	mov	x0, x19
	mov	w1, #1
	bl	_md_update_sb
LBB0_21:
Lloh35:
	adrp	x8, _MD_RECOVERY_NEEDED@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MD_RECOVERY_NEEDED@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	add	x1, x19, #12
	bl	_set_bit
	ldr	w0, [x19, #8]
	bl	_md_wakeup_thread
	mov	x0, x19
	bl	_md_new_event
	mov	w21, #0
	b	LBB0_6
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_BDEVNAME_SIZE,4,2              ; @BDEVNAME_SIZE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: HOT_ADD may only be used with version-0 superblocks.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"%s: personality does not support diskops!\n"

l_.str.2:                               ; @.str.2
	.asciz	"md: error, md_import_device() returned %ld\n"

	.comm	_Faulty,4,2                     ; @Faulty
l_.str.3:                               ; @.str.3
	.asciz	"md: can not hot-add faulty %s disk to %s!\n"

	.comm	_In_sync,4,2                    ; @In_sync
	.comm	_MD_SB_CHANGE_DEVS,4,2          ; @MD_SB_CHANGE_DEVS
	.comm	_MD_RECOVERY_NEEDED,4,2         ; @MD_RECOVERY_NEEDED
	.no_dead_strip	_hot_add_disk
.subsections_via_symbols
