	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function draw_cd_leds
_draw_cd_leds:                          ## @draw_cd_leds
	.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	_Pico_mcd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %ebx
	movq	_currentConfig@GOTPCREL(%rip), %rax
	movq	_EOPT_WIZ_TEAR_FIX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	andl	(%rax), %r12d
	movl	$4, %eax
	movl	$-1440, %r14d                   ## imm = 0xFA60
	cmovel	%eax, %r14d
	movl	$644, %eax                      ## imm = 0x284
	movl	$75840, %r15d                   ## imm = 0x12840
	cmoveq	%rax, %r15
	movl	$320, %eax                      ## imm = 0x140
	movl	$240, %r13d
	cmovel	%eax, %r13d
	xorl	%eax, %eax
	callq	_is_16bit_mode
	movq	_g_screen_ptr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%ebx, %edx
	shll	$30, %edx
	sarl	$31, %edx
	andl	$100664832, %edx                ## imm = 0x6000600
	andl	$1, %ebx
	negl	%ebx
	andl	$-1073692672, %ebx              ## imm = 0xC000C000
	movl	%r13d, %r8d
	orl	$1, %r8d
	movl	%r13d, %r11d
	shrl	%r11d
	movl	%r11d, %r10d
	orl	$1, %r10d
	leal	(%r14,%r13,2), %eax
	sarl	%eax
	movslq	%eax, %r9
	movl	%eax, %esi
	orl	$1, %esi
	testl	%r12d, %r12d
	leaq	(%rcx,%r15,2), %rax
	movl	%edx, (%rax,%r8,4)
	movl	%r13d, %edi
	movl	%edx, (%rax,%rdi,4)
	movl	%edx, (%rax,%r10,4)
	movl	%edx, (%rax,%r11,4)
	movl	%edx, 4(%rcx,%r15,2)
	movl	%edx, (%rcx,%r15,2)
	movslq	%esi, %rdx
	movl	%ebx, (%rax,%rdx,4)
	movl	%ebx, (%rax,%r9,4)
	leaq	652(%rcx,%r15,2), %rdx
	leaq	-2396(%rcx,%r15,2), %rsi
	cmoveq	%rdx, %rsi
	movl	%ebx, (%rsi)
	leaq	648(%rcx,%r15,2), %rdx
	leaq	-2400(%rcx,%r15,2), %rcx
	cmoveq	%rdx, %rcx
	movl	%ebx, (%rcx)
	sarl	%r14d
	movl	%r14d, %ecx
	orl	$1, %ecx
	movslq	%ecx, %rcx
	movl	%ebx, (%rax,%rcx,4)
	jmp	LBB0_3
LBB0_1:
	leaq	(%rcx,%r15), %rax
	testb	$2, %bl
	movl	$-522133280, %edx               ## imm = 0xE0E0E0E0
	movl	$-1061109568, %esi              ## imm = 0xC0C0C0C0
	cmovel	%edx, %esi
	testb	$1, %bl
	movl	$-791621424, %ebx               ## imm = 0xD0D0D0D0
	cmovel	%edx, %ebx
	movl	%r13d, %edx
	shrl	%edx
	leal	(%r14,%r13,2), %edi
	sarl	$2, %edi
	testl	%r12d, %r12d
	movl	%esi, (%rax,%rdx,4)
	movl	%r13d, %edx
	movl	%esi, (%rdx,%rax)
	movl	%esi, (%rcx,%r15)
	movslq	%edi, %rdx
	movl	%ebx, (%rax,%rdx,4)
	leaq	324(%rcx,%r15), %rdx
	leaq	-1200(%rcx,%r15), %rcx
	cmoveq	%rdx, %rcx
	movl	%ebx, (%rcx)
	sarl	$2, %r14d
LBB0_3:
	movslq	%r14d, %rcx
	movl	%ebx, (%rax,%rcx,4)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico_mcd,8,3                   ## @Pico_mcd
	.comm	_currentConfig,4,2              ## @currentConfig
	.comm	_EOPT_WIZ_TEAR_FIX,4,2          ## @EOPT_WIZ_TEAR_FIX
	.comm	_g_screen_ptr,8,3               ## @g_screen_ptr
	.no_dead_strip	_draw_cd_leds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function draw_cd_leds
_draw_cd_leds:                          ; @draw_cd_leds
	.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	x8, _Pico_mcd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Pico_mcd@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _currentConfig@GOTPAGE
Lloh4:
	ldr	x9, [x9, _currentConfig@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _EOPT_WIZ_TEAR_FIX@GOTPAGE
Lloh7:
	ldr	x10, [x10, _EOPT_WIZ_TEAR_FIX@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	ands	w20, w10, w9
	mov	w9, #-1440
	ldr	w22, [x8]
	mov	w8, #4
	csel	w19, w8, w9, eq
	mov	w8, #10304
	movk	w8, #1, lsl #16
	mov	w9, #644
	csel	x23, x9, x8, eq
	mov	w8, #240
	mov	w9, #320
	csel	w21, w9, w8, eq
	bl	_is_16bit_mode
Lloh9:
	adrp	x8, _g_screen_ptr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _g_screen_ptr@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	w0, LBB0_2
; %bb.1:
	add	x8, x8, x23, lsl #1
	sbfx	w9, w22, #1, #1
	and	w10, w9, #0x6000600
	sbfx	w9, w22, #0, #1
	orr	w11, w21, #0x1
	str	w10, [x8, w11, uxtw #2]
	str	w10, [x8, w21, uxtw #2]
	lsr	w11, w21, #1
	orr	w12, w11, #0x1
	str	w10, [x8, w12, uxtw #2]
	and	w9, w9, #0xc000c000
	stp	w10, w10, [x8]
	add	w12, w19, w21, lsl #1
	cmp	w20, #0
	mov	w13, #648
	mov	x14, #-2400
	csel	x13, x13, x14, eq
	asr	w12, w12, #1
	sbfiz	x12, x12, #2, #32
	orr	x14, x12, #0x4
	add	x13, x8, x13
	str	w10, [x8, w11, uxtw #2]
	str	w9, [x8, x14]
	str	w9, [x8, x12]
	stp	w9, w9, [x13]
	asr	w10, w19, #1
	orr	w11, w10, #0x1
	str	w9, [x8, w11, sxtw #2]
	b	LBB0_3
LBB0_2:
	add	x8, x8, x23
	tst	w22, #0x2
	mov	w9, #-1061109568
	mov	w10, #-522133280
	csel	w11, w10, w9, eq
	tst	w22, #0x1
	mov	w9, #53456
	movk	w9, #53456, lsl #16
	csel	w9, w10, w9, eq
	lsr	w10, w21, #1
	str	w11, [x8, w10, uxtw #2]
	str	w11, [x8, w21, uxtw]
	str	w11, [x8]
	add	w10, w19, w21, lsl #1
	asr	w10, w10, #2
	str	w9, [x8, w10, sxtw #2]
	cmp	w20, #0
	mov	w10, #324
	mov	x11, #-1200
	csel	x10, x10, x11, eq
	str	w9, [x8, x10]
	asr	w10, w19, #2
LBB0_3:
	str	w9, [x8, w10, sxtw #2]
	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 AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico_mcd,8,3                   ; @Pico_mcd
	.comm	_currentConfig,4,2              ; @currentConfig
	.comm	_EOPT_WIZ_TEAR_FIX,4,2          ; @EOPT_WIZ_TEAR_FIX
	.comm	_g_screen_ptr,8,3               ; @g_screen_ptr
	.no_dead_strip	_draw_cd_leds
.subsections_via_symbols
