	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dtc_open_file                  ## -- Begin function dtc_open_file
	.p2align	4, 0x90
_dtc_open_file:                         ## @dtc_open_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	%rsi, %r15
	movq	%rdi, %r12
	movl	$24, %edi
	callq	_xmalloc
	movq	%rax, %r14
	movq	%r12, %rdi
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	subq	%r12, %rbx
	leal	1(%rbx), %edi
	callq	_xmalloc
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movb	$0, (%r13,%rbx)
	jmp	LBB0_3
LBB0_1:
	xorl	%r13d, %r13d
LBB0_3:
	movq	%r13, (%r14)
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_streq
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, 8(%r14)
	movq	_stdin@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	jmp	LBB0_14
LBB0_5:
	cmpb	$47, (%r12)
	jne	LBB0_9
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_fopen
	movl	%eax, 16(%r14)
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	%r12, %rdi
	callq	_strdup
	movq	%rax, 8(%r14)
	jmp	LBB0_14
LBB0_9:
	testq	%r15, %r15
	leaq	_dtc_open_file.default_search(%rip), %rbx
	cmovneq	%r15, %rbx
	movq	_errno@GOTPCREL(%rip), %r15
	movq	_ENOENT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_dtc_open_one
	testq	%rax, %rax
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r15), %rdi
	cmpq	(%r13), %rdi
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_10
	jmp	LBB0_13
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_13:
	callq	_strerror
	leaq	L_.str.3(%rip), %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_die
LBB0_14:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	3                               ## @dtc_open_file.default_search
_dtc_open_file.default_search:
	.space	40

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-"

L_.str.1:                               ## @.str.1
	.asciz	"stdin"

	.comm	_stdin,4,2                      ## @stdin
L_.str.2:                               ## @.str.2
	.asciz	"r"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
L_.str.3:                               ## @.str.3
	.asciz	"Couldn't open \"%s\": %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dtc_open_file                  ; -- Begin function dtc_open_file
	.p2align	2
_dtc_open_file:                         ; @dtc_open_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	x21, x1
	mov	x20, x0
	mov	w0, #24
	bl	_xmalloc
	mov	x19, x0
	mov	x0, x20
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_2
; %bb.1:
	sub	x23, x0, x20
	add	w0, w23, #1
	bl	_xmalloc
	mov	x22, x0
	mov	x1, x20
	mov	x2, x23
	bl	_memcpy
	strb	wzr, [x22, x23]
	b	LBB0_3
LBB0_2:
	mov	x22, #0
LBB0_3:
	str	x22, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_streq
	cbz	x0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x19, #8]
Lloh4:
	adrp	x8, _stdin@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	b	LBB0_14
LBB0_5:
	ldrb	w8, [x20]
	cmp	w8, #47
	b.ne	LBB0_8
; %bb.6:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fopen
	str	w0, [x19, #16]
	cbz	w0, LBB0_12
; %bb.7:
	mov	x0, x20
	bl	_strdup
	str	x0, [x19, #8]
	b	LBB0_14
LBB0_8:
Lloh9:
	adrp	x8, _dtc_open_file.default_search@PAGE
Lloh10:
	add	x8, x8, _dtc_open_file.default_search@PAGEOFF
	cmp	x21, #0
	csel	x21, x8, x21, eq
Lloh11:
	adrp	x22, _errno@GOTPAGE
Lloh12:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
Lloh13:
	adrp	x23, _ENOENT@GOTPAGE
Lloh14:
	ldr	x23, [x23, _ENOENT@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21, #8]
	mov	x0, x19
	mov	x2, x20
	bl	_dtc_open_one
	cbnz	x0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x0, [x22]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x21, [x21]
	cbnz	x21, LBB0_9
	b	LBB0_13
LBB0_12:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	x0, [x8]
LBB0_13:
	bl	_strerror
	mov	x2, x0
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_die
LBB0_14:
	mov	x0, x19
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	3                               ; @dtc_open_file.default_search
_dtc_open_file.default_search:
	.space	40

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-"

l_.str.1:                               ; @.str.1
	.asciz	"stdin"

	.comm	_stdin,4,2                      ; @stdin
l_.str.2:                               ; @.str.2
	.asciz	"r"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
l_.str.3:                               ; @.str.3
	.asciz	"Couldn't open \"%s\": %s\n"

.subsections_via_symbols
