	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pt_sec_posix_map               ## -- Begin function pt_sec_posix_map
	.p2align	4, 0x90
_pt_sec_posix_map:                      ## @pt_sec_posix_map
	.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
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	movq	8(%rdi), %r14
	movq	__SC_PAGESIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sysconf
	testq	%rax, %rax
	js	LBB0_4
## %bb.2:
	movq	%rax, %rcx
	orq	%r12, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.3:
	movq	%r12, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_6
LBB0_4:
	movq	_pte_bad_config@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_5:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_6:
	addq	%rdx, %r14
	cmpq	8(%rbx), %r14
	jge	LBB0_8
LBB0_7:
	movq	_pte_internal@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jl	LBB0_10
## %bb.9:
	subq	%rdx, %r12
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jge	LBB0_14
LBB0_10:
	movq	_pte_nomem@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%r13d, %r13d
LBB0_12:
	subl	(%rax), %r13d
LBB0_13:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	movq	%r14, %rsi
	movl	%r15d, %r8d
	movl	%r12d, %r9d
	callq	_mmap
	movq	%rax, %r15
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_17
## %bb.15:
	movl	$32, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movq	%r15, 24(%rax)
	movq	%r14, 16(%rax)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%r15,%rcx,4), %rcx
	movq	%rcx, 8(%rax)
	leaq	(%r15,%r14,4), %rcx
	movq	%rcx, (%rax)
	movq	%rax, 32(%rbx)
	movq	_pt_sec_posix_unmap@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_pt_sec_posix_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_pt_sec_posix_memsize@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_17:
	movq	_pte_nomem@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_18:
	movq	_pte_nomem@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_munmap
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_pte_internal,4,2               ## @pte_internal
	.comm	__SC_PAGESIZE,4,2               ## @_SC_PAGESIZE
	.comm	_pte_bad_config,4,2             ## @pte_bad_config
	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
	.comm	_pte_nomem,4,2                  ## @pte_nomem
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_pt_sec_posix_unmap,4,2         ## @pt_sec_posix_unmap
	.comm	_pt_sec_posix_read,4,2          ## @pt_sec_posix_read
	.comm	_pt_sec_posix_memsize,4,2       ## @pt_sec_posix_memsize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pt_sec_posix_map               ; -- Begin function pt_sec_posix_map
	.p2align	2
_pt_sec_posix_map:                      ; @pt_sec_posix_map
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	ldp	x20, x22, [x0]
Lloh0:
	adrp	x8, __SC_PAGESIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, __SC_PAGESIZE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_sysconf
	tbnz	x0, #63, LBB0_4
; %bb.2:
	sdiv	x8, x20, x0
	mul	x5, x8, x0
	sub	x23, x20, x5
	add	x20, x23, x22
	ldr	x8, [x19, #8]
	cmp	x20, x8
	b.ge	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _pte_internal@GOTPAGE
Lloh4:
	ldr	x8, [x8, _pte_internal@GOTPAGEOFF]
	b	LBB0_11
LBB0_4:
Lloh5:
	adrp	x8, _pte_bad_config@GOTPAGE
Lloh6:
	ldr	x8, [x8, _pte_bad_config@GOTPAGEOFF]
	b	LBB0_11
LBB0_5:
Lloh7:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x8, x20
	b.lt	LBB0_10
; %bb.6:
Lloh10:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x8, x5
	b.lt	LBB0_10
; %bb.7:
Lloh13:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x1, x20
	mov	x4, x21
                                        ; kill: def $w5 killed $w5 killed $x5
	bl	_mmap
Lloh19:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_10
; %bb.8:
	mov	x22, x0
	mov	w0, #32
	bl	_malloc
	cbz	x0, LBB0_13
; %bb.9:
	mov	w21, #0
	stp	x20, x22, [x0, #16]
	add	x8, x22, x23, lsl #2
	add	x9, x22, x20, lsl #2
	stp	x9, x8, [x0]
	str	x0, [x19, #32]
Lloh22:
	adrp	x8, _pt_sec_posix_unmap@GOTPAGE
Lloh23:
	ldr	x8, [x8, _pt_sec_posix_unmap@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh25:
	adrp	x8, _pt_sec_posix_read@GOTPAGE
Lloh26:
	ldr	x8, [x8, _pt_sec_posix_read@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _pt_sec_posix_memsize@GOTPAGE
Lloh29:
	ldr	x9, [x9, _pt_sec_posix_memsize@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
	b	LBB0_12
LBB0_10:
Lloh31:
	adrp	x8, _pte_nomem@GOTPAGE
Lloh32:
	ldr	x8, [x8, _pte_nomem@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	mov	x0, x21
	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
LBB0_13:
Lloh33:
	adrp	x8, _pte_nomem@GOTPAGE
Lloh34:
	ldr	x8, [x8, _pte_nomem@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w21, w8
	mov	x0, x22
	mov	x1, x20
	bl	_munmap
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_pte_internal,4,2               ; @pte_internal
	.comm	__SC_PAGESIZE,4,2               ; @_SC_PAGESIZE
	.comm	_pte_bad_config,4,2             ; @pte_bad_config
	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
	.comm	_pte_nomem,4,2                  ; @pte_nomem
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_pt_sec_posix_unmap,4,2         ; @pt_sec_posix_unmap
	.comm	_pt_sec_posix_read,4,2          ; @pt_sec_posix_read
	.comm	_pt_sec_posix_memsize,4,2       ; @pt_sec_posix_memsize
.subsections_via_symbols
