	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xpc_disconnect_wait            ## -- Begin function xpc_disconnect_wait
	.p2align	4, 0x90
_xpc_disconnect_wait:                   ## @xpc_disconnect_wait
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_xp_max_npartitions@GOTPCREL(%rip), %rax
	cmpw	$0, (%rax)
	jle	LBB0_13
## %bb.1:
	movslq	%edi, %rax
	xorl	%r14d, %r14d
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_XPC_C_WDISCONNECT@GOTPCREL(%rip), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_xpc_part_deref
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	movq	_xp_max_npartitions@GOTPCREL(%rip), %rax
	movswq	(%rax), %rax
	addq	$32, %r14
	cmpq	%rax, %r15
	jge	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_xpc_partitions@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	(%rbx,%r14), %r12
	movq	%r12, %rdi
	callq	_xpc_part_ref
	testl	%eax, %eax
	je	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	24(%rbx,%r14), %r12
	movl	(%r13), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%r12,%rcx,8)
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	leaq	(%r12,%r13,8), %rbx
	leaq	(%r12,%r13,8), %rdi
	addq	$20, %rdi
	callq	_wait_for_completion
	leaq	(%r12,%r13,8), %rdi
	addq	$16, %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	_XPC_C_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	sete	%dil
	callq	_DBUG_ON
	cmpl	$0, 4(%r12,%r13,8)
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%r13,8), %r13
	addq	$4, %r13
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx,%r14), %rax
	xorl	%edx, %edx
	movq	_XPC_P_AS_DEACTIVATING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%r14), %rdi
	addq	$8, %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	movl	(%r13), %eax
	movq	16(%rbx,%r14), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%r12,%rdx,8), %rdx
	orl	%eax, (%rcx,%rdx,4)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movl	$1, %edx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, (%r13)
	movq	_XPC_C_WDISCONNECT@GOTPCREL(%rip), %r13
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%edx, %r12d
	jmp	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	movq	_XPC_C_WDISCONNECT@GOTPCREL(%rip), %r13
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, (%rbx)
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_xpc_wakeup_channel_mgr
	jmp	LBB0_11
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_xp_max_npartitions,2,1         ## @xp_max_npartitions
	.comm	_xpc_partitions,8,3             ## @xpc_partitions
	.comm	_XPC_C_WDISCONNECT,4,2          ## @XPC_C_WDISCONNECT
	.comm	_XPC_C_DISCONNECTED,4,2         ## @XPC_C_DISCONNECTED
	.comm	_XPC_P_AS_DEACTIVATING,8,3      ## @XPC_P_AS_DEACTIVATING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xpc_disconnect_wait            ; -- Begin function xpc_disconnect_wait
	.p2align	2
_xpc_disconnect_wait:                   ; @xpc_disconnect_wait
	.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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x27, _xp_max_npartitions@GOTPAGE
Lloh1:
	ldr	x27, [x27, _xp_max_npartitions@GOTPAGEOFF]
	ldrsh	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x23, #0
	mov	x24, #0
	sxtw	x20, w0
Lloh2:
	adrp	x25, _xpc_partitions@GOTPAGE
Lloh3:
	ldr	x25, [x25, _xpc_partitions@GOTPAGEOFF]
	mov	w26, #24
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_xpc_part_deref
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	ldrsh	x8, [x27]
	add	x23, x23, #32
	cmp	x24, x8
	b.ge	LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x25]
	add	x19, x21, x23
	mov	x0, x19
	bl	_xpc_part_ref
	cbz	w0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x28, [x19, #24]
	madd	x22, x20, x26, x28
	ldr	w8, [x22]
Lloh4:
	adrp	x9, _XPC_C_WDISCONNECT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _XPC_C_WDISCONNECT@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #24
	madd	x26, x20, x8, x28
	add	x0, x26, #20
	bl	_wait_for_completion
	add	x20, x26, #16
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x22]
Lloh7:
	adrp	x9, _XPC_C_DISCONNECTED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _XPC_C_DISCONNECTED@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_DBUG_ON
	ldr	w8, [x26, #4]!
	cbz	w8, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, x23]
Lloh10:
	adrp	x9, _XPC_P_AS_DEACTIVATING@GOTPAGE
Lloh11:
	ldr	x9, [x9, _XPC_P_AS_DEACTIVATING@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w21, #0
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w21, #0
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x21, x23
	add	x21, x27, #8
	mov	x0, x21
	bl	_spin_lock
	ldr	w8, [x26]
	ldr	x9, [x27, #16]
Lloh13:
	adrp	x27, _xp_max_npartitions@GOTPAGE
Lloh14:
	ldr	x27, [x27, _xp_max_npartitions@GOTPAGEOFF]
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	mov	w11, #24
	madd	x10, x10, x11, x28
	ldr	x10, [x10, #8]
	lsl	x10, x10, #2
	ldr	w11, [x9, x10]
	orr	w8, w11, w8
	str	w8, [x9, x10]
	mov	x0, x21
	bl	_spin_unlock
	mov	w21, #1
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [x26]
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh15:
	adrp	x8, _XPC_C_WDISCONNECT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _XPC_C_WDISCONNECT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x22]
	bic	w8, w9, w8
	str	w8, [x22]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	mov	w26, #24
	cbz	w21, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_xpc_wakeup_channel_mgr
	b	LBB0_2
LBB0_14:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_xp_max_npartitions,2,1         ; @xp_max_npartitions
	.comm	_xpc_partitions,8,3             ; @xpc_partitions
	.comm	_XPC_C_WDISCONNECT,4,2          ; @XPC_C_WDISCONNECT
	.comm	_XPC_C_DISCONNECTED,4,2         ; @XPC_C_DISCONNECTED
	.comm	_XPC_P_AS_DEACTIVATING,8,3      ; @XPC_P_AS_DEACTIVATING
.subsections_via_symbols
