	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmcstat_create_process         ## -- Begin function pmcstat_create_process
	.p2align	4, 0x90
_pmcstat_create_process:                ## @pmcstat_create_process
	.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
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	_AF_UNIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	movq	%r13, %rcx
	callq	_socketpair
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	xorl	%eax, %eax
	callq	_fork
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$-1, %r15d
	jne	LBB0_10
## %bb.4:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_5:
	movq	_PARENTSOCKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r13,%rax,4), %edi
	callq	_close
	movq	_CHILDSOCKET@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	(%r13,%rax,4), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edx
	callq	_write
	cmpl	$1, %eax
	je	LBB0_7
## %bb.6:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_7:
	movq	(%rbx), %rax
	movl	(%r13,%rax,4), %edi
	leaq	-41(%rbp), %rsi
	movl	$1, %edx
	callq	_read
	testq	%rax, %rax
	jns	LBB0_9
## %bb.8:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_9:
	movq	(%rbx), %rax
	movl	(%r13,%rax,4), %edi
	callq	_close
	movq	8(%r14), %rsi
	movl	(%rsi), %edi
	callq	_execvp
	xorl	%eax, %eax
	callq	_getppid
	movq	_SIGCHLD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kill
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r14), %rax
	movl	(%rax), %edx
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_10:
	movq	_CHILDSOCKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r13,%rax,4), %edi
	callq	_close
	movq	_EVFILT_PROC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_EV_ADD@GOTPCREL(%rip), %rax
	movq	_EV_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_NOTE_EXIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	$0, (%rsp)
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	xorl	%r9d, %r9d
	callq	_EV_SET
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_kevent
	testq	%rax, %rax
	jns	LBB0_12
## %bb.11:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_err
LBB0_12:
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	_EX_SOFTWARE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_errx
LBB0_14:
	movl	%r15d, (%rbx)
	movq	_pt_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_SLIST_INSERT_HEAD
	movq	_PARENTSOCKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r13,%rax,4), %edi
	leaq	-41(%rbp), %rsi
	movl	$1, %edx
	callq	_read
	testq	%rax, %rax
	jns	LBB0_16
## %bb.15:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_UNIX,4,2                    ## @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR: cannot create socket pair"

L_.str.1:                               ## @.str.1
	.asciz	"ERROR: cannot fork"

	.comm	_PARENTSOCKET,8,3               ## @PARENTSOCKET
	.comm	_CHILDSOCKET,8,3                ## @CHILDSOCKET
L_.str.2:                               ## @.str.2
	.asciz	"+"

L_.str.3:                               ## @.str.3
	.asciz	"ERROR (child): cannot write token"

L_.str.4:                               ## @.str.4
	.asciz	"ERROR (child): cannot read token"

	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
L_.str.5:                               ## @.str.5
	.asciz	"ERROR: execvp \"%s\" failed"

	.comm	_EVFILT_PROC,4,2                ## @EVFILT_PROC
	.comm	_EV_ADD,4,2                     ## @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ## @EV_ONESHOT
	.comm	_NOTE_EXIT,4,2                  ## @NOTE_EXIT
L_.str.6:                               ## @.str.6
	.asciz	"ERROR: cannot monitor child process %d"

	.comm	_EX_SOFTWARE,4,2                ## @EX_SOFTWARE
L_.str.7:                               ## @.str.7
	.asciz	"ERROR: Out of memory."

	.comm	_pt_next,4,2                    ## @pt_next
L_.str.8:                               ## @.str.8
	.asciz	"ERROR (parent): cannot read token"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmcstat_create_process         ; -- Begin function pmcstat_create_process
	.p2align	2
_pmcstat_create_process:                ; @pmcstat_create_process
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _AF_UNIX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_UNIX@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	mov	x3, x19
	bl	_socketpair
Lloh6:
	adrp	x23, _EX_OSERR@GOTPAGE
Lloh7:
	ldr	x23, [x23, _EX_OSERR@GOTPAGEOFF]
	tbz	x0, #63, LBB0_2
; %bb.1:
	ldr	w0, [x23]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_2:
	bl	_fork
	mov	x21, x0
Lloh10:
	adrp	x24, _PARENTSOCKET@GOTPAGE
Lloh11:
	ldr	x24, [x24, _PARENTSOCKET@GOTPAGEOFF]
Lloh12:
	adrp	x25, _CHILDSOCKET@GOTPAGE
Lloh13:
	ldr	x25, [x25, _CHILDSOCKET@GOTPAGEOFF]
	cbz	w0, LBB0_5
; %bb.3:
	cmn	w21, #1
	b.ne	LBB0_10
; %bb.4:
	ldr	w0, [x23]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_5:
	ldr	x8, [x24]
	ldr	w0, [x19, x8, lsl #2]
	bl	_close
	ldr	x8, [x25]
	ldr	w0, [x19, x8, lsl #2]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #1
	bl	_write
	cmp	w0, #1
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x23]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_err
LBB0_7:
	ldr	x8, [x25]
	ldr	w0, [x19, x8, lsl #2]
	add	x1, sp, #15
	mov	w2, #1
	bl	_read
	tbz	x0, #63, LBB0_9
; %bb.8:
	ldr	w0, [x23]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_err
LBB0_9:
	ldr	x8, [x25]
	ldr	w0, [x19, x8, lsl #2]
	bl	_close
	ldr	x1, [x20, #8]
	ldr	w0, [x1]
	bl	_execvp
	bl	_getppid
Lloh22:
	adrp	x8, _SIGCHLD@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SIGCHLD@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_kill
	ldr	w0, [x23]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_err
LBB0_10:
	ldr	x8, [x25]
	ldr	w0, [x19, x8, lsl #2]
	bl	_close
Lloh27:
	adrp	x8, _EVFILT_PROC@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EVFILT_PROC@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
Lloh30:
	adrp	x8, _EV_ADD@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EV_ADD@GOTPAGEOFF]
Lloh32:
	adrp	x9, _EV_ONESHOT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _EV_ONESHOT@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh36:
	adrp	x8, _NOTE_EXIT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _NOTE_EXIT@GOTPAGEOFF]
Lloh38:
	ldr	w4, [x8]
	add	x0, sp, #8
	mov	x1, x21
	mov	w5, #0
	mov	x6, #0
	bl	_EV_SET
	add	x1, sp, #8
	mov	x0, x22
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_kevent
	tbz	x0, #63, LBB0_12
; %bb.11:
	ldr	w0, [x23]
	str	x21, [sp]
Lloh39:
	adrp	x1, l_.str.6@PAGE
Lloh40:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_err
LBB0_12:
	mov	w0, #4
	bl	_malloc
	mov	x22, x0
	cbnz	x0, LBB0_14
; %bb.13:
Lloh41:
	adrp	x8, _EX_SOFTWARE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _EX_SOFTWARE@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
Lloh44:
	adrp	x1, l_.str.7@PAGE
Lloh45:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_errx
LBB0_14:
	str	w21, [x22]
Lloh46:
	adrp	x8, _pt_next@GOTPAGE
Lloh47:
	ldr	x8, [x8, _pt_next@GOTPAGEOFF]
Lloh48:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x22
	bl	_SLIST_INSERT_HEAD
	ldr	x8, [x24]
	ldr	w0, [x19, x8, lsl #2]
	add	x1, sp, #15
	mov	w2, #1
	bl	_read
	tbz	x0, #63, LBB0_16
; %bb.15:
	ldr	w0, [x23]
Lloh49:
	adrp	x1, l_.str.8@PAGE
Lloh50:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_err
LBB0_16:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh34
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_UNIX,4,2                    ; @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR: cannot create socket pair"

l_.str.1:                               ; @.str.1
	.asciz	"ERROR: cannot fork"

	.comm	_PARENTSOCKET,8,3               ; @PARENTSOCKET
	.comm	_CHILDSOCKET,8,3                ; @CHILDSOCKET
l_.str.2:                               ; @.str.2
	.asciz	"+"

l_.str.3:                               ; @.str.3
	.asciz	"ERROR (child): cannot write token"

l_.str.4:                               ; @.str.4
	.asciz	"ERROR (child): cannot read token"

	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
l_.str.5:                               ; @.str.5
	.asciz	"ERROR: execvp \"%s\" failed"

	.comm	_EVFILT_PROC,4,2                ; @EVFILT_PROC
	.comm	_EV_ADD,4,2                     ; @EV_ADD
	.comm	_EV_ONESHOT,4,2                 ; @EV_ONESHOT
	.comm	_NOTE_EXIT,4,2                  ; @NOTE_EXIT
l_.str.6:                               ; @.str.6
	.asciz	"ERROR: cannot monitor child process %d"

	.comm	_EX_SOFTWARE,4,2                ; @EX_SOFTWARE
l_.str.7:                               ; @.str.7
	.asciz	"ERROR: Out of memory."

	.comm	_pt_next,4,2                    ; @pt_next
l_.str.8:                               ; @.str.8
	.asciz	"ERROR (parent): cannot read token"

.subsections_via_symbols
