	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_whole_file
_read_whole_file:                       ## @read_whole_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r14
	leaq	-56(%rbp), %rsi
	movl	%r12d, %edi
	callq	_fstat
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.1:
	cmpq	$0, (%r14)
	jne	LBB0_5
## %bb.2:
	movl	-52(%rbp), %edi
	callq	_S_ISREG
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	$1, (%r15)
	movslq	-56(%rbp), %rsi
	movq	%rsi, (%rbx)
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	movl	%r12d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, 8(%rbx)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_4:
	cmpq	$0, (%r14)
	je	LBB0_14
LBB0_5:
	movl	%r12d, %edi
	callq	_dup
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.6:
	movl	%eax, %r12d
	movq	%r15, %r13
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_gzdopen
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	movq	%rax, %r15
	jmp	LBB0_15
LBB0_8:
	movq	_MANDOCERR_FSTAT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_MANDOCERR_DUP@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rcx
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_mandoc_msg
LBB0_11:
	movl	$-1, %r13d
LBB0_12:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_MANDOCERR_GZDOPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rcx
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_mandoc_msg
	movl	%r12d, %edi
	callq	_close
	jmp	LBB0_11
LBB0_14:
	movq	%r15, %r13
	xorl	%r15d, %r15d
LBB0_15:
	movl	$0, (%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	cmpq	%rax, %r13
	jne	LBB0_18
	.p2align	4, 0x90
LBB0_16:
	movl	$2147483648, %ecx               ## imm = 0x80000000
	cmpq	%rcx, %rax
	je	LBB0_28
## %bb.17:
	movq	%rbx, %rdi
	movl	$65536, %esi                    ## imm = 0x10000
	callq	_resize_buf
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movslq	%r13d, %rsi
	movq	(%rbx), %rdx
	subq	%r13, %rdx
	addq	8(%rbx), %rsi
	cmpq	$0, (%r14)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r15, %rdi
	callq	_gzread
	cmpl	$-1, %eax
	jne	LBB0_21
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	movl	%r12d, %edi
	callq	_read
	cmpl	$-1, %eax
	je	LBB0_23
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=1
	testl	%eax, %eax
	je	LBB0_27
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=1
	cltq
	addq	%rax, %r13
	movq	(%rbx), %rax
	cmpq	%rax, %r13
	je	LBB0_16
	jmp	LBB0_18
LBB0_23:
	cmpq	$0, (%r14)
	je	LBB0_29
## %bb.24:
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_gzerror
	movq	_MANDOCERR_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	cmpq	$0, (%r14)
	je	LBB0_30
## %bb.25:
	movl	-44(%rbp), %edi
	movq	_Z_ERRNO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	je	LBB0_30
## %bb.26:
	callq	_zError
	jmp	LBB0_31
LBB0_27:
	movq	%r13, (%rbx)
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	cmpq	$0, (%r14)
	jne	LBB0_33
	jmp	LBB0_38
LBB0_28:
	movq	_MANDOCERR_TOOLARGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	callq	_mandoc_msg
	jmp	LBB0_32
LBB0_29:
	movq	_MANDOCERR_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_30:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
LBB0_31:
	leaq	L_.str(%rip), %rcx
	movl	%r12d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_mandoc_msg
LBB0_32:
	movl	$-1, %r13d
	movb	$1, %r12b
	cmpq	$0, (%r14)
	je	LBB0_38
LBB0_33:
	movq	%r15, %rdi
	callq	_gzclose
	movl	%eax, -44(%rbp)
	movq	_Z_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_38
## %bb.34:
	movq	_MANDOCERR_GZCLOSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movq	_Z_ERRNO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_36
## %bb.35:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	jmp	LBB0_37
LBB0_36:
	movl	%eax, %edi
	callq	_zError
LBB0_37:
	leaq	L_.str(%rip), %rcx
	movl	%r14d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_mandoc_msg
LBB0_38:
	testb	%r12b, %r12b
	je	LBB0_12
## %bb.39:
	movq	8(%rbx), %rdi
	callq	_free
	movq	$0, 8(%rbx)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MANDOCERR_FSTAT,4,2            ## @MANDOCERR_FSTAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_errno,4,2                      ## @errno
	.comm	_MANDOCERR_TOOLARGE,4,2         ## @MANDOCERR_TOOLARGE
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_MANDOCERR_DUP,4,2              ## @MANDOCERR_DUP
L_.str.1:                               ## @.str.1
	.asciz	"rb"

	.comm	_MANDOCERR_GZDOPEN,4,2          ## @MANDOCERR_GZDOPEN
	.comm	_MANDOCERR_READ,4,2             ## @MANDOCERR_READ
	.comm	_Z_ERRNO,4,2                    ## @Z_ERRNO
	.comm	_Z_OK,4,2                       ## @Z_OK
	.comm	_MANDOCERR_GZCLOSE,4,2          ## @MANDOCERR_GZCLOSE
	.no_dead_strip	_read_whole_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_whole_file
_read_whole_file:                       ; @read_whole_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x24, x3
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	add	x1, sp, #24
	mov	x0, x22
	bl	_fstat
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.1:
	ldr	x8, [x20]
	cbnz	x8, LBB0_5
; %bb.2:
	ldr	w0, [sp, #28]
	bl	_S_ISREG
	cbz	x0, LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x24]
	ldrsw	x1, [sp, #24]
	str	x1, [x19]
Lloh0:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x4, x22
	mov	w5, #0
	bl	_mmap
	mov	w23, #0
	str	x0, [x19, #8]
Lloh6:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
LBB0_4:
	ldr	x8, [x20]
	cbz	x8, LBB0_14
LBB0_5:
	mov	x0, x22
	bl	_dup
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.6:
	mov	x22, x0
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_gzdopen
	cbz	x0, LBB0_13
; %bb.7:
	mov	x21, x0
	b	LBB0_15
LBB0_8:
Lloh11:
	adrp	x8, _MANDOCERR_FSTAT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MANDOCERR_FSTAT@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x8, _MANDOCERR_DUP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MANDOCERR_DUP@GOTPAGEOFF]
LBB0_10:
	ldr	w19, [x8]
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh18:
	adrp	x3, l_.str@PAGE
Lloh19:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_mandoc_msg
LBB0_11:
	mov	w23, #-1
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
Lloh20:
	adrp	x8, _MANDOCERR_GZDOPEN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MANDOCERR_GZDOPEN@GOTPAGEOFF]
Lloh22:
	ldr	w19, [x8]
Lloh23:
	adrp	x8, _errno@GOTPAGE
Lloh24:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh26:
	adrp	x3, l_.str@PAGE
Lloh27:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_mandoc_msg
	mov	x0, x22
	bl	_close
	b	LBB0_11
LBB0_14:
	mov	x21, #0
LBB0_15:
	mov	x8, #0
	mov	x25, #0
	str	wzr, [x24]
	mov	w23, #-2147483648
	stp	xzr, xzr, [x19]
	cmp	x25, x8
	b.ne	LBB0_18
LBB0_16:
	cmp	x8, x23
	b.eq	LBB0_28
; %bb.17:
	mov	x0, x19
	mov	w1, #65536
	bl	_resize_buf
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldp	x10, x9, [x19]
	add	x1, x9, w25, sxtw
	sub	x2, x10, x25
	cbz	x8, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x21
	bl	_gzread
	cmn	w0, #1
	b.ne	LBB0_21
	b	LBB0_23
LBB0_20:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x22
	bl	_read
	cmn	w0, #1
	b.eq	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_18 Depth=1
	cbz	w0, LBB0_27
; %bb.22:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x25, x25, w0, sxtw
	ldr	x8, [x19]
	cmp	x25, x8
	b.eq	LBB0_16
	b	LBB0_18
LBB0_23:
	ldr	x8, [x20]
	cbz	x8, LBB0_29
; %bb.24:
	add	x1, sp, #20
	mov	x0, x21
	bl	_gzerror
	ldr	x8, [x20]
Lloh28:
	adrp	x9, _MANDOCERR_READ@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MANDOCERR_READ@GOTPAGEOFF]
Lloh30:
	ldr	w22, [x9]
	cbz	x8, LBB0_30
; %bb.25:
	ldr	w0, [sp, #20]
Lloh31:
	adrp	x8, _Z_ERRNO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _Z_ERRNO@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_30
; %bb.26:
	bl	_zError
	b	LBB0_31
LBB0_27:
	mov	w22, #0
	mov	w23, #0
	str	x25, [x19]
	ldr	x8, [x20]
	cbnz	x8, LBB0_33
	b	LBB0_38
LBB0_28:
Lloh34:
	adrp	x8, _MANDOCERR_TOOLARGE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MANDOCERR_TOOLARGE@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #0
	mov	x3, #0
	b	LBB0_32
LBB0_29:
Lloh37:
	adrp	x8, _MANDOCERR_READ@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MANDOCERR_READ@GOTPAGEOFF]
Lloh39:
	ldr	w22, [x8]
LBB0_30:
Lloh40:
	adrp	x8, _errno@GOTPAGE
Lloh41:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	bl	_strerror
LBB0_31:
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh43:
	adrp	x3, l_.str@PAGE
Lloh44:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x22
	mov	w1, #0
	mov	w2, #0
LBB0_32:
	bl	_mandoc_msg
	mov	w23, #-1
	mov	w22, #1
	ldr	x8, [x20]
	cbz	x8, LBB0_38
LBB0_33:
	mov	x0, x21
	bl	_gzclose
	str	w0, [sp, #20]
Lloh45:
	adrp	x8, _Z_OK@GOTPAGE
Lloh46:
	ldr	x8, [x8, _Z_OK@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_38
; %bb.34:
Lloh48:
	adrp	x8, _MANDOCERR_GZCLOSE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _MANDOCERR_GZCLOSE@GOTPAGEOFF]
Lloh50:
	ldr	w20, [x8]
Lloh51:
	adrp	x8, _Z_ERRNO@GOTPAGE
Lloh52:
	ldr	x8, [x8, _Z_ERRNO@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_36
; %bb.35:
Lloh54:
	adrp	x8, _errno@GOTPAGE
Lloh55:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh56:
	ldr	w0, [x8]
	bl	_strerror
	b	LBB0_37
LBB0_36:
	bl	_zError
LBB0_37:
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh57:
	adrp	x3, l_.str@PAGE
Lloh58:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	bl	_mandoc_msg
LBB0_38:
	cbz	w22, LBB0_12
; %bb.39:
	ldr	x0, [x19, #8]
	bl	_free
	str	xzr, [x19, #8]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_MANDOCERR_FSTAT,4,2            ; @MANDOCERR_FSTAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_errno,4,2                      ; @errno
	.comm	_MANDOCERR_TOOLARGE,4,2         ; @MANDOCERR_TOOLARGE
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_MANDOCERR_DUP,4,2              ; @MANDOCERR_DUP
l_.str.1:                               ; @.str.1
	.asciz	"rb"

	.comm	_MANDOCERR_GZDOPEN,4,2          ; @MANDOCERR_GZDOPEN
	.comm	_MANDOCERR_READ,4,2             ; @MANDOCERR_READ
	.comm	_Z_ERRNO,4,2                    ; @Z_ERRNO
	.comm	_Z_OK,4,2                       ; @Z_OK
	.comm	_MANDOCERR_GZCLOSE,4,2          ; @MANDOCERR_GZCLOSE
	.no_dead_strip	_read_whole_file
.subsections_via_symbols
