	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _mdfd_openseg
__mdfd_openseg:                         ## @_mdfd_openseg
	.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
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	__mdfd_segpath
	movq	%rax, %r13
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_PG_BINARY@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_PathNameOpenFile
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_pfree
	testl	%ebx, %ebx
	js	LBB0_1
## %bb.2:
	movq	(%r12), %rax
	cmpl	%r15d, (%rax,%r14,4)
	jl	LBB0_4
## %bb.3:
	leal	1(%r15), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	__fdvec_resize
LBB0_4:
	movq	8(%r12), %rax
	movq	(%rax,%r14,8), %rax
	movslq	%r15d, %rcx
	leaq	(%rax,%rcx,8), %r13
	movl	%ebx, (%rax,%rcx,8)
	movl	%r15d, 4(%rax,%rcx,8)
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	__mdnblocks
	movq	_RELSEG_SIZE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	setle	%dil
	callq	_Assert
	jmp	LBB0_5
LBB0_1:
	xorl	%r13d, %r13d
LBB0_5:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_PG_BINARY,4,2                  ## @PG_BINARY
	.comm	_RELSEG_SIZE,8,3                ## @RELSEG_SIZE
	.no_dead_strip	__mdfd_openseg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _mdfd_openseg
__mdfd_openseg:                         ; @_mdfd_openseg
	.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	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	__mdfd_segpath
	mov	x23, x0
Lloh0:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PG_BINARY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PG_BINARY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w8, w22
	orr	w1, w8, w9
	bl	_PathNameOpenFile
	mov	x22, x0
	mov	x0, x23
	bl	_pfree
	tbnz	w22, #31, LBB0_4
; %bb.1:
	ldr	x8, [x20]
	ldr	w8, [x8, x19, lsl #2]
	cmp	w8, w21
	b.lt	LBB0_3
; %bb.2:
	add	w2, w21, #1
	mov	x0, x20
	mov	x1, x19
	bl	__fdvec_resize
LBB0_3:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x19, lsl #3]
	add	x23, x8, w21, sxtw #3
	stp	w22, w21, [x23]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	__mdnblocks
Lloh6:
	adrp	x8, _RELSEG_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RELSEG_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, le
	bl	_Assert
	b	LBB0_5
LBB0_4:
	mov	x23, #0
LBB0_5:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_PG_BINARY,4,2                  ; @PG_BINARY
	.comm	_RELSEG_SIZE,8,3                ; @RELSEG_SIZE
	.no_dead_strip	__mdfd_openseg
.subsections_via_symbols
