	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_refdir
_get_refdir:                            ## @get_refdir
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	$8192, %edi                     ## imm = 0x2000
	movl	$1, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	movq	%rax, %r15
	movl	$16384, %edi                    ## imm = 0x4000
	movl	$1, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_18
## %bb.2:
	movq	%rax, %r14
	testq	%r12, %r12
	je	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	movl	$8192, %esi                     ## imm = 0x2000
	movq	%r15, %rdi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movq	_KNOWNREF@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	movq	%r15, %rdx
	callq	_slurpfile
	testq	%rax, %rax
	jne	LBB0_17
## %bb.4:
	movq	%r14, %rdi
	callq	_strlen
	movl	$16383, %ebx                    ## imm = 0x3FFF
	movl	$16383, %edx                    ## imm = 0x3FFF
	subq	%rax, %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_strncat
	movq	%r14, %rdi
	callq	_strlen
	subq	%rax, %rbx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
LBB0_15:
	callq	_strncat
LBB0_16:
	movq	_KNOWNREF@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.8(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	$1, %edi
	callq	_exit
LBB0_5:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_getcwd
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_strlen
	cmpb	$10, -1(%rax,%rbx)
	jne	LBB0_8
## %bb.6:
	leaq	(%rax,%rbx), %rcx
	decq	%rcx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movb	$0, (%rcx)
	movq	%rbx, %rdi
	callq	_strlen
	leaq	(%rax,%rbx), %rcx
	decq	%rcx
	cmpb	$10, -1(%rax,%rbx)
	je	LBB0_7
LBB0_8:
	leaq	L_.str.1(%rip), %rdx
	movl	$8192, %esi                     ## imm = 0x2000
	movq	%r15, %rdi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movq	_KNOWNREF@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	movq	%r15, %rdx
	callq	_slurpfile
	testq	%rax, %rax
	jne	LBB0_17
## %bb.9:
	movq	%r14, %rdi
	callq	_strlen
	movl	$16383, %r12d                   ## imm = 0x3FFF
	movl	$16383, %edx                    ## imm = 0x3FFF
	subq	%rax, %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_strncat
	movq	%r14, %rdi
	callq	_strlen
	movl	$16383, %edx                    ## imm = 0x3FFF
	subq	%rax, %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_strncat
	leaq	L_.str.4(%rip), %rdx
	movl	$8192, %esi                     ## imm = 0x2000
	movq	%r15, %rdi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movq	(%r13), %rcx
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	movq	%r15, %rdx
	callq	_slurpfile
	testq	%rax, %rax
	jne	LBB0_17
## %bb.10:
	movq	%r14, %rdi
	callq	_strlen
	movl	$16383, %edx                    ## imm = 0x3FFF
	subq	%rax, %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_strncat
	movq	%r14, %rdi
	callq	_strlen
	subq	%rax, %r12
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_strncat
	movq	_PROGRAM@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	leaq	L_.str.5(%rip), %rdx
	movl	$8192, %esi                     ## imm = 0x2000
	movq	%r15, %rdi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movq	(%r13), %rcx
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	movq	%r15, %rdx
	callq	_slurpfile
	testq	%rax, %rax
	jne	LBB0_17
## %bb.11:
	movq	%r14, %rdi
	callq	_strlen
	movl	$16383, %r12d                   ## imm = 0x3FFF
	movl	$16383, %edx                    ## imm = 0x3FFF
	subq	%rax, %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_strncat
	movq	%r14, %rdi
	callq	_strlen
	subq	%rax, %r12
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_strncat
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_16
## %bb.12:
	movq	%rbx, %r12
	addq	$8, %r12
	leaq	L_.str.1(%rip), %rdx
	movl	$8192, %esi                     ## imm = 0x2000
	movq	%r15, %rdi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movq	(%r13), %rcx
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	movq	%r15, %rdx
	callq	_slurpfile
	testq	%rax, %rax
	jne	LBB0_17
## %bb.13:
	movq	%r14, %rdi
	callq	_strlen
	movl	$16383, %edx                    ## imm = 0x3FFF
	subq	%rax, %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_strncat
	movq	%r14, %rdi
	callq	_strlen
	movl	$16383, %edx                    ## imm = 0x3FFF
	subq	%rax, %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_strncat
	leaq	L_.str.4(%rip), %rdx
	movl	$8192, %esi                     ## imm = 0x2000
	movq	%r15, %rdi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movq	(%r13), %rcx
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	movq	%r15, %rdx
	callq	_slurpfile
	testq	%rax, %rax
	je	LBB0_14
LBB0_17:
	movq	%rax, %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_free
	movq	%r15, %rdi
	callq	_strdup
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_free
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_14:
	movq	%r14, %rdi
	callq	_strlen
	movl	$16383, %edx                    ## imm = 0x3FFF
	subq	%rax, %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_strncat
	movq	%r14, %rdi
	callq	_strlen
	movl	$16383, %edx                    ## imm = 0x3FFF
	subq	%rax, %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to allocate memory\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s"

L_.str.2:                               ## @.str.2
	.asciz	"%s/%s"

	.comm	_KNOWNREF,8,3                   ## @KNOWNREF
L_.str.3:                               ## @.str.3
	.asciz	"\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s/test"

L_.str.5:                               ## @.str.5
	.asciz	"%s/%s/test"

	.comm	_PROGRAM,8,3                    ## @PROGRAM
L_.str.6:                               ## @.str.6
	.asciz	"/usr/obj"

L_.str.7:                               ## @.str.7
	.asciz	"Unable to locate known reference file %s\n"

L_.str.8:                               ## @.str.8
	.asciz	"  Checked following directories:\n%s\n"

	.comm	_LIBRARY,8,3                    ## @LIBRARY
	.comm	_PATH_MAX,8,3                   ## @PATH_MAX
	.comm	_PROGRAM_ALIAS,8,3              ## @PROGRAM_ALIAS
L_str:                                  ## @str
	.asciz	"Use -r option to specify full path to reference directory"

	.no_dead_strip	_get_refdir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_refdir
_get_refdir:                            ; @get_refdir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	mov	w0, #8192
	mov	w1, #1
	bl	_calloc
	cbz	x0, LBB0_15
; %bb.1:
	mov	x20, x0
	mov	w0, #16384
	mov	w1, #1
	bl	_calloc
	cbz	x0, LBB0_15
; %bb.2:
	mov	x19, x0
	cbz	x21, LBB0_5
; %bb.3:
Lloh0:
	adrp	x2, l_.str.1@PAGE
Lloh1:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w1, #8192
	mov	x3, x21
	bl	_snprintf
Lloh2:
	adrp	x8, _KNOWNREF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KNOWNREF@GOTPAGEOFF]
Lloh4:
	ldr	x3, [x8]
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, #0
	mov	x2, x20
	bl	_slurpfile
	cbz	x0, LBB0_16
; %bb.4:
	mov	x21, #0
	b	LBB0_14
LBB0_5:
	mov	x0, #0
	mov	x1, #0
	bl	_getcwd
	mov	x21, x0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	bl	_strlen
	add	x8, x0, x21
	ldrb	w9, [x8, #-1]!
	cmp	w9, #10
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	strb	wzr, [x8]
	mov	x0, x21
	b	LBB0_6
LBB0_8:
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w1, #8192
	mov	x3, x21
	bl	_snprintf
Lloh9:
	adrp	x23, _KNOWNREF@GOTPAGE
Lloh10:
	ldr	x23, [x23, _KNOWNREF@GOTPAGEOFF]
	ldr	x3, [x23]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, #0
	mov	x2, x20
	bl	_slurpfile
	cbnz	x0, LBB0_14
; %bb.9:
	mov	x0, x19
	bl	_strlen
	mov	w22, #16383
	sub	x2, x22, x0
	mov	x0, x19
	mov	x1, x20
	bl	_strncat
	mov	x0, x19
	bl	_strlen
	sub	x2, x22, x0
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_strncat
Lloh15:
	adrp	x2, l_.str.4@PAGE
Lloh16:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	w1, #8192
	mov	x3, x21
	bl	_snprintf
	ldr	x3, [x23]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, #0
	mov	x2, x20
	bl	_slurpfile
	cbnz	x0, LBB0_14
; %bb.10:
	mov	x0, x19
	bl	_strlen
	mov	w22, #16383
	sub	x2, x22, x0
	mov	x0, x19
	mov	x1, x20
	bl	_strncat
	mov	x0, x19
	bl	_strlen
	sub	x2, x22, x0
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_strncat
Lloh21:
	adrp	x8, _PROGRAM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PROGRAM@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	str	x8, [sp]
Lloh24:
	adrp	x2, l_.str.5@PAGE
Lloh25:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	w1, #8192
	mov	x3, x21
	bl	_snprintf
	ldr	x3, [x23]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, #0
	mov	x2, x20
	bl	_slurpfile
	cbnz	x0, LBB0_14
; %bb.11:
	mov	x0, x19
	bl	_strlen
	mov	w22, #16383
	sub	x2, x22, x0
	mov	x0, x19
	mov	x1, x20
	bl	_strncat
	mov	x0, x19
	bl	_strlen
	sub	x2, x22, x0
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_strncat
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x21
	mov	w2, #8
	bl	_memcmp
	cbnz	x0, LBB0_17
; %bb.12:
	add	x22, x21, #8
Lloh32:
	adrp	x2, l_.str.1@PAGE
Lloh33:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w1, #8192
	mov	x3, x22
	bl	_snprintf
	ldr	x3, [x23]
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, #0
	mov	x2, x20
	bl	_slurpfile
	cbnz	x0, LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_strlen
	mov	w24, #16383
	sub	x2, x24, x0
	mov	x0, x19
	mov	x1, x20
	bl	_strncat
	mov	x0, x19
	bl	_strlen
	sub	x2, x24, x0
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_strncat
Lloh38:
	adrp	x2, l_.str.4@PAGE
Lloh39:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	w1, #8192
	mov	x3, x22
	bl	_snprintf
	ldr	x3, [x23]
Lloh40:
	adrp	x1, l_.str.2@PAGE
Lloh41:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, #0
	mov	x2, x20
	bl	_slurpfile
	cbz	x0, LBB0_16
LBB0_14:
	bl	_free
	mov	x0, x21
	bl	_free
	mov	x0, x19
	bl	_free
	mov	x0, x20
	bl	_strdup
	mov	x19, x0
	mov	x0, x20
	bl	_free
	mov	x0, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
Lloh42:
	adrp	x8, _stderr@GOTPAGE
Lloh43:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
Lloh45:
	adrp	x1, l_.str@PAGE
Lloh46:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	bl	_exit
LBB0_16:
	mov	x0, x19
	bl	_strlen
	mov	w21, #16383
	sub	x2, x21, x0
	mov	x0, x19
	mov	x1, x20
	bl	_strncat
	mov	x0, x19
	bl	_strlen
	sub	x2, x21, x0
Lloh47:
	adrp	x1, l_.str.3@PAGE
Lloh48:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_strncat
LBB0_17:
Lloh49:
	adrp	x8, _KNOWNREF@GOTPAGE
Lloh50:
	ldr	x8, [x8, _KNOWNREF@GOTPAGEOFF]
Lloh51:
	ldr	x8, [x8]
	str	x8, [sp]
Lloh52:
	adrp	x0, l_.str.7@PAGE
Lloh53:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_printf
	str	x19, [sp]
Lloh54:
	adrp	x0, l_.str.8@PAGE
Lloh55:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_printf
Lloh56:
	adrp	x0, l_str@PAGE
Lloh57:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to allocate memory\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s"

l_.str.2:                               ; @.str.2
	.asciz	"%s/%s"

	.comm	_KNOWNREF,8,3                   ; @KNOWNREF
l_.str.3:                               ; @.str.3
	.asciz	"\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s/test"

l_.str.5:                               ; @.str.5
	.asciz	"%s/%s/test"

	.comm	_PROGRAM,8,3                    ; @PROGRAM
l_.str.6:                               ; @.str.6
	.asciz	"/usr/obj"

l_.str.7:                               ; @.str.7
	.asciz	"Unable to locate known reference file %s\n"

l_.str.8:                               ; @.str.8
	.asciz	"  Checked following directories:\n%s\n"

	.comm	_LIBRARY,8,3                    ; @LIBRARY
	.comm	_PATH_MAX,8,3                   ; @PATH_MAX
	.comm	_PROGRAM_ALIAS,8,3              ; @PROGRAM_ALIAS
l_str:                                  ; @str
	.asciz	"Use -r option to specify full path to reference directory"

	.no_dead_strip	_get_refdir
.subsections_via_symbols
