	.file	"extr_ScriptRunner_b.c_Script_ActorMoveRel_b.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	Script_ActorMoveRel_b
	.type	Script_ActorMoveRel_b, @function
Script_ActorMoveRel_b:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR actor_move_settings[rip]
	or	eax, DWORD PTR ACTOR_MOVE_ENABLED[rip]
	or	eax, DWORD PTR ACTOR_NOCLIP[rip]
	mov	rcx, QWORD PTR script_cmd_args[rip]
	mov	DWORD PTR actor_move_settings[rip], eax
	mov	rax, QWORD PTR script_actor[rip]
	mov	edx, DWORD PTR [rcx]
	sal	rax, 4
	add	rax, QWORD PTR actors[rip]
	mov	rsi, QWORD PTR [rax]
	mov	QWORD PTR actor_move_dest[rip], rsi
	test	edx, edx
	je	.L3
	sal	edx, 3
	cmp	DWORD PTR 4[rcx], 1
	movsx	rdx, edx
	je	.L15
	add	rdx, rsi
	mov	QWORD PTR actor_move_dest[rip], rdx
	cmp	rsi, rdx
	jg	.L16
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR 8[rcx]
	mov	QWORD PTR actor_move_dest[rip+8], rdx
	test	eax, eax
	je	.L8
	sal	eax, 3
	cmp	DWORD PTR 12[rcx], 1
	cdqe
	je	.L17
	add	rax, rdx
	mov	QWORD PTR actor_move_dest[rip+8], rax
	cmp	rdx, rax
	jle	.L8
	mov	rax, QWORD PTR ACTOR_MAX_Y[rip]
	mov	QWORD PTR actor_move_dest[rip+8], rax
.L8:
	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
	mov	eax, DWORD PTR FALSE[rip]
	mov	DWORD PTR script_action_complete[rip], eax
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, rdx
	mov	rcx, QWORD PTR ACTOR_MIN_Y[rip]
	sub	rdi, rax
	mov	QWORD PTR actor_move_dest[rip+8], rdi
	cmp	rdx, rdi
	jl	.L13
	cmp	rdi, rcx
	jge	.L8
.L13:
	mov	QWORD PTR actor_move_dest[rip+8], rcx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, rsi
	sub	rdi, rdx
	mov	rdx, rdi
	mov	QWORD PTR actor_move_dest[rip], rdi
	mov	rdi, QWORD PTR ACTOR_MIN_X[rip]
	cmp	rsi, rdx
	jl	.L12
	cmp	rdx, rdi
	jge	.L3
.L12:
	mov	QWORD PTR actor_move_dest[rip], rdi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdx, QWORD PTR ACTOR_MAX_X[rip]
	mov	QWORD PTR actor_move_dest[rip], rdx
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	Script_ActorMoveRel_b, .-Script_ActorMoveRel_b
	.comm	script_ptr,4,4
	.comm	script_cmd_args_len,8,8
	.comm	script_cmd_args,8,8
	.comm	script_actor,8,8
	.comm	script_action_complete,4,4
	.comm	actors,8,8
	.comm	actor_move_settings,4,4
	.comm	actor_move_dest,16,16
	.comm	FALSE,4,4
	.comm	ACTOR_NOCLIP,4,4
	.comm	ACTOR_MOVE_ENABLED,4,4
	.comm	ACTOR_MIN_Y,8,8
	.comm	ACTOR_MIN_X,8,8
	.comm	ACTOR_MAX_Y,8,8
	.comm	ACTOR_MAX_X,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_ActorMoveRel_b.c"
	.text
	.align	2
	.global	Script_ActorMoveRel_b
	.syntax unified
	.arm
	.fpu softvfp
	.type	Script_ActorMoveRel_b, %function
Script_ActorMoveRel_b:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L18
	ldr	r1, .L18+4
	ldr	r0, .L18+8
	ldr	r3, [r2]
	ldr	r1, [r1]
	str	lr, [sp, #-4]!
	ldr	lr, [r0]
	ldr	r0, .L18+12
	ldr	ip, .L18+16
	orr	r3, r3, r1
	ldr	r1, .L18+20
	orr	r3, r3, lr
	ldr	r0, [r0]
	ldr	lr, [r1]
	str	r3, [r2]
	ldr	r2, [ip]
	ldr	r3, [r0]
	ldr	ip, [r2, lr, lsl #3]
	ldr	r1, .L18+24
	cmp	r3, #0
	add	r2, r2, lr, lsl #3
	str	ip, [r1]
	beq	.L3
	ldr	lr, [r0, #4]
	lsl	r3, r3, #3
	cmp	lr, #1
	beq	.L16
	add	r3, ip, r3
	cmp	ip, r3
	str	r3, [r1]
	ldrgt	r3, .L18+28
	ldrgt	r3, [r3]
	strgt	r3, [r1]
.L3:
	ldr	r3, [r0, #8]
	ldr	r2, [r2, #4]
	cmp	r3, #0
	str	r2, [r1, #4]
	beq	.L8
	ldr	r0, [r0, #12]
	lsl	r3, r3, #3
	cmp	r0, #1
	beq	.L17
	add	r3, r2, r3
	cmp	r2, r3
	str	r3, [r1, #4]
	ldrgt	r3, .L18+32
	ldrgt	r3, [r3]
	strgt	r3, [r1, #4]
.L8:
	ldr	r3, .L18+36
	ldr	r2, .L18+40
	ldr	r1, .L18+44
	ldr	r3, [r3]
	ldr	ip, [r2]
	ldr	r0, [r1]
	add	r3, r3, #1
	ldr	r1, .L18+48
	add	r3, r3, ip
	str	r3, [r2]
	str	r0, [r1]
	ldr	pc, [sp], #4
.L17:
	sub	r3, r2, r3
	ldr	r0, .L18+52
	cmp	r2, r3
	str	r3, [r1, #4]
	ldr	r2, [r0]
	blt	.L14
	cmp	r3, r2
	bge	.L8
.L14:
	str	r2, [r1, #4]
	b	.L8
.L16:
	sub	r3, ip, r3
	ldr	lr, .L18+56
	cmp	ip, r3
	str	r3, [r1]
	ldr	ip, [lr]
	blt	.L13
	cmp	r3, ip
	bge	.L3
.L13:
	str	ip, [r1]
	b	.L3
.L19:
	.align	2
.L18:
	.word	actor_move_settings
	.word	ACTOR_MOVE_ENABLED
	.word	ACTOR_NOCLIP
	.word	script_cmd_args
	.word	actors
	.word	script_actor
	.word	actor_move_dest
	.word	ACTOR_MAX_X
	.word	ACTOR_MAX_Y
	.word	script_cmd_args_len
	.word	script_ptr
	.word	FALSE
	.word	script_action_complete
	.word	ACTOR_MIN_Y
	.word	ACTOR_MIN_X
	.size	Script_ActorMoveRel_b, .-Script_ActorMoveRel_b
	.comm	script_ptr,4,4
	.comm	script_cmd_args_len,4,4
	.comm	script_cmd_args,4,4
	.comm	script_actor,4,4
	.comm	script_action_complete,4,4
	.comm	actors,4,4
	.comm	actor_move_settings,4,4
	.comm	actor_move_dest,8,4
	.comm	FALSE,4,4
	.comm	ACTOR_NOCLIP,4,4
	.comm	ACTOR_MOVE_ENABLED,4,4
	.comm	ACTOR_MIN_Y,4,4
	.comm	ACTOR_MIN_X,4,4
	.comm	ACTOR_MAX_Y,4,4
	.comm	ACTOR_MAX_X,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
