	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init
_init:                                  ## @init
	.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
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_fopen
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.2(%rip), %rdi
	callq	_fatal_error
LBB0_2:
	movq	_nes_height@GOTPCREL(%rip), %r14
	movq	_nes_width@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	imull	(%r14), %edi
	callq	_malloc
	movq	_nes_pixels@GOTPCREL(%rip), %r12
	movq	%rax, (%r12)
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.3(%rip), %rdi
	callq	_fatal_error
	movq	(%r12), %rax
LBB0_4:
	movq	(%r15), %rsi
	movq	(%r14), %rdx
	movq	%rax, %rdi
	movq	%rbx, %rcx
	callq	_fread
	movq	%rbx, %rdi
	callq	_fclose
	movl	$4, %edi
	callq	_malloc
	movq	_ntsc@GOTPCREL(%rip), %rbx
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rdi
	callq	_fatal_error
	movq	(%rbx), %rax
LBB0_6:
	movq	_setup@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nes_ntsc_init                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nes.raw"

L_.str.1:                               ## @.str.1
	.asciz	"rb"

L_.str.2:                               ## @.str.2
	.asciz	"Couldn't open image file"

	.comm	_nes_height,8,3                 ## @nes_height
	.comm	_nes_width,8,3                  ## @nes_width
	.comm	_nes_pixels,8,3                 ## @nes_pixels
L_.str.3:                               ## @.str.3
	.asciz	"Out of memory"

	.comm	_ntsc,8,3                       ## @ntsc
	.comm	_setup,4,2                      ## @setup
	.no_dead_strip	_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init
_init:                                  ; @init
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fopen
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_fatal_error
LBB0_2:
Lloh6:
	adrp	x20, _nes_height@GOTPAGE
Lloh7:
	ldr	x20, [x20, _nes_height@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh8:
	adrp	x21, _nes_width@GOTPAGE
Lloh9:
	ldr	x21, [x21, _nes_width@GOTPAGEOFF]
	ldr	w9, [x21]
	mul	w0, w9, w8
	bl	_malloc
Lloh10:
	adrp	x22, _nes_pixels@GOTPAGE
Lloh11:
	ldr	x22, [x22, _nes_pixels@GOTPAGEOFF]
	str	x0, [x22]
	cbnz	x0, LBB0_4
; %bb.3:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_fatal_error
	ldr	x0, [x22]
LBB0_4:
	ldr	x1, [x21]
	ldr	x2, [x20]
	mov	x3, x19
	bl	_fread
	mov	x0, x19
	bl	_fclose
	mov	w0, #4
	bl	_malloc
Lloh14:
	adrp	x19, _ntsc@GOTPAGE
Lloh15:
	ldr	x19, [x19, _ntsc@GOTPAGEOFF]
	str	x0, [x19]
	cbnz	x0, LBB0_6
; %bb.5:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_fatal_error
	ldr	x0, [x19]
LBB0_6:
Lloh18:
	adrp	x1, _setup@GOTPAGE
Lloh19:
	ldr	x1, [x1, _setup@GOTPAGEOFF]
	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	_nes_ntsc_init
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nes.raw"

l_.str.1:                               ; @.str.1
	.asciz	"rb"

l_.str.2:                               ; @.str.2
	.asciz	"Couldn't open image file"

	.comm	_nes_height,8,3                 ; @nes_height
	.comm	_nes_width,8,3                  ; @nes_width
	.comm	_nes_pixels,8,3                 ; @nes_pixels
l_.str.3:                               ; @.str.3
	.asciz	"Out of memory"

	.comm	_ntsc,8,3                       ; @ntsc
	.comm	_setup,4,2                      ; @setup
	.no_dead_strip	_init
.subsections_via_symbols
