	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptrace_wrap_fork               ## -- Begin function ptrace_wrap_fork
	.p2align	4, 0x90
_ptrace_wrap_fork:                      ## @ptrace_wrap_fork
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	xorl	%eax, %eax
	callq	_pthread_self
	cmpq	%rax, %r12
	jne	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	callq	_fork
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	*%r15
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_3:
	movl	$0, -36(%rbp)
	movq	_PTRACE_WRAP_REQUEST_TYPE_FORK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	%r15, 24(%rbx)
	movq	%r14, 40(%rbx)
	leaq	-36(%rbp), %rax
	movq	%rax, 32(%rbx)
	leaq	20(%rbx), %rdi
	callq	_sem_post
	leaq	16(%rbx), %rdi
	callq	_sem_wait
	movl	-36(%rbp), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	8(%rbx), %rax
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PTRACE_WRAP_REQUEST_TYPE_FORK,4,2 ## @PTRACE_WRAP_REQUEST_TYPE_FORK
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptrace_wrap_fork               ; -- Begin function ptrace_wrap_fork
	.p2align	2
_ptrace_wrap_fork:                      ; @ptrace_wrap_fork
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0]
	bl	_pthread_self
	cmp	x22, x0
	b.ne	LBB0_3
; %bb.1:
	bl	_fork
	cbnz	x0, LBB0_4
; %bb.2:
	mov	x0, x21
	blr	x20
	mov	x0, #0
	b	LBB0_4
LBB0_3:
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _PTRACE_WRAP_REQUEST_TYPE_FORK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTRACE_WRAP_REQUEST_TYPE_FORK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #48]
	add	x8, sp, #12
	str	x20, [x19, #24]
	stp	x8, x21, [x19, #32]
	add	x0, x19, #20
	bl	_sem_post
	add	x0, x19, #16
	bl	_sem_wait
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
	ldr	x0, [x19, #8]
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PTRACE_WRAP_REQUEST_TYPE_FORK,4,2 ; @PTRACE_WRAP_REQUEST_TYPE_FORK
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
