	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carthw_pier_prot_mem_setup
_carthw_pier_prot_mem_setup:            ## @carthw_pier_prot_mem_setup
	.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
	testl	%edi, %edi
	je	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_Pico@GOTPCREL(%rip), %r12
	movq	_m68k_read16_map@GOTPCREL(%rip), %r13
	movq	_M68K_BANK_SIZE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_m68k_read8_map@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	65535(%rbx), %r14d
	movq	8(%r12), %rcx
	addq	(%r12), %rcx
	movl	%ebx, %esi
	movl	%r14d, %edx
	xorl	%r8d, %r8d
	callq	_cpu68k_map_set
	movl	(%r13), %edi
	movq	8(%r12), %rcx
	addq	(%r12), %rcx
	movl	%ebx, %esi
	movl	%r14d, %edx
	xorl	%r8d, %r8d
	callq	_cpu68k_map_set
	movl	(%r15), %esi
	addl	%esi, %ebx
	cmpl	$4194304, %ebx                  ## imm = 0x400000
	jl	LBB0_2
## %bb.3:
	movq	_m68k_read8_map@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	(%rsi,%rsi), %edx
	decl	%edx
	movq	_carthw_pier_prot_read8@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$1, %r8d
	jmp	LBB0_4
LBB0_5:
	movq	_m68k_read8_map@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_Pico@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	xorl	%esi, %esi
	movl	$2621439, %edx                  ## imm = 0x27FFFF
	xorl	%r8d, %r8d
	callq	_cpu68k_map_set
	movq	_m68k_read16_map@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rcx
	xorl	%esi, %esi
	movl	$2621439, %edx                  ## imm = 0x27FFFF
	xorl	%r8d, %r8d
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cpu68k_map_set                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_m68k_read8_map,4,2             ## @m68k_read8_map
	.comm	_Pico,16,3                      ## @Pico
	.comm	_m68k_read16_map,4,2            ## @m68k_read16_map
	.comm	_M68K_BANK_SIZE,4,2             ## @M68K_BANK_SIZE
	.comm	_carthw_pier_prot_read8,8,3     ## @carthw_pier_prot_read8
	.no_dead_strip	_carthw_pier_prot_mem_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carthw_pier_prot_mem_setup
_carthw_pier_prot_mem_setup:            ; @carthw_pier_prot_mem_setup
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	w0, LBB0_4
; %bb.1:
	mov	w19, #0
Lloh0:
	adrp	x21, _m68k_read8_map@GOTPAGE
Lloh1:
	ldr	x21, [x21, _m68k_read8_map@GOTPAGEOFF]
	mov	w22, #65535
Lloh2:
	adrp	x23, _Pico@GOTPAGE
Lloh3:
	ldr	x23, [x23, _Pico@GOTPAGEOFF]
Lloh4:
	adrp	x24, _m68k_read16_map@GOTPAGE
Lloh5:
	ldr	x24, [x24, _m68k_read16_map@GOTPAGEOFF]
Lloh6:
	adrp	x25, _M68K_BANK_SIZE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _M68K_BANK_SIZE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	add	w20, w19, w22
	ldp	x8, x9, [x23]
	add	x3, x9, x8
	mov	x1, x19
	mov	x2, x20
	mov	w4, #0
	bl	_cpu68k_map_set
	ldr	w0, [x24]
	ldp	x8, x9, [x23]
	add	x3, x9, x8
	mov	x1, x19
	mov	x2, x20
	mov	w4, #0
	bl	_cpu68k_map_set
	ldr	w1, [x25]
	add	w19, w1, w19
	cmp	w19, #1024, lsl #12             ; =4194304
	b.lt	LBB0_2
; %bb.3:
	ldr	w0, [x21]
	lsl	w8, w1, #1
	sub	w2, w8, #1
Lloh8:
	adrp	x8, _carthw_pier_prot_read8@GOTPAGE
Lloh9:
	ldr	x8, [x8, _carthw_pier_prot_read8@GOTPAGEOFF]
Lloh10:
	ldr	x3, [x8]
	mov	w4, #1
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _m68k_read8_map@GOTPAGE
Lloh12:
	ldr	x8, [x8, _m68k_read8_map@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x19, _Pico@GOTPAGE
Lloh15:
	ldr	x19, [x19, _Pico@GOTPAGEOFF]
	ldr	x3, [x19]
	mov	w1, #0
	mov	w2, #2621439
	mov	w4, #0
	bl	_cpu68k_map_set
Lloh16:
	adrp	x8, _m68k_read16_map@GOTPAGE
Lloh17:
	ldr	x8, [x8, _m68k_read16_map@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	x3, [x19]
	mov	w1, #0
	mov	w2, #2621439
	mov	w4, #0
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_cpu68k_map_set
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_m68k_read8_map,4,2             ; @m68k_read8_map
	.comm	_Pico,16,3                      ; @Pico
	.comm	_m68k_read16_map,4,2            ; @m68k_read16_map
	.comm	_M68K_BANK_SIZE,4,2             ; @M68K_BANK_SIZE
	.comm	_carthw_pier_prot_read8,8,3     ; @carthw_pier_prot_read8
	.no_dead_strip	_carthw_pier_prot_mem_setup
.subsections_via_symbols
