	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_scripts_dir
_set_scripts_dir:                       ## @set_scripts_dir
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_program_name@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	_BINDIR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SCRIPTDIR@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	callq	_make_relative_prefix
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_check_for_scripts_dir
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_free
	testq	%r14, %r14
	jne	LBB0_9
LBB0_2:
	movq	(%r15), %rdi
	movq	_TOOLBINDIR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rdx
	callq	_make_relative_prefix
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_check_for_scripts_dir
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_free
	testq	%r14, %r14
	jne	LBB0_9
LBB0_4:
	movq	(%r12), %rdi
	callq	_check_for_scripts_dir
	testq	%rax, %rax
	je	LBB0_5
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%r15), %r14
	movq	%r14, %rdi
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%rax, %rbx
	subq	%r14, %rbx
	leaq	8(%rbx), %rdi
	callq	_xmalloc
	movq	%rax, %r14
	movq	(%r15), %rsi
	movq	%rax, %rdi
	movq	%rbx, %rdx
	callq	_strncpy
	movb	$0, (%r14,%rbx)
	movq	%r14, %rdi
	callq	_check_for_scripts_dir
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	addq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	%r14, %rdi
	callq	_check_for_scripts_dir
LBB0_8:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_program_name,8,3               ## @program_name
	.comm	_BINDIR,4,2                     ## @BINDIR
	.comm	_SCRIPTDIR,8,3                  ## @SCRIPTDIR
	.comm	_TOOLBINDIR,4,2                 ## @TOOLBINDIR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/../lib"

	.no_dead_strip	_set_scripts_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_scripts_dir
_set_scripts_dir:                       ; @set_scripts_dir
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x21, _program_name@GOTPAGE
Lloh1:
	ldr	x21, [x21, _program_name@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh2:
	adrp	x8, _BINDIR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BINDIR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x22, _SCRIPTDIR@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SCRIPTDIR@GOTPAGEOFF]
	ldr	x2, [x22]
	bl	_make_relative_prefix
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	bl	_check_for_scripts_dir
	mov	x20, x0
	mov	x0, x19
	bl	_free
	cbnz	x20, LBB0_5
LBB0_2:
	ldr	x0, [x21]
Lloh7:
	adrp	x8, _TOOLBINDIR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TOOLBINDIR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	x2, [x22]
	bl	_make_relative_prefix
	cbz	x0, LBB0_4
; %bb.3:
	mov	x19, x0
	bl	_check_for_scripts_dir
	mov	x20, x0
	mov	x0, x19
	bl	_free
	cbnz	x20, LBB0_5
LBB0_4:
	ldr	x0, [x22]
	bl	_check_for_scripts_dir
	cbz	x0, LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x19, [x21]
	mov	x0, x19
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_5
; %bb.7:
	sub	x20, x0, x19
	add	x0, x20, #8
	bl	_xmalloc
	mov	x19, x0
	ldr	x1, [x21]
	mov	x2, x20
	bl	_strncpy
	add	x20, x19, x20
	strb	wzr, [x20]
	mov	x0, x19
	bl	_check_for_scripts_dir
	cbnz	x0, LBB0_9
; %bb.8:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_strcpy
	mov	x0, x19
	bl	_check_for_scripts_dir
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_free
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_program_name,8,3               ; @program_name
	.comm	_BINDIR,4,2                     ; @BINDIR
	.comm	_SCRIPTDIR,8,3                  ; @SCRIPTDIR
	.comm	_TOOLBINDIR,4,2                 ; @TOOLBINDIR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/../lib"

	.no_dead_strip	_set_scripts_dir
.subsections_via_symbols
