	.file	"extr_debug_monitor.c_dbg_monitor_exit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	dbg_monitor_exit
	.type	dbg_monitor_exit, @function
dbg_monitor_exit:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	eax, DWORD PTR PSR_D[rip]
	mov	rdi, QWORD PTR [rdi]
	or	DWORD PTR [rsi], eax
	mov	eax, DWORD PTR DBGMON_ENABLED[rip]
	mov	ebx, eax
	and	ebx, DWORD PTR [rdi]
	jne	.L15
	test	DWORD PTR kernel_monitor[rip], eax
	je	.L1
	mov	edx, DWORD PTR dbg_watchpoint_num[rip]
	test	edx, edx
	jle	.L4
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR DBG_REG_BASE_WCR[rip]
	xor	edx, edx
	mov	esi, ebp
	call	dbg_wb_write_reg@PLT
	mov	edi, DWORD PTR DBG_REG_BASE_WVR[rip]
	xor	edx, edx
	mov	esi, ebp
	add	ebp, 1
	call	dbg_wb_write_reg@PLT
	cmp	DWORD PTR dbg_watchpoint_num[rip], ebp
	jg	.L5
.L4:
	mov	eax, DWORD PTR dbg_breakpoint_num[rip]
	test	eax, eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, DWORD PTR DBG_REG_BASE_BCR[rip]
	xor	edx, edx
	mov	esi, ebx
	call	dbg_wb_write_reg@PLT
	mov	edi, DWORD PTR DBG_REG_BASE_BVR[rip]
	xor	edx, edx
	mov	esi, ebx
	add	ebx, 1
	call	dbg_wb_write_reg@PLT
	cmp	DWORD PTR dbg_breakpoint_num[rip], ebx
	jg	.L7
.L6:
	mov	edi, DWORD PTR mdscr_el1[rip]
	call	READ_SPECIALREG@PLT
	mov	esi, DWORD PTR DBG_MDSCR_MDE[rip]
	or	esi, DWORD PTR DBG_MDSCR_KDE[rip]
	mov	edi, DWORD PTR mdscr_el1[rip]
	not	esi
	and	esi, eax
	call	WRITE_SPECIALREG@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	isb@PLT
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rbp, rsi
	call	dbg_register_sync@PLT
	mov	eax, DWORD PTR PSR_D[rip]
	not	eax
	and	DWORD PTR 0[rbp], eax
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	dbg_monitor_exit, .-dbg_monitor_exit
	.comm	mdscr_el1,4,4
	.comm	kernel_monitor,4,4
	.comm	dbg_watchpoint_num,4,4
	.comm	dbg_breakpoint_num,4,4
	.comm	PSR_D,4,4
	.comm	DBG_REG_BASE_WVR,4,4
	.comm	DBG_REG_BASE_WCR,4,4
	.comm	DBG_REG_BASE_BVR,4,4
	.comm	DBG_REG_BASE_BCR,4,4
	.comm	DBG_MDSCR_MDE,4,4
	.comm	DBG_MDSCR_KDE,4,4
	.comm	DBGMON_ENABLED,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_debug_monitor.c_dbg_monitor_exit.c"
	.text
	.align	2
	.global	dbg_monitor_exit
	.syntax unified
	.arm
	.fpu softvfp
	.type	dbg_monitor_exit, %function
dbg_monitor_exit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L16
	ldr	r3, [r1]
	ldr	r2, [r6]
	ldr	r0, [r0]
	orr	r3, r3, r2
	ldr	r2, .L16+4
	str	r3, [r1]
	ldr	r3, [r2]
	ldr	r4, [r0]
	ands	r4, r3, r4
	bne	.L15
	ldr	r2, .L16+8
	ldr	r2, [r2]
	tst	r3, r2
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r6, .L16+12
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L4
	mov	r5, r4
	ldr	r8, .L16+16
	ldr	r7, .L16+20
.L5:
	mov	r1, r5
	mov	r2, #0
	ldr	r0, [r8]
	bl	dbg_wb_write_reg
	mov	r1, r5
	mov	r2, #0
	ldr	r0, [r7]
	bl	dbg_wb_write_reg
	ldr	r3, [r6]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L5
.L4:
	ldr	r5, .L16+24
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L6
	ldr	r7, .L16+28
	ldr	r6, .L16+32
.L7:
	mov	r1, r4
	mov	r2, #0
	ldr	r0, [r7]
	bl	dbg_wb_write_reg
	mov	r1, r4
	mov	r2, #0
	ldr	r0, [r6]
	bl	dbg_wb_write_reg
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L7
.L6:
	ldr	r3, .L16+36
	ldr	r4, [r3]
	mov	r0, r4
	bl	READ_SPECIALREG
	mov	r1, r0
	ldr	r3, .L16+40
	ldr	r2, .L16+44
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r0, r4
	orr	r3, r3, r2
	bic	r1, r1, r3
	bl	WRITE_SPECIALREG
	pop	{r4, r5, r6, r7, r8, lr}
	b	isb
.L15:
	mov	r5, r1
	bl	dbg_register_sync
	ldr	r2, [r6]
	ldr	r3, [r5]
	bic	r3, r3, r2
	str	r3, [r5]
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	.align	2
.L16:
	.word	PSR_D
	.word	DBGMON_ENABLED
	.word	kernel_monitor
	.word	dbg_watchpoint_num
	.word	DBG_REG_BASE_WCR
	.word	DBG_REG_BASE_WVR
	.word	dbg_breakpoint_num
	.word	DBG_REG_BASE_BCR
	.word	DBG_REG_BASE_BVR
	.word	mdscr_el1
	.word	DBG_MDSCR_MDE
	.word	DBG_MDSCR_KDE
	.size	dbg_monitor_exit, .-dbg_monitor_exit
	.comm	mdscr_el1,4,4
	.comm	kernel_monitor,4,4
	.comm	dbg_watchpoint_num,4,4
	.comm	dbg_breakpoint_num,4,4
	.comm	PSR_D,4,4
	.comm	DBG_REG_BASE_WVR,4,4
	.comm	DBG_REG_BASE_WCR,4,4
	.comm	DBG_REG_BASE_BVR,4,4
	.comm	DBG_REG_BASE_BCR,4,4
	.comm	DBG_MDSCR_MDE,4,4
	.comm	DBG_MDSCR_KDE,4,4
	.comm	DBGMON_ENABLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
