	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kirai                          ## -- Begin function kirai
	.p2align	4, 0x90
_kirai:                                 ## @kirai
	.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	_MAX_KT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.1:
	xorl	%ebx, %ebx
	movq	_kf@GOTPCREL(%rip), %r15
	movq	_ky@GOTPCREL(%rip), %r12
	movq	_DEF_KS@GOTPCREL(%rip), %r14
	movq	_DEF_KC@GOTPCREL(%rip), %r13
	jmp	LBB0_2
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$3, %ecx
	subl	%esi, %ecx
	movl	%ecx, (%rax,%rbx,4)
	movl	%ecx, %esi
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rdi
	addq	%rbx, %rdi
	addl	(%r13), %esi
	callq	_set_sprite_tile
	movq	(%r14), %rdi
	addq	%rbx, %rdi
	movq	_foreCGB@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	movslq	(%rcx,%rbx,4), %rcx
	movslq	(%r13), %rdx
	addq	%rcx, %rdx
	movl	(%rax,%rdx,4), %esi
	callq	_set_sprite_attrb
	movq	(%r14), %rdi
	addq	%rbx, %rdi
	movq	_kx@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdx
	callq	_move_sprite
	movq	_MAX_KT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rcx, %rbx
	jae	LBB0_15
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	testl	%esi, %esi
	je	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdx
	decq	%rdx
	movq	%rdx, (%rcx,%rbx,8)
	cmpl	$3, %esi
	jl	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%esi
	movl	%esi, (%rax,%rbx,4)
	movq	_kx@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r8
	movl	(%r8,%rbx,4), %r9d
	movq	_px@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	leal	-5(%rdx), %edi
	cmpl	%edi, %r9d
	jle	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	$12, %edx
	cmpl	%edx, %r9d
	jge	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_pf@GOTPCREL(%rip), %rdx
	cmpl	$1, (%rdx)
	jg	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_pf@GOTPCREL(%rip), %rdx
	movl	$2, (%rdx)
	movl	(%rax,%rbx,4), %esi
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$6, %esi
	jl	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, (%rax,%rbx,4)
	movq	_DEF_KX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, (%r8,%rbx,4)
	movq	_DEF_KY@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, (%rcx,%rbx,8)
	movl	(%rax,%rbx,4), %esi
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_MIN_KY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jg	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$3, (%rax,%rbx,4)
	movl	$3, %esi
	jmp	LBB0_13
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_KT,8,3                     ## @MAX_KT
	.comm	_kf,8,3                         ## @kf
	.comm	_ky,8,3                         ## @ky
	.comm	_kx,8,3                         ## @kx
	.comm	_px,4,2                         ## @px
	.comm	_pf,4,2                         ## @pf
	.comm	_DEF_KX,4,2                     ## @DEF_KX
	.comm	_DEF_KY,8,3                     ## @DEF_KY
	.comm	_MIN_KY,8,3                     ## @MIN_KY
	.comm	_DEF_KS,8,3                     ## @DEF_KS
	.comm	_DEF_KC,4,2                     ## @DEF_KC
	.comm	_foreCGB,8,3                    ## @foreCGB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kirai                          ; -- Begin function kirai
	.p2align	2
_kirai:                                 ; @kirai
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x19, _MAX_KT@GOTPAGE
Lloh1:
	ldr	x19, [x19, _MAX_KT@GOTPAGEOFF]
	ldr	x9, [x19]
	cbz	x9, LBB0_15
; %bb.1:
	mov	x20, #0
Lloh2:
	adrp	x21, _kf@GOTPAGE
Lloh3:
	ldr	x21, [x21, _kf@GOTPAGEOFF]
Lloh4:
	adrp	x22, _ky@GOTPAGE
Lloh5:
	ldr	x22, [x22, _ky@GOTPAGEOFF]
Lloh6:
	adrp	x23, _kx@GOTPAGE
Lloh7:
	ldr	x23, [x23, _kx@GOTPAGEOFF]
Lloh8:
	adrp	x28, _DEF_KS@GOTPAGE
Lloh9:
	ldr	x28, [x28, _DEF_KS@GOTPAGEOFF]
Lloh10:
	adrp	x26, _DEF_KC@GOTPAGE
Lloh11:
	ldr	x26, [x26, _DEF_KC@GOTPAGEOFF]
Lloh12:
	adrp	x27, _foreCGB@GOTPAGE
Lloh13:
	ldr	x27, [x27, _foreCGB@GOTPAGEOFF]
Lloh14:
	adrp	x25, _MIN_KY@GOTPAGE
Lloh15:
	ldr	x25, [x25, _MIN_KY@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w9, #3
	sub	w10, w9, w10
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	w10, [x8, x20, lsl #2]
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x28]
	add	x0, x20, x8
	ldr	w8, [x26]
	add	w1, w8, w10
	bl	_set_sprite_tile
	ldr	x8, [x28]
	add	x0, x20, x8
	ldr	x8, [x27]
	ldr	x9, [x21]
	ldr	w9, [x9, x24]
	ldr	w10, [x26]
	add	w9, w10, w9
	ldr	w1, [x8, w9, sxtw #2]
	bl	_set_sprite_attrb
	ldr	x8, [x28]
	add	x0, x20, x8
	ldr	x8, [x23]
	ldr	w1, [x8, x24]
	ldr	x8, [x22]
	ldr	x2, [x8, x20, lsl #3]
	bl	_move_sprite
	ldr	x9, [x19]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x20, #1
	cmp	x20, x9
	b.hs	LBB0_15
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w10, [x8, x20, lsl #2]
	cbz	w10, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x22]
	lsl	x12, x20, #3
	ldr	x11, [x9, x12]
	sub	x11, x11, #1
	str	x11, [x9, x12]
	lsl	x24, x20, #2
	cmp	w10, #3
	b.lt	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w10, w10, #1
	str	w10, [x8, x24]
	ldr	x11, [x23]
	ldr	w12, [x11, x24]
Lloh16:
	adrp	x13, _px@GOTPAGE
Lloh17:
	ldr	x13, [x13, _px@GOTPAGEOFF]
Lloh18:
	ldr	w13, [x13]
	sub	w14, w13, #5
	cmp	w12, w14
	b.le	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w13, w13, #12
Lloh19:
	adrp	x14, _pf@GOTPAGE
Lloh20:
	ldr	x14, [x14, _pf@GOTPAGEOFF]
Lloh21:
	ldr	w14, [x14]
	cmp	w12, w13
	ccmp	w14, #1, #0, lt
	b.gt	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh22:
	adrp	x10, _pf@GOTPAGE
Lloh23:
	ldr	x10, [x10, _pf@GOTPAGEOFF]
	mov	w12, #2
Lloh24:
	str	w12, [x10]
	ldr	w10, [x8, x20, lsl #2]
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w10, #6
	b.lt	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	str	wzr, [x8, x24]
Lloh25:
	adrp	x10, _DEF_KX@GOTPAGE
Lloh26:
	ldr	x10, [x10, _DEF_KX@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	str	w10, [x11, x24]
Lloh28:
	adrp	x10, _DEF_KY@GOTPAGE
Lloh29:
	ldr	x10, [x10, _DEF_KY@GOTPAGEOFF]
Lloh30:
	ldr	x10, [x10]
	str	x10, [x9, x20, lsl #3]
	ldr	w10, [x8, x24]
	b	LBB0_4
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x25]
	cmp	x11, x9
	b.gt	LBB0_2
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w10, #3
	b	LBB0_3
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_KT,8,3                     ; @MAX_KT
	.comm	_kf,8,3                         ; @kf
	.comm	_ky,8,3                         ; @ky
	.comm	_kx,8,3                         ; @kx
	.comm	_px,4,2                         ; @px
	.comm	_pf,4,2                         ; @pf
	.comm	_DEF_KX,4,2                     ; @DEF_KX
	.comm	_DEF_KY,8,3                     ; @DEF_KY
	.comm	_MIN_KY,8,3                     ; @MIN_KY
	.comm	_DEF_KS,8,3                     ; @DEF_KS
	.comm	_DEF_KC,4,2                     ; @DEF_KC
	.comm	_foreCGB,8,3                    ; @foreCGB
.subsections_via_symbols
