	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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
	movl	$24, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %r13
	movq	_in_height@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.2:
	movq	_in_width@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	%ecx, %rdx
	cmpq	%rdx, %rbx
	jge	LBB0_8
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	testl	%eax, %eax
	jle	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %r14
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_rand
	shrl	$4, %eax
	andl	$31, %eax
	movq	(%r13), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	%eax, (%rcx,%r15,4)
	incq	%r15
	movslq	(%r12), %rax
	cmpq	%rax, %r15
	jl	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %r15
	movl	(%r14), %ecx
	jmp	LBB0_7
LBB0_8:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addq	$16, %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_nes_ntsc_init
	xorl	%eax, %eax
	callq	_time_blitter
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	_in_width@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	8(%r13), %rcx
	movq	(%rax), %rsi
	movl	(%r14), %edx
	movl	(%r15), %r9d
	movl	(%rcx), %eax
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	movl	%edx, %r8d
	pushq	$4
	pushq	%rax
	callq	_nes_ntsc_blit
	addq	$16, %rsp
	xorl	%eax, %eax
	callq	_time_blitter
	testq	%rax, %rax
	jne	LBB0_10
LBB0_11:
	movq	%r13, %rdi
	callq	_free
LBB0_12:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_in_height,4,2                  ## @in_height
	.comm	_in_width,4,2                   ## @in_width
	.comm	_stdout,4,2                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"Timing nes_ntsc..."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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
	mov	w0, #24
	bl	_malloc
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, _in_height@GOTPAGE
Lloh1:
	ldr	x21, [x21, _in_height@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh2:
	adrp	x22, _in_width@GOTPAGE
Lloh3:
	ldr	x22, [x22, _in_width@GOTPAGEOFF]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x20, #0
	ldr	w8, [x22]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	cmp	x20, w9, sxtw
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, #0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_rand
	ldr	x8, [x19]
	ldr	x8, [x8, x20, lsl #3]
	ubfx	w9, w0, #4, #5
	str	w9, [x8, x23, lsl #2]
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x21]
	b	LBB0_3
LBB0_8:
Lloh4:
	adrp	x0, l_str@PAGE
Lloh5:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh6:
	adrp	x8, _stdout@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_fflush
	add	x20, x19, #16
	mov	x0, x20
	mov	w1, #0
	bl	_nes_ntsc_init
	bl	_time_blitter
	cbz	x0, LBB0_10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x19]
	ldr	x1, [x8]
	ldr	w2, [x22]
	ldr	w5, [x21]
	ldr	w6, [x9]
	mov	x0, x20
	mov	w3, #0
	mov	x4, x2
	mov	w7, #4
	bl	_nes_ntsc_blit
	bl	_time_blitter
	cbnz	x0, LBB0_9
LBB0_10:
	mov	x0, x19
	bl	_free
LBB0_11:
	mov	w0, #0
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_in_height,4,2                  ; @in_height
	.comm	_in_width,4,2                   ; @in_width
	.comm	_stdout,4,2                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"Timing nes_ntsc..."

.subsections_via_symbols
