	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_srcdir
_get_srcdir:                            ## @get_srcdir
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_srcdir@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_realpath
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_err
LBB0_2:
	leaq	L_.str.2(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	cmpb	$47, (%rax)
	jne	LBB0_13
## %bb.4:
	movq	%rax, %rdi
	callq	_strdup
	testq	%rax, %rax
	je	LBB0_13
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	movb	$0, (%rax)
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	movb	$0, (%rax)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.8:
	movq	(%r14), %rdi
	leaq	-32(%rbp), %rsi
	callq	_stat
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.9:
	movq	-48(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_12
## %bb.10:
	movq	-40(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movq	(%r14), %rdi
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_strlcpy
LBB0_12:
	movq	%rbx, %rdi
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_13:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"../.."

	.comm	_srcdir,8,3                     ## @srcdir
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
L_.str.1:                               ## @.str.1
	.asciz	"Unable to find root of source tree"

L_.str.2:                               ## @.str.2
	.asciz	"PWD"

	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.no_dead_strip	_get_srcdir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_srcdir
_get_srcdir:                            ; @get_srcdir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
Lloh0:
	adrp	x20, _srcdir@GOTPAGE
Lloh1:
	ldr	x20, [x20, _srcdir@GOTPAGEOFF]
	ldr	x1, [x20]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_realpath
	cbnz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_2:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_13
; %bb.3:
	ldrb	w8, [x0]
	cmp	w8, #47
	b.ne	LBB0_13
; %bb.4:
	bl	_strdup
	cbz	x0, LBB0_13
; %bb.5:
	mov	x19, x0
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_12
; %bb.6:
	strb	wzr, [x0]
	mov	x0, x19
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_12
; %bb.7:
	strb	wzr, [x0]
	add	x1, sp, #16
	mov	x0, x19
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.8:
	ldr	x0, [x20]
	mov	x1, sp
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.9:
	ldr	x8, [sp, #16]
	ldr	x9, [sp]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	ldr	x8, [sp, #24]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	ldr	x0, [x20]
Lloh11:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_strlcpy
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_free
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"../.."

	.comm	_srcdir,8,3                     ; @srcdir
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
l_.str.1:                               ; @.str.1
	.asciz	"Unable to find root of source tree"

l_.str.2:                               ; @.str.2
	.asciz	"PWD"

	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.no_dead_strip	_get_srcdir
.subsections_via_symbols
