	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nexus_init_resources           ## -- Begin function nexus_init_resources
	.p2align	4, 0x90
_nexus_init_resources:                  ## @nexus_init_resources
	.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
	movq	_irq_rman@GOTPCREL(%rip), %rdi
	movl	$0, (%rdi)
	movq	_RMAN_ARRAY@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, 24(%rdi)
	leaq	L_.str(%rip), %rax
	movq	%rax, 8(%rdi)
	movq	_num_io_irqs@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	decl	%eax
	movl	%eax, 16(%rdi)
	callq	_rman_init
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_panic
LBB0_2:
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.3:
	xorl	%ebx, %ebx
	movq	_irq_rman@GOTPCREL(%rip), %r14
	leaq	L_.str.2(%rip), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	cmpl	(%r13), %ebx
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_intr_lookup_source
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%ebx, %edx
	callq	_rman_manage_region
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_panic
	jmp	LBB0_7
LBB0_8:
	movq	_drq_rman@GOTPCREL(%rip), %rbx
	movl	$0, (%rbx)
	movl	$7, 16(%rbx)
	movq	(%r12), %rax
	movq	%rax, 24(%rbx)
	leaq	L_.str.3(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_rman_init
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movl	(%rbx), %esi
	movl	16(%rbx), %edx
	movq	%rbx, %rdi
	callq	_rman_manage_region
	testq	%rax, %rax
	je	LBB0_11
LBB0_10:
	leaq	L_.str.4(%rip), %rdi
	callq	_panic
LBB0_11:
	movq	_port_rman@GOTPCREL(%rip), %rdi
	movl	$0, (%rdi)
	movl	$65535, 16(%rdi)                ## imm = 0xFFFF
	movq	(%r12), %rax
	movq	%rax, 24(%rdi)
	leaq	L_.str.5(%rip), %rax
	movq	%rax, 8(%rdi)
	callq	_rman_init
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	_port_rman@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_rman_manage_region
	testq	%rax, %rax
	je	LBB0_14
LBB0_13:
	leaq	L_.str.6(%rip), %rdi
	callq	_panic
LBB0_14:
	movq	_mem_rman@GOTPCREL(%rip), %rbx
	movl	$0, (%rbx)
	xorl	%eax, %eax
	callq	_cpu_getmaxphyaddr
	movl	%eax, 16(%rbx)
	movq	(%r12), %rax
	movq	%rax, 24(%rbx)
	leaq	L_.str.7(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_rman_init
	testq	%rax, %rax
	jne	LBB0_17
## %bb.15:
	movl	16(%rbx), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rman_manage_region
	testq	%rax, %rax
	je	LBB0_16
LBB0_17:
	leaq	L_.str.8(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_panic                          ## TAILCALL
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_irq_rman,32,3                  ## @irq_rman
	.comm	_RMAN_ARRAY,8,3                 ## @RMAN_ARRAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Interrupt request lines"

	.comm	_num_io_irqs,4,2                ## @num_io_irqs
L_.str.1:                               ## @.str.1
	.asciz	"nexus_init_resources irq_rman"

L_.str.2:                               ## @.str.2
	.asciz	"nexus_init_resources irq_rman add"

	.comm	_drq_rman,32,3                  ## @drq_rman
L_.str.3:                               ## @.str.3
	.asciz	"DMA request lines"

L_.str.4:                               ## @.str.4
	.asciz	"nexus_init_resources drq_rman"

	.comm	_port_rman,32,3                 ## @port_rman
L_.str.5:                               ## @.str.5
	.asciz	"I/O ports"

L_.str.6:                               ## @.str.6
	.asciz	"nexus_init_resources port_rman"

	.comm	_mem_rman,32,3                  ## @mem_rman
L_.str.7:                               ## @.str.7
	.asciz	"I/O memory addresses"

L_.str.8:                               ## @.str.8
	.asciz	"nexus_init_resources mem_rman"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nexus_init_resources           ; -- Begin function nexus_init_resources
	.p2align	2
_nexus_init_resources:                  ; @nexus_init_resources
	.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
Lloh0:
	adrp	x0, _irq_rman@GOTPAGE
Lloh1:
	ldr	x0, [x0, _irq_rman@GOTPAGEOFF]
	str	wzr, [x0]
Lloh2:
	adrp	x22, _RMAN_ARRAY@GOTPAGE
Lloh3:
	ldr	x22, [x22, _RMAN_ARRAY@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [x0, #24]
Lloh4:
	adrp	x8, l_.str@PAGE
Lloh5:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x0, #8]
Lloh6:
	adrp	x23, _num_io_irqs@GOTPAGE
Lloh7:
	ldr	x23, [x23, _num_io_irqs@GOTPAGEOFF]
	ldr	w8, [x23]
	sub	w8, w8, #1
	str	w8, [x0, #16]
	bl	_rman_init
	cbz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_2:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	w19, #0
Lloh10:
	adrp	x20, _irq_rman@GOTPAGE
Lloh11:
	ldr	x20, [x20, _irq_rman@GOTPAGEOFF]
Lloh12:
	adrp	x21, l_.str.2@PAGE
Lloh13:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w19, w19, #1
	ldr	w8, [x23]
	cmp	w19, w8
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_intr_lookup_source
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x19
	bl	_rman_manage_region
	cbz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_panic
	b	LBB0_4
LBB0_8:
Lloh14:
	adrp	x19, _drq_rman@GOTPAGE
Lloh15:
	ldr	x19, [x19, _drq_rman@GOTPAGEOFF]
	str	wzr, [x19]
	mov	w8, #7
	str	w8, [x19, #16]
	ldr	x8, [x22]
	str	x8, [x19, #24]
Lloh16:
	adrp	x8, l_.str.3@PAGE
Lloh17:
	add	x8, x8, l_.str.3@PAGEOFF
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_rman_init
	cbnz	x0, LBB0_10
; %bb.9:
	ldr	w1, [x19]
	ldr	w2, [x19, #16]
	mov	x0, x19
	bl	_rman_manage_region
	cbz	x0, LBB0_11
LBB0_10:
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_panic
LBB0_11:
Lloh20:
	adrp	x0, _port_rman@GOTPAGE
Lloh21:
	ldr	x0, [x0, _port_rman@GOTPAGEOFF]
	str	wzr, [x0]
	mov	w8, #65535
	str	w8, [x0, #16]
	ldr	x8, [x22]
	str	x8, [x0, #24]
Lloh22:
	adrp	x8, l_.str.5@PAGE
Lloh23:
	add	x8, x8, l_.str.5@PAGEOFF
	str	x8, [x0, #8]
	bl	_rman_init
	cbnz	x0, LBB0_13
; %bb.12:
Lloh24:
	adrp	x0, _port_rman@GOTPAGE
Lloh25:
	ldr	x0, [x0, _port_rman@GOTPAGEOFF]
	mov	w1, #0
	mov	w2, #65535
	bl	_rman_manage_region
	cbz	x0, LBB0_14
LBB0_13:
Lloh26:
	adrp	x0, l_.str.6@PAGE
Lloh27:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_panic
LBB0_14:
Lloh28:
	adrp	x19, _mem_rman@GOTPAGE
Lloh29:
	ldr	x19, [x19, _mem_rman@GOTPAGEOFF]
	str	wzr, [x19]
	bl	_cpu_getmaxphyaddr
	str	w0, [x19, #16]
	ldr	x8, [x22]
	str	x8, [x19, #24]
Lloh30:
	adrp	x8, l_.str.7@PAGE
Lloh31:
	add	x8, x8, l_.str.7@PAGEOFF
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_rman_init
	cbnz	x0, LBB0_16
; %bb.15:
	ldr	w2, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_rman_manage_region
	cbz	x0, LBB0_17
LBB0_16:
Lloh32:
	adrp	x0, l_.str.8@PAGE
Lloh33:
	add	x0, x0, l_.str.8@PAGEOFF
	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
	b	_panic
LBB0_17:
	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	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_irq_rman,32,3                  ; @irq_rman
	.comm	_RMAN_ARRAY,8,3                 ; @RMAN_ARRAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Interrupt request lines"

	.comm	_num_io_irqs,4,2                ; @num_io_irqs
l_.str.1:                               ; @.str.1
	.asciz	"nexus_init_resources irq_rman"

l_.str.2:                               ; @.str.2
	.asciz	"nexus_init_resources irq_rman add"

	.comm	_drq_rman,32,3                  ; @drq_rman
l_.str.3:                               ; @.str.3
	.asciz	"DMA request lines"

l_.str.4:                               ; @.str.4
	.asciz	"nexus_init_resources drq_rman"

	.comm	_port_rman,32,3                 ; @port_rman
l_.str.5:                               ; @.str.5
	.asciz	"I/O ports"

l_.str.6:                               ; @.str.6
	.asciz	"nexus_init_resources port_rman"

	.comm	_mem_rman,32,3                  ; @mem_rman
l_.str.7:                               ; @.str.7
	.asciz	"I/O memory addresses"

l_.str.8:                               ; @.str.8
	.asciz	"nexus_init_resources mem_rman"

.subsections_via_symbols
