	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xpc_kthread_start
_xpc_kthread_start:                     ## @xpc_kthread_start
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_XPC_UNPACK_ARG1
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_XPC_UNPACK_ARG2
	movq	%rax, %r13
	movq	_xpc_partitions@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movswq	%r14w, %rax
	movq	%rax, %rbx
	shlq	$4, %rbx
	leaq	(%r15,%rbx), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	_xpc_arch_ops@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	movq	_xpc_chan@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movswl	%ax, %edx
	leaq	L_.str(%rip), %rsi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rcx
	callq	_dev_dbg
	movq	8(%r15,%rbx), %r14
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	leaq	(,%r13,2), %r15
	addq	%r13, %r15
	leaq	(%r14,%r15,4), %r13
	movq	_XPC_C_DISCONNECTING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14,%r15,4)
	jne	LBB0_7
## %bb.1:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r15,4), %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movl	(%r13), %eax
	movq	_XPC_C_CONNECTEDCALLOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_2
## %bb.5:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_6
LBB0_2:
	orl	%eax, %ecx
	movl	%ecx, (%r13)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r13, %rdi
	callq	_xpc_connected_callout
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_XPC_C_CONNECTEDCALLOUT_MADE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r13, %rdi
	callq	*-64(%rbp)                      ## 8-byte Folded Reload
	cmpl	$2, %eax
	jl	LBB0_6
## %bb.3:
	movq	_XPC_C_DISCONNECTING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r13)
	jne	LBB0_6
## %bb.4:
	decl	%eax
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_xpc_activate_kthreads
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_xpc_kthread_waitmsgs
LBB0_7:
	leaq	(%r14,%r15,4), %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movl	(%r13), %eax
	movq	_XPC_C_CONNECTEDCALLOUT_MADE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.8:
	movq	_XPC_C_DISCONNECTINGCALLOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	jne	LBB0_10
## %bb.9:
	orl	%eax, %ecx
	movl	%ecx, (%r13)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_xpDisconnecting@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_xpc_disconnect_callout
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_XPC_C_DISCONNECTINGCALLOUT_MADE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
LBB0_10:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	leaq	(%r14,%r15,4), %rdi
	addq	$4, %rdi
	callq	_atomic_dec_return
	testq	%rax, %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_13
## %bb.11:
	movq	%rbx, %rdi
	callq	_atomic_dec_return
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	movq	_xpc_arch_ops@GOTPCREL(%rip), %rax
	callq	*8(%rax)
LBB0_13:
	movq	%r13, %rdi
	callq	_xpc_msgqueue_deref
	movq	_xpc_chan@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_xpc_part_deref
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_xpc_partitions,8,3             ## @xpc_partitions
	.comm	_xpc_arch_ops,16,3              ## @xpc_arch_ops
	.comm	_xpc_chan,4,2                   ## @xpc_chan
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kthread starting, partid=%d, channel=%d\n"

	.comm	_XPC_C_DISCONNECTING,4,2        ## @XPC_C_DISCONNECTING
	.comm	_XPC_C_CONNECTEDCALLOUT,4,2     ## @XPC_C_CONNECTEDCALLOUT
	.comm	_XPC_C_CONNECTEDCALLOUT_MADE,4,2 ## @XPC_C_CONNECTEDCALLOUT_MADE
	.comm	_XPC_C_DISCONNECTINGCALLOUT,4,2 ## @XPC_C_DISCONNECTINGCALLOUT
	.comm	_xpDisconnecting,4,2            ## @xpDisconnecting
	.comm	_XPC_C_DISCONNECTINGCALLOUT_MADE,4,2 ## @XPC_C_DISCONNECTINGCALLOUT_MADE
L_.str.1:                               ## @.str.1
	.asciz	"kthread exiting, partid=%d, channel=%d\n"

	.no_dead_strip	_xpc_kthread_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xpc_kthread_start
_xpc_kthread_start:                     ; @xpc_kthread_start
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x0
	bl	_XPC_UNPACK_ARG1
	mov	x19, x0
	mov	x0, x20
	bl	_XPC_UNPACK_ARG2
	mov	x21, x0
Lloh0:
	adrp	x8, _xpc_partitions@GOTPAGE
Lloh1:
	ldr	x8, [x8, _xpc_partitions@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x20, x8, w19, sxtw #4
Lloh3:
	adrp	x8, _xpc_arch_ops@GOTPAGE
Lloh4:
	ldr	x8, [x8, _xpc_arch_ops@GOTPAGEOFF]
Lloh5:
	ldr	x28, [x8]
Lloh6:
	adrp	x24, _xpc_chan@GOTPAGE
Lloh7:
	ldr	x24, [x24, _xpc_chan@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x21
	bl	_dev_dbg
	ldr	x26, [x20, #8]
	mov	w8, #12
	madd	x22, x21, x8, x26
	ldr	w8, [x22]
Lloh10:
	adrp	x25, _XPC_C_DISCONNECTING@GOTPAGE
Lloh11:
	ldr	x25, [x25, _XPC_C_DISCONNECTING@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh12:
	adrp	x27, _XPC_C_CONNECTEDCALLOUT_MADE@GOTPAGE
Lloh13:
	ldr	x27, [x27, _XPC_C_CONNECTEDCALLOUT_MADE@GOTPAGEOFF]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.1:
	mov	w8, #12
	madd	x8, x21, x8, x26
	add	x23, x8, #8
	mov	x0, x23
	bl	_spin_lock_irqsave
	ldr	w8, [x22]
Lloh14:
	adrp	x9, _XPC_C_CONNECTEDCALLOUT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _XPC_C_CONNECTEDCALLOUT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	b	LBB0_6
LBB0_3:
	orr	w8, w9, w8
	str	w8, [x22]
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	mov	x0, x22
	bl	_xpc_connected_callout
	mov	x0, x23
	bl	_spin_lock_irqsave
	ldr	w8, [x27]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	mov	x0, x22
	blr	x28
	cmp	w0, #2
	b.lt	LBB0_6
; %bb.4:
	ldr	w8, [x22]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.5:
	sub	w1, w0, #1
	mov	x0, x22
	bl	_xpc_activate_kthreads
LBB0_6:
	mov	x0, x20
	mov	x1, x22
	bl	_xpc_kthread_waitmsgs
LBB0_7:
	mov	w8, #12
	madd	x8, x21, x8, x26
	add	x23, x8, #8
	mov	x0, x23
	bl	_spin_lock_irqsave
	ldr	w8, [x22]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.8:
Lloh17:
	adrp	x9, _XPC_C_DISCONNECTINGCALLOUT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _XPC_C_DISCONNECTINGCALLOUT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.9:
	orr	w8, w9, w8
	str	w8, [x22]
	mov	x0, x23
	bl	_spin_unlock_irqrestore
Lloh20:
	adrp	x8, _xpDisconnecting@GOTPAGE
Lloh21:
	ldr	x8, [x8, _xpDisconnecting@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_xpc_disconnect_callout
	mov	x0, x23
	bl	_spin_lock_irqsave
Lloh23:
	adrp	x8, _XPC_C_DISCONNECTINGCALLOUT_MADE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _XPC_C_DISCONNECTINGCALLOUT_MADE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
LBB0_10:
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	mov	w8, #12
	madd	x8, x21, x8, x26
	add	x0, x8, #4
	bl	_atomic_dec_return
	cbnz	x0, LBB0_13
; %bb.11:
	mov	x0, x20
	bl	_atomic_dec_return
	cbnz	x0, LBB0_13
; %bb.12:
Lloh26:
	adrp	x8, _xpc_arch_ops@GOTPAGE
Lloh27:
	ldr	x8, [x8, _xpc_arch_ops@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
LBB0_13:
	mov	x0, x22
	bl	_xpc_msgqueue_deref
	ldr	w0, [x24]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	mov	x3, x21
	bl	_dev_dbg
	mov	x0, x20
	bl	_xpc_part_deref
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_xpc_partitions,8,3             ; @xpc_partitions
	.comm	_xpc_arch_ops,16,3              ; @xpc_arch_ops
	.comm	_xpc_chan,4,2                   ; @xpc_chan
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kthread starting, partid=%d, channel=%d\n"

	.comm	_XPC_C_DISCONNECTING,4,2        ; @XPC_C_DISCONNECTING
	.comm	_XPC_C_CONNECTEDCALLOUT,4,2     ; @XPC_C_CONNECTEDCALLOUT
	.comm	_XPC_C_CONNECTEDCALLOUT_MADE,4,2 ; @XPC_C_CONNECTEDCALLOUT_MADE
	.comm	_XPC_C_DISCONNECTINGCALLOUT,4,2 ; @XPC_C_DISCONNECTINGCALLOUT
	.comm	_xpDisconnecting,4,2            ; @xpDisconnecting
	.comm	_XPC_C_DISCONNECTINGCALLOUT_MADE,4,2 ; @XPC_C_DISCONNECTINGCALLOUT_MADE
l_.str.1:                               ; @.str.1
	.asciz	"kthread exiting, partid=%d, channel=%d\n"

	.no_dead_strip	_xpc_kthread_start
.subsections_via_symbols
