	.file	"extr_ScriptRunner_b.c_Script_LoadScene_b.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	Script_LoadScene_b
	.type	Script_LoadScene_b, @function
Script_LoadScene_b:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	mov	rdx, QWORD PTR script_cmd_args[rip]
	mov	eax, DWORD PTR [rdx]
	sal	eax, 8
	add	eax, DWORD PTR 4[rdx]
	mov	DWORD PTR scene_next_index[rip], eax
	add	eax, 1
	mov	DWORD PTR scene_index[rip], eax
	mov	eax, DWORD PTR 8[rdx]
	lea	eax, 8[0+rax*8]
	mov	DWORD PTR map_next_pos[rip], eax
	mov	eax, DWORD PTR 12[rdx]
	lea	eax, 8[0+rax*8]
	mov	DWORD PTR map_next_pos[rip+4], eax
	mov	eax, DWORD PTR 16[rdx]
	cmp	eax, 2
	je	.L2
	xor	ecx, ecx
	cmp	eax, 4
	sete	cl
	mov	DWORD PTR map_next_dir[rip], ecx
	mov	ecx, -1
	cmp	eax, 8
	jne	.L4
.L3:
	mov	eax, DWORD PTR SCENE[rip]
	mov	edi, DWORD PTR 20[rdx]
	mov	DWORD PTR map_next_dir[rip+4], ecx
	mov	DWORD PTR stage_next_type[rip], eax
	mov	rax, QWORD PTR FALSE[rip]
	mov	QWORD PTR scene_loaded[rip], rax
	mov	QWORD PTR script_action_complete[rip], rax
	call	FadeSetSpeed@PLT
	xor	eax, eax
	call	FadeOut@PLT
	mov	eax, DWORD PTR script_ptr[rip]
	add	eax, DWORD PTR script_cmd_args_len[rip]
	add	eax, 1
	mov	DWORD PTR script_ptr[rip], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	DWORD PTR map_next_dir[rip], -1
.L4:
	xor	ecx, ecx
	cmp	eax, 1
	sete	cl
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	Script_LoadScene_b, .-Script_LoadScene_b
	.comm	stage_next_type,4,4
	.comm	script_ptr,4,4
	.comm	script_cmd_args_len,8,8
	.comm	script_cmd_args,8,8
	.comm	script_action_complete,8,8
	.comm	scene_next_index,4,4
	.comm	scene_loaded,8,8
	.comm	scene_index,4,4
	.comm	map_next_pos,8,8
	.comm	map_next_dir,8,8
	.comm	SCENE,4,4
	.comm	FALSE,8,8
	.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_ScriptRunner_b.c_Script_LoadScene_b.c"
	.text
	.align	2
	.global	Script_LoadScene_b
	.syntax unified
	.arm
	.fpu softvfp
	.type	Script_LoadScene_b, %function
Script_LoadScene_b:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L9
	push	{r4, lr}
	ldr	r3, [r3]
	ldr	r4, .L9+4
	ldm	r3, {r1, r2}
	ldr	lr, .L9+8
	add	r2, r2, r1, lsl #8
	ldr	r0, [r3, #8]
	ldr	r1, [r3, #12]
	ldr	ip, [r3, #16]
	str	r2, [r4]
	add	r2, r2, #1
	lsl	r0, r0, #3
	lsl	r1, r1, #3
	str	r2, [lr]
	ldr	r2, .L9+12
	add	r0, r0, #8
	add	r1, r1, #8
	cmp	ip, #2
	stm	r2, {r0, r1}
	beq	.L2
	sub	r1, ip, #4
	clz	r1, r1
	ldr	r2, .L9+16
	lsr	r1, r1, #5
	cmp	ip, #8
	mvneq	ip, #0
	str	r1, [r2]
	bne	.L4
.L3:
	ldr	r0, .L9+20
	ldr	r1, .L9+24
	ldr	r4, [r0]
	ldr	r1, [r1]
	ldr	lr, .L9+28
	str	ip, [r2, #4]
	ldr	r0, [r3, #20]
	ldr	r2, .L9+32
	ldr	r3, .L9+36
	str	r1, [r2]
	str	r1, [r3]
	str	r4, [lr]
	bl	FadeSetSpeed
	bl	FadeOut
	ldr	r3, .L9+40
	ldr	r2, .L9+44
	ldr	r3, [r3]
	ldr	r1, [r2]
	add	r3, r3, #1
	add	r3, r3, r1
	str	r3, [r2]
	pop	{r4, pc}
.L2:
	mvn	r1, #0
	ldr	r2, .L9+16
	str	r1, [r2]
.L4:
	sub	ip, ip, #1
	clz	ip, ip
	lsr	ip, ip, #5
	b	.L3
.L10:
	.align	2
.L9:
	.word	script_cmd_args
	.word	scene_next_index
	.word	scene_index
	.word	map_next_pos
	.word	map_next_dir
	.word	SCENE
	.word	FALSE
	.word	stage_next_type
	.word	scene_loaded
	.word	script_action_complete
	.word	script_cmd_args_len
	.word	script_ptr
	.size	Script_LoadScene_b, .-Script_LoadScene_b
	.comm	stage_next_type,4,4
	.comm	script_ptr,4,4
	.comm	script_cmd_args_len,4,4
	.comm	script_cmd_args,4,4
	.comm	script_action_complete,4,4
	.comm	scene_next_index,4,4
	.comm	scene_loaded,4,4
	.comm	scene_index,4,4
	.comm	map_next_pos,8,4
	.comm	map_next_dir,8,4
	.comm	SCENE,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
