	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_perf_extract_argv0_path        ## -- Begin function perf_extract_argv0_path
	.p2align	4, 0x90
_perf_extract_argv0_path:               ## @perf_extract_argv0_path
	.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
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	cmpb	$0, (%rdi)
	je	LBB0_7
## %bb.2:
	movq	%r14, %rdi
	callq	_strlen
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	(%r14,%rbx), %edi
	callq	_is_dir_sep
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%r14,%rbx), %rax
	decq	%rax
	decq	%rbx
	cmpq	%r14, %rax
	jae	LBB0_4
	jmp	LBB0_9
LBB0_7:
	xorl	%r14d, %r14d
LBB0_9:
	movq	%r14, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_strndup
	movq	_argv0_path@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	leaq	1(%r14,%rbx), %r14
	cmoveq	%rax, %r14
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_argv0_path,8,3                 ## @argv0_path
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_perf_extract_argv0_path        ; -- Begin function perf_extract_argv0_path
	.p2align	2
_perf_extract_argv0_path:               ; @perf_extract_argv0_path
	.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, x0
	cbz	x0, LBB0_8
; %bb.1:
	ldrb	w8, [x19]
	cbz	w8, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_strlen
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	w20, w0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x19, x20]
	bl	_is_dir_sep
	cbnz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	x20, x20, #1
	add	x8, x19, x20
	cmp	x8, x19
	b.hs	LBB0_4
	b	LBB0_8
LBB0_6:
	mov	x19, #0
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_strndup
Lloh0:
	adrp	x8, _argv0_path@GOTPAGE
Lloh1:
	ldr	x8, [x8, _argv0_path@GOTPAGEOFF]
Lloh2:
	str	x0, [x8]
	add	x8, x19, x20
	cmp	x0, #0
	csinc	x19, xzr, x8, eq
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_argv0_path,8,3                 ; @argv0_path
.subsections_via_symbols
