	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nes_dump_mem                   ## -- Begin function nes_dump_mem
	.p2align	4, 0x90
_nes_dump_mem:                          ## @nes_dump_mem
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_nes_debug_level@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_17
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %rdx
	movl	%edi, %ebx
	cmpl	$257, %r15d                     ## imm = 0x101
	movq	%rsi, -176(%rbp)                ## 8-byte Spill
	jl	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%r15d, %edx
	movl	$256, %ecx                      ## imm = 0x100
	xorl	%eax, %eax
	callq	_nes_debug
	movq	-176(%rbp), %rdx                ## 8-byte Reload
	movl	$256, %r15d                     ## imm = 0x100
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%ebx, %edi
	movl	%r15d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_nes_debug
	leaq	-160(%rbp), %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	leaq	-128(%rbp), %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	movq	-176(%rbp), %rsi                ## 8-byte Reload
	testl	%r15d, %r15d
	jle	LBB0_17
## %bb.4:
	movl	%ebx, -164(%rbp)                ## 4-byte Spill
	movl	%r15d, %r13d
	movl	$46, %edi
	leaq	L___const.nes_dump_mem.xlate(%rip), %r9
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r15d, %r15d
	movl	-164(%rbp), %edi                ## 4-byte Reload
	leaq	L_.str.2(%rip), %rsi
	leaq	-128(%rbp), %rdx
	leaq	-160(%rbp), %r12
	movq	%r12, %rcx
	xorl	%eax, %eax
	movq	%r9, %r14
	callq	_nes_debug
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	leaq	-128(%rbp), %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	movq	%r14, %r9
	movl	$46, %edi
	movq	-176(%rbp), %rsi                ## 8-byte Reload
	xorl	%r14d, %r14d
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpl	%ebx, %r13d
	je	LBB0_11
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$8, %r15d
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movb	$32, -152(%rbp)
	movslq	%r14d, %r14
	movw	$8237, -128(%rbp,%r14)          ## imm = 0x202D
	addl	$2, %r14d
	movl	$9, %r15d
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movzbl	(%rsi,%rbx), %eax
	leal	-127(%rax), %ecx
	cmpb	$-95, %cl
	movslq	%r15d, %rcx
	movl	%eax, %edx
	cmovbl	%edi, %edx
	movb	%dl, -160(%rbp,%rcx)
	movq	%rax, %rcx
	shrq	$4, %rcx
	movzbl	(%rcx,%r9), %ecx
	movslq	%r14d, %rdx
	movb	%cl, -128(%rbp,%rdx)
	andl	$15, %eax
	movzbl	(%rax,%r9), %eax
	movb	%al, -127(%rbp,%rdx)
	movb	$32, -126(%rbp,%rdx)
	cmpl	$16, %r15d
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%r15d
	addl	$3, %r14d
	jmp	LBB0_10
LBB0_11:
	testl	%r15d, %r15d
	movl	-164(%rbp), %edi                ## 4-byte Reload
	je	LBB0_17
## %bb.12:
	addl	$-17, %r15d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movslq	%r14d, %rax
	movw	$8224, -128(%rbp,%rax)          ## imm = 0x2020
	leal	3(%rax), %r14d
	movb	$32, -126(%rbp,%rax)
	incl	%r15d
	je	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$-9, %r15d
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movslq	%r14d, %r14
	movw	$8224, -128(%rbp,%r14)          ## imm = 0x2020
	addl	$2, %r14d
	jmp	LBB0_15
LBB0_16:
	leaq	L_.str.2(%rip), %rsi
	leaq	-128(%rbp), %rdx
	leaq	-160(%rbp), %rcx
	xorl	%eax, %eax
	callq	_nes_debug
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @__const.nes_dump_mem.xlate
L___const.nes_dump_mem.xlate:
	.ascii	"0123456789abcdef"

	.comm	_nes_debug_level,4,2            ## @nes_debug_level
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Length truncated from %x to %x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Address=0x%p, length=0x%x (%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"   %s |  %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nes_dump_mem                   ; -- Begin function nes_dump_mem
	.p2align	2
_nes_dump_mem:                          ; @nes_dump_mem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x28, x27, [sp, #144]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _nes_debug_level@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nes_debug_level@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_16
; %bb.1:
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	cmp	w2, #257
	b.lt	LBB0_3
; %bb.2:
	mov	w22, #256
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	stp	x21, x22, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nes_debug
	mov	x21, x22
LBB0_3:
	stp	x21, x21, [sp, #8]
	str	x20, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_nes_debug
	add	x23, sp, #36
	add	x0, sp, #36
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	add	x24, sp, #56
	add	x0, sp, #56
	mov	w1, #0
	mov	w2, #80
	bl	_memset
	cmp	w21, #1
	b.lt	LBB0_16
; %bb.4:
	mov	w8, #0
	mov	w9, #0
	mov	w25, #32
	mov	w26, #8237
	mov	w27, #46
Lloh10:
	adrp	x28, l___const.nes_dump_mem.xlate@PAGE
Lloh11:
	add	x28, x28, l___const.nes_dump_mem.xlate@PAGEOFF
Lloh12:
	adrp	x22, l_.str.2@PAGE
Lloh13:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	stp	x24, x23, [sp]
	mov	x0, x19
	mov	x1, x22
	bl	_nes_debug
	add	x0, sp, #36
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	add	x0, sp, #56
	mov	w1, #0
	mov	w2, #80
	bl	_memset
	mov	w9, #0
	mov	w8, #0
	subs	w21, w21, #1
	b.eq	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w9, #8
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	strb	w25, [sp, #44]
	strh	w26, [x24, w8, sxtw]
	add	w8, w8, #2
	mov	w9, #9
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w10, [x20], #1
	sub	w11, w10, #127
	cmn	w11, #95
	csel	w11, w27, w10, lo
	strb	w11, [x23, w9, sxtw]
	lsr	x11, x10, #4
	ldrb	w11, [x28, x11]
	add	x12, x24, w8, sxtw
	strb	w11, [x12]
	and	w10, w10, #0xf
	ldrb	w10, [x28, w10, uxtw]
	strb	w10, [x12, #1]
	strb	w25, [x12, #2]
	cmp	w9, #16
	b.ge	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w9, w9, #1
	add	w8, w8, #3
	subs	w21, w21, #1
	b.ne	LBB0_6
LBB0_10:
	cbz	w9, LBB0_16
; %bb.11:
	sub	w9, w9, #17
	add	x10, sp, #56
	mov	w11, #8224
	mov	w12, #32
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x13, x10, w8, sxtw
	strh	w11, [x13]
	add	w8, w8, #3
	strb	w12, [x13, #2]
	adds	w9, w9, #1
	b.hs	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	cmn	w9, #9
	b.ne	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	strh	w11, [x10, w8, sxtw]
	add	w8, w8, #2
	b	LBB0_12
LBB0_15:
	add	x8, sp, #36
	add	x9, sp, #56
	stp	x9, x8, [sp]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_nes_debug
LBB0_16:
	ldur	x8, [x29, #-88]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
l___const.nes_dump_mem.xlate:           ; @__const.nes_dump_mem.xlate
	.ascii	"0123456789abcdef"

	.comm	_nes_debug_level,4,2            ; @nes_debug_level
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Length truncated from %x to %x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Address=0x%p, length=0x%x (%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"   %s |  %s\n"

.subsections_via_symbols
