	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mapper_realtec_w
_mapper_realtec_w:                      ## @mapper_realtec_w
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$4194304, %edi                  ## imm = 0x400000
	je	LBB0_5
## %bb.1:
	cmpl	$4210688, %edi                  ## imm = 0x404000
	je	LBB0_4
## %bb.2:
	cmpl	$4202496, %edi                  ## imm = 0x402000
	jne	LBB0_8
## %bb.3:
	addl	%esi, %esi
	movq	_cart@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, 8(%rax)
	popq	%rbp
	retq
LBB0_5:
	andl	$6, %esi
	movq	_cart@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	%esi, 4(%rcx)
	movl	8(%rcx), %r8d
	testl	%r8d, %r8d
	je	LBB0_8
## %bb.6:
	movl	(%rcx), %ecx
	addl	%ecx, %ecx
	shll	$3, %esi
	orl	%ecx, %esi
	movq	8(%rax), %r9
	movq	_m68k@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %eax
	cltd
	idivl	%r8d
	addl	%esi, %edx
	shll	$16, %edx
	movslq	%edx, %rax
	leaq	(%r9,%rax,4), %rax
	movq	%rax, (%rdi,%rcx,8)
	leal	1(%rcx), %eax
	cltd
	idivl	%r8d
	addl	%esi, %edx
	shll	$16, %edx
	movslq	%edx, %rax
	leaq	(%r9,%rax,4), %rax
	movq	%rax, 8(%rdi,%rcx,8)
	addq	$2, %rcx
	cmpq	$64, %rcx
	jne	LBB0_7
LBB0_8:
	popq	%rbp
	retq
LBB0_4:
	andl	$7, %esi
	movq	_cart@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, (%rax)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cart,16,3                      ## @cart
	.comm	_m68k,8,3                       ## @m68k
	.no_dead_strip	_mapper_realtec_w
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mapper_realtec_w
_mapper_realtec_w:                      ; @mapper_realtec_w
	.cfi_startproc
; %bb.0:
	cmp	w0, #1024, lsl #12              ; =4194304
	b.eq	LBB0_4
; %bb.1:
	cmp	w0, #1028, lsl #12              ; =4210688
	b.eq	LBB0_8
; %bb.2:
	cmp	w0, #1026, lsl #12              ; =4202496
	b.ne	LBB0_7
; %bb.3:
	lsl	w8, w1, #1
Lloh0:
	adrp	x9, _cart@GOTPAGE
Lloh1:
	ldr	x9, [x9, _cart@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	str	w8, [x9, #8]
	ret
LBB0_4:
	and	w10, w1, #0x6
Lloh3:
	adrp	x11, _cart@GOTPAGE
Lloh4:
	ldr	x11, [x11, _cart@GOTPAGEOFF]
	ldr	x12, [x11]
	str	w10, [x12, #4]
	ldr	w8, [x12, #8]
	cbz	w8, LBB0_7
; %bb.5:
	mov	x9, #0
	ldr	w12, [x12]
	lsl	w12, w12, #1
	orr	w10, w12, w10, lsl #3
	ldr	x11, [x11, #8]
Lloh5:
	adrp	x12, _m68k@GOTPAGE
Lloh6:
	ldr	x12, [x12, _m68k@GOTPAGEOFF]
Lloh7:
	ldr	x12, [x12]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sdiv	w13, w9, w8
	msub	w13, w13, w8, w9
	add	w13, w13, w10
	lsl	w13, w13, #16
	add	x13, x11, w13, sxtw #2
	str	x13, [x12, x9, lsl #3]
	add	x9, x9, #1
	cmp	x9, #64
	b.ne	LBB0_6
LBB0_7:
	ret
LBB0_8:
	and	w8, w1, #0x7
Lloh8:
	adrp	x9, _cart@GOTPAGE
Lloh9:
	ldr	x9, [x9, _cart@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	str	w8, [x9]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_cart,16,3                      ; @cart
	.comm	_m68k,8,3                       ; @m68k
	.no_dead_strip	_mapper_realtec_w
.subsections_via_symbols
