	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nubus_seq_write_rsrc_mem       ## -- Begin function nubus_seq_write_rsrc_mem
	.p2align	4, 0x90
_nubus_seq_write_rsrc_mem:              ## @nubus_seq_write_rsrc_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	$280, %rsp                      ## imm = 0x118
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, %rdi
	callq	_nubus_dirptr
	movq	%rax, -312(%rbp)
	cmpl	$256, %r14d                     ## imm = 0x100
	jb	LBB0_6
## %bb.1:
	leaq	-304(%rbp), %r12
	leaq	-312(%rbp), %r13
	movq	%r15, -320(%rbp)                ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-320(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$256, %edx                      ## imm = 0x100
	callq	_seq_write
	addl	$-256, %r14d
	cmpl	$255, %r14d
	jbe	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%r12, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movl	$8, %esi
	callq	_nubus_get_rom
	movq	%rax, -304(%rbp,%r15,8)
	incq	%r15
	movq	%r12, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	cmpq	%rax, %r15
	jb	LBB0_4
	jmp	LBB0_5
LBB0_6:
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.7:
	leaq	-312(%rbp), %r12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_nubus_get_rom
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_seq_putc
	decl	%r14d
	jne	LBB0_8
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	addq	$280, %rsp                      ## imm = 0x118
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nubus_seq_write_rsrc_mem       ; -- Begin function nubus_seq_write_rsrc_mem
	.p2align	2
_nubus_seq_write_rsrc_mem:              ; @nubus_seq_write_rsrc_mem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #336
	.cfi_def_cfa_offset 336
	stp	x24, x23, [sp, #272]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #288]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #304]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #320]            ; 16-byte Folded Spill
	add	x29, sp, #320
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	mov	x0, x1
	bl	_nubus_dirptr
	str	x0, [sp]
	cmp	w19, #256
	b.lo	LBB0_6
; %bb.1:
	add	x22, sp, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #256
	bl	_seq_write
	sub	w19, w19, #256
	cmp	w19, #255
	b.ls	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w2, [x20]
	mov	x0, sp
	mov	w1, #8
	bl	_nubus_get_rom
	str	x0, [x22, x23, lsl #3]
	add	x23, x23, #1
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	cmp	x23, w0, uxtw
	b.lo	LBB0_5
	b	LBB0_2
LBB0_6:
	cbz	w19, LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	sub	w19, w19, #1
	ldr	w2, [x20]
	mov	x0, sp
	mov	w1, #1
	bl	_nubus_get_rom
	mov	x1, x0
	mov	x0, x21
	bl	_seq_putc
	cbnz	w19, LBB0_7
LBB0_8:
	ldur	x8, [x29, #-56]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #320]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #304]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #288]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #336
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
