	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isa_alloc_resource             ## -- Begin function isa_alloc_resource
	.p2align	4, 0x90
_isa_alloc_resource:                    ## @isa_alloc_resource
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, %ebx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movl	%edi, %r13d
	movl	%esi, %edi
	callq	_device_get_parent
	movl	%eax, %r15d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, %esi
	callq	_RMAN_IS_DEFAULT_RANGE
	movl	%eax, %r14d
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%r12d, %edi
	callq	_DEVTOISA
	movq	%rax, %rdi
	cmpl	%r13d, %r15d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_12
## %bb.1:
	testl	%r14d, %r14d
	jne	LBB0_12
## %bb.2:
	movl	(%r12), %edx
	movq	%rdi, %r14
	movl	%ebx, %esi
	callq	_resource_list_find
	movq	%r14, %rdi
	testq	%rax, %rax
	je	LBB0_3
LBB0_12:
	movl	24(%rbp), %eax
	subq	$8, %rsp
	movl	%r13d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	movq	%r12, %r8
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	movl	16(%rbp), %eax
	pushq	%rax
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_resource_list_alloc
	addq	$72, %rsp
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%r12), %edx
	testl	%edx, %edx
	js	LBB0_13
## %bb.4:
	leal	-128(%rbx), %eax
	cmpl	$3, %eax
	ja	LBB0_13
## %bb.5:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_8:
	movq	_ISA_NMEM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_13
	jmp	LBB0_11
LBB0_6:
	movq	_ISA_NIRQ@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_13
	jmp	LBB0_11
LBB0_9:
	movq	_ISA_NPORT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jl	LBB0_11
LBB0_13:
	xorl	%eax, %eax
	addq	$40, %rsp
	jmp	LBB0_14
LBB0_7:
	movq	_ISA_NDRQ@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_13
LBB0_11:
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	16(%rbp), %r9d
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_resource_list_add
	movq	%r14, %rdi
	jmp	LBB0_12
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_9
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_ISA_NIRQ,4,2                   ## @ISA_NIRQ
	.comm	_ISA_NDRQ,4,2                   ## @ISA_NDRQ
	.comm	_ISA_NMEM,4,2                   ## @ISA_NMEM
	.comm	_ISA_NPORT,4,2                  ## @ISA_NPORT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isa_alloc_resource             ; -- Begin function isa_alloc_resource
	.p2align	2
_isa_alloc_resource:                    ; @isa_alloc_resource
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x23, x7
	str	w6, [sp, #12]                   ; 4-byte Folded Spill
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x24, x2
	mov	x25, x1
	mov	x26, x0
	mov	x0, x1
	bl	_device_get_parent
	mov	x19, x0
	mov	x0, x21
	mov	x1, x20
	bl	_RMAN_IS_DEFAULT_RANGE
	mov	x28, x0
	mov	x0, x25
	bl	_DEVTOISA
	mov	x27, x0
	cmp	w19, w26
	b.ne	LBB0_3
; %bb.1:
	cbnz	w28, LBB0_3
; %bb.2:
	ldr	w2, [x22]
	mov	x0, x27
	mov	x1, x24
	bl	_resource_list_find
	cbz	x0, LBB0_5
LBB0_3:
	str	w23, [sp]
	mov	x0, x27
	mov	x1, x26
	mov	x2, x25
	mov	x3, x24
	mov	x4, x22
	mov	x5, x21
	mov	x6, x20
	ldr	w7, [sp, #12]                   ; 4-byte Folded Reload
	bl	_resource_list_alloc
LBB0_4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	ldr	w2, [x22]
	tbnz	w2, #31, LBB0_14
; %bb.6:
	sub	w8, w24, #128
	cmp	w8, #3
	b.hi	LBB0_14
; %bb.7:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
Lloh2:
	adrp	x8, _ISA_NMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ISA_NMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh4:
	adrp	x8, _ISA_NIRQ@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ISA_NIRQ@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh6:
	adrp	x8, _ISA_NPORT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ISA_NPORT@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh8:
	adrp	x8, _ISA_NDRQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ISA_NDRQ@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ge	LBB0_14
; %bb.13:
	mov	x0, x27
	mov	x1, x24
	mov	x3, x21
	mov	x4, x20
	ldr	w5, [sp, #12]                   ; 4-byte Folded Reload
	bl	_resource_list_add
	b	LBB0_3
LBB0_14:
	mov	x0, #0
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_10-LBB0_8)>>2
	.byte	(LBB0_11-LBB0_8)>>2
                                        ; -- End function
	.comm	_ISA_NIRQ,4,2                   ; @ISA_NIRQ
	.comm	_ISA_NDRQ,4,2                   ; @ISA_NDRQ
	.comm	_ISA_NMEM,4,2                   ; @ISA_NMEM
	.comm	_ISA_NPORT,4,2                  ; @ISA_NPORT
.subsections_via_symbols
