	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nubus_proc_add_rsrc_mem        ## -- Begin function nubus_proc_add_rsrc_mem
	.p2align	4, 0x90
_nubus_proc_add_rsrc_mem:               ## @nubus_proc_add_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %ecx
	leaq	L_.str(%rip), %rdx
	leaq	-41(%rbp), %rdi
	movl	$9, %esi
	callq	_snprintf
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	callq	_nubus_dirptr
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_nubus_proc_alloc_pde_data
	movq	%rax, %r8
	jmp	LBB0_4
LBB0_2:
	xorl	%r8d, %r8d
LBB0_4:
	movq	_S_IFREG@GOTPCREL(%rip), %rax
	movl	$292, %esi                      ## imm = 0x124
	orl	(%rax), %esi
	movq	_nubus_proc_rsrc_show@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-41(%rbp), %rdi
	movq	%r14, %rdx
	callq	_proc_create_single_data
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%x"

	.comm	_S_IFREG,4,2                    ## @S_IFREG
	.comm	_nubus_proc_rsrc_show,4,2       ## @nubus_proc_rsrc_show
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nubus_proc_add_rsrc_mem        ; -- Begin function nubus_proc_add_rsrc_mem
	.p2align	2
_nubus_proc_add_rsrc_mem:               ; @nubus_proc_add_rsrc_mem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w3, [x1]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #15
	mov	w1, #9
	bl	_snprintf
	cbz	w20, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_nubus_dirptr
	mov	x1, x20
	bl	_nubus_proc_alloc_pde_data
	mov	x4, x0
	b	LBB0_4
LBB0_3:
	mov	x4, #0
LBB0_4:
Lloh5:
	adrp	x8, _S_IFREG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _S_IFREG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mov	w9, #292
	orr	w1, w8, w9
Lloh8:
	adrp	x8, _nubus_proc_rsrc_show@GOTPAGE
Lloh9:
	ldr	x8, [x8, _nubus_proc_rsrc_show@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	add	x0, sp, #15
	mov	x2, x19
	bl	_proc_create_single_data
LBB0_5:
	ldr	x8, [sp, #24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%x"

	.comm	_S_IFREG,4,2                    ; @S_IFREG
	.comm	_nubus_proc_rsrc_show,4,2       ; @nubus_proc_rsrc_show
.subsections_via_symbols
