	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_perf_evlist__prepare_workload  ## -- Begin function perf_evlist__prepare_workload
	.p2align	4, 0x90
_perf_evlist__prepare_workload:         ## @perf_evlist__prepare_workload
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	-40(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	leaq	-48(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	callq	_fork
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	je	LBB0_7
## %bb.12:
	movq	%r15, %rdi
	callq	_perf_target__none
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
LBB0_14:
	movl	-36(%rbp), %edi
	callq	_close
	movl	-48(%rbp), %edi
	callq	_close
	movl	-40(%rbp), %edi
	leaq	-49(%rbp), %rsi
	movl	$1, %edx
	callq	_read
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.21:
	movl	-44(%rbp), %eax
	movl	%eax, 8(%rbx)
	movl	-40(%rbp), %edi
	callq	_close
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	jmp	LBB0_18
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	jmp	LBB0_17
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_16
LBB0_15:
	leaq	L_.str.4(%rip), %rdi
LBB0_16:
	leaq	-48(%rbp), %rdx
	movq	%rdx, %rsi
	callq	_perf_evlist__prepare_workload.cold.1
LBB0_17:
	movl	-40(%rbp), %edi
	callq	_close
	movl	-36(%rbp), %edi
	callq	_close
LBB0_18:
	movl	$-1, %eax
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_22
## %bb.20:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
LBB0_7:
	cmpq	$0, 8(%r15)
	je	LBB0_9
## %bb.8:
	movl	$2, %edi
	movl	$1, %esi
	callq	_dup2
LBB0_9:
	movl	-40(%rbp), %edi
	callq	_close
	movl	-44(%rbp), %edi
	callq	_close
	movl	-48(%rbp), %edi
	movq	_F_SETFD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FD_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_fcntl
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	callq	_execvp
	movl	-36(%rbp), %edi
	callq	_close
	movl	-48(%rbp), %edi
	leaq	-49(%rbp), %rsi
	movl	$1, %edx
	callq	_read
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.4(%rip), %rdi
	callq	_perror
LBB0_11:
	movq	(%r14), %rdi
	movq	%r14, %rsi
	callq	_execvp
	movq	(%r14), %rdi
	callq	_perror
	xorl	%eax, %eax
	callq	_getppid
	movq	_SIGUSR1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kill
	movl	$-1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function perf_evlist__prepare_workload.cold.1
_perf_evlist__prepare_workload.cold.1:  ## @perf_evlist__prepare_workload.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	callq	_perror
	movl	(%rbx), %edi
	callq	_close
	movl	4(%r14), %edi
	callq	_close
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create 'ready' pipe"

L_.str.1:                               ## @.str.1
	.asciz	"failed to create 'go' pipe"

L_.str.2:                               ## @.str.2
	.asciz	"failed to fork"

	.comm	_F_SETFD,4,2                    ## @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ## @FD_CLOEXEC
L_.str.3:                               ## @.str.3
	.space	1

L_.str.4:                               ## @.str.4
	.asciz	"unable to read pipe"

	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_perf_evlist__prepare_workload  ; -- Begin function perf_evlist__prepare_workload
	.p2align	2
_perf_evlist__prepare_workload:         ; @perf_evlist__prepare_workload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	add	x0, sp, #16
	bl	_pipe
	tbnz	x0, #63, LBB0_8
; %bb.1:
	add	x0, sp, #8
	bl	_pipe
	tbnz	x0, #63, LBB0_9
; %bb.2:
	bl	_fork
	str	x0, [x20]
	tbnz	x0, #63, LBB0_10
; %bb.3:
	cbz	x0, LBB0_18
; %bb.4:
	mov	x0, x21
	bl	_perf_target__none
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x8, [x20]
	ldr	x9, [x20, #16]
	ldr	x9, [x9]
	str	x8, [x9]
LBB0_6:
	ldr	w0, [sp, #20]
	bl	_close
	ldr	w0, [sp, #8]
	bl	_close
	ldr	w0, [sp, #16]
	add	x1, sp, #7
	mov	w2, #1
	bl	_read
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.7:
	ldp	w8, w0, [sp, #12]
	str	w8, [x20, #8]
	bl	_close
	mov	w0, #0
	b	LBB0_15
LBB0_8:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	b	LBB0_14
LBB0_9:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	b	LBB0_13
LBB0_10:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh9:
	adrp	x0, l_.str.4@PAGE
Lloh10:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_12:
	add	x1, sp, #8
	add	x2, sp, #8
	bl	_perf_evlist__prepare_workload.cold.1
LBB0_13:
	ldr	w0, [sp, #16]
	bl	_close
	ldr	w0, [sp, #20]
	bl	_close
LBB0_14:
	mov	w0, #-1
LBB0_15:
	ldr	x8, [sp, #24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	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
	add	sp, sp, #80
	ret
LBB0_17:
	bl	___stack_chk_fail
LBB0_18:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_20
; %bb.19:
	mov	w0, #2
	mov	w1, #1
	bl	_dup2
LBB0_20:
	ldr	w0, [sp, #16]
	bl	_close
	ldr	w0, [sp, #12]
	bl	_close
	ldr	w0, [sp, #8]
Lloh14:
	adrp	x8, _F_SETFD@GOTPAGE
Lloh15:
	ldr	x8, [x8, _F_SETFD@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _FD_CLOEXEC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _FD_CLOEXEC@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	bl	_fcntl
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_execvp
	ldr	w0, [sp, #20]
	bl	_close
	ldr	w0, [sp, #8]
	add	x1, sp, #7
	mov	w2, #1
	bl	_read
	cmn	w0, #1
	b.ne	LBB0_22
; %bb.21:
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_perror
LBB0_22:
	ldr	x0, [x19]
	mov	x1, x19
	bl	_execvp
	ldr	x0, [x19]
	bl	_perror
	bl	_getppid
Lloh24:
	adrp	x8, _SIGUSR1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SIGUSR1@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_kill
	mov	w0, #-1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function perf_evlist__prepare_workload.cold.1
_perf_evlist__prepare_workload.cold.1:  ; @perf_evlist__prepare_workload.cold.1
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	bl	_perror
	ldr	w0, [x20]
	bl	_close
	ldr	w0, [x19, #4]
	bl	_close
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create 'ready' pipe"

l_.str.1:                               ; @.str.1
	.asciz	"failed to create 'go' pipe"

l_.str.2:                               ; @.str.2
	.asciz	"failed to fork"

	.comm	_F_SETFD,4,2                    ; @F_SETFD
	.comm	_FD_CLOEXEC,4,2                 ; @FD_CLOEXEC
l_.str.3:                               ; @.str.3
	.space	1

l_.str.4:                               ; @.str.4
	.asciz	"unable to read pipe"

	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
.subsections_via_symbols
