	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FinalizeLine555                ## -- Begin function FinalizeLine555
	.p2align	4, 0x90
_FinalizeLine555:                       ## @FinalizeLine555
	.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
	movl	%edi, %r14d
	movq	_DrawLineDest@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_HighCol@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_HighPal@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_Pico@GOTPCREL(%rip), %r13
	cmpq	$0, 8(%r13)
	je	LBB0_2
## %bb.1:
	movl	%r14d, %edi
	callq	_PicoDoHighPal555
LBB0_2:
	movq	(%r13), %rcx
	movl	$320, %eax                      ## imm = 0x140
	testb	$1, 48(%rcx)
	jne	LBB0_4
## %bb.3:
	movq	_PicoOpt@GOTPCREL(%rip), %rax
	movq	_POPT_DIS_32C_BORDER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	testl	%ecx, (%rax)
	sete	%dl
	shlq	$6, %rdx
	addq	%rdx, %r15
	movl	$256, %eax                      ## imm = 0x100
LBB0_4:
	movl	$255, %ecx
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.5:
	movq	_rendstatus@GOTPCREL(%rip), %rcx
	movq	_PDRAW_SPR_LO_ON_HI@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	movl	$255, %edx
	movl	$63, %ecx
	cmoveq	%rdx, %rcx
LBB0_6:
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	8(%r12,%rdx), %esi
	andl	%ecx, %esi
	movzwl	(%rbx,%rsi,2), %esi
	movw	%si, (%r15,%rdx,2)
	movzbl	9(%r12,%rdx), %esi
	andl	%ecx, %esi
	movzwl	(%rbx,%rsi,2), %esi
	movw	%si, 2(%r15,%rdx,2)
	movzbl	10(%r12,%rdx), %esi
	andl	%ecx, %esi
	movzwl	(%rbx,%rsi,2), %esi
	movw	%si, 4(%r15,%rdx,2)
	movzbl	11(%r12,%rdx), %esi
	andl	%ecx, %esi
	movzwl	(%rbx,%rsi,2), %esi
	movw	%si, 6(%r15,%rdx,2)
	addq	$4, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_7
## %bb.8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DrawLineDest,8,3               ## @DrawLineDest
	.comm	_HighCol,8,3                    ## @HighCol
	.comm	_HighPal,8,3                    ## @HighPal
	.comm	_Pico,16,3                      ## @Pico
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_POPT_DIS_32C_BORDER,4,2        ## @POPT_DIS_32C_BORDER
	.comm	_rendstatus,4,2                 ## @rendstatus
	.comm	_PDRAW_SPR_LO_ON_HI,4,2         ## @PDRAW_SPR_LO_ON_HI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FinalizeLine555                ; -- Begin function FinalizeLine555
	.p2align	2
_FinalizeLine555:                       ; @FinalizeLine555
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _DrawLineDest@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DrawLineDest@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
Lloh3:
	adrp	x8, _HighCol@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HighCol@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x8]
Lloh6:
	adrp	x8, _HighPal@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HighPal@GOTPAGEOFF]
Lloh8:
	ldr	x21, [x8]
Lloh9:
	adrp	x23, _Pico@GOTPAGE
Lloh10:
	ldr	x23, [x23, _Pico@GOTPAGEOFF]
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_PicoDoHighPal555
LBB0_2:
	ldr	x8, [x23]
	ldrb	w8, [x8, #48]
	tbnz	w8, #0, LBB0_5
; %bb.3:
Lloh11:
	adrp	x8, _PicoOpt@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PicoOpt@GOTPAGEOFF]
Lloh13:
	adrp	x9, _POPT_DIS_32C_BORDER@GOTPAGE
Lloh14:
	ldr	x9, [x9, _POPT_DIS_32C_BORDER@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, eq
	add	x20, x20, x8, lsl #6
	mov	w8, #256
	add	x9, x22, #8
	cbz	w19, LBB0_6
LBB0_4:
	mov	w10, #255
	b	LBB0_7
LBB0_5:
	mov	w8, #320
	add	x9, x22, #8
	cbnz	w19, LBB0_4
LBB0_6:
Lloh17:
	adrp	x10, _rendstatus@GOTPAGE
Lloh18:
	ldr	x10, [x10, _rendstatus@GOTPAGEOFF]
Lloh19:
	adrp	x11, _PDRAW_SPR_LO_ON_HI@GOTPAGE
Lloh20:
	ldr	x11, [x11, _PDRAW_SPR_LO_ON_HI@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
Lloh22:
	ldr	w11, [x11]
	tst	w11, w10
	mov	w10, #63
	mov	w11, #255
	csel	x10, x11, x10, eq
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x9], #1
	and	x11, x10, x11
	ldrh	w11, [x21, x11, lsl #1]
	strh	w11, [x20], #2
	subs	x8, x8, #1
	b.ne	LBB0_7
; %bb.8:
	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
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DrawLineDest,8,3               ; @DrawLineDest
	.comm	_HighCol,8,3                    ; @HighCol
	.comm	_HighPal,8,3                    ; @HighPal
	.comm	_Pico,16,3                      ; @Pico
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_POPT_DIS_32C_BORDER,4,2        ; @POPT_DIS_32C_BORDER
	.comm	_rendstatus,4,2                 ; @rendstatus
	.comm	_PDRAW_SPR_LO_ON_HI,4,2         ; @PDRAW_SPR_LO_ON_HI
.subsections_via_symbols
