	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_mapper_93c46
_write_mapper_93c46:                    ## @write_mapper_93c46
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_eeprom_93c@GOTPCREL(%rip), %rax
	cmpl	$32768, %edi                    ## imm = 0x8000
	jne	LBB0_2
## %bb.1:
	cmpb	$0, (%rax)
	je	LBB0_2
## %bb.8:
	movzbl	%r14b, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_eeprom_93c_write               ## TAILCALL
LBB0_2:
	cmpl	$65532, %ebx                    ## imm = 0xFFFC
	jne	LBB0_5
## %bb.3:
	movl	%r14d, %ecx
	andb	$8, %cl
	movb	%cl, (%rax)
	testb	%r14b, %r14b
	jns	LBB0_7
## %bb.4:
	xorl	%eax, %eax
	callq	_eeprom_93c_init
	jmp	LBB0_7
LBB0_5:
	jbe	LBB0_7
## %bb.6:
	movl	%ebx, %edi
	andl	$3, %edi
	movzbl	%r14b, %esi
	callq	_mapper_16k_w
LBB0_7:
	movq	_z80_writemap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	shrl	$10, %ecx
	movq	(%rax,%rcx,8), %rax
	andl	$1023, %ebx                     ## imm = 0x3FF
	movb	%r14b, (%rax,%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_eeprom_93c,1,0                 ## @eeprom_93c
	.comm	_z80_writemap,8,3               ## @z80_writemap
	.no_dead_strip	_write_mapper_93c46
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_mapper_93c46
_write_mapper_93c46:                    ; @write_mapper_93c46
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _eeprom_93c@GOTPAGE
Lloh1:
	ldr	x8, [x8, _eeprom_93c@GOTPAGEOFF]
	cmp	w0, #8, lsl #12                 ; =32768
	b.ne	LBB0_3
; %bb.1:
	ldrb	w9, [x8]
	cbz	w9, LBB0_3
; %bb.2:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_eeprom_93c_write
LBB0_3:
	mov	w9, #65532
	cmp	w20, w9
	b.ne	LBB0_6
; %bb.4:
	and	w9, w19, #0x8
	strb	w9, [x8]
	tbz	w19, #7, LBB0_8
; %bb.5:
	bl	_eeprom_93c_init
	b	LBB0_8
LBB0_6:
	mov	w8, #65533
	cmp	w20, w8
	b.lo	LBB0_8
; %bb.7:
	and	w0, w20, #0x3
	mov	x1, x19
	bl	_mapper_16k_w
LBB0_8:
Lloh2:
	adrp	x8, _z80_writemap@GOTPAGE
Lloh3:
	ldr	x8, [x8, _z80_writemap@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	lsr	w9, w20, #10
	ldr	x8, [x8, w9, uxtw #3]
	and	x9, x20, #0x3ff
	strb	w19, [x8, x9]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_eeprom_93c,1,0                 ; @eeprom_93c
	.comm	_z80_writemap,8,3               ; @z80_writemap
	.no_dead_strip	_write_mapper_93c46
.subsections_via_symbols
