	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_mmap_write_private
_check_mmap_write_private:              ## @check_mmap_write_private
	.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	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	testl	%r8d, %r8d
	jle	LBB0_22
## %bb.1:
	movl	%r8d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_notok_mode
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_22
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx,4), %r14d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r13d
	xorl	%eax, %eax
	callq	_getpagesize
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_PROT_READ@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edi, %edi
	movl	%eax, %esi
	movl	%r13d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %r15
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_5
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_O_ACCMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.4(%rip), %rsi
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edx
	callq	_notok_mode
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_getpagesize
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_munmap
	jmp	LBB0_20
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_O_ACCMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rsi
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edx
	callq	_ok_mode
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edi
	callq	_close
	jmp	LBB0_21
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edx
	callq	_ok_mode
	jmp	LBB0_19
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	callq	_notok_mode
	jmp	LBB0_20
LBB0_22:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open"

	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"mmap dir failed"

	.comm	_O_ACCMODE,4,2                  ## @O_ACCMODE
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.2:                               ## @.str.2
	.asciz	"mmap file failed"

L_.str.3:                               ## @.str.3
	.asciz	"mmap dir succeeded"

L_.str.4:                               ## @.str.4
	.asciz	"mmap file succeeded"

	.no_dead_strip	_check_mmap_write_private
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_mmap_write_private
_check_mmap_write_private:              ; @check_mmap_write_private
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 w27, -88
	.cfi_offset w28, -96
	cmp	w4, #1
	b.lt	LBB0_18
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	w25, w4
Lloh0:
	adrp	x27, _MAP_PRIVATE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MAP_PRIVATE@GOTPAGEOFF]
Lloh2:
	adrp	x23, _MAP_FAILED@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MAP_FAILED@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x24
	bl	_notok_mode
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #4
	subs	x25, x25, #1
	b.eq	LBB0_18
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w24, [x19]
	mov	x0, x21
	mov	x1, x24
	bl	_open
	tbnz	w0, #31, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, x0
	bl	_getpagesize
	mov	x1, x0
Lloh6:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w9, w8
	ldr	w3, [x27]
	mov	x0, #0
	mov	x4, x28
	mov	w5, #0
	bl	_mmap
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, x0
	cbz	w20, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	w20, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh16:
	adrp	x8, _O_ACCMODE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _O_ACCMODE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	and	w8, w8, w24
Lloh19:
	adrp	x9, _O_RDONLY@GOTPAGE
Lloh20:
	ldr	x9, [x9, _O_RDONLY@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _O_RDWR@GOTPAGE
Lloh23:
	ldr	x10, [x10, _O_RDWR@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	cmp	w8, w9
	mov	x0, x22
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x24
	bl	_ok_mode
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x24
	bl	_notok_mode
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_getpagesize
	mov	x1, x0
	mov	x0, x26
	bl	_munmap
	b	LBB0_17
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh27:
	adrp	x8, _O_ACCMODE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _O_ACCMODE@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	and	w8, w8, w24
Lloh30:
	adrp	x9, _O_RDONLY@GOTPAGE
Lloh31:
	ldr	x9, [x9, _O_RDONLY@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x10, _O_RDWR@GOTPAGE
Lloh34:
	ldr	x10, [x10, _O_RDWR@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	cmp	w8, w9
	mov	x0, x22
Lloh36:
	adrp	x1, l_.str.2@PAGE
Lloh37:
	add	x1, x1, l_.str.2@PAGEOFF
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x24
	bl	_notok_mode
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x24
	bl	_ok_mode
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x28
	bl	_close
	b	LBB0_3
LBB0_18:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open"

	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"mmap dir failed"

	.comm	_O_ACCMODE,4,2                  ; @O_ACCMODE
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.2:                               ; @.str.2
	.asciz	"mmap file failed"

l_.str.3:                               ; @.str.3
	.asciz	"mmap dir succeeded"

l_.str.4:                               ; @.str.4
	.asciz	"mmap file succeeded"

	.no_dead_strip	_check_mmap_write_private
.subsections_via_symbols
