	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psp_resume_suspend             ## -- Begin function psp_resume_suspend
	.p2align	4, 0x90
_psp_resume_suspend:                    ## @psp_resume_suspend
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	movq	_PSP_O_RDONLY@GOTPCREL(%rip), %r12
	leaq	L_.str(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	$511, %edx                      ## imm = 0x1FF
	callq	_sceIoOpen
	movq	%rax, %r15
	testq	%rax, %rax
	jns	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$102400, %edi                   ## imm = 0x19000
	callq	_sceKernelDelayThread
	incq	%rbx
	cmpl	$30, %ebx
	jne	LBB0_1
## %bb.3:
	xorl	%eax, %eax
	callq	_sceDisplayWaitVblankStart
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	callq	_lprintf
	movl	$512000, %edi                   ## imm = 0x7D000
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sceKernelDelayThread           ## TAILCALL
LBB0_4:
	movq	%r15, %rdi
	callq	_sceIoClose
	xorl	%eax, %eax
	callq	_sceDisplayWaitVblankStart
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lprintf                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EBOOT.PBP"

	.comm	_PSP_O_RDONLY,4,2               ## @PSP_O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"io resumed after %i tries\n"

L_.str.2:                               ## @.str.2
	.asciz	"io resume failed with %08x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psp_resume_suspend             ; -- Begin function psp_resume_suspend
	.p2align	2
_psp_resume_suspend:                    ; @psp_resume_suspend
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, #0
	mov	w22, #36864
	movk	w22, #1, lsl #16
Lloh0:
	adrp	x23, _PSP_O_RDONLY@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PSP_O_RDONLY@GOTPAGEOFF]
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x20
	mov	w2, #511
	bl	_sceIoOpen
	mov	x21, x0
	tbz	x0, #63, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #36864
	movk	w0, #1, lsl #16
	bl	_sceKernelDelayThread
	add	x19, x19, #1
	cmp	w19, #30
	b.ne	LBB0_1
; %bb.3:
	bl	_sceDisplayWaitVblankStart
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_lprintf
	add	w0, w22, #100, lsl #12          ; =409600
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_sceKernelDelayThread
LBB0_4:
	mov	x0, x21
	bl	_sceIoClose
	bl	_sceDisplayWaitVblankStart
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_lprintf
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EBOOT.PBP"

	.comm	_PSP_O_RDONLY,4,2               ; @PSP_O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"io resumed after %i tries\n"

l_.str.2:                               ; @.str.2
	.asciz	"io resume failed with %08x\n"

.subsections_via_symbols
