	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DrawLayer
_DrawLayer:                             ## @DrawLayer
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -64(%rbp)
	movl	%ecx, -56(%rbp)
	movq	_Pico@GOTPCREL(%rip), %r9
	movq	16(%r9), %r11
	movl	64(%r11), %esi
	movl	%esi, %eax
	andl	$3, %eax
	leaq	L___const.DrawLayer.shift(%rip), %rcx
	movzbl	(%rax,%rcx), %r10d
	movl	$-1, %ebx
	movl	%r10d, %ecx
	shll	%cl, %ebx
	movl	%edi, %r8d
	notl	%ebx
	movl	%ebx, -52(%rbp)
	andl	$48, %esi
	shll	$4, %esi
	orl	$255, %esi
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.2:
	andl	$511, %esi                      ## imm = 0x1FF
	jmp	LBB0_4
LBB0_3:
	movl	$255, %esi
LBB0_4:
	xorl	%ecx, %ecx
	movl	%r8d, %eax
	andl	$1, %eax
	movl	8(%r11,%rax,8), %r12d
	setne	%cl
	leal	(%rcx,%rcx,2), %ecx
	addl	$9, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	andl	$28672, %r12d                   ## imm = 0x7000
	movl	%r12d, -48(%rbp)
	movl	44(%r11), %r14d
	movl	52(%r11), %ecx
	shll	$9, %ecx
	movl	%r14d, %edi
	shll	$30, %edi
	sarl	$31, %edi
	movq	_DrawScanline@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	leal	(%rbx,%rbx), %r15d
	andl	%r15d, %edi
	addl	%ecx, %edi
	movl	%edi, %ecx
	andl	$32752, %ecx                    ## imm = 0x7FF0
	testb	$1, %r14b
	cmovnel	%edi, %ecx
	movq	8(%r9), %rdi
	andl	$32766, %ecx                    ## imm = 0x7FFE
	orl	%eax, %ecx
	movl	(%rdi,%rcx,4), %ecx
	movl	%ecx, -40(%rbp)
	movl	48(%r11), %ecx
	notl	%ecx
	testb	$6, %cl
	jne	LBB0_6
## %bb.5:
	movq	(%r9), %rcx
	movl	%eax, %eax
	addl	(%rcx,%rax,4), %r15d
	leal	(%rsi,%rsi), %eax
	incl	%eax
	andl	%r15d, %eax
	movl	%eax, -44(%rbp)
	shrl	$4, %eax
	movl	%r10d, %ecx
	shll	%cl, %eax
	addl	%r12d, %eax
	movl	%eax, -48(%rbp)
	leaq	-64(%rbp), %rdi
	callq	_DrawStripInterlace
	jmp	LBB0_9
LBB0_6:
	testb	$4, %r14b
	jne	LBB0_7
## %bb.8:
	movq	(%r9), %rcx
	movl	%eax, %eax
	addl	(%rcx,%rax,4), %ebx
	andl	%esi, %ebx
	movl	%ebx, -44(%rbp)
	shrl	$3, %ebx
	movl	%r10d, %ecx
	shll	%cl, %ebx
	addl	%r12d, %ebx
	movl	%ebx, -48(%rbp)
	leaq	-64(%rbp), %rdi
	movl	%r8d, %esi
	callq	_DrawStrip
	jmp	LBB0_9
LBB0_7:
	shll	$24, %r10d
	orl	%r10d, %esi
	movl	%esi, -44(%rbp)
	leaq	-64(%rbp), %rdi
	movl	%r8d, %esi
	callq	_DrawStripVSRam
LBB0_9:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico,24,3                      ## @Pico
	.section	__TEXT,__literal4,4byte_literals
L___const.DrawLayer.shift:              ## @__const.DrawLayer.shift
	.ascii	"\005\006\005\007"

	.comm	_DrawScanline,4,2               ## @DrawScanline
	.no_dead_strip	_DrawLayer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DrawLayer
_DrawLayer:                             ; @DrawLayer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x8, x0
	str	x1, [sp]
Lloh0:
	adrp	x9, _Pico@GOTPAGE
Lloh1:
	ldr	x9, [x9, _Pico@GOTPAGEOFF]
	ldp	x17, x10, [x9, #8]
	ldr	w11, [x10, #64]
	lsr	w12, w11, #4
Lloh2:
	adrp	x13, l___const.DrawLayer.shift@PAGE
Lloh3:
	add	x13, x13, l___const.DrawLayer.shift@PAGEOFF
	and	x14, x11, #0x3
	ldrb	w11, [x13, x14]
	mov	w13, #-1
	lsl	w13, w13, w11
	mvn	w13, w13
	stp	w3, w13, [sp, #8]
	mov	w13, #255
	bfi	w13, w12, #8, #2
	mov	w12, #255
	and	w15, w13, #0x1ff
	cmp	w14, #1
	csel	w12, w12, w15, ne
	cmp	w14, #0
	csel	w12, w13, w12, eq
	ands	w13, w0, #0x1
	mov	w14, #16
	mov	w15, #8
	csel	x14, x15, x14, eq
	mov	w15, #12
	mov	w16, #9
	ldr	w14, [x10, x14]
	csel	w15, w16, w15, eq
	lsl	w0, w14, w15
	ldp	w3, w1, [x10, #48]
	ldr	w14, [x10, #44]
	lsl	w10, w14, #30
Lloh4:
	adrp	x15, _DrawScanline@GOTPAGE
Lloh5:
	ldr	x15, [x15, _DrawScanline@GOTPAGEOFF]
Lloh6:
	ldr	w15, [x15]
	lsl	w16, w15, #1
	and	w10, w16, w10, asr #31
	add	w10, w10, w1, lsl #9
	and	w1, w10, #0x7ff0
	tst	w14, #0x1
	csel	w1, w1, w10, eq
	and	w10, w0, #0x7000
	str	w10, [sp, #16]
	and	w0, w1, #0x7ffe
	orr	w0, w0, w13
	ldr	w17, [x17, w0, uxtw #2]
	str	w17, [sp, #24]
	mvn	w17, w3
	tst	w17, #0x6
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x9]
	ldr	w8, [x8, w13, uxtw #2]
	mov	w9, #1
	bfi	w9, w12, #1, #10
	add	w8, w8, w16
	and	w8, w8, w9
	lsr	w9, w8, #4
	lsl	w9, w9, w11
	add	w9, w9, w10
	stp	w9, w8, [sp, #16]
	mov	x0, sp
	bl	_DrawStripInterlace
	b	LBB0_5
LBB0_2:
	tbnz	w14, #2, LBB0_4
; %bb.3:
	ldr	x9, [x9]
	ldr	w9, [x9, w13, uxtw #2]
	add	w9, w9, w15
	and	w9, w9, w12
	lsr	w12, w9, #3
	lsl	w11, w12, w11
	add	w10, w11, w10
	stp	w10, w9, [sp, #16]
	mov	x0, sp
	mov	x1, x8
	bl	_DrawStrip
	b	LBB0_5
LBB0_4:
	bfi	w12, w11, #24, #8
	str	w12, [sp, #20]
	mov	x0, sp
	mov	x1, x8
	bl	_DrawStripVSRam
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico,24,3                      ; @Pico
	.section	__TEXT,__literal4,4byte_literals
l___const.DrawLayer.shift:              ; @__const.DrawLayer.shift
	.ascii	"\005\006\005\007"

	.comm	_DrawScanline,4,2               ; @DrawScanline
	.no_dead_strip	_DrawLayer
.subsections_via_symbols
