	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_render_bg_m1x                  ## -- Begin function render_bg_m1x
	.p2align	4, 0x90
_render_bg_m1x:                         ## @render_bg_m1x
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edi killed $edi def $rdi
	movq	_reg@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	28(%rdx), %r14d
	movq	_linebuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	leaq	128(%rbx), %r8
	movq	_vram@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r10
	movl	8(%rdx), %esi
	movl	16(%rdx), %ecx
	andl	$15, %esi
	shlq	$10, %rsi
	movl	%edi, %eax
	sarl	$3, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rsi,%rax,8), %rax
	shll	$11, %ecx
	movq	_system_hw@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	_SYSTEM_SMS@GOTPCREL(%rip), %r9
	movl	%ecx, %edx
	orl	$6144, %edx                     ## imm = 0x1800
	cmpq	(%r9), %rsi
	cmovlel	%ecx, %edx
	leaq	(%r10,%rax,4), %r15
	movl	%edi, %eax
	shll	$5, %eax
	andl	$6144, %eax                     ## imm = 0x1800
	orl	$8192, %eax                     ## imm = 0x2000
	andl	%edx, %eax
	andl	$7, %edi
	orl	%eax, %edi
	leaq	(%r10,%rdi,4), %r12
	movq	%r8, %rdi
	movl	$64, %esi
	movl	$8, %edx
	callq	_memset
	addq	$160, %rbx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rdx,4), %eax
	shll	$3, %eax
	cltq
	movzbl	(%r12,%rax,4), %eax
	movl	%eax, %ecx
	shrb	$5, %cl
	andb	$4, %cl
	movl	%r14d, %esi
	sarl	%cl, %esi
	andl	$15, %esi
	orl	$16, %esi
	movl	%esi, (%rbx)
	movl	%eax, %ecx
	shrb	$4, %cl
	andb	$4, %cl
	movl	%r14d, %esi
	sarl	%cl, %esi
	andl	$15, %esi
	orl	$16, %esi
	movl	%esi, 4(%rbx)
	movl	%eax, %ecx
	shrb	$3, %cl
	andb	$4, %cl
	movl	%r14d, %esi
	sarl	%cl, %esi
	andl	$15, %esi
	orl	$16, %esi
	movl	%esi, 8(%rbx)
	movl	%eax, %ecx
	shrb	$2, %cl
	andb	$4, %cl
	movl	%r14d, %esi
	sarl	%cl, %esi
	andl	$15, %esi
	orl	$16, %esi
	movl	%esi, 12(%rbx)
	movl	%eax, %ecx
	shrb	%cl
	andb	$4, %cl
	movl	%r14d, %esi
	sarl	%cl, %esi
	andl	$15, %esi
	andb	$4, %al
	movl	%r14d, %edi
	movl	%eax, %ecx
	sarl	%cl, %edi
	orl	$16, %esi
	movl	%esi, 16(%rbx)
	andl	$15, %edi
	orl	$16, %edi
	movl	%edi, 20(%rbx)
	addq	$24, %rbx
	incq	%rdx
	cmpl	$40, %edx
	jne	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	$64, %esi
	movl	$8, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memset                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_reg,8,3                        ## @reg
	.comm	_linebuf,8,3                    ## @linebuf
	.comm	_vram,8,3                       ## @vram
	.comm	_system_hw,8,3                  ## @system_hw
	.comm	_SYSTEM_SMS,8,3                 ## @SYSTEM_SMS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function render_bg_m1x
lCPI0_0:
	.long	4294967291                      ; 0xfffffffb
	.long	4294967292                      ; 0xfffffffc
	.long	4294967293                      ; 0xfffffffd
	.long	4294967294                      ; 0xfffffffe
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_render_bg_m1x
	.p2align	2
_render_bg_m1x:                         ; @render_bg_m1x
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	lsr	w9, w0, #6
Lloh0:
	adrp	x8, _reg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _reg@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	ldr	w21, [x10, #28]
Lloh3:
	adrp	x8, _linebuf@GOTPAGE
Lloh4:
	ldr	x8, [x8, _linebuf@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x22, [x8]
Lloh6:
	adrp	x11, _vram@GOTPAGE
Lloh7:
	ldr	x11, [x11, _vram@GOTPAGEOFF]
	add	x8, x22, #128
Lloh8:
	ldr	x11, [x11]
	ldr	w12, [x10, #8]
	ubfiz	w12, w12, #10, #4
	asr	w13, w0, #3
	mov	w14, #40
	madd	w12, w13, w14, w12
	add	x19, x11, w12, sxtw #2
	ldr	w10, [x10, #16]
	lsl	w10, w10, #11
Lloh9:
	adrp	x12, _system_hw@GOTPAGE
Lloh10:
	ldr	x12, [x12, _system_hw@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
Lloh12:
	adrp	x13, _SYSTEM_SMS@GOTPAGE
Lloh13:
	ldr	x13, [x13, _SYSTEM_SMS@GOTPAGEOFF]
Lloh14:
	ldr	x13, [x13]
	orr	w14, w10, #0x1800
	cmp	x12, x13
	csel	w10, w14, w10, gt
	mov	w12, #8192
	bfi	w12, w9, #11, #2
	and	w9, w10, w12
	bfxil	w9, w0, #0, #3
	add	x20, x11, w9, uxtw #2
	mov	x0, x8
	mov	w1, #64
	mov	w2, #8
	bl	_memset
	mov	x8, #0
	add	x9, x22, #160
	dup.4s	v0, w21
	dup.2s	v1, w21
Lloh15:
	adrp	x10, lCPI0_0@PAGE
Lloh16:
	ldr	q2, [x10, lCPI0_0@PAGEOFF]
	movi.4s	v3, #4
	movi.4s	v4, #15
	movi.2s	v5, #4
	movi.2s	v6, #15
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x19, x8]
	lsl	w10, w10, #3
	ldr	w10, [x20, w10, sxtw #2]
	lsr	w11, w10, #1
	dup.4s	v7, w10
	ushl.4s	v7, v7, v2
	and.16b	v7, v7, v3
	neg.4s	v7, v7
	sshl.4s	v7, v0, v7
	and.16b	v7, v7, v4
	orr.4s	v7, #16
	str	q7, [x9]
	add	x0, x9, #24
	fmov	s7, w11
	mov.s	v7[1], w10
	and.8b	v7, v7, v5
	neg.2s	v7, v7
	sshl.2s	v7, v1, v7
	and.8b	v7, v7, v6
	orr.2s	v7, #16
	str	d7, [x9, #16]
	add	x8, x8, #4
	mov	x9, x0
	cmp	w8, #160
	b.ne	LBB0_1
; %bb.2:
	mov	w1, #64
	mov	w2, #8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_memset
	.loh AdrpLdr	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.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	_reg,8,3                        ; @reg
	.comm	_linebuf,8,3                    ; @linebuf
	.comm	_vram,8,3                       ; @vram
	.comm	_system_hw,8,3                  ; @system_hw
	.comm	_SYSTEM_SMS,8,3                 ; @SYSTEM_SMS
.subsections_via_symbols
