	.file	"extr_..taskstask_save.c_task_load_handler.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%s \"%s\" %s."
	.text
	.p2align 4
	.type	task_load_handler, @function
task_load_handler:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbp, QWORD PTR [rdi]
	cmp	QWORD PTR 40[rbp], 0
	je	.L2
	mov	ebx, DWORD PTR 8[rbp]
.L3:
	sub	ebx, DWORD PTR 24[rbp]
	mov	esi, DWORD PTR SAVE_STATE_CHUNK[rip]
	mov	edi, ebx
	call	MIN@PLT
	movsx	rdx, DWORD PTR 24[rbp]
	mov	rdi, QWORD PTR 40[rbp]
	mov	r13, rax
	mov	rax, QWORD PTR 16[rbp]
	lea	rsi, [rax+rdx*4]
	mov	rdx, r13
	call	intfstream_read@PLT
	mov	edx, DWORD PTR 8[rbp]
	mov	rbx, rax
	mov	eax, DWORD PTR 24[rbp]
	add	eax, ebx
	mov	DWORD PTR 24[rbp], eax
	test	edx, edx
	jg	.L24
	mov	rdi, r12
	call	task_get_cancelled@PLT
	cmp	r13, rbx
	jne	.L15
.L26:
	test	rax, rax
	je	.L6
.L15:
	cmp	QWORD PTR 32[rbp], 0
	jne	.L25
	mov	edi, DWORD PTR MSG_FAILED_TO_LOAD_STATE[rip]
	call	msg_hash_to_str@PLT
	mov	rdi, rax
	call	strdup@PLT
	mov	rdi, r12
	mov	esi, eax
	call	task_set_error@PLT
.L9:
	mov	rdi, QWORD PTR 16[rbp]
	call	free@PLT
	mov	QWORD PTR 16[rbp], 0
.L4:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, rbp
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	task_load_handler_finished@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, QWORD PTR 0[rbp]
	mov	edx, DWORD PTR RETRO_VFS_FILE_ACCESS_HINT_NONE[rip]
	mov	esi, DWORD PTR RETRO_VFS_FILE_ACCESS_READ[rip]
	call	intfstream_open_file@PLT
	mov	QWORD PTR 40[rbp], rax
	mov	rdi, rax
	test	rax, rax
	je	.L4
	mov	edx, DWORD PTR SEEK_END[rip]
	xor	esi, esi
	call	intfstream_seek@PLT
	test	rax, rax
	jne	.L4
	mov	rdi, QWORD PTR 40[rbp]
	call	intfstream_tell@PLT
	mov	DWORD PTR 8[rbp], eax
	test	eax, eax
	js	.L4
	mov	rdi, QWORD PTR 40[rbp]
	call	intfstream_rewind@PLT
	mov	ebx, DWORD PTR 8[rbp]
	lea	edi, 1[rbx]
	movsx	rdi, edi
	call	malloc@PLT
	mov	QWORD PTR 16[rbp], rax
	test	rax, rax
	jne	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L24:
	pxor	xmm0, xmm0
	pxor	xmm1, xmm1
	mov	rdi, r12
	cvtsi2ss	xmm0, eax
	cvtsi2ss	xmm1, edx
	divss	xmm0, xmm1
	mulss	xmm0, DWORD PTR .LC0[rip]
	call	task_set_progress@PLT
	mov	rdi, r12
	call	task_get_cancelled@PLT
	cmp	r13, rbx
	je	.L26
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, 8192
	call	malloc@PLT
	mov	edi, DWORD PTR MSG_FAILED[rip]
	mov	BYTE PTR [rax], 0
	mov	r13, rax
	call	msg_hash_to_str@PLT
	mov	edi, DWORD PTR MSG_AUTOLOADING_SAVESTATE_FROM[rip]
	mov	r14, QWORD PTR 0[rbp]
	mov	rbx, rax
	call	msg_hash_to_str@PLT
	mov	r9, rbx
	mov	r8, r14
	mov	esi, 8192
	mov	rcx, rax
	lea	rdx, .LC1[rip]
	mov	rdi, r13
	xor	eax, eax
	call	snprintf@PLT
	mov	rdi, r13
	call	strdup@PLT
	mov	rdi, r12
	mov	esi, eax
	call	task_set_error@PLT
	mov	rdi, r13
	call	free@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR 8[rbp]
	cmp	DWORD PTR 24[rbp], eax
	je	.L27
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	mov	edi, 8192
	call	malloc@PLT
	mov	rdi, r12
	mov	BYTE PTR [rax], 0
	mov	r13, rax
	call	task_free_title@PLT
	cmp	QWORD PTR 32[rbp], 0
	jne	.L28
	mov	ebx, DWORD PTR 28[rbp]
	test	ebx, ebx
	js	.L29
	mov	edi, DWORD PTR MSG_LOADED_STATE_FROM_SLOT[rip]
	call	msg_hash_to_str@PLT
	movsx	rcx, ebx
	mov	esi, 8192
	mov	rdi, r13
	mov	rdx, rax
	xor	eax, eax
	call	snprintf@PLT
.L12:
	mov	rdi, r12
	call	task_get_mute@PLT
	test	eax, eax
	je	.L30
.L14:
	mov	rdi, r13
	call	free@PLT
	jmp	.L4
.L28:
	mov	edi, DWORD PTR MSG_SUCCEEDED[rip]
	call	msg_hash_to_str@PLT
	mov	edi, DWORD PTR MSG_AUTOLOADING_SAVESTATE_FROM[rip]
	mov	r14, QWORD PTR 0[rbp]
	mov	rbx, rax
	call	msg_hash_to_str@PLT
	mov	r9, rbx
	mov	r8, r14
	mov	esi, 8192
	mov	rcx, rax
	lea	rdx, .LC1[rip]
	mov	rdi, r13
	xor	eax, eax
	call	snprintf@PLT
	jmp	.L12
.L30:
	mov	rdi, r13
	call	strdup@PLT
	mov	rdi, r12
	mov	esi, eax
	call	task_set_title@PLT
	jmp	.L14
.L29:
	mov	edi, DWORD PTR MSG_LOADED_STATE_FROM_SLOT_AUTO[rip]
	call	msg_hash_to_str@PLT
	mov	edx, 8192
	mov	rdi, r13
	mov	rsi, rax
	call	strlcpy@PLT
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	task_load_handler, .-task_load_handler
	.comm	SEEK_END,4,4
	.comm	SAVE_STATE_CHUNK,4,4
	.comm	RETRO_VFS_FILE_ACCESS_READ,4,4
	.comm	RETRO_VFS_FILE_ACCESS_HINT_NONE,4,4
	.comm	MSG_SUCCEEDED,4,4
	.comm	MSG_LOADED_STATE_FROM_SLOT_AUTO,4,4
	.comm	MSG_LOADED_STATE_FROM_SLOT,4,4
	.comm	MSG_FAILED_TO_LOAD_STATE,4,4
	.comm	MSG_FAILED,4,4
	.comm	MSG_AUTOLOADING_SAVESTATE_FROM,4,4
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	1120403456
	.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_..taskstask_save.c_task_load_handler.c"
	.text
	.global	__aeabi_i2f
	.global	__aeabi_fdiv
	.global	__aeabi_fmul
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s \"%s\" %s.\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	task_load_handler, %function
task_load_handler:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r0]
	mov	r5, r0
	ldr	r6, [r4, #24]
	sub	sp, sp, #8
	cmp	r6, #0
	beq	.L2
	ldr	r6, [r4, #4]
.L3:
	ldr	r3, .L30
	ldr	r0, [r4, #12]
	ldr	r1, [r3]
	sub	r0, r6, r0
	bl	MIN
	ldr	r1, [r4, #12]
	ldr	r3, [r4, #8]
	mov	r2, r0
	mov	r6, r0
	add	r1, r3, r1, lsl #2
	ldr	r0, [r4, #24]
	bl	intfstream_read
	mov	r7, r0
	ldr	r8, [r4, #4]
	ldr	r0, [r4, #12]
	cmp	r8, #0
	add	r0, r7, r0
	str	r0, [r4, #12]
	bgt	.L23
.L5:
	mov	r0, r5
	bl	task_get_cancelled
	cmp	r0, #0
	cmpeq	r6, r7
	movne	r6, #1
	moveq	r6, #0
	beq	.L6
	ldr	r3, [r4, #20]
	cmp	r3, #0
	bne	.L24
	ldr	r3, .L30+4
	ldr	r0, [r3]
	bl	msg_hash_to_str
	bl	strdup
	mov	r1, r0
	mov	r0, r5
	bl	task_set_error
.L8:
	ldr	r0, [r4, #8]
	bl	free
	mov	r3, #0
	mov	r0, r5
	mov	r1, r4
	str	r3, [r4, #8]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	task_load_handler_finished
.L2:
	ldr	r3, .L30+8
	ldr	r2, .L30+12
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r0, [r4]
	bl	intfstream_open_file
	cmp	r0, #0
	str	r0, [r4, #24]
	bne	.L25
.L4:
	mov	r1, r4
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	task_load_handler_finished
.L25:
	ldr	r3, .L30+16
	mov	r1, r6
	ldr	r2, [r3]
	bl	intfstream_seek
	cmp	r0, #0
	bne	.L4
	ldr	r0, [r4, #24]
	bl	intfstream_tell
	cmp	r0, #0
	str	r0, [r4, #4]
	blt	.L4
	ldr	r0, [r4, #24]
	bl	intfstream_rewind
	ldr	r6, [r4, #4]
	add	r0, r6, #1
	bl	malloc
	cmp	r0, #0
	str	r0, [r4, #8]
	bne	.L3
	b	.L4
.L23:
	bl	__aeabi_i2f
	mov	r3, r0
	mov	r0, r8
	mov	r8, r3
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r8
	bl	__aeabi_fdiv
	ldr	r1, .L30+20
	bl	__aeabi_fmul
	mov	r1, r0
	mov	r0, r5
	bl	task_set_progress
	b	.L5
.L24:
	mov	r0, #8192
	bl	malloc
	mov	r2, #0
	ldr	r3, .L30+24
	mov	r6, r0
	strb	r2, [r0]
	ldr	r0, [r3]
	bl	msg_hash_to_str
	ldr	r3, .L30+28
	mov	r7, r0
	ldr	r0, [r3]
	ldr	r8, [r4]
	bl	msg_hash_to_str
	mov	r3, r7
	ldr	r2, .L30+32
	mov	r1, #8192
	str	r0, [sp, #4]
	str	r8, [sp]
	mov	r0, r6
	bl	snprintf
	mov	r0, r6
	bl	strdup
	mov	r1, r0
	mov	r0, r5
	bl	task_set_error
	mov	r0, r6
	bl	free
	b	.L8
.L6:
	ldr	r2, [r4, #12]
	ldr	r3, [r4, #4]
	cmp	r2, r3
	beq	.L26
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L26:
	mov	r0, #8192
	bl	malloc
	mov	r7, r0
	mov	r0, r5
	strb	r6, [r7]
	bl	task_free_title
	ldr	r3, [r4, #20]
	cmp	r3, #0
	bne	.L27
	ldr	r3, [r4, #16]
	cmp	r3, #0
	blt	.L28
	ldr	r3, .L30+36
	ldr	r0, [r3]
	bl	msg_hash_to_str
	mov	r1, #8192
	mov	r2, r0
	ldr	r3, [r4, #16]
	mov	r0, r7
	bl	snprintf
.L11:
	mov	r0, r5
	bl	task_get_mute
	cmp	r0, #0
	beq	.L29
.L13:
	mov	r0, r7
	bl	free
	b	.L4
.L27:
	ldr	r3, .L30+24
	ldr	r0, [r3]
	bl	msg_hash_to_str
	ldr	r3, .L30+40
	mov	r6, r0
	ldr	r0, [r3]
	ldr	r8, [r4]
	bl	msg_hash_to_str
	mov	r3, r6
	str	r0, [sp, #4]
	mov	r1, #8192
	mov	r0, r7
	ldr	r2, .L30+32
	str	r8, [sp]
	bl	snprintf
	b	.L11
.L29:
	mov	r0, r7
	bl	strdup
	mov	r1, r0
	mov	r0, r5
	bl	task_set_title
	b	.L13
.L28:
	ldr	r3, .L30+44
	ldr	r0, [r3]
	bl	msg_hash_to_str
	mov	r2, #8192
	mov	r1, r0
	mov	r0, r7
	bl	strlcpy
	b	.L11
.L31:
	.align	2
.L30:
	.word	SAVE_STATE_CHUNK
	.word	MSG_FAILED_TO_LOAD_STATE
	.word	RETRO_VFS_FILE_ACCESS_READ
	.word	RETRO_VFS_FILE_ACCESS_HINT_NONE
	.word	SEEK_END
	.word	1120403456
	.word	MSG_AUTOLOADING_SAVESTATE_FROM
	.word	MSG_FAILED
	.word	.LC0
	.word	MSG_LOADED_STATE_FROM_SLOT
	.word	MSG_SUCCEEDED
	.word	MSG_LOADED_STATE_FROM_SLOT_AUTO
	.size	task_load_handler, .-task_load_handler
	.comm	SEEK_END,4,4
	.comm	SAVE_STATE_CHUNK,4,4
	.comm	RETRO_VFS_FILE_ACCESS_READ,4,4
	.comm	RETRO_VFS_FILE_ACCESS_HINT_NONE,4,4
	.comm	MSG_SUCCEEDED,4,4
	.comm	MSG_LOADED_STATE_FROM_SLOT_AUTO,4,4
	.comm	MSG_LOADED_STATE_FROM_SLOT,4,4
	.comm	MSG_FAILED_TO_LOAD_STATE,4,4
	.comm	MSG_FAILED,4,4
	.comm	MSG_AUTOLOADING_SAVESTATE_FROM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
