	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_filemap                        ## -- Begin function filemap
	.p2align	4, 0x90
_filemap:                               ## @filemap
	.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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_BINARY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_topen
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movl	%eax, %r14d
	leaq	-64(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	js	LBB0_6
## %bb.2:
	movl	-56(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movq	-64(%rbp), %r13
	movq	_XML_MAX_CHUNK_LEN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jbe	LBB0_12
## %bb.4:
	movl	%r14d, %edi
	callq	_close
	movl	$2, %eax
	jmp	LBB0_11
LBB0_5:
	movq	%rbx, %rdi
	callq	_tperror
	jmp	LBB0_10
LBB0_6:
	movq	%rbx, %rdi
	callq	_tperror
	jmp	LBB0_9
LBB0_7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str(%rip), %rdi
LBB0_8:
	callq	_T
	movl	%r15d, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_ftprintf
LBB0_9:
	movl	%r14d, %edi
	callq	_close
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	testq	%r13, %r13
	je	LBB0_17
## %bb.13:
	movq	%r13, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.14:
	movl	%r14d, %edi
	movq	%rax, %rsi
	movl	%r13d, %edx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	__EXPAT_read
	testq	%rax, %rax
	js	LBB0_20
## %bb.15:
	cmpq	%r13, %rax
	jne	LBB0_21
## %bb.16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	*%r15
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	jmp	LBB0_18
LBB0_17:
	leaq	_filemap.c(%rip), %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	*%r15
LBB0_18:
	movl	%r14d, %edi
	callq	_close
	movl	$1, %eax
	jmp	LBB0_11
LBB0_19:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_8
LBB0_20:
	movq	%rbx, %rdi
	callq	_tperror
	jmp	LBB0_22
LBB0_21:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str.2(%rip), %rdi
	callq	_T
	movl	%r15d, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_ftprintf
LBB0_22:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_BINARY,4,2                   ## @O_BINARY
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: not a regular file\n"

	.comm	_XML_MAX_CHUNK_LEN,8,3          ## @XML_MAX_CHUNK_LEN
	.section	__TEXT,__const
_filemap.c:                             ## @filemap.c
	.byte	0                               ## 0x0

	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"%s: out of memory\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: read unexpected number of bytes\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_filemap                        ; -- Begin function filemap
	.p2align	2
_filemap:                               ; @filemap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_BINARY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_BINARY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_topen
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x1, sp
	bl	_fstat
	tbnz	x0, #63, LBB0_6
; %bb.2:
	ldr	w0, [sp, #8]
	bl	_S_ISREG
	cbz	w0, LBB0_7
; %bb.3:
	ldr	x24, [sp]
Lloh6:
	adrp	x8, _XML_MAX_CHUNK_LEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XML_MAX_CHUNK_LEN@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x24, x8
	b.ls	LBB0_12
; %bb.4:
	mov	x0, x19
	bl	_close
	mov	w0, #2
	b	LBB0_11
LBB0_5:
	mov	x0, x20
	bl	_tperror
	b	LBB0_10
LBB0_6:
	mov	x0, x20
	bl	_tperror
	b	LBB0_9
LBB0_7:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
LBB0_8:
	bl	_T
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	bl	_ftprintf
LBB0_9:
	mov	x0, x19
	bl	_close
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_12:
	cbz	x24, LBB0_17
; %bb.13:
	mov	x0, x24
	bl	_malloc
	cbz	x0, LBB0_19
; %bb.14:
	mov	x23, x0
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	bl	__EXPAT_read
	tbnz	x0, #63, LBB0_20
; %bb.15:
	cmp	x0, x24
	b.ne	LBB0_21
; %bb.16:
	mov	x0, x23
	mov	x1, x24
	mov	x2, x20
	mov	x3, x22
	blr	x21
	mov	x0, x23
	bl	_free
	b	LBB0_18
LBB0_17:
Lloh14:
	adrp	x0, _filemap.c@PAGE
Lloh15:
	add	x0, x0, _filemap.c@PAGEOFF
	mov	x1, #0
	mov	x2, x20
	mov	x3, x22
	blr	x21
LBB0_18:
	mov	x0, x19
	bl	_close
	mov	w0, #1
	b	LBB0_11
LBB0_19:
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_20:
	mov	x0, x20
	bl	_tperror
	b	LBB0_22
LBB0_21:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w21, [x8]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_T
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	bl	_ftprintf
LBB0_22:
	mov	x0, x23
	bl	_free
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_BINARY,4,2                   ; @O_BINARY
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: not a regular file\n"

	.comm	_XML_MAX_CHUNK_LEN,8,3          ; @XML_MAX_CHUNK_LEN
	.section	__TEXT,__const
_filemap.c:                             ; @filemap.c
	.byte	0                               ; 0x0

	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"%s: out of memory\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: read unexpected number of bytes\n"

.subsections_via_symbols
