	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mem_segv_reason                ## -- Begin function mem_segv_reason
	.p2align	4, 0x90
_mem_segv_reason:                       ## @mem_segv_reason
	.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
	movl	%edx, %ebx
	movq	_MEM_READ@GOTPCREL(%rip), %r13
	cmpl	%edx, (%r13)
	sete	%al
	movq	_MEM_WRITE@GOTPCREL(%rip), %r12
	cmpl	%edx, (%r12)
	movl	%esi, %r14d
	movq	%rdi, %r15
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movl	%r14d, %edi
	callq	_PAGE
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_mem_pt
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	cmpl	%ebx, (%r13)
	jne	LBB0_3
## %bb.2:
	movq	_P_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_7
LBB0_3:
	cmpl	%ebx, (%r12)
	jne	LBB0_5
## %bb.4:
	movq	_P_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_die
                                        ## implicit-def: $eax
	jmp	LBB0_9
LBB0_6:
	movq	_SEGV_MAPERR_@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_SEGV_ACCERR_@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEM_READ,4,2                   ## @MEM_READ
	.comm	_MEM_WRITE,4,2                  ## @MEM_WRITE
	.comm	_SEGV_MAPERR_,4,2               ## @SEGV_MAPERR_
	.comm	_P_READ,4,2                     ## @P_READ
	.comm	_P_WRITE,4,2                    ## @P_WRITE
	.comm	_SEGV_ACCERR_,4,2               ## @SEGV_ACCERR_
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"caught segv for valid access"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mem_segv_reason                ; -- Begin function mem_segv_reason
	.p2align	2
_mem_segv_reason:                       ; @mem_segv_reason
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _MEM_READ@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MEM_READ@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, w2
Lloh2:
	adrp	x22, _MEM_WRITE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MEM_WRITE@GOTPAGEOFF]
	ldr	w8, [x22]
	ccmp	w8, w2, #4, ne
	cset	w0, eq
	bl	_assert
	mov	x0, x20
	bl	_PAGE
	mov	x1, x0
	mov	x0, x21
	bl	_mem_pt
	cbz	x0, LBB0_6
; %bb.1:
	ldr	w8, [x23]
	cmp	w8, w19
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x0]
Lloh4:
	adrp	x9, _P_READ@GOTPAGE
Lloh5:
	ldr	x9, [x9, _P_READ@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_3:
	ldr	w8, [x22]
	cmp	w8, w19
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x0]
Lloh7:
	adrp	x9, _P_WRITE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _P_WRITE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_5:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_die
                                        ; implicit-def: $w0
	b	LBB0_9
LBB0_6:
Lloh12:
	adrp	x8, _SEGV_MAPERR_@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SEGV_MAPERR_@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x8, _SEGV_ACCERR_@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SEGV_ACCERR_@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MEM_READ,4,2                   ; @MEM_READ
	.comm	_MEM_WRITE,4,2                  ; @MEM_WRITE
	.comm	_SEGV_MAPERR_,4,2               ; @SEGV_MAPERR_
	.comm	_P_READ,4,2                     ; @P_READ
	.comm	_P_WRITE,4,2                    ; @P_WRITE
	.comm	_SEGV_ACCERR_,4,2               ; @SEGV_ACCERR_
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"caught segv for valid access"

.subsections_via_symbols
