	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carthw_pier_write8
_carthw_pier_write8:                    ## @carthw_pier_write8
	.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	%esi, %r14d
	movl	%edi, %ebx
	movl	%edi, %eax
	andl	$16776960, %eax                 ## imm = 0xFFFF00
	cmpl	$10563584, %eax                 ## imm = 0xA13000
	jne	LBB0_10
## %bb.1:
	movl	%ebx, %r13d
	andl	$15, %r13d
	movq	_pier_regs@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	%r13d, %ecx
	shrl	%ecx
	movl	%r14d, (%rax,%rcx,4)
	movq	_EL_UIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movzwl	%r14w, %r15d
	movq	_SekPc@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_elprintf
	decl	%r13d
	cmpl	$8, %r13d
	ja	LBB0_11
## %bb.2:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r13,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	%ebx, %edi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PicoWrite8_io                  ## TAILCALL
LBB0_3:
	movq	(%r12), %rax
	movl	$2621440, %r12d                 ## imm = 0x280000
	testb	$2, (%rax)
	jne	LBB0_7
	jmp	LBB0_11
LBB0_4:
	movq	(%r12), %rax
	movl	$3145728, %r12d                 ## imm = 0x300000
	testb	$2, (%rax)
	je	LBB0_11
LBB0_7:
	shll	$19, %r14d
	leal	524288(%r14), %eax
	movq	_Pico@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jle	LBB0_8
## %bb.12:
	movq	_EL_ANOMALY@GOTPCREL(%rip), %rax
	movq	_EL_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elprintf                       ## TAILCALL
LBB0_5:
	movq	(%r12), %rax
	movl	$3670016, %r12d                 ## imm = 0x380000
	testb	$2, (%rax)
	jne	LBB0_7
LBB0_11:
	movq	_EL_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SekPc@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elprintf                       ## TAILCALL
LBB0_8:
	movq	_m68k_read8_map@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %r15d
	orl	$524287, %r15d                  ## imm = 0x7FFFF
	movslq	%r14d, %rbx
	movq	8(%r13), %rcx
	addq	%rbx, %rcx
	movl	%r12d, %esi
	movl	%r15d, %edx
	xorl	%r8d, %r8d
	callq	_cpu68k_map_set
	movq	_m68k_read16_map@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	8(%r13), %rbx
	movl	%r12d, %esi
	movl	%r15d, %edx
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cpu68k_map_set                 ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_3
	.long	L0_0_set_11
	.long	L0_0_set_4
	.long	L0_0_set_11
	.long	L0_0_set_5
	.long	L0_0_set_11
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_pier_regs,8,3                  ## @pier_regs
	.comm	_EL_UIO,4,2                     ## @EL_UIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pier w8  [%06x] %02x @%06x"

	.comm	_SekPc,4,2                      ## @SekPc
	.comm	_EL_STATUS,4,2                  ## @EL_STATUS
L_.str.1:                               ## @.str.1
	.asciz	"-- unmapped w8 [%06x] %02x @%06x"

	.comm	_Pico,16,3                      ## @Pico
	.comm	_EL_ANOMALY,4,2                 ## @EL_ANOMALY
L_.str.2:                               ## @.str.2
	.asciz	"pier: missing bank @ %06x"

	.comm	_m68k_read8_map,4,2             ## @m68k_read8_map
	.comm	_m68k_read16_map,4,2            ## @m68k_read16_map
	.no_dead_strip	_carthw_pier_write8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carthw_pier_write8
_carthw_pier_write8:                    ; @carthw_pier_write8
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	and	w8, w0, #0xffff00
	cmp	w8, #2579, lsl #12              ; =10563584
	b.ne	LBB0_5
; %bb.1:
Lloh0:
	adrp	x23, _pier_regs@GOTPAGE
Lloh1:
	ldr	x23, [x23, _pier_regs@GOTPAGEOFF]
	ldr	x8, [x23]
	ubfx	w9, w20, #1, #3
	str	w19, [x8, w9, uxtw #2]
Lloh2:
	adrp	x8, _EL_UIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EL_UIO@GOTPAGEOFF]
	and	w24, w20, #0xf
Lloh4:
	ldr	w0, [x8]
	and	w21, w19, #0xffff
Lloh5:
	adrp	x22, _SekPc@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SekPc@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	x9, x21
	stp	x9, x8, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_elprintf
	sub	w8, w24, #1
	cmp	w8, #8
	b.hi	LBB0_9
; %bb.2:
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	ldr	x8, [x23]
	ldrb	w8, [x8]
	tbz	w8, #1, LBB0_9
; %bb.4:
	mov	w20, #2621440
	b	LBB0_12
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	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
	add	sp, sp, #80
	b	_PicoWrite8_io
LBB0_6:
	ldr	x8, [x23]
	ldrb	w8, [x8]
	tbz	w8, #1, LBB0_9
; %bb.7:
	mov	w20, #3145728
	b	LBB0_12
LBB0_8:
	ldr	x8, [x23]
	ldrb	w8, [x8]
	tbnz	w8, #1, LBB0_11
LBB0_9:
Lloh11:
	adrp	x8, _EL_STATUS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EL_STATUS@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w8, [x22]
	stp	x21, x8, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_elprintf
LBB0_10:
	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
	add	sp, sp, #80
	ret
LBB0_11:
	mov	w20, #3670016
LBB0_12:
	lsl	w2, w19, #19
	add	w8, w2, #128, lsl #12           ; =524288
Lloh16:
	adrp	x21, _Pico@GOTPAGE
Lloh17:
	ldr	x21, [x21, _Pico@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	w8, w9
	b.le	LBB0_14
; %bb.13:
Lloh18:
	adrp	x8, _EL_ANOMALY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EL_ANOMALY@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _EL_STATUS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _EL_STATUS@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	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
	add	sp, sp, #80
	b	_elprintf
LBB0_14:
Lloh26:
	adrp	x8, _m68k_read8_map@GOTPAGE
Lloh27:
	ldr	x8, [x8, _m68k_read8_map@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	orr	w19, w20, #0x7ffff
	ldr	x8, [x21, #8]
	sxtw	x22, w2
	add	x3, x8, x22
	mov	x1, x20
	mov	x2, x19
	mov	w4, #0
	bl	_cpu68k_map_set
Lloh29:
	adrp	x8, _m68k_read16_map@GOTPAGE
Lloh30:
	ldr	x8, [x8, _m68k_read16_map@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	ldr	x8, [x21, #8]
	add	x3, x8, x22
	mov	x1, x20
	mov	x2, x19
	mov	w4, #0
	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
	add	sp, sp, #80
	b	_cpu68k_map_set
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_10-LBB0_3)>>2
                                        ; -- End function
	.comm	_pier_regs,8,3                  ; @pier_regs
	.comm	_EL_UIO,4,2                     ; @EL_UIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pier w8  [%06x] %02x @%06x"

	.comm	_SekPc,4,2                      ; @SekPc
	.comm	_EL_STATUS,4,2                  ; @EL_STATUS
l_.str.1:                               ; @.str.1
	.asciz	"-- unmapped w8 [%06x] %02x @%06x"

	.comm	_Pico,16,3                      ; @Pico
	.comm	_EL_ANOMALY,4,2                 ; @EL_ANOMALY
l_.str.2:                               ; @.str.2
	.asciz	"pier: missing bank @ %06x"

	.comm	_m68k_read8_map,4,2             ; @m68k_read8_map
	.comm	_m68k_read16_map,4,2            ; @m68k_read16_map
	.no_dead_strip	_carthw_pier_write8
.subsections_via_symbols
