	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_new_disk
_add_new_disk:                          ## @add_new_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rdi), %r14
	movl	4(%rsi), %edi
	callq	_page_address
	movq	(%rax), %r13
	leaq	-64(%rbp), %r15
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_NEWDISK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -48(%rbp)
	movl	-56(%rbp), %edi
	movq	%r13, %rsi
	movl	$16, %edx
	callq	_memcpy
	movl	(%rbx), %edi
	callq	_cpu_to_le32
	movq	%rax, -64(%rbp)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_lock_comm
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	___sendmsg
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_unlock_comm
	movl	%ebx, %r12d
	jmp	LBB0_5
LBB0_2:
	movq	_DLM_LKF_NOQUEUE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	8(%r14), %rdi
	orl	%eax, (%rdi)
	movq	_DLM_LOCK_EX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dlm_lock_sync
	movl	(%rbx), %ecx
	notl	%ecx
	movq	8(%r14), %rdi
	andl	%ecx, (%rdi)
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	movq	_ENOENT@GOTPCREL(%rip), %rdx
	subl	(%rdx), %r12d
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	cmovnel	%eax, %r12d
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_unlock_comm
	jmp	LBB0_5
LBB0_4:
	movq	_DLM_LOCK_CR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dlm_lock_sync
	movq	_MD_CLUSTER_SEND_LOCKED_ALREADY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r14), %rsi
	callq	_set_bit
	movq	%r14, %rdi
	callq	_wake_up
	xorl	%r12d, %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NEWDISK,4,2                    ## @NEWDISK
	.comm	_DLM_LKF_NOQUEUE,4,2            ## @DLM_LKF_NOQUEUE
	.comm	_DLM_LOCK_EX,4,2                ## @DLM_LOCK_EX
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_DLM_LOCK_CR,4,2                ## @DLM_LOCK_CR
	.comm	_MD_CLUSTER_SEND_LOCKED_ALREADY,4,2 ## @MD_CLUSTER_SEND_LOCKED_ALREADY
	.no_dead_strip	_add_new_disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_new_disk
_add_new_disk:                          ; @add_new_disk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	ldr	x19, [x0]
	ldr	w0, [x1, #4]
	bl	_page_address
	ldr	x21, [x0]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh0:
	adrp	x8, _NEWDISK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NEWDISK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [sp, #24]
	ldr	w0, [sp, #16]
	mov	x1, x21
	mov	w2, #16
	bl	_memcpy
	ldr	w0, [x20]
	bl	_cpu_to_le32
	str	x0, [sp, #8]
	mov	x0, x19
	mov	w1, #1
	bl	_lock_comm
	add	x1, sp, #8
	mov	x0, x19
	bl	___sendmsg
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x20, _DLM_LKF_NOQUEUE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _DLM_LKF_NOQUEUE@GOTPAGEOFF]
	ldr	w8, [x20]
	ldr	x0, [x19, #8]
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
Lloh5:
	adrp	x8, _DLM_LOCK_EX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DLM_LOCK_EX@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_dlm_lock_sync
	mov	x8, x0
	ldr	w9, [x20]
	ldr	x0, [x19, #8]
	ldr	w10, [x0]
	bic	w9, w10, w9
	str	w9, [x0]
Lloh8:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _ENOENT@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ENOENT@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	cmn	w8, w9
	csneg	w20, w8, w10, ne
	cbz	w20, LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_unlock_comm
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
Lloh14:
	adrp	x8, _DLM_LOCK_CR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DLM_LOCK_CR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_dlm_lock_sync
Lloh17:
	adrp	x8, _MD_CLUSTER_SEND_LOCKED_ALREADY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MD_CLUSTER_SEND_LOCKED_ALREADY@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_set_bit
	mov	x0, x19
	bl	_wake_up
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NEWDISK,4,2                    ; @NEWDISK
	.comm	_DLM_LKF_NOQUEUE,4,2            ; @DLM_LKF_NOQUEUE
	.comm	_DLM_LOCK_EX,4,2                ; @DLM_LOCK_EX
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_DLM_LOCK_CR,4,2                ; @DLM_LOCK_CR
	.comm	_MD_CLUSTER_SEND_LOCKED_ALREADY,4,2 ; @MD_CLUSTER_SEND_LOCKED_ALREADY
	.no_dead_strip	_add_new_disk
.subsections_via_symbols
