	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tlb_calc_wimg
_tlb_calc_wimg:                         ## @tlb_calc_wimg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	movq	_VM_MEMATTR_DEFAULT@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_7
LBB0_1:
	movq	__TLB_ENTRY_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_physmem_regions_sz@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_11
## %bb.2:
	movq	_physmem_regions@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	shlq	$4, %r8
	xorl	%esi, %esi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$16, %rsi
	cmpq	%rsi, %r8
	je	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi), %rcx
	cmpq	%rdi, %rcx
	jg	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	8(%rdx,%rsi), %rcx
	cmpq	%rdi, %rcx
	jle	LBB0_3
## %bb.6:
	movq	__TLB_ENTRY_MEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	addl	$-128, %esi
	cmpl	$5, %esi
	ja	LBB0_1
## %bb.8:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_9:
	movq	_MAS2_I@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_12:
	movq	_MAS2_W@GOTPCREL(%rip), %rcx
	movq	_MAS2_M@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_MAS2_M@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
	popq	%rbp
	retq
LBB0_14:
	movq	_MAS2_I@GOTPCREL(%rip), %rcx
	movq	_MAS2_G@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	orl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_14
	.long	L0_0_set_9
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_VM_MEMATTR_DEFAULT,4,2         ## @VM_MEMATTR_DEFAULT
	.comm	_MAS2_I,4,2                     ## @MAS2_I
	.comm	_MAS2_G,4,2                     ## @MAS2_G
	.comm	_MAS2_W,4,2                     ## @MAS2_W
	.comm	_MAS2_M,4,2                     ## @MAS2_M
	.comm	__TLB_ENTRY_IO,4,2              ## @_TLB_ENTRY_IO
	.comm	_physmem_regions_sz,4,2         ## @physmem_regions_sz
	.comm	_physmem_regions,8,3            ## @physmem_regions
	.comm	__TLB_ENTRY_MEM,4,2             ## @_TLB_ENTRY_MEM
	.no_dead_strip	_tlb_calc_wimg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tlb_calc_wimg
_tlb_calc_wimg:                         ; @tlb_calc_wimg
	.cfi_startproc
; %bb.0:
	mov	x8, x0
Lloh0:
	adrp	x9, _VM_MEMATTR_DEFAULT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VM_MEMATTR_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w1
	b.ne	LBB0_7
LBB0_1:
Lloh3:
	adrp	x9, __TLB_ENTRY_IO@GOTPAGE
Lloh4:
	ldr	x9, [x9, __TLB_ENTRY_IO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x9]
Lloh6:
	adrp	x9, _physmem_regions_sz@GOTPAGE
Lloh7:
	ldr	x9, [x9, _physmem_regions_sz@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.2:
Lloh9:
	adrp	x10, _physmem_regions@GOTPAGE
Lloh10:
	ldr	x10, [x10, _physmem_regions@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	add	x10, x10, #8
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #16
	subs	x9, x9, #1
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x11, [x10, #-8]
	cmp	x11, x8
	b.gt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x10]
	add	x11, x12, x11
	cmp	x11, x8
	b.le	LBB0_3
; %bb.6:
Lloh12:
	adrp	x8, __TLB_ENTRY_MEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, __TLB_ENTRY_MEM@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ret
LBB0_7:
	sub	w9, w1, #128
	cmp	w9, #5
	b.hi	LBB0_1
; %bb.8:
Lloh15:
	adrp	x8, lJTI0_0@PAGE
Lloh16:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_9
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_9:
Lloh17:
	adrp	x8, _MAS2_I@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAS2_I@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
LBB0_10:
	ret
LBB0_11:
Lloh20:
	adrp	x8, _MAS2_W@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MAS2_W@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _MAS2_M@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MAS2_M@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh25:
	adrp	x8, _MAS2_M@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MAS2_M@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ret
LBB0_13:
Lloh28:
	adrp	x8, _MAS2_I@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MAS2_I@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _MAS2_G@GOTPAGE
Lloh32:
	ldr	x9, [x9, _MAS2_G@GOTPAGEOFF]
LBB0_14:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_9)>>2
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_13-LBB0_9)>>2
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_12-LBB0_9)>>2
                                        ; -- End function
	.comm	_VM_MEMATTR_DEFAULT,4,2         ; @VM_MEMATTR_DEFAULT
	.comm	_MAS2_I,4,2                     ; @MAS2_I
	.comm	_MAS2_G,4,2                     ; @MAS2_G
	.comm	_MAS2_W,4,2                     ; @MAS2_W
	.comm	_MAS2_M,4,2                     ; @MAS2_M
	.comm	__TLB_ENTRY_IO,4,2              ; @_TLB_ENTRY_IO
	.comm	_physmem_regions_sz,4,2         ; @physmem_regions_sz
	.comm	_physmem_regions,8,3            ; @physmem_regions
	.comm	__TLB_ENTRY_MEM,4,2             ; @_TLB_ENTRY_MEM
	.no_dead_strip	_tlb_calc_wimg
.subsections_via_symbols
