	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function md_set_file
_md_set_file:                           ## @md_set_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_mdio@GOTPCREL(%rip), %r15
	movl	8(%r15), %esi
	callq	_realpath
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_err
LBB0_2:
	movl	8(%r15), %edi
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_err
LBB0_4:
	leaq	-40(%rbp), %rsi
	movl	%ebx, %edi
	callq	_fstat
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_err
LBB0_6:
	movl	-32(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	cmpq	$0, (%r15)
	je	LBB0_9
LBB0_10:
	movl	%ebx, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_close                          ## TAILCALL
LBB0_7:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_errx
	cmpq	$0, (%r15)
	jne	LBB0_10
LBB0_9:
	movq	-40(%rbp), %rax
	movq	%rax, (%r15)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_mdio,16,3                      ## @mdio
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not find full path for %s"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"could not open %s"

L_.str.2:                               ## @.str.2
	.asciz	"could not stat %s"

L_.str.3:                               ## @.str.3
	.asciz	"%s is not a regular file"

	.no_dead_strip	_md_set_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function md_set_file
_md_set_file:                           ; @md_set_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _mdio@GOTPAGE
Lloh1:
	ldr	x21, [x21, _mdio@GOTPAGEOFF]
	ldr	w1, [x21, #8]
	bl	_realpath
	cbnz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_2:
	ldr	w0, [x21, #8]
Lloh4:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_open
	mov	x20, x0
	tbz	w0, #31, LBB0_4
; %bb.3:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_4:
	mov	x1, sp
	mov	x0, x20
	bl	_fstat
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_6:
	ldr	w0, [sp, #8]
	bl	_S_ISREG
	cbz	w0, LBB0_9
; %bb.7:
	ldr	x8, [x21]
	cbz	x8, LBB0_10
LBB0_8:
	mov	x0, x20
	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
	add	sp, sp, #64
	b	_close
LBB0_9:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_errx
	ldr	x8, [x21]
	cbnz	x8, LBB0_8
LBB0_10:
	ldr	x8, [sp]
	str	x8, [x21]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_mdio,16,3                      ; @mdio
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not find full path for %s"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"could not open %s"

l_.str.2:                               ; @.str.2
	.asciz	"could not stat %s"

l_.str.3:                               ; @.str.3
	.asciz	"%s is not a regular file"

	.no_dead_strip	_md_set_file
.subsections_via_symbols
