	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dt_proc_create_thread
_dt_proc_create_thread:                 ## @dt_proc_create_thread
	.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
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	leaq	8(%rsi), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_pthread_mutex_lock
	orl	%r15d, (%rbx)
	leaq	-44(%rbp), %r15
	movq	%r15, %rdi
	callq	_pthread_attr_init
	movq	_PTHREAD_CREATE_DETACHED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pthread_attr_setdetachstate
	leaq	-64(%rbp), %r13
	movq	%r13, %rdi
	callq	_sigfillset
	movq	_SIGABRT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_sigdelset
	movq	_SIGUSR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_sigdelset
	movq	%r12, -72(%rbp)
	movq	%rbx, -80(%rbp)
	movq	_SIG_SETMASK@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	-60(%rbp), %r12
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_pthread_sigmask
	leaq	36(%rbx), %rdi
	movq	_dt_proc_control@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %rcx
	movq	%r15, %rsi
	callq	_pthread_create
	movl	%eax, %r15d
	movl	(%r14), %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_pthread_sigmask
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.13:
	movl	4(%rbx), %r14d
	movl	12(%rbx), %r12d
	movl	%r15d, %edi
	callq	_strerror
	leaq	L_.str.3(%rip), %rdx
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	%r14d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dt_proc_error
	jmp	LBB0_14
LBB0_1:
	cmpq	$0, 24(%rbx)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_5
## %bb.2:
	leaq	32(%rbx), %r15
	movq	_DT_PROC_STOP_IDLE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	testl	%eax, (%rbx)
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_pthread_cond_wait
	cmpq	$0, 24(%rbx)
	je	LBB0_3
LBB0_5:
	movl	16(%rbx), %edi
	callq	_proc_getwstat
	movl	%eax, %r12d
	movl	16(%rbx), %edi
	callq	_proc_getpid
	movl	%eax, %r15d
	movl	16(%rbx), %edi
	callq	_proc_state
	movq	_PS_LOST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.6:
	movl	12(%rbx), %edi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rsi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dt_proc_error
	jmp	LBB0_7
LBB0_9:
	movl	%r12d, %edi
	callq	_WIFSIGNALED
	movl	12(%rbx), %r13d
	movl	%r12d, %edi
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	callq	_WTERMSIG
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_11
LBB0_12:
	callq	_WEXITSTATUS
	leaq	L_.str.2(%rip), %rdx
LBB0_11:
	movl	%r13d, %edi
	movq	%rbx, %rsi
	movl	%r15d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dt_proc_error
LBB0_7:
	movq	_ESRCH@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	jne	LBB0_14
LBB0_8:
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	xorl	%r15d, %r15d
LBB0_14:
	leaq	-44(%rbp), %rdi
	callq	_pthread_attr_destroy
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PTHREAD_CREATE_DETACHED,4,2    ## @PTHREAD_CREATE_DETACHED
	.comm	_SIGABRT,4,2                    ## @SIGABRT
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
	.comm	_SIG_SETMASK,4,2                ## @SIG_SETMASK
	.comm	_dt_proc_control,4,2            ## @dt_proc_control
	.comm	_DT_PROC_STOP_IDLE,4,2          ## @DT_PROC_STOP_IDLE
	.comm	_PS_LOST,8,3                    ## @PS_LOST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to control pid %d: process exec'd set-id or unobservable program\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to control pid %d: process died from signal %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to control pid %d: process exited with status %d\n"

	.comm	_ESRCH,4,2                      ## @ESRCH
L_.str.3:                               ## @.str.3
	.asciz	"failed to create control thread for process-id %d: %s\n"

	.comm	_SIGCANCEL,4,2                  ## @SIGCANCEL
	.no_dead_strip	_dt_proc_create_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dt_proc_create_thread
_dt_proc_create_thread:                 ; @dt_proc_create_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	add	x19, x1, #8
	mov	x0, x19
	bl	_pthread_mutex_lock
	ldr	w8, [x20]
	orr	w8, w8, w21
	str	w8, [x20]
	add	x0, sp, #20
	bl	_pthread_attr_init
Lloh0:
	adrp	x8, _PTHREAD_CREATE_DETACHED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTHREAD_CREATE_DETACHED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #20
	bl	_pthread_attr_setdetachstate
	add	x0, sp, #28
	bl	_sigfillset
Lloh3:
	adrp	x8, _SIGABRT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIGABRT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #28
	bl	_sigdelset
Lloh6:
	adrp	x8, _SIGUSR1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SIGUSR1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #28
	bl	_sigdelset
	stp	x20, x22, [sp, #32]
Lloh9:
	adrp	x22, _SIG_SETMASK@GOTPAGE
Lloh10:
	ldr	x22, [x22, _SIG_SETMASK@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x1, sp, #28
	add	x2, sp, #24
	bl	_pthread_sigmask
	add	x0, x20, #36
Lloh11:
	adrp	x8, _dt_proc_control@GOTPAGE
Lloh12:
	ldr	x8, [x8, _dt_proc_control@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x1, sp, #20
	add	x3, sp, #32
	bl	_pthread_create
	mov	x21, x0
	ldr	w0, [x22]
	add	x1, sp, #24
	mov	x2, #0
	bl	_pthread_sigmask
	cbz	w21, LBB0_2
; %bb.1:
	ldr	w19, [x20, #12]
	ldr	w22, [x20, #4]
	mov	x0, x21
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh14:
	adrp	x2, l_.str.3@PAGE
Lloh15:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	mov	x3, x22
	bl	_dt_proc_error
	b	LBB0_14
LBB0_2:
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_6
; %bb.3:
	add	x21, x20, #32
Lloh16:
	adrp	x22, _DT_PROC_STOP_IDLE@GOTPAGE
Lloh17:
	ldr	x22, [x22, _DT_PROC_STOP_IDLE@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x19
	bl	_pthread_cond_wait
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_4
LBB0_6:
	ldr	w0, [x20, #16]
	bl	_proc_getwstat
	mov	x22, x0
	ldr	w0, [x20, #16]
	bl	_proc_getpid
	mov	x21, x0
	ldr	w0, [x20, #16]
	bl	_proc_state
Lloh18:
	adrp	x8, _PS_LOST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PS_LOST@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x20, #12]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_12
LBB0_8:
	mov	x0, x22
	bl	_WIFSIGNALED
	ldr	w23, [x20, #12]
	cbz	x0, LBB0_10
; %bb.9:
	mov	x0, x22
	bl	_WTERMSIG
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh23:
	adrp	x2, l_.str.1@PAGE
Lloh24:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
	mov	x0, x22
	bl	_WEXITSTATUS
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh25:
	adrp	x2, l_.str.2@PAGE
Lloh26:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_11:
	mov	x0, x23
LBB0_12:
	mov	x1, x20
	mov	x3, x21
	bl	_dt_proc_error
Lloh27:
	adrp	x8, _ESRCH@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
Lloh29:
	ldr	w21, [x8]
	cbnz	w21, LBB0_14
LBB0_13:
	mov	x0, x19
	bl	_pthread_mutex_unlock
	mov	w21, #0
LBB0_14:
	add	x0, sp, #20
	bl	_pthread_attr_destroy
	mov	x0, x21
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_PTHREAD_CREATE_DETACHED,4,2    ; @PTHREAD_CREATE_DETACHED
	.comm	_SIGABRT,4,2                    ; @SIGABRT
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
	.comm	_SIG_SETMASK,4,2                ; @SIG_SETMASK
	.comm	_dt_proc_control,4,2            ; @dt_proc_control
	.comm	_DT_PROC_STOP_IDLE,4,2          ; @DT_PROC_STOP_IDLE
	.comm	_PS_LOST,8,3                    ; @PS_LOST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to control pid %d: process exec'd set-id or unobservable program\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to control pid %d: process died from signal %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to control pid %d: process exited with status %d\n"

	.comm	_ESRCH,4,2                      ; @ESRCH
l_.str.3:                               ; @.str.3
	.asciz	"failed to create control thread for process-id %d: %s\n"

	.comm	_SIGCANCEL,4,2                  ; @SIGCANCEL
	.no_dead_strip	_dt_proc_create_thread
.subsections_via_symbols
