	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_map_file                       ## -- Begin function map_file
	.p2align	4, 0x90
_map_file:                              ## @map_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	$0, -24(%rbp)
	movl	(%rdi), %edi
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$384, %edx                      ## imm = 0x180
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.3:
	movl	%eax, %ebx
	leaq	-24(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movl	-24(%rbp), %esi
	movl	%esi, 8(%r14)
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movl	%ebx, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movl	%eax, 4(%r14)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.7:
	movl	%ebx, %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_close                          ## TAILCALL
LBB0_1:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_6:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
LBB0_2:
	callq	_ERR
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error while opening file %s."

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
L_.str.1:                               ## @.str.1
	.asciz	"Error getting file size for %s."

	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,4,2                 ## @MAP_FAILED
L_.str.2:                               ## @.str.2
	.asciz	"Error mapping file %s."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_map_file                       ; -- Begin function map_file
	.p2align	2
_map_file:                              ; @map_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	xzr, [sp, #8]
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #384
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x20, x0
	add	x1, sp, #8
	bl	_fstat
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.2:
	ldr	w1, [sp, #8]
	str	w1, [x19, #8]
Lloh3:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	w0, #0
	mov	x4, x20
	mov	w5, #0
	bl	_mmap
	str	w0, [x19, #4]
Lloh9:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_close
LBB0_4:
	ldr	w1, [x19]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	w1, [x19]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	w1, [x19]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_7:
	bl	_ERR
Lloh18:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error while opening file %s."

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
l_.str.1:                               ; @.str.1
	.asciz	"Error getting file size for %s."

	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,4,2                 ; @MAP_FAILED
l_.str.2:                               ; @.str.2
	.asciz	"Error mapping file %s."

.subsections_via_symbols
