	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DrawWindow
_DrawWindow:                            ## @DrawWindow
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r8d
	movl	%esi, %r15d
	movl	%edi, %r14d
	movq	_Pico@GOTPCREL(%rip), %r9
	movq	8(%r9), %rdx
	movl	12(%rdx), %eax
	shll	$9, %eax
	testb	$1, 48(%rdx)
	jne	LBB0_1
## %bb.2:
	andl	$31744, %eax                    ## imm = 0x7C00
	movq	_DrawScanline@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %ebx
                                        ## kill: def $edx killed $edx def $rdx
	andl	$-8, %edx
	leal	(%rax,%rdx,4), %edx
	jmp	LBB0_3
LBB0_1:
	andl	$30720, %eax                    ## imm = 0x7800
	movq	_DrawScanline@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %ebx
                                        ## kill: def $edx killed $edx def $rdx
	andl	$-8, %edx
	leal	(%rax,%rdx,8), %edx
LBB0_3:
	leal	(%r14,%r14), %eax
	movq	_rendstatus@GOTPCREL(%rip), %rdi
	movq	_PDRAW_WND_DIFF_PRIO@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rdi)
	jne	LBB0_5
## %bb.4:
	movq	(%r9), %rsi
	leal	(%rdx,%rax), %edi
	movslq	%edi, %rdi
	movl	(%rsi,%rdi,4), %esi
	sarl	$15, %esi
	cmpl	%r8d, %esi
	jne	LBB0_33
LBB0_5:
	addl	%r15d, %r15d
	addl	%ebx, %ebx
	andl	$14, %ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	je	LBB0_11
## %bb.6:
	cmpl	%r15d, %eax
	jge	LBB0_33
## %bb.7:
	movl	$14, %ecx
	subl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movslq	%eax, %rcx
	movslq	%edx, %r12
	addq	%rcx, %r12
	shll	$4, %r14d
	subl	%eax, %r15d
	movl	$-1, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_PDRAW_WND_DIFF_PRIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_rendstatus@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
LBB0_32:                                ##   in Loop: Header=BB0_8 Depth=1
	addl	$8, %r14d
	incq	%r12
	decl	%r15d
	je	LBB0_33
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r9), %rax
	movl	(%rax,%r12,4), %ebx
	cmpl	%r13d, %ebx
	je	LBB0_32
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %eax
	sarl	$15, %eax
	cmpl	%r8d, %eax
	jne	LBB0_10
## %bb.23:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %edx
	shrl	$9, %edx
	andl	$48, %edx
	testl	%r8d, %r8d
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_HighCol@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	andl	$-1077952577, 8(%rcx,%rax)      ## imm = 0xBFBFBFBF
	andl	$-1077952577, 12(%rcx,%rax)     ## imm = 0xBFBFBFBF
	jmp	LBB0_26
LBB0_25:                                ##   in Loop: Header=BB0_8 Depth=1
	orl	$64, %edx
LBB0_26:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %eax
	shll	$4, %eax
	andl	$32752, %eax                    ## imm = 0x7FF0
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	testl	$4096, %ebx                     ## imm = 0x1000
	je	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	-48(%rbp), %esi                 ## 4-byte Reload
LBB0_28:                                ##   in Loop: Header=BB0_8 Depth=1
	orl	%eax, %esi
	leal	8(%r14), %edi
	testl	$2048, %ebx                     ## imm = 0x800
	jne	LBB0_29
## %bb.30:                              ##   in Loop: Header=BB0_8 Depth=1
	callq	_TileNorm
	jmp	LBB0_31
LBB0_29:                                ##   in Loop: Header=BB0_8 Depth=1
	callq	_TileFlip
LBB0_31:                                ##   in Loop: Header=BB0_8 Depth=1
	testl	%eax, %eax
	cmovnel	%ebx, %r13d
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movq	_Pico@GOTPCREL(%rip), %r9
	jmp	LBB0_32
LBB0_11:
	cmpl	%r15d, %eax
	jge	LBB0_33
## %bb.12:
	movl	$14, %ecx
	subl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movslq	%eax, %rcx
	movslq	%edx, %rbx
	addq	%rcx, %rbx
	shll	$4, %r14d
	orl	$8, %r14d
	subl	%eax, %r15d
	movl	$-1, %r13d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_PDRAW_WND_DIFF_PRIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_rendstatus@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
LBB0_22:                                ##   in Loop: Header=BB0_13 Depth=1
	addl	$8, %r14d
	incq	%rbx
	decl	%r15d
	je	LBB0_33
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r9), %rax
	movl	(%rax,%rbx,4), %r12d
	cmpl	%r13d, %r12d
	je	LBB0_22
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%r12d, %eax
	sarl	$15, %eax
	cmpl	%r8d, %eax
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%r12d, %edx
	shrl	$9, %edx
	movl	%r12d, %eax
	shll	$4, %eax
	andl	$32752, %eax                    ## imm = 0x7FF0
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	testl	$4096, %r12d                    ## imm = 0x1000
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	-48(%rbp), %esi                 ## 4-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	orl	%eax, %esi
	andl	$48, %edx
	movl	%r14d, %edi
	testl	$2048, %r12d                    ## imm = 0x800
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=1
	callq	_TileNorm
	jmp	LBB0_21
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	callq	_TileFlip
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_Pico@GOTPCREL(%rip), %r9
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	testl	%eax, %eax
	cmovnel	%r12d, %r13d
	jmp	LBB0_22
LBB0_33:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico,16,3                      ## @Pico
	.comm	_DrawScanline,4,2               ## @DrawScanline
	.comm	_rendstatus,4,2                 ## @rendstatus
	.comm	_PDRAW_WND_DIFF_PRIO,4,2        ## @PDRAW_WND_DIFF_PRIO
	.comm	_HighCol,8,3                    ## @HighCol
	.no_dead_strip	_DrawWindow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DrawWindow
_DrawWindow:                            ; @DrawWindow
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x19, x2
Lloh0:
	adrp	x21, _Pico@GOTPAGE
Lloh1:
	ldr	x21, [x21, _Pico@GOTPAGEOFF]
	ldr	x9, [x21, #8]
	ldr	w8, [x9, #12]
	lsl	w8, w8, #9
	ldrb	w9, [x9, #48]
	tbnz	w9, #0, LBB0_2
; %bb.1:
	and	w8, w8, #0x7c00
Lloh2:
	adrp	x9, _DrawScanline@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DrawScanline@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x9]
	lsl	w9, w10, #2
	and	w9, w9, #0xffffffe0
	b	LBB0_3
LBB0_2:
	and	w8, w8, #0x7800
Lloh5:
	adrp	x9, _DrawScanline@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DrawScanline@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x9]
	lsl	w9, w10, #3
	and	w9, w9, #0xffffffc0
LBB0_3:
	add	w9, w9, w8
Lloh8:
	adrp	x22, _rendstatus@GOTPAGE
Lloh9:
	ldr	x22, [x22, _rendstatus@GOTPAGEOFF]
	lsl	w8, w0, #1
	ldr	w11, [x22]
Lloh10:
	adrp	x12, _PDRAW_WND_DIFF_PRIO@GOTPAGE
Lloh11:
	ldr	x12, [x12, _PDRAW_WND_DIFF_PRIO@GOTPAGEOFF]
Lloh12:
	ldr	w12, [x12]
	tst	w12, w11
	b.ne	LBB0_5
; %bb.4:
	ldr	x11, [x21]
	add	w12, w9, w8
	ldr	w11, [x11, w12, sxtw #2]
	cmp	w19, w11, asr #15
	b.ne	LBB0_29
LBB0_5:
	lsl	w11, w1, #1
	ubfiz	w24, w10, #1, #3
	cmp	w8, w11
	cbz	w3, LBB0_19
; %bb.6:
	b.ge	LBB0_29
; %bb.7:
	mov	w10, #14
	sub	w20, w10, w24
	sxtw	x9, w9
	lsl	w25, w0, #4
	add	x9, x9, w8, sxtw
	lsl	x26, x9, #2
	sub	w27, w11, w8
	mov	w28, #-1
	movi.8b	v8, #191
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
Lloh13:
	adrp	x8, _PDRAW_WND_DIFF_PRIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PDRAW_WND_DIFF_PRIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w25, w25, #8
	add	x26, x26, #4
	subs	w27, w27, #1
	b.eq	LBB0_29
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w23, [x8, x26]
	cmp	w23, w28
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w19, w23, asr #15
	b.ne	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	lsr	w8, w23, #9
	and	w2, w8, #0x30
	cbz	w19, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh16:
	adrp	x8, _HighCol@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HighCol@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	add	x8, x8, w25, sxtw
	ldr	d0, [x8, #8]
	and.8b	v0, v0, v8
	str	d0, [x8, #8]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	orr	w2, w2, #0x40
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=1
	ubfiz	w8, w23, #4, #11
	tst	w23, #0x1000
	csel	w9, w24, w20, eq
	orr	w1, w9, w8
	add	w0, w25, #8
	tbnz	w23, #11, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=1
	bl	_TileNorm
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=1
	bl	_TileFlip
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=1
	cmp	w0, #0
	csel	w28, w28, w23, eq
	b	LBB0_9
LBB0_19:
	b.ge	LBB0_29
; %bb.20:
	mov	w10, #14
	sub	w25, w10, w24
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	sxtw	x9, w9
	mov	w20, #8
	bfi	w20, w0, #4, #28
	add	x9, x9, w8, sxtw
	lsl	x26, x9, #2
	sub	w27, w11, w8
	mov	w28, #-1
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_23 Depth=1
Lloh19:
	adrp	x8, _PDRAW_WND_DIFF_PRIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PDRAW_WND_DIFF_PRIO@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	w20, w20, #8
	add	x26, x26, #4
	subs	w27, w27, #1
	b.eq	LBB0_29
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w23, [x8, x26]
	cmp	w23, w28
	b.eq	LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	cmp	w19, w23, asr #15
	b.ne	LBB0_21
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	lsr	w8, w23, #9
	and	w2, w8, #0x30
	ubfiz	w8, w23, #4, #11
	tst	w23, #0x1000
	csel	w9, w24, w25, eq
	orr	w1, w9, w8
	mov	x0, x20
	tbnz	w23, #11, LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_23 Depth=1
	bl	_TileNorm
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_23 Depth=1
	bl	_TileFlip
LBB0_28:                                ;   in Loop: Header=BB0_23 Depth=1
	cmp	w0, #0
	csel	w28, w28, w23, eq
	b	LBB0_22
LBB0_29:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico,16,3                      ; @Pico
	.comm	_DrawScanline,4,2               ; @DrawScanline
	.comm	_rendstatus,4,2                 ; @rendstatus
	.comm	_PDRAW_WND_DIFF_PRIO,4,2        ; @PDRAW_WND_DIFF_PRIO
	.comm	_HighCol,8,3                    ; @HighCol
	.no_dead_strip	_DrawWindow
.subsections_via_symbols
