	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mparse_readfd                  ## -- Begin function mparse_readfd
	.p2align	4, 0x90
_mparse_readfd:                         ## @mparse_readfd
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpl	$65, _mparse_readfd.recursion_depth(%rip)
	jl	LBB0_2
## %bb.1:
	movq	_MANDOCERR_ROFFLOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mandoc_msg                     ## TAILCALL
LBB0_2:
	movq	%rdx, %r12
	leaq	-72(%rbp), %r13
	leaq	-52(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r13, %rdx
	callq	_read_whole_file
	cmpl	$-1, %eax
	je	LBB0_19
## %bb.3:
	movq	16(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_mandoc_msg_getinfilename
	movq	%rax, %r14
	movq	%r13, 16(%rbx)
	movq	_MPARSE_UTF8@GOTPCREL(%rip), %r13
	movq	_MPARSE_LATIN1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r13), %eax
	andl	8(%rbx), %eax
	movl	%eax, 4(%rbx)
	movl	$1, (%rbx)
	movq	%r12, %rdi
	callq	_mandoc_msg_setinfilename
	movl	4(%rbx), %eax
	movl	-72(%rbp), %esi
	movq	-64(%rbp), %rdx
	testl	%eax, (%r13)
	je	LBB0_12
## %bb.4:
	cmpl	$3, %esi
	jl	LBB0_12
## %bb.5:
	cmpb	$-17, (%rdx)
	jne	LBB0_11
## %bb.6:
	cmpb	$-69, 8(%rdx)
	jne	LBB0_11
## %bb.7:
	cmpb	$-65, 16(%rdx)
	jne	LBB0_11
## %bb.8:
	movq	_MPARSE_LATIN1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 4(%rbx)
	movl	$3, %r15d
	jmp	LBB0_12
LBB0_11:
	xorl	%r15d, %r15d
LBB0_12:
	incl	_mparse_readfd.recursion_depth(%rip)
	movq	%rbx, %rdi
	movq	%r15, %rcx
	movl	$1, %r8d
	callq	_mparse_buf_r
	decl	_mparse_readfd.recursion_depth(%rip)
	jne	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	callq	_mparse_end
LBB0_14:
	cmpl	$0, -52(%rbp)
	movq	-64(%rbp), %rdi
	je	LBB0_16
## %bb.15:
	movl	-72(%rbp), %esi
	callq	_munmap
	jmp	LBB0_17
LBB0_16:
	callq	_free
LBB0_17:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%rbx)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	testq	%r14, %r14
	je	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	_mandoc_msg_setinfilename
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_mparse_readfd.recursion_depth,4,2 ## @mparse_readfd.recursion_depth
	.comm	_MANDOCERR_ROFFLOOP,4,2         ## @MANDOCERR_ROFFLOOP
	.comm	_MPARSE_UTF8,4,2                ## @MPARSE_UTF8
	.comm	_MPARSE_LATIN1,4,2              ## @MPARSE_LATIN1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mparse_readfd                  ; -- Begin function mparse_readfd
	.p2align	2
_mparse_readfd:                         ; @mparse_readfd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	mov	x19, x0
	adrp	x23, _mparse_readfd.recursion_depth@PAGE
	ldr	w8, [x23, _mparse_readfd.recursion_depth@PAGEOFF]
	cmp	w8, #65
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MANDOCERR_ROFFLOOP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MANDOCERR_ROFFLOOP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19]
	mov	w2, #0
	mov	x3, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_mandoc_msg
LBB0_2:
	mov	x21, x2
	add	x24, sp, #16
	add	x2, sp, #16
	add	x3, sp, #12
	mov	x0, x19
	bl	_read_whole_file
	cmn	w0, #1
	b.eq	LBB0_17
; %bb.3:
	ldr	x22, [x19, #16]
	ldr	d8, [x19]
	bl	_mandoc_msg_getinfilename
	mov	x20, x0
	str	x24, [x19, #16]
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x25, _MPARSE_UTF8@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MPARSE_UTF8@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh5:
	adrp	x24, _MPARSE_LATIN1@GOTPAGE
Lloh6:
	ldr	x24, [x24, _MPARSE_LATIN1@GOTPAGEOFF]
	ldr	w10, [x24]
	orr	w9, w10, w9
	and	w8, w9, w8
	mov	w9, #1
	stp	w9, w8, [x19]
	mov	x0, x21
	bl	_mandoc_msg_setinfilename
	ldr	w8, [x19, #4]
	ldr	w9, [x25]
	and	w9, w9, w8
	ldr	w10, [sp, #16]
	cmp	w9, #0
	ccmp	w10, #2, #4, ne
	b.gt	LBB0_5
; %bb.4:
	mov	x3, #0
	ldr	x2, [sp, #24]
	b	LBB0_10
LBB0_5:
	ldr	x2, [sp, #24]
	ldrb	w9, [x2]
	cmp	x9, #239
	b.ne	LBB0_9
; %bb.6:
	ldrb	w9, [x2, #8]
	cmp	x9, #187
	b.ne	LBB0_9
; %bb.7:
	ldrb	w9, [x2, #16]
	cmp	x9, #191
	b.ne	LBB0_9
; %bb.8:
	ldr	w9, [x24]
	bic	w8, w8, w9
	str	w8, [x19, #4]
	mov	w3, #3
	b	LBB0_10
LBB0_9:
	mov	x3, #0
LBB0_10:
	ldr	w8, [x23, _mparse_readfd.recursion_depth@PAGEOFF]
	add	w8, w8, #1
	str	w8, [x23, _mparse_readfd.recursion_depth@PAGEOFF]
	ldr	x1, [sp, #16]
	mov	x0, x19
	mov	w4, #1
	bl	_mparse_buf_r
	ldr	w8, [x23, _mparse_readfd.recursion_depth@PAGEOFF]
	subs	w8, w8, #1
	str	w8, [x23, _mparse_readfd.recursion_depth@PAGEOFF]
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_mparse_end
LBB0_12:
	ldr	w8, [sp, #12]
	ldr	x0, [sp, #24]
	cbz	w8, LBB0_14
; %bb.13:
	ldr	w1, [sp, #16]
	bl	_munmap
	b	LBB0_15
LBB0_14:
	bl	_free
LBB0_15:
	str	x22, [x19, #16]
	str	d8, [x19]
	cbz	x20, LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_mandoc_msg_setinfilename
LBB0_17:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_mparse_readfd.recursion_depth,4,2 ; @mparse_readfd.recursion_depth
	.comm	_MANDOCERR_ROFFLOOP,4,2         ; @MANDOCERR_ROFFLOOP
	.comm	_MPARSE_UTF8,4,2                ; @MPARSE_UTF8
	.comm	_MPARSE_LATIN1,4,2              ; @MPARSE_LATIN1
.subsections_via_symbols
