	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_rmwstub                     ## -- Begin function do_rmwstub
	.p2align	4, 0x90
_do_rmwstub:                            ## @do_rmwstub
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_start@GOTPCREL(%rip), %rax
	movq	_stubs@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movslq	%edi, %rbx
	movq	(%rcx,%rbx,8), %rcx
	movslq	12(%rcx), %rsi
	addq	%rsi, %rsi
	addq	(%rax), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_assem_debug
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movl	4(%rax), %edi
	movq	_out@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_set_jump_target
	movq	(%r14), %rax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %r13d
	movl	16(%rax), %r15d
	movslq	12(%rax), %rdx
	movslq	20(%rax), %rcx
	movl	28(%rax), %r14d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %r12
	movq	_AGEN1@GOTPCREL(%rip), %rax
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %esi
	andl	$1, %esi
	addl	(%rax), %esi
	movq	%r12, %rdi
	callq	_get_reg
	movq	%rax, %rbx
	movl	%r15d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
	testl	%ebx, %ebx
	jns	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movl	$-1, %esi
	callq	_get_reg
	movq	%rax, %rbx
LBB0_2:
	notl	%ebx
	shrl	$31, %ebx
	movl	%ebx, %edi
	callq	_assert
	movl	%r14d, %edi
	callq	_save_regs
	movl	%r15d, %edi
	movl	$1, %esi
	movl	%r15d, %edx
	callq	_emit_xorimm
	testl	%r15d, %r15d
	movl	%r14d, %r12d
	je	LBB0_5
## %bb.3:
	xorl	%r14d, %r14d
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_emit_mov
	cmpl	$4, %r15d
	jl	LBB0_5
## %bb.4:
	cmpl	$12, %r15d
	jne	LBB0_6
LBB0_5:
	movl	_dynarec_local@GOTPCREL(%rip), %esi
	addl	$24, %esi
	xorl	%edi, %edi
	callq	_emit_writeword
	movb	$1, %r14b
LBB0_6:
	movq	_MappedMemoryReadByte@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_emit_call
	movq	_RMWA_STUB@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_8
## %bb.7:
	movq	_imm@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	xorl	%edi, %edi
	movl	$1, %edx
	callq	_emit_andimm
LBB0_8:
	movq	_RMWX_STUB@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_10
## %bb.9:
	movq	_imm@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	xorl	%edi, %edi
	movl	$1, %edx
	callq	_emit_xorimm
LBB0_10:
	movq	_RMWO_STUB@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_12
## %bb.11:
	movq	_imm@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	xorl	%edi, %edi
	movl	$1, %edx
	callq	_emit_orimm
LBB0_12:
	movq	_RMWT_STUB@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_14
## %bb.13:
	movl	_dynarec_local@GOTPCREL(%rip), %esi
	addl	$20, %esi
	xorl	%edi, %edi
	callq	_emit_writeword
	xorl	%edi, %edi
	movl	$128, %esi
	movl	$1, %edx
	callq	_emit_orimm
LBB0_14:
	testb	%r14b, %r14b
	je	LBB0_16
## %bb.15:
	movl	_dynarec_local@GOTPCREL(%rip), %edi
	addl	$24, %edi
	xorl	%esi, %esi
	callq	_emit_readword
	jmp	LBB0_17
LBB0_16:
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_emit_mov
LBB0_17:
	movq	_stubs@GOTPCREL(%rip), %r15
	movq	_WriteInvalidateByte@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_emit_call
	movl	%r12d, %edi
	callq	_restore_regs
	movq	_opcode2@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$11, (%rax,%rbx,4)
	jne	LBB0_19
## %bb.18:
	movl	_dynarec_local@GOTPCREL(%rip), %edi
	addl	$20, %edi
	movl	$14, %esi
	callq	_emit_readword
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	_SR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_get_reg
	movq	%rax, %rbx
	notb	%al
	shrb	$7, %al
	movzbl	%al, %edi
	callq	_assert
	movsbl	%bl, %ebx
	movl	%ebx, %edi
	movl	$-2, %esi
	movl	%ebx, %edx
	callq	_emit_andimm
	movl	$14, %edi
	movl	$255, %esi
	callq	_emit_testimm
	movl	%ebx, %edi
	movl	$1, %esi
	movl	%ebx, %edx
	callq	_emit_orreq_imm
LBB0_19:
	movq	(%r15), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movl	8(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_emit_jmp                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"do_rmwstub %x\n"

	.comm	_start,8,3                      ## @start
	.comm	_stubs,8,3                      ## @stubs
	.comm	_out,8,3                        ## @out
	.comm	_AGEN1,4,2                      ## @AGEN1
	.comm	_dynarec_local,4,2              ## @dynarec_local
	.comm	_MappedMemoryReadByte,8,3       ## @MappedMemoryReadByte
	.comm	_RMWA_STUB,4,2                  ## @RMWA_STUB
	.comm	_imm,8,3                        ## @imm
	.comm	_RMWX_STUB,4,2                  ## @RMWX_STUB
	.comm	_RMWO_STUB,4,2                  ## @RMWO_STUB
	.comm	_RMWT_STUB,4,2                  ## @RMWT_STUB
	.comm	_WriteInvalidateByte,8,3        ## @WriteInvalidateByte
	.comm	_opcode2,8,3                    ## @opcode2
	.comm	_SR,4,2                         ## @SR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_rmwstub                     ; -- Begin function do_rmwstub
	.p2align	2
_do_rmwstub:                            ; @do_rmwstub
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _start@GOTPAGE
Lloh1:
	ldr	x8, [x8, _start@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x24, _stubs@GOTPAGE
Lloh4:
	ldr	x24, [x24, _stubs@GOTPAGEOFF]
	ldr	x9, [x24]
	sbfiz	x20, x19, #3, #32
	ldr	x9, [x9, x20]
	ldrsw	x9, [x9, #12]
	add	x1, x8, x9, lsl #1
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_assem_debug
	ldr	x8, [x24]
	ldr	x8, [x8, x20]
	ldr	w0, [x8, #4]
Lloh7:
	adrp	x8, _out@GOTPAGE
Lloh8:
	ldr	x8, [x8, _out@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_set_jump_target
	ldr	x8, [x24]
	ldr	x8, [x8, x20]
	ldr	w27, [x8]
	ldp	w26, w21, [x8, #12]
                                        ; kill: def $w26 killed $w26 def $x26
	sxtw	x26, w26
	ldrsw	x25, [x8, #20]
	ldr	w20, [x8, #28]
	ldr	x22, [x25]
Lloh10:
	adrp	x8, _AGEN1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AGEN1@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w9, w26, #0x1
	add	w1, w8, w9
	mov	x0, x22
	bl	_get_reg
	mov	x23, x0
	mvn	w8, w21
	lsr	w0, w8, #31
	bl	_assert
	tbz	w23, #31, LBB0_2
; %bb.1:
	mov	x0, x22
	mov	w1, #-1
	bl	_get_reg
	mov	x23, x0
LBB0_2:
	mvn	w8, w23
	lsr	w0, w8, #31
	bl	_assert
	mov	x0, x20
	bl	_save_regs
	mov	x0, x21
	mov	w1, #1
	mov	x2, x21
	bl	_emit_xorimm
	cbz	w21, LBB0_4
; %bb.3:
	mov	x0, x21
	mov	w1, #0
	bl	_emit_mov
	mov	w22, #0
	cmp	w21, #4
	ccmp	w21, #12, #4, ge
	b.ne	LBB0_5
LBB0_4:
Lloh13:
	adrp	x8, _dynarec_local@GOTPAGE
Lloh14:
	ldr	x8, [x8, _dynarec_local@GOTPAGEOFF]
	add	w1, w8, #24
	mov	w0, #0
	bl	_emit_writeword
	mov	w22, #1
LBB0_5:
Lloh15:
	adrp	x8, _MappedMemoryReadByte@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MappedMemoryReadByte@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_emit_call
Lloh18:
	adrp	x8, _RMWA_STUB@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RMWA_STUB@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w27, w8
	b.ne	LBB0_7
; %bb.6:
Lloh21:
	adrp	x8, _imm@GOTPAGE
Lloh22:
	ldr	x8, [x8, _imm@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	w1, [x8, x26, lsl #2]
	mov	w0, #0
	mov	w2, #1
	bl	_emit_andimm
LBB0_7:
Lloh24:
	adrp	x8, _RMWX_STUB@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RMWX_STUB@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w27, w8
	b.ne	LBB0_9
; %bb.8:
Lloh27:
	adrp	x8, _imm@GOTPAGE
Lloh28:
	ldr	x8, [x8, _imm@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	ldr	w1, [x8, x26, lsl #2]
	mov	w0, #0
	mov	w2, #1
	bl	_emit_xorimm
LBB0_9:
Lloh30:
	adrp	x8, _RMWO_STUB@GOTPAGE
Lloh31:
	ldr	x8, [x8, _RMWO_STUB@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w27, w8
	b.ne	LBB0_11
; %bb.10:
Lloh33:
	adrp	x8, _imm@GOTPAGE
Lloh34:
	ldr	x8, [x8, _imm@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	ldr	w1, [x8, x26, lsl #2]
	mov	w0, #0
	mov	w2, #1
	bl	_emit_orimm
LBB0_11:
Lloh36:
	adrp	x8, _RMWT_STUB@GOTPAGE
Lloh37:
	ldr	x8, [x8, _RMWT_STUB@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	cmp	w27, w8
	b.ne	LBB0_13
; %bb.12:
Lloh39:
	adrp	x8, _dynarec_local@GOTPAGE
Lloh40:
	ldr	x8, [x8, _dynarec_local@GOTPAGEOFF]
	add	w1, w8, #20
	mov	w0, #0
	bl	_emit_writeword
	mov	w0, #0
	mov	w1, #128
	mov	w2, #1
	bl	_emit_orimm
LBB0_13:
	cbz	w22, LBB0_15
; %bb.14:
Lloh41:
	adrp	x8, _dynarec_local@GOTPAGE
Lloh42:
	ldr	x8, [x8, _dynarec_local@GOTPAGEOFF]
	add	w0, w8, #24
	mov	w1, #0
	bl	_emit_readword
	b	LBB0_16
LBB0_15:
	mov	x0, x21
	mov	w1, #0
	bl	_emit_mov
LBB0_16:
	sxtw	x21, w19
Lloh43:
	adrp	x8, _WriteInvalidateByte@GOTPAGE
Lloh44:
	ldr	x8, [x8, _WriteInvalidateByte@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	bl	_emit_call
	mov	x0, x20
	bl	_restore_regs
Lloh46:
	adrp	x8, _opcode2@GOTPAGE
Lloh47:
	ldr	x8, [x8, _opcode2@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
	ldr	w8, [x8, x26, lsl #2]
	cmp	w8, #11
	b.ne	LBB0_18
; %bb.17:
Lloh49:
	adrp	x8, _dynarec_local@GOTPAGE
Lloh50:
	ldr	x8, [x8, _dynarec_local@GOTPAGEOFF]
	add	w0, w8, #20
	mov	w1, #14
	bl	_emit_readword
	ldr	x0, [x25]
Lloh51:
	adrp	x8, _SR@GOTPAGE
Lloh52:
	ldr	x8, [x8, _SR@GOTPAGEOFF]
Lloh53:
	ldr	w1, [x8]
	bl	_get_reg
	mov	x19, x0
	mvn	w8, w19
	ubfx	w0, w8, #7, #1
	bl	_assert
	sxtb	w19, w19
	mov	x0, x19
	mov	w1, #-2
	mov	x2, x19
	bl	_emit_andimm
	mov	w0, #14
	mov	w1, #255
	bl	_emit_testimm
	mov	x0, x19
	mov	w1, #1
	mov	x2, x19
	bl	_emit_orreq_imm
LBB0_18:
	ldr	x8, [x24]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w0, [x8, #8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_emit_jmp
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"do_rmwstub %x\n"

	.comm	_start,8,3                      ; @start
	.comm	_stubs,8,3                      ; @stubs
	.comm	_out,8,3                        ; @out
	.comm	_AGEN1,4,2                      ; @AGEN1
	.comm	_dynarec_local,4,2              ; @dynarec_local
	.comm	_MappedMemoryReadByte,8,3       ; @MappedMemoryReadByte
	.comm	_RMWA_STUB,4,2                  ; @RMWA_STUB
	.comm	_imm,8,3                        ; @imm
	.comm	_RMWX_STUB,4,2                  ; @RMWX_STUB
	.comm	_RMWO_STUB,4,2                  ; @RMWO_STUB
	.comm	_RMWT_STUB,4,2                  ; @RMWT_STUB
	.comm	_WriteInvalidateByte,8,3        ; @WriteInvalidateByte
	.comm	_opcode2,8,3                    ; @opcode2
	.comm	_SR,4,2                         ; @SR
.subsections_via_symbols
