	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SceneUpdateCamera_b            ## -- Begin function SceneUpdateCamera_b
	.p2align	4, 0x90
_SceneUpdateCamera_b:                   ## @SceneUpdateCamera_b
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_camera_settings@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movq	_CAMERA_LOCK_FLAG@GOTPCREL(%rip), %rcx
	notl	%eax
	testl	%eax, (%rcx)
	jne	LBB0_1
## %bb.2:
	movq	_actors@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	4(%rax), %r14d
	movq	_SCREEN_WIDTH_HALF@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movq	_scene_width@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MUL_8
	subq	(%r13), %rax
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ClampUBYTE
	subq	(%r13), %rax
	movq	_camera_dest@GOTPCREL(%rip), %r13
	movq	%rax, (%r13)
	movq	(%r12), %rax
	movl	(%rax), %r14d
	movq	_SCREEN_HEIGHT_HALF@GOTPCREL(%rip), %r12
	movq	(%r12), %rbx
	movq	_scene_height@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MUL_8
	subq	(%r12), %rax
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ClampUBYTE
	subq	(%r12), %rax
	movq	%rax, 8(%r13)
	jmp	LBB0_3
LBB0_1:
	movq	_camera_dest@GOTPCREL(%rip), %rax
	movq	8(%rax), %rax
LBB0_3:
	movq	_SCX_REG@GOTPCREL(%rip), %r9
	movq	(%r9), %rsi
	movq	_camera_dest@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	movq	%rsi, %rdi
	xorq	%rbx, %rdi
	movq	_SCY_REG@GOTPCREL(%rip), %r10
	movq	(%r10), %r11
	movq	%r11, %rdx
	xorq	%rax, %rdx
	xorl	%ecx, %ecx
	orq	%rdi, %rdx
	setne	%cl
	movq	_camera_moved@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	je	LBB0_15
## %bb.4:
	movl	(%r15), %ecx
	movq	_CAMERA_TRANSITION_FLAG@GOTPCREL(%rip), %rdx
	notl	%ecx
	testl	%ecx, (%rdx)
	jne	LBB0_13
## %bb.5:
	movq	_time@GOTPCREL(%rip), %rcx
	movq	_camera_speed@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	jne	LBB0_15
## %bb.6:
	movq	$-1, %r8
	cmpq	%rbx, %rsi
	jg	LBB0_8
## %bb.7:
	movl	$1, %r8d
	jge	LBB0_9
LBB0_8:
	addq	%r8, %rsi
	movq	%rsi, (%r9)
LBB0_9:
	cmpq	%rax, %r11
	jle	LBB0_11
## %bb.10:
	decq	%r11
	movq	%r11, %rax
	jmp	LBB0_14
LBB0_13:
	movq	%rbx, (%r9)
LBB0_14:
	movq	%rax, (%r10)
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	jge	LBB0_15
## %bb.12:
	incq	%r11
	movq	%r11, %rax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_camera_settings,4,2            ## @camera_settings
	.comm	_CAMERA_LOCK_FLAG,4,2           ## @CAMERA_LOCK_FLAG
	.comm	_actors,8,3                     ## @actors
	.comm	_SCREEN_WIDTH_HALF,8,3          ## @SCREEN_WIDTH_HALF
	.comm	_scene_width,4,2                ## @scene_width
	.comm	_camera_dest,16,3               ## @camera_dest
	.comm	_SCREEN_HEIGHT_HALF,8,3         ## @SCREEN_HEIGHT_HALF
	.comm	_scene_height,4,2               ## @scene_height
	.comm	_SCX_REG,8,3                    ## @SCX_REG
	.comm	_SCY_REG,8,3                    ## @SCY_REG
	.comm	_camera_moved,4,2               ## @camera_moved
	.comm	_CAMERA_TRANSITION_FLAG,4,2     ## @CAMERA_TRANSITION_FLAG
	.comm	_time,4,2                       ## @time
	.comm	_camera_speed,4,2               ## @camera_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SceneUpdateCamera_b            ; -- Begin function SceneUpdateCamera_b
	.p2align	2
_SceneUpdateCamera_b:                   ; @SceneUpdateCamera_b
	.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
Lloh0:
	adrp	x21, _camera_settings@GOTPAGE
Lloh1:
	ldr	x21, [x21, _camera_settings@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x9, _CAMERA_LOCK_FLAG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CAMERA_LOCK_FLAG@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x22, _camera_dest@GOTPAGE
Lloh6:
	ldr	x22, [x22, _camera_dest@GOTPAGEOFF]
	bics	wzr, w9, w8
	b.ne	LBB0_2
; %bb.1:
Lloh7:
	adrp	x23, _actors@GOTPAGE
Lloh8:
	ldr	x23, [x23, _actors@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	w19, [x8, #4]
Lloh9:
	adrp	x24, _SCREEN_WIDTH_HALF@GOTPAGE
Lloh10:
	ldr	x24, [x24, _SCREEN_WIDTH_HALF@GOTPAGEOFF]
	ldr	x20, [x24]
Lloh11:
	adrp	x8, _scene_width@GOTPAGE
Lloh12:
	ldr	x8, [x8, _scene_width@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_MUL_8
	ldr	x8, [x24]
	sub	x2, x0, x8
	mov	x0, x19
	mov	x1, x20
	bl	_ClampUBYTE
	ldr	x8, [x24]
	sub	x8, x0, x8
	str	x8, [x22]
	ldr	x8, [x23]
	ldr	w19, [x8]
Lloh14:
	adrp	x23, _SCREEN_HEIGHT_HALF@GOTPAGE
Lloh15:
	ldr	x23, [x23, _SCREEN_HEIGHT_HALF@GOTPAGEOFF]
	ldr	x20, [x23]
Lloh16:
	adrp	x8, _scene_height@GOTPAGE
Lloh17:
	ldr	x8, [x8, _scene_height@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_MUL_8
	ldr	x8, [x23]
	sub	x2, x0, x8
	mov	x0, x19
	mov	x1, x20
	bl	_ClampUBYTE
	ldr	x8, [x23]
	sub	x8, x0, x8
	str	x8, [x22, #8]
	b	LBB0_3
LBB0_2:
	ldr	x8, [x22, #8]
LBB0_3:
Lloh19:
	adrp	x11, _SCX_REG@GOTPAGE
Lloh20:
	ldr	x11, [x11, _SCX_REG@GOTPAGEOFF]
	ldr	x12, [x11]
	ldr	x13, [x22]
	cmp	x12, x13
Lloh21:
	adrp	x9, _SCY_REG@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SCY_REG@GOTPAGEOFF]
	ldr	x10, [x9]
	ccmp	x10, x8, #0, eq
	cset	w14, ne
Lloh23:
	adrp	x15, _camera_moved@GOTPAGE
Lloh24:
	ldr	x15, [x15, _camera_moved@GOTPAGEOFF]
Lloh25:
	str	w14, [x15]
	b.eq	LBB0_10
; %bb.4:
	ldr	w14, [x21]
Lloh26:
	adrp	x15, _CAMERA_TRANSITION_FLAG@GOTPAGE
Lloh27:
	ldr	x15, [x15, _CAMERA_TRANSITION_FLAG@GOTPAGEOFF]
Lloh28:
	ldr	w15, [x15]
	bics	wzr, w15, w14
	b.ne	LBB0_8
; %bb.5:
Lloh29:
	adrp	x14, _time@GOTPAGE
Lloh30:
	ldr	x14, [x14, _time@GOTPAGEOFF]
Lloh31:
	ldr	w14, [x14]
Lloh32:
	adrp	x15, _camera_speed@GOTPAGE
Lloh33:
	ldr	x15, [x15, _camera_speed@GOTPAGEOFF]
Lloh34:
	ldr	w15, [x15]
	tst	w15, w14
	b.ne	LBB0_10
; %bb.6:
	cmp	x12, x13
	b.le	LBB0_11
; %bb.7:
	mov	x13, #-1
	b	LBB0_13
LBB0_8:
	str	x13, [x11]
LBB0_9:
	str	x8, [x9]
LBB0_10:
	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
	ret
LBB0_11:
	b.ge	LBB0_14
; %bb.12:
	mov	w13, #1
LBB0_13:
	add	x12, x12, x13
	str	x12, [x11]
LBB0_14:
	cmp	x10, x8
	b.le	LBB0_16
; %bb.15:
	sub	x8, x10, #1
	b	LBB0_9
LBB0_16:
	b.ge	LBB0_10
; %bb.17:
	add	x8, x10, #1
	b	LBB0_9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_camera_settings,4,2            ; @camera_settings
	.comm	_CAMERA_LOCK_FLAG,4,2           ; @CAMERA_LOCK_FLAG
	.comm	_actors,8,3                     ; @actors
	.comm	_SCREEN_WIDTH_HALF,8,3          ; @SCREEN_WIDTH_HALF
	.comm	_scene_width,4,2                ; @scene_width
	.comm	_camera_dest,16,3               ; @camera_dest
	.comm	_SCREEN_HEIGHT_HALF,8,3         ; @SCREEN_HEIGHT_HALF
	.comm	_scene_height,4,2               ; @scene_height
	.comm	_SCX_REG,8,3                    ; @SCX_REG
	.comm	_SCY_REG,8,3                    ; @SCY_REG
	.comm	_camera_moved,4,2               ; @camera_moved
	.comm	_CAMERA_TRANSITION_FLAG,4,2     ; @CAMERA_TRANSITION_FLAG
	.comm	_time,4,2                       ; @time
	.comm	_camera_speed,4,2               ; @camera_speed
.subsections_via_symbols
