	.file	"extr_assem_arm.c_do_rmwstub.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"do_rmwstub %x\n"
	.text
	.p2align 4
	.globl	do_rmwstub
	.type	do_rmwstub, @function
do_rmwstub:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movsx	rbx, edi
	lea	rdi, .LC0[rip]
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR stubs[rip]
	mov	rax, QWORD PTR [rax+rbx*8]
	mov	esi, DWORD PTR 12[rax]
	add	esi, esi
	movsx	rsi, esi
	add	rsi, QWORD PTR start[rip]
	call	assem_debug@PLT
	mov	rax, QWORD PTR stubs[rip]
	mov	esi, DWORD PTR out[rip]
	mov	rax, QWORD PTR [rax+rbx*8]
	mov	edi, DWORD PTR 4[rax]
	call	set_jump_target@PLT
	mov	rax, QWORD PTR stubs[rip]
	mov	rax, QWORD PTR [rax+rbx*8]
	movsx	rcx, DWORD PTR 20[rax]
	movsx	r12, DWORD PTR 12[rax]
	mov	ebp, DWORD PTR 16[rax]
	mov	r13d, DWORD PTR [rax]
	mov	r8, QWORD PTR [rcx]
	mov	esi, r12d
	mov	r15d, DWORD PTR 28[rax]
	mov	QWORD PTR 24[rsp], rcx
	and	esi, 1
	add	esi, DWORD PTR AGEN1[rip]
	mov	rdi, r8
	mov	QWORD PTR 16[rsp], r8
	call	get_reg@PLT
	mov	edi, ebp
	not	edi
	mov	QWORD PTR 8[rsp], rax
	mov	r14d, eax
	shr	edi, 31
	call	assert@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	r8, QWORD PTR 16[rsp]
	test	edx, edx
	js	.L15
.L2:
	mov	edi, r14d
	not	edi
	shr	edi, 31
	call	assert@PLT
	mov	edi, r15d
	call	save_regs@PLT
	mov	edx, ebp
	mov	esi, 1
	mov	edi, ebp
	call	emit_xorimm@PLT
	test	ebp, ebp
	jne	.L3
.L5:
	lea	rsi, dynarec_local[rip]
	xor	edi, edi
	mov	r14d, 1
	add	esi, 24
	call	emit_writeword@PLT
.L4:
	mov	edi, DWORD PTR MappedMemoryReadByte[rip]
	call	emit_call@PLT
	cmp	DWORD PTR RMWA_STUB[rip], r13d
	je	.L16
.L6:
	cmp	DWORD PTR RMWX_STUB[rip], r13d
	je	.L17
.L7:
	cmp	DWORD PTR RMWO_STUB[rip], r13d
	je	.L18
.L8:
	cmp	DWORD PTR RMWT_STUB[rip], r13d
	je	.L19
.L9:
	test	r14b, r14b
	je	.L10
	lea	rdi, dynarec_local[rip]
	xor	esi, esi
	add	edi, 24
	call	emit_readword@PLT
.L11:
	mov	edi, DWORD PTR WriteInvalidateByte[rip]
	call	emit_call@PLT
	mov	edi, r15d
	call	restore_regs@PLT
	mov	rax, QWORD PTR opcode2[rip]
	cmp	DWORD PTR [rax+r12*4], 11
	je	.L20
.L12:
	mov	rax, QWORD PTR stubs[rip]
	mov	rax, QWORD PTR [rax+rbx*8]
	mov	edi, DWORD PTR 8[rax]
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	emit_jmp@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	xor	esi, esi
	mov	edi, ebp
	call	emit_mov@PLT
	cmp	ebp, 3
	setle	r14b
	cmp	ebp, 12
	sete	al
	or	r14b, al
	je	.L4
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	xor	esi, esi
	mov	edi, ebp
	call	emit_mov@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L15:
	mov	esi, -1
	mov	rdi, r8
	call	get_reg@PLT
	mov	r14d, eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L20:
	lea	rdi, dynarec_local[rip]
	mov	esi, 14
	add	edi, 20
	call	emit_readword@PLT
	mov	rax, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR SR[rip]
	mov	rdi, QWORD PTR [rax]
	call	get_reg@PLT
	movsx	ebp, al
	mov	edi, ebp
	not	edi
	shr	edi, 31
	call	assert@PLT
	mov	edx, ebp
	mov	edi, ebp
	mov	esi, -2
	call	emit_andimm@PLT
	mov	esi, 255
	mov	edi, 14
	call	emit_testimm@PLT
	mov	edx, ebp
	mov	esi, 1
	mov	edi, ebp
	call	emit_orreq_imm@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L19:
	lea	rsi, dynarec_local[rip]
	xor	edi, edi
	add	esi, 20
	call	emit_writeword@PLT
	mov	edx, 1
	mov	esi, 128
	xor	edi, edi
	call	emit_orimm@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rax, QWORD PTR imm[rip]
	mov	edx, 1
	xor	edi, edi
	mov	esi, DWORD PTR [rax+r12*4]
	call	emit_orimm@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rax, QWORD PTR imm[rip]
	mov	edx, 1
	xor	edi, edi
	mov	esi, DWORD PTR [rax+r12*4]
	call	emit_xorimm@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR imm[rip]
	mov	edx, 1
	xor	edi, edi
	mov	esi, DWORD PTR [rax+r12*4]
	call	emit_andimm@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	do_rmwstub, .-do_rmwstub
	.comm	stubs,8,8
	.comm	start,8,8
	.comm	out,8,8
	.comm	opcode2,8,8
	.comm	imm,8,8
	.comm	dynarec_local,4,4
	.comm	WriteInvalidateByte,8,8
	.comm	SR,4,4
	.comm	RMWX_STUB,4,4
	.comm	RMWT_STUB,4,4
	.comm	RMWO_STUB,4,4
	.comm	RMWA_STUB,4,4
	.comm	MappedMemoryReadByte,8,8
	.comm	AGEN1,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_assem_arm.c_do_rmwstub.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"do_rmwstub %x\012\000"
	.text
	.align	2
	.global	do_rmwstub
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_rmwstub, %function
do_rmwstub:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	ldr	r7, .L21
	ldr	r3, .L21+4
	ldr	r2, [r7]
	ldr	r3, [r3]
	ldr	r2, [r2, r0, lsl #2]
	sub	sp, sp, #12
	ldr	r1, [r2, #12]
	ldr	r0, .L21+8
	add	r1, r3, r1, lsl #1
	bl	assem_debug
	ldr	r3, [r7]
	ldr	r2, .L21+12
	ldr	r3, [r3, r5, lsl #2]
	ldr	r1, [r2]
	ldr	r0, [r3, #4]
	bl	set_jump_target
	ldr	r3, [r7]
	ldr	r2, .L21+16
	ldr	r3, [r3, r5, lsl #2]
	ldr	r1, [r2]
	ldr	r10, [r3, #20]
	ldr	r9, [r3, #12]
	ldr	r2, [r10]
	and	ip, r9, #1
	mov	r0, r2
	add	r1, ip, r1
	ldr	r4, [r3, #16]
	str	r2, [sp, #4]
	ldr	r8, [r3]
	ldr	fp, [r3, #28]
	bl	get_reg
	mov	r6, r0
	mvn	r0, r4
	lsr	r0, r0, #31
	bl	assert
	cmp	r6, #0
	ldr	r2, [sp, #4]
	blt	.L15
.L2:
	mvn	r0, r6
	lsr	r0, r0, #31
	bl	assert
	mov	r0, fp
	bl	save_regs
	mov	r2, r4
	mov	r1, #1
	mov	r0, r4
	bl	emit_xorimm
	cmp	r4, #0
	bne	.L3
.L5:
	mov	r0, #0
	ldr	r1, .L21+20
	bl	emit_writeword
	mov	r6, #1
.L4:
	ldr	r3, .L21+24
	ldr	r0, [r3]
	bl	emit_call
	ldr	r3, .L21+28
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L16
.L6:
	ldr	r3, .L21+32
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L17
.L7:
	ldr	r3, .L21+36
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L18
.L8:
	ldr	r3, .L21+40
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L19
.L9:
	cmp	r6, #0
	beq	.L10
	mov	r1, #0
	ldr	r0, .L21+20
	bl	emit_readword
.L11:
	ldr	r3, .L21+44
	ldr	r0, [r3]
	bl	emit_call
	mov	r0, fp
	bl	restore_regs
	ldr	r3, .L21+48
	ldr	r3, [r3]
	ldr	r3, [r3, r9, lsl #2]
	cmp	r3, #11
	beq	.L20
.L12:
	ldr	r3, [r7]
	ldr	r3, [r3, r5, lsl #2]
	ldr	r0, [r3, #8]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	emit_jmp
.L3:
	mov	r1, #0
	mov	r0, r4
	bl	emit_mov
	cmp	r4, #12
	cmpne	r4, #3
	movle	r6, #1
	movgt	r6, #0
	bgt	.L4
	b	.L5
.L10:
	mov	r1, r6
	mov	r0, r4
	bl	emit_mov
	b	.L11
.L15:
	mov	r0, r2
	mvn	r1, #0
	bl	get_reg
	mov	r6, r0
	b	.L2
.L20:
	mov	r1, #14
	ldr	r0, .L21+52
	bl	emit_readword
	ldr	r3, .L21+56
	ldr	r0, [r10]
	ldr	r1, [r3]
	bl	get_reg
	mov	r4, r0
	lsl	r0, r0, #24
	asr	r0, r0, #24
	mvn	r0, r0
	and	r4, r4, #255
	lsr	r0, r0, #31
	bl	assert
	mov	r2, r4
	mov	r0, r4
	mvn	r1, #1
	bl	emit_andimm
	mov	r1, #255
	mov	r0, #14
	bl	emit_testimm
	mov	r2, r4
	mov	r0, r4
	mov	r1, #1
	bl	emit_orreq_imm
	b	.L12
.L19:
	ldr	r1, .L21+52
	mov	r0, #0
	bl	emit_writeword
	mov	r2, #1
	mov	r1, #128
	mov	r0, #0
	bl	emit_orimm
	b	.L9
.L18:
	ldr	r3, .L21+60
	mov	r2, #1
	ldr	r3, [r3]
	mov	r0, #0
	ldr	r1, [r3, r9, lsl #2]
	bl	emit_orimm
	b	.L8
.L17:
	ldr	r3, .L21+60
	mov	r2, #1
	ldr	r3, [r3]
	mov	r0, #0
	ldr	r1, [r3, r9, lsl #2]
	bl	emit_xorimm
	b	.L7
.L16:
	ldr	r3, .L21+60
	mov	r2, #1
	ldr	r3, [r3]
	mov	r0, #0
	ldr	r1, [r3, r9, lsl #2]
	bl	emit_andimm
	b	.L6
.L22:
	.align	2
.L21:
	.word	stubs
	.word	start
	.word	.LC0
	.word	out
	.word	AGEN1
	.word	dynarec_local+24
	.word	MappedMemoryReadByte
	.word	RMWA_STUB
	.word	RMWX_STUB
	.word	RMWO_STUB
	.word	RMWT_STUB
	.word	WriteInvalidateByte
	.word	opcode2
	.word	dynarec_local+20
	.word	SR
	.word	imm
	.size	do_rmwstub, .-do_rmwstub
	.comm	stubs,4,4
	.comm	start,4,4
	.comm	out,4,4
	.comm	opcode2,4,4
	.comm	imm,4,4
	.comm	dynarec_local,4,4
	.comm	WriteInvalidateByte,4,4
	.comm	SR,4,4
	.comm	RMWX_STUB,4,4
	.comm	RMWT_STUB,4,4
	.comm	RMWO_STUB,4,4
	.comm	RMWA_STUB,4,4
	.comm	MappedMemoryReadByte,4,4
	.comm	AGEN1,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
