	.file	"extr_psp_v11_0.c_psp_v11_0_mode1_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"psp is not working correctly before mode1 reset!\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"psp mode 1 reset failed!\n"
.LC2:
	.string	"psp mode1 reset succeed \n"
	.text
	.p2align 4
	.type	psp_v11_0_mode1_reset, @function
psp_v11_0_mode1_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	xor	esi, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	edx, DWORD PTR mmMP0_SMN_C2PMSG_64[rip]
	mov	edi, DWORD PTR MP0[rip]
	call	SOC15_REG_OFFSET@PLT
	xor	r8d, r8d
	mov	ecx, -2147418113
	mov	rdi, r12
	mov	edx, -2147483648
	mov	esi, eax
	mov	ebp, eax
	call	psp_wait_for@PLT
	test	eax, eax
	jne	.L7
	mov	esi, DWORD PTR GFX_CTRL_CMD_ID_MODE1_RST[rip]
	mov	edi, ebp
	call	WREG32@PLT
	mov	edi, 500
	call	msleep@PLT
	mov	edx, DWORD PTR mmMP0_SMN_C2PMSG_33[rip]
	mov	edi, DWORD PTR MP0[rip]
	xor	esi, esi
	call	SOC15_REG_OFFSET@PLT
	mov	rdi, r12
	xor	r8d, r8d
	mov	ecx, -2147483648
	mov	esi, eax
	mov	edx, -2147483648
	call	psp_wait_for@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L8
	lea	rdi, .LC2[rip]
	call	DRM_INFO@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	DRM_INFO@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	DRM_INFO@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	psp_v11_0_mode1_reset, .-psp_v11_0_mode1_reset
	.comm	mmMP0_SMN_C2PMSG_64,4,4
	.comm	mmMP0_SMN_C2PMSG_33,4,4
	.comm	MP0,4,4
	.comm	GFX_CTRL_CMD_ID_MODE1_RST,4,4
	.comm	EINVAL,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_psp_v11_0.c_psp_v11_0_mode1_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"psp is not working correctly before mode1 reset!\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"psp mode 1 reset failed!\012\000"
	.align	2
.LC2:
	.ascii	"psp mode1 reset succeed \012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	psp_v11_0_mode1_reset, %function
psp_v11_0_mode1_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L9
	ldr	r7, .L9+4
	ldr	r2, [r3]
	sub	sp, sp, #12
	mov	r5, r0
	mov	r1, #0
	ldr	r0, [r7]
	bl	SOC15_REG_OFFSET
	mov	r3, #0
	mov	r6, r0
	str	r3, [sp]
	mov	r0, r5
	mov	r1, r6
	mov	r2, #-2147483648
	ldr	r3, .L9+8
	bl	psp_wait_for
	subs	r4, r0, #0
	bne	.L7
	ldr	r3, .L9+12
	mov	r0, r6
	ldr	r1, [r3]
	bl	WREG32
	mov	r0, #500
	bl	msleep
	ldr	r3, .L9+16
	mov	r1, r4
	ldr	r2, [r3]
	ldr	r0, [r7]
	bl	SOC15_REG_OFFSET
	mov	r3, #-2147483648
	mov	r1, r0
	str	r4, [sp]
	mov	r0, r5
	mov	r2, r3
	bl	psp_wait_for
	subs	r4, r0, #0
	bne	.L8
	ldr	r0, .L9+20
	bl	DRM_INFO
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L8:
	ldr	r0, .L9+24
	bl	DRM_INFO
	ldr	r3, .L9+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L7:
	ldr	r0, .L9+32
	bl	DRM_INFO
	ldr	r3, .L9+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L10:
	.align	2
.L9:
	.word	mmMP0_SMN_C2PMSG_64
	.word	MP0
	.word	-2147418113
	.word	GFX_CTRL_CMD_ID_MODE1_RST
	.word	mmMP0_SMN_C2PMSG_33
	.word	.LC2
	.word	.LC1
	.word	EINVAL
	.word	.LC0
	.size	psp_v11_0_mode1_reset, .-psp_v11_0_mode1_reset
	.comm	mmMP0_SMN_C2PMSG_64,4,4
	.comm	mmMP0_SMN_C2PMSG_33,4,4
	.comm	MP0,4,4
	.comm	GFX_CTRL_CMD_ID_MODE1_RST,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
