	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_md_ntsc_blit                   ## -- Begin function md_ntsc_blit
	.p2align	4, 0x90
_md_ntsc_blit:                          ## @md_ntsc_blit
	.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	%ecx, %eax
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r14
	movq	_md_ntsc_in_chunk@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %r13d
	movl	%r8d, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	(%rsi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movzbl	(%r14), %eax
	movl	(%rsi,%rax,4), %edi
	callq	_MD_NTSC_ADJ_IN
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movzbl	1(%r14), %eax
	movl	(%r12,%rax,4), %edi
	callq	_MD_NTSC_ADJ_IN
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movzbl	2(%r14), %eax
	addq	$3, %r14
	movl	(%r12,%rax,4), %edi
	callq	_MD_NTSC_ADJ_IN
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r8d
	callq	_MD_NTSC_BEGIN_ROW
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_MD_NTSC_OUT_WIDTH
	shll	$3, %eax
	andl	$-32, %eax
	movl	%ebx, %ecx
	sarl	$2, %ecx
	imull	%eax, %ecx
	andl	$3, %ebx
	leal	(%rcx,%rbx,8), %eax
	movq	_texturemem@GOTPCREL(%rip), %rcx
	movslq	%eax, %rbx
	addq	(%rcx), %rbx
	decl	%r13d
	je	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r14), %eax
	movl	(%r12,%rax,4), %edi
	callq	_MD_NTSC_ADJ_IN
	xorl	%edi, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_MD_NTSC_COLOR_IN
	movl	(%rbx), %esi
	xorl	%edi, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	4(%rbx), %esi
	movl	$1, %edi
	callq	_MD_NTSC_RGB_OUT
	movzbl	1(%r14), %eax
	movl	(%r12,%rax,4), %edi
	callq	_MD_NTSC_ADJ_IN
	movl	$1, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_MD_NTSC_COLOR_IN
	movl	8(%rbx), %esi
	movl	$2, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	12(%rbx), %esi
	movl	$3, %edi
	callq	_MD_NTSC_RGB_OUT
	movzbl	2(%r14), %eax
	movl	(%r12,%rax,4), %edi
	callq	_MD_NTSC_ADJ_IN
	movl	$2, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_MD_NTSC_COLOR_IN
	movl	64(%rbx), %esi
	movl	$4, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	68(%rbx), %esi
	movl	$5, %edi
	callq	_MD_NTSC_RGB_OUT
	movzbl	3(%r14), %eax
	addq	$4, %r14
	movl	(%r12,%rax,4), %edi
	callq	_MD_NTSC_ADJ_IN
	movl	$3, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_MD_NTSC_COLOR_IN
	movl	72(%rbx), %esi
	movl	$6, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	76(%rbx), %esi
	movl	$7, %edi
	callq	_MD_NTSC_RGB_OUT
	subq	$-128, %rbx
	decl	%r13d
	jne	LBB0_1
LBB0_3:
	movzbl	(%r14), %eax
	movl	(%r12,%rax,4), %edi
	callq	_MD_NTSC_ADJ_IN
	xorl	%edi, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_MD_NTSC_COLOR_IN
	movl	(%rbx), %esi
	xorl	%edi, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	4(%rbx), %esi
	movl	$1, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	$1, %edi
	movq	%r15, %rsi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	callq	_MD_NTSC_COLOR_IN
	movl	8(%rbx), %esi
	movl	$2, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	12(%rbx), %esi
	movl	$3, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	$2, %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_MD_NTSC_COLOR_IN
	movl	64(%rbx), %esi
	movl	$4, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	68(%rbx), %esi
	movl	$5, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	$3, %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_MD_NTSC_COLOR_IN
	movl	72(%rbx), %esi
	movl	$6, %edi
	callq	_MD_NTSC_RGB_OUT
	movl	76(%rbx), %esi
	movl	$7, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_MD_NTSC_RGB_OUT                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_md_ntsc_in_chunk,4,2           ## @md_ntsc_in_chunk
	.comm	_texturemem,8,3                 ## @texturemem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_md_ntsc_blit                   ; -- Begin function md_ntsc_blit
	.p2align	2
_md_ntsc_blit:                          ; @md_ntsc_blit
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w19, [x1]
Lloh0:
	adrp	x8, _md_ntsc_in_chunk@GOTPAGE
Lloh1:
	ldr	x8, [x8, _md_ntsc_in_chunk@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sdiv	w28, w3, w8
	ldrb	w8, [x2]
	ldr	w0, [x1, x8, lsl #2]
	bl	_MD_NTSC_ADJ_IN
	mov	x25, x0
	ldrb	w8, [x24, #1]
	ldr	w0, [x21, x8, lsl #2]
	bl	_MD_NTSC_ADJ_IN
	mov	x26, x0
	add	x27, x24, #3
	ldrb	w8, [x24, #2]
	ldr	w0, [x21, x8, lsl #2]
	bl	_MD_NTSC_ADJ_IN
	mov	x4, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x25
	mov	x3, x26
	bl	_MD_NTSC_BEGIN_ROW
	mov	x0, x23
	bl	_MD_NTSC_OUT_WIDTH
	lsl	w8, w0, #3
	and	w8, w8, #0xffffffe0
	asr	w9, w22, #2
	mul	w8, w8, w9
	bfi	w8, w22, #3, #2
Lloh3:
	adrp	x9, _texturemem@GOTPAGE
Lloh4:
	ldr	x9, [x9, _texturemem@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x22, x9, w8, sxtw
	subs	w23, w28, #1
	b.eq	LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x27]
	ldr	w0, [x21, x8, lsl #2]
	bl	_MD_NTSC_ADJ_IN
	mov	x2, x0
	mov	w0, #0
	mov	x1, x20
	bl	_MD_NTSC_COLOR_IN
	ldr	w1, [x22]
	mov	w0, #0
	bl	_MD_NTSC_RGB_OUT
	ldr	w1, [x22, #4]
	mov	w0, #1
	bl	_MD_NTSC_RGB_OUT
	ldrb	w8, [x27, #1]
	ldr	w0, [x21, x8, lsl #2]
	bl	_MD_NTSC_ADJ_IN
	mov	x2, x0
	mov	w0, #1
	mov	x1, x20
	bl	_MD_NTSC_COLOR_IN
	ldr	w1, [x22, #8]
	mov	w0, #2
	bl	_MD_NTSC_RGB_OUT
	ldr	w1, [x22, #12]
	mov	w0, #3
	bl	_MD_NTSC_RGB_OUT
	ldrb	w8, [x27, #2]
	ldr	w0, [x21, x8, lsl #2]
	bl	_MD_NTSC_ADJ_IN
	mov	x2, x0
	mov	w0, #2
	mov	x1, x20
	bl	_MD_NTSC_COLOR_IN
	ldr	w1, [x22, #64]
	mov	w0, #4
	bl	_MD_NTSC_RGB_OUT
	ldr	w1, [x22, #68]
	mov	w0, #5
	bl	_MD_NTSC_RGB_OUT
	add	x24, x27, #4
	ldrb	w8, [x27, #3]
	ldr	w0, [x21, x8, lsl #2]
	bl	_MD_NTSC_ADJ_IN
	mov	x2, x0
	mov	w0, #3
	mov	x1, x20
	bl	_MD_NTSC_COLOR_IN
	ldr	w1, [x22, #72]
	mov	w0, #6
	bl	_MD_NTSC_RGB_OUT
	ldr	w1, [x22, #76]
	mov	w0, #7
	bl	_MD_NTSC_RGB_OUT
	add	x22, x22, #128
	mov	x27, x24
	subs	w23, w23, #1
	b.ne	LBB0_1
; %bb.2:
	mov	x27, x24
LBB0_3:
	ldrb	w8, [x27]
	ldr	w0, [x21, x8, lsl #2]
	bl	_MD_NTSC_ADJ_IN
	mov	x2, x0
	mov	w0, #0
	mov	x1, x20
	bl	_MD_NTSC_COLOR_IN
	ldr	w1, [x22]
	mov	w0, #0
	bl	_MD_NTSC_RGB_OUT
	ldr	w1, [x22, #4]
	mov	w0, #1
	bl	_MD_NTSC_RGB_OUT
	mov	w0, #1
	mov	x1, x20
	mov	x2, x19
	bl	_MD_NTSC_COLOR_IN
	ldr	w1, [x22, #8]
	mov	w0, #2
	bl	_MD_NTSC_RGB_OUT
	ldr	w1, [x22, #12]
	mov	w0, #3
	bl	_MD_NTSC_RGB_OUT
	mov	w0, #2
	mov	x1, x20
	mov	x2, x19
	bl	_MD_NTSC_COLOR_IN
	ldr	w1, [x22, #64]
	mov	w0, #4
	bl	_MD_NTSC_RGB_OUT
	ldr	w1, [x22, #68]
	mov	w0, #5
	bl	_MD_NTSC_RGB_OUT
	mov	w0, #3
	mov	x1, x20
	mov	x2, x19
	bl	_MD_NTSC_COLOR_IN
	ldr	w1, [x22, #72]
	mov	w0, #6
	bl	_MD_NTSC_RGB_OUT
	ldr	w1, [x22, #76]
	mov	w0, #7
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_MD_NTSC_RGB_OUT
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_md_ntsc_in_chunk,4,2           ; @md_ntsc_in_chunk
	.comm	_texturemem,8,3                 ; @texturemem
.subsections_via_symbols
