	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function collect_children
_collect_children:                      ## @collect_children
	.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	%rdi, %r14
	leaq	-52(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sigemptyset
	movq	_SIGCHLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sigaddset
	movq	_SIG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_sigprocmask
	movq	_child_terminated@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_debug
	movq	_WNOHANG@GOTPCREL(%rip), %r12
	leaq	-44(%rbp), %rbx
	movq	_errno@GOTPCREL(%rip), %r13
	movq	_EINTR@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_session_close_by_pid
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	movl	$-1, %edi
	movq	%rbx, %rsi
	callq	_waitpid
	testq	%rax, %rax
	jg	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	cmpq	%rax, (%r13)
	je	LBB0_2
LBB0_5:
	movq	_child_terminated@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_6:
	movq	_SIG_SETMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigprocmask
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
	.comm	_SIG_BLOCK,4,2                  ## @SIG_BLOCK
	.comm	_child_terminated,8,3           ## @child_terminated
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received SIGCHLD."

	.comm	_WNOHANG,4,2                    ## @WNOHANG
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_SIG_SETMASK,4,2                ## @SIG_SETMASK
	.no_dead_strip	_collect_children
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function collect_children
_collect_children:                      ; @collect_children
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	add	x0, sp, #8
	bl	_sigemptyset
Lloh0:
	adrp	x8, _SIGCHLD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGCHLD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_sigaddset
Lloh3:
	adrp	x8, _SIG_BLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIG_BLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, sp, #8
	add	x2, sp, #12
	bl	_sigprocmask
Lloh6:
	adrp	x20, _child_terminated@GOTPAGE
Lloh7:
	ldr	x20, [x20, _child_terminated@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_6
; %bb.1:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug
Lloh10:
	adrp	x21, _WNOHANG@GOTPAGE
Lloh11:
	ldr	x21, [x21, _WNOHANG@GOTPAGEOFF]
Lloh12:
	adrp	x22, _errno@GOTPAGE
Lloh13:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
Lloh14:
	adrp	x23, _EINTR@GOTPAGE
Lloh15:
	ldr	x23, [x23, _EINTR@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [sp, #4]
	mov	x0, x19
	bl	_session_close_by_pid
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21]
	add	x1, sp, #4
	mov	w0, #-1
	bl	_waitpid
	mov	x1, x0
	cmp	x0, #0
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x1, #0
	ccmp	x8, x9, #0, ne
	b.eq	LBB0_3
; %bb.5:
	str	xzr, [x20]
LBB0_6:
Lloh16:
	adrp	x8, _SIG_SETMASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SIG_SETMASK@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	add	x1, sp, #12
	mov	x2, #0
	bl	_sigprocmask
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
	.comm	_SIG_BLOCK,4,2                  ; @SIG_BLOCK
	.comm	_child_terminated,8,3           ; @child_terminated
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received SIGCHLD."

	.comm	_WNOHANG,4,2                    ; @WNOHANG
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_SIG_SETMASK,4,2                ; @SIG_SETMASK
	.no_dead_strip	_collect_children
.subsections_via_symbols
