	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_render_bg_m1                   ## -- Begin function render_bg_m1
	.p2align	4, 0x90
_render_bg_m1:                          ## @render_bg_m1
	.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), %rcx
	movl	8(%rdx), %esi
	movl	16(%rdx), %edx
	andl	$15, %esi
	shlq	$10, %rsi
	movl	%edi, %eax
	sarl	$3, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rsi,%rax,8), %rax
	leaq	(%rcx,%rax,4), %r15
	andl	$7, %edx
	shlq	$11, %rdx
	andl	$7, %edi
	orq	%rdx, %rdi
	leaq	(%rcx,%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
	movslq	(%r15,%rdx,4), %rax
	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
.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_m1
lCPI0_0:
	.long	4294967291                      ; 0xfffffffb
	.long	4294967292                      ; 0xfffffffc
	.long	4294967293                      ; 0xfffffffd
	.long	4294967294                      ; 0xfffffffe
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_render_bg_m1
	.p2align	2
_render_bg_m1:                          ; @render_bg_m1
	.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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _reg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _reg@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
Lloh3:
	adrp	x8, _linebuf@GOTPAGE
Lloh4:
	ldr	x8, [x8, _linebuf@GOTPAGEOFF]
	ldr	w21, [x9, #28]
Lloh5:
	ldr	x8, [x8]
	ldr	x22, [x8]
	add	x8, x22, #128
Lloh6:
	adrp	x10, _vram@GOTPAGE
Lloh7:
	ldr	x10, [x10, _vram@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	ldr	w11, [x9, #8]
	ubfiz	w11, w11, #10, #4
	asr	w12, w0, #3
	mov	w13, #40
	madd	w11, w12, w13, w11
	add	x19, x10, w11, sxtw #2
	ldr	w9, [x9, #16]
	lsl	w9, w9, #11
	and	x9, x9, #0x3800
	bfxil	x9, x0, #0, #3
	add	x20, x10, x9, lsl #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
Lloh9:
	adrp	x10, lCPI0_0@PAGE
Lloh10:
	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
	ldrsw	x10, [x19, x8]
	ldr	w10, [x20, x10, lsl #2]
	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]
	lsr	w11, w10, #1
	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	Lloh9, Lloh10
	.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
.subsections_via_symbols
