	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_open_source_file               ## -- Begin function open_source_file
	.p2align	4, 0x90
_open_source_file:                      ## @open_source_file
	.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
	movq	_source_path@GOTPCREL(%rip), %r13
	movq	(%r13), %r14
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	_OPEN_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_15
## %bb.2:
	movq	(%r12), %rsi
	movq	24(%r12), %rax
	movl	(%rax), %edi
	callq	_xmfree
	movq	$0, (%r12)
LBB0_3:
	cmpq	$0, 8(%r12)
	je	LBB0_11
## %bb.4:
	movq	(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movq	%rax, %r15
	cmpq	%rax, %r14
	je	LBB0_6
## %bb.7:
	movb	-1(%r15), %al
	movq	_DIRNAME_SEPARATOR@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	je	LBB0_8
	jmp	LBB0_11
LBB0_6:
	movq	_DIRNAME_SEPARATOR@GOTPCREL(%rip), %rax
	movb	(%rax), %al
LBB0_8:
	movb	5(%r15), %cl
	testb	%cl, %cl
	je	LBB0_10
## %bb.9:
	cmpb	%al, %cl
	jne	LBB0_11
LBB0_10:
	movq	(%r13), %rdi
	callq	_strlen
	movq	%rax, %rbx
	movq	8(%r12), %rdi
	callq	_strlen
	leaq	(%rbx,%rax), %rdi
	addq	$2, %rdi
	callq	_alloca
	movq	%rax, %r14
	movq	(%r13), %rsi
	subq	%rsi, %r15
	movq	%rax, %rdi
	movl	%r15d, %edx
	callq	_strncpy
	movslq	%r15d, %r15
	movq	%r14, %rbx
	addq	%r15, %rbx
	movq	8(%r12), %rsi
	movq	%rbx, %rdi
	callq	_strcpy
	movq	(%r13), %rax
	leaq	(%rax,%r15), %rsi
	addq	$5, %rsi
	movq	%rbx, %rdi
	callq	_strcat
LBB0_11:
	movq	16(%r12), %rdx
	movq	_OPEN_MODE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	movq	%r12, %r9
	callq	_openp
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_12
LBB0_14:
	movq	(%r12), %r14
	movq	24(%r12), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_mstrsave
	movq	%rax, (%r12)
	movq	%r14, %rdi
	callq	_xfree
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	16(%r12), %rdi
	callq	_lbasename
	cmpq	16(%r12), %rax
	je	LBB0_15
## %bb.13:
	movl	(%r15), %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rax, %rdx
	xorl	%r8d, %r8d
	movq	%r12, %r9
	callq	_openp
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_14
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_source_path,8,3                ## @source_path
	.comm	_OPEN_MODE,4,2                  ## @OPEN_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"$cdir"

	.comm	_DIRNAME_SEPARATOR,1,0          ## @DIRNAME_SEPARATOR
	.comm	_cdir_len,8,3                   ## @cdir_len
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_open_source_file               ; -- Begin function open_source_file
	.p2align	2
_open_source_file:                      ; @open_source_file
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x23, _source_path@GOTPAGE
Lloh1:
	ldr	x23, [x23, _source_path@GOTPAGEOFF]
	ldr	x20, [x23]
	ldr	x0, [x0]
Lloh2:
	adrp	x22, _OPEN_MODE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _OPEN_MODE@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w1, [x22]
	bl	_open
	mov	x21, x0
	tbz	w0, #31, LBB0_12
; %bb.2:
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	ldr	x1, [x19]
	bl	_xmfree
	str	xzr, [x19]
LBB0_3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.4:
	ldr	x0, [x23]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_10
; %bb.5:
	mov	x21, x0
	cmp	x20, x0
	b.eq	LBB0_7
; %bb.6:
	ldurb	w8, [x21, #-1]
Lloh6:
	adrp	x9, _DIRNAME_SEPARATOR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DIRNAME_SEPARATOR@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_8
	b	LBB0_10
LBB0_7:
Lloh8:
	adrp	x8, _DIRNAME_SEPARATOR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DIRNAME_SEPARATOR@GOTPAGEOFF]
	ldrb	w8, [x8]
LBB0_8:
	ldrb	w9, [x21, #5]
	cmp	w9, #0
	ccmp	w9, w8, #4, ne
	b.ne	LBB0_10
; %bb.9:
	ldr	x0, [x23]
	bl	_strlen
	mov	x20, x0
	ldr	x0, [x19, #8]
	bl	_strlen
	add	x8, x20, x0
	add	x0, x8, #2
	bl	_alloca
	mov	x20, x0
	ldr	x1, [x23]
	sub	x21, x21, x1
	mov	x2, x21
	bl	_strncpy
	sxtw	x24, w21
	add	x21, x20, x24
	ldr	x1, [x19, #8]
	mov	x0, x21
	bl	_strcpy
	ldr	x8, [x23]
	add	x8, x8, x24
	add	x1, x8, #5
	mov	x0, x21
	bl	_strcat
LBB0_10:
	ldr	x2, [x19, #16]
	ldr	w3, [x22]
	mov	x0, x20
	mov	w1, #0
	mov	w4, #0
	mov	x5, x19
	bl	_openp
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
LBB0_11:
	ldr	x20, [x19]
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_mstrsave
	str	x0, [x19]
	mov	x0, x20
	bl	_xfree
LBB0_12:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	x0, [x19, #16]
	bl	_lbasename
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.eq	LBB0_12
; %bb.14:
	mov	x2, x0
	ldr	w3, [x22]
	mov	x0, x20
	mov	w1, #0
	mov	w4, #0
	mov	x5, x19
	bl	_openp
	mov	x21, x0
	tbz	w0, #31, LBB0_11
	b	LBB0_12
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_source_path,8,3                ; @source_path
	.comm	_OPEN_MODE,4,2                  ; @OPEN_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"$cdir"

	.comm	_DIRNAME_SEPARATOR,1,0          ; @DIRNAME_SEPARATOR
	.comm	_cdir_len,8,3                   ; @cdir_len
.subsections_via_symbols
