	.file	"extr_xmon.c_write_spr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"SPR 0x%03x (%4d) Faulted during write\n"
	.text
	.p2align 4
	.type	write_spr, @function
write_spr:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 24
	.cfi_def_cfa_offset 32
	cmp	QWORD PTR xmon_is_ro[rip], 0
	mov	DWORD PTR 4[rsp], edi
	mov	QWORD PTR 8[rsp], rsi
	jne	.L9
	mov	edi, DWORD PTR bus_error_jmp[rip]
	call	setjmp@PLT
	endbr64
	test	rax, rax
	je	.L10
	mov	edx, DWORD PTR 4[rsp]
	lea	rdi, .LC0[rip]
	xor	eax, eax
	mov	esi, edx
	call	printf@PLT
.L6:
	mov	DWORD PTR catch_spr_faults[rip], 0
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	DWORD PTR catch_spr_faults[rip], 1
	call	sync@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	edi, DWORD PTR 4[rsp]
	call	xmon_mtspr@PLT
	xor	eax, eax
	call	sync@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, QWORD PTR xmon_ro_msg[rip]
	xor	eax, eax
	call	printf@PLT
	add	rsp, 24
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	write_spr, .-write_spr
	.comm	xmon_ro_msg,8,8
	.comm	xmon_is_ro,8,8
	.comm	catch_spr_faults,4,4
	.comm	bus_error_jmp,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_xmon.c_write_spr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"SPR 0x%03x (%4d) Faulted during write\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_spr, %function
write_spr:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	str	lr, [sp, #-4]!
	ldr	r3, .L11
	sub	sp, sp, #12
	ldr	r3, [r3]
	str	r0, [sp]
	cmp	r3, #0
	str	r1, [sp, #4]
	bne	.L9
	ldr	r3, .L11+4
	ldr	r0, [r3]
	bl	setjmp
	cmp	r0, #0
	beq	.L10
	ldr	r2, [sp]
	ldr	r0, .L11+8
	mov	r1, r2
	bl	printf
.L6:
	mov	r2, #0
	ldr	r3, .L11+12
	str	r2, [r3]
	add	sp, sp, #12
	@ sp needed
	ldr	pc, [sp], #4
.L10:
	mov	r2, #1
	ldr	r3, .L11+12
	str	r2, [r3]
	bl	sync
	ldm	sp, {r0, r1}
	bl	xmon_mtspr
	bl	sync
	b	.L6
.L9:
	ldr	r3, .L11+16
	ldr	r0, [r3]
	bl	printf
	add	sp, sp, #12
	@ sp needed
	ldr	pc, [sp], #4
.L12:
	.align	2
.L11:
	.word	xmon_is_ro
	.word	bus_error_jmp
	.word	.LC0
	.word	catch_spr_faults
	.word	xmon_ro_msg
	.size	write_spr, .-write_spr
	.comm	xmon_ro_msg,4,4
	.comm	xmon_is_ro,4,4
	.comm	catch_spr_faults,4,4
	.comm	bus_error_jmp,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
