	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lookup_mem_region              ## -- Begin function lookup_mem_region
	.p2align	4, 0x90
_lookup_mem_region:                     ## @lookup_mem_region
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_mem_region_chain@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$-1, %r8
	xorl	%r9d, %r9d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%rcx, %r9
	movq	%r9, %rdx
	cmovlq	%rcx, %rdx
	cmpq	%rdi, %rcx
	cmovleq	%rdx, %r9
	cmpq	%rsi, %r8
	movq	%r8, %rcx
	cmovgq	%rsi, %rcx
	cmpq	%rdi, %rsi
	cmovgeq	%rcx, %r8
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	32(%rax), %rax
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$1, (%rax)
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%rax), %rsi
	movq	16(%rax), %rcx
	cmpq	%rdi, %rsi
	jg	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%rdi, %rcx
	jg	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	testq	%rcx, %rcx
	jne	LBB0_6
	jmp	LBB0_9
LBB0_8:
	movq	%r9, _lookup_mem_region.region+8(%rip)
	leaq	_lookup_mem_region.region(%rip), %rax
	movq	%r8, _lookup_mem_region.region+16(%rip)
	movq	_default_mem_attrib@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, _lookup_mem_region.region+24(%rip)
LBB0_9:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_lookup_mem_region.region,40,3 ## @lookup_mem_region.region
	.comm	_mem_region_chain,8,3           ## @mem_region_chain
	.comm	_default_mem_attrib,4,2         ## @default_mem_attrib
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lookup_mem_region              ; -- Begin function lookup_mem_region
	.p2align	2
_lookup_mem_region:                     ; @lookup_mem_region
	.cfi_startproc
; %bb.0:
	mov	x8, x0
Lloh0:
	adrp	x9, _mem_region_chain@GOTPAGE
Lloh1:
	ldr	x9, [x9, _mem_region_chain@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x9]
	cbz	x0, LBB0_8
; %bb.1:
	mov	x9, #0
	mov	x10, #-1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x9, x12
	ccmp	x12, x8, #0, lt
	csel	x9, x12, x9, le
	cmp	x10, x11
	ccmp	x11, x8, #8, gt
	csel	x10, x11, x10, ge
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x0, #32]
	cbz	x0, LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x0]
	cmp	w11, #1
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x11, x12, [x0, #8]
	cmp	x11, x8
	b.gt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x12, x8
	ccmp	x12, #0, #4, le
	b.ne	LBB0_2
; %bb.7:
	ret
LBB0_8:
	mov	x9, #0
	mov	x10, #-1
LBB0_9:
Lloh3:
	adrp	x0, _lookup_mem_region.region@PAGE
Lloh4:
	add	x0, x0, _lookup_mem_region.region@PAGEOFF
	stp	x9, x10, [x0, #8]
Lloh5:
	adrp	x8, _default_mem_attrib@GOTPAGE
Lloh6:
	ldr	x8, [x8, _default_mem_attrib@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_lookup_mem_region.region,40,3 ; @lookup_mem_region.region
	.comm	_mem_region_chain,8,3           ; @mem_region_chain
	.comm	_default_mem_attrib,4,2         ; @default_mem_attrib
.subsections_via_symbols
