	.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, %r12d
	movl	%r8d, %ebx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r14d
	movl	%edi, %r15d
	movl	%esi, %edi
	callq	_device_get_parent
	movl	%eax, %r13d
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	%r12d, %esi
	callq	_RMAN_IS_DEFAULT_RANGE
	movl	%eax, %r12d
	movl	%r15d, %edi
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	callq	_BUS_GET_RESOURCE_LIST
	movl	%r15d, %ebx
	movl	%r13d, %r14d
	cmpl	%r15d, %r13d
	movq	%rax, %r15
	jne	LBB0_12
## %bb.1:
	testl	%r12d, %r12d
	jne	LBB0_12
## %bb.2:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_resource_list_find
	testq	%rax, %rax
	je	LBB0_3
LBB0_12:
	cmpl	%ebx, %r14d
	je	LBB0_13
LBB0_22:
	movl	24(%rbp), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	movl	16(%rbp), %eax
	pushq	%rax
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	callq	_resource_list_alloc
	addq	$72, %rsp
	jmp	LBB0_23
LBB0_3:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	testl	%edx, %edx
	js	LBB0_18
## %bb.4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_18
## %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
	jl	LBB0_11
	jmp	LBB0_18
LBB0_6:
	movq	_ISA_NIRQ@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jl	LBB0_11
	jmp	LBB0_18
LBB0_9:
	movq	_ISA_NPORT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jl	LBB0_11
	jmp	LBB0_18
LBB0_7:
	movq	_ISA_NDRQ@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_18
LBB0_11:
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movq	-80(%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
	cmpl	%ebx, %r14d
	jne	LBB0_22
LBB0_13:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_resource_list_find
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:
	movq	%rax, %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	-128(%rax), %edx
	cmpl	$3, %edx
	ja	LBB0_18
## %bb.15:
	movq	_isa_mem_base@GOTPCREL(%rip), %rax
	movq	_isa_mem_limit@GOTPCREL(%rip), %rcx
	leaq	LJTI0_1(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	jmpq	*%rdx
LBB0_16:
	movl	(%r12), %eax
	cmpl	$8, %eax
	jl	LBB0_18
## %bb.17:
	cmpl	4(%r12), %eax
	je	LBB0_22
	jmp	LBB0_18
LBB0_19:
	movq	_isa_io_base@GOTPCREL(%rip), %rax
	movq	_isa_io_limit@GOTPCREL(%rip), %rcx
LBB0_20:
	movq	(%rax), %r14
	movq	(%rcx), %r13
	addq	%r14, %r13
	movl	(%r12), %edi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_INRANGE
	testl	%eax, %eax
	je	LBB0_18
## %bb.21:
	movl	4(%r12), %edi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_INRANGE
	testl	%eax, %eax
	jne	LBB0_22
LBB0_18:
	xorl	%eax, %eax
	addq	$40, %rsp
LBB0_23:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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
.set L0_1_set_20, LBB0_20-LJTI0_1
.set L0_1_set_16, LBB0_16-LJTI0_1
.set L0_1_set_19, LBB0_19-LJTI0_1
.set L0_1_set_22, LBB0_22-LJTI0_1
LJTI0_1:
	.long	L0_1_set_20
	.long	L0_1_set_16
	.long	L0_1_set_19
	.long	L0_1_set_22
	.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
	.comm	_isa_mem_base,8,3               ## @isa_mem_base
	.comm	_isa_mem_limit,8,3              ## @isa_mem_limit
	.comm	_isa_io_base,8,3                ## @isa_io_base
	.comm	_isa_io_limit,8,3               ## @isa_io_limit
.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, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, #28]                   ; 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	x28, x0
	mov	x0, x21
	mov	x1, x20
	bl	_RMAN_IS_DEFAULT_RANGE
	mov	x19, x0
	mov	x0, x26
	mov	x1, x25
	bl	_BUS_GET_RESOURCE_LIST
	mov	x27, x0
	cmp	w28, w26
	b.ne	LBB0_3
; %bb.1:
	cbnz	w19, LBB0_3
; %bb.2:
	ldr	w2, [x22]
	mov	x0, x27
	mov	x1, x24
	bl	_resource_list_find
	cbz	x0, LBB0_5
LBB0_3:
	cmp	w28, w26
	b.eq	LBB0_14
LBB0_4:
	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, #28]                   ; 4-byte Folded Reload
	bl	_resource_list_alloc
	b	LBB0_22
LBB0_5:
	ldr	w2, [x22]
	tbnz	w2, #31, LBB0_21
; %bb.6:
	sub	w8, w24, #128
	cmp	w8, #3
	b.hi	LBB0_21
; %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_21
; %bb.13:
	mov	x0, x27
	mov	x1, x24
	mov	x3, x21
	mov	x4, x20
	ldr	w5, [sp, #28]                   ; 4-byte Folded Reload
	bl	_resource_list_add
	cmp	w28, w26
	b.ne	LBB0_4
LBB0_14:
	ldr	w2, [x22]
	mov	x0, x27
	mov	x1, x24
	bl	_resource_list_find
	cbz	x0, LBB0_21
; %bb.15:
	sub	w10, w24, #128
	cmp	w10, #3
	b.hi	LBB0_21
; %bb.16:
	mov	x28, x0
Lloh10:
	adrp	x8, _isa_mem_base@GOTPAGE
Lloh11:
	ldr	x8, [x8, _isa_mem_base@GOTPAGEOFF]
Lloh12:
	adrp	x9, _isa_mem_limit@GOTPAGE
Lloh13:
	ldr	x9, [x9, _isa_mem_limit@GOTPAGEOFF]
Lloh14:
	adrp	x11, lJTI0_1@PAGE
Lloh15:
	add	x11, x11, lJTI0_1@PAGEOFF
	adr	x12, LBB0_4
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_17:
	ldp	w8, w9, [x28]
	cmp	w8, #8
	ccmp	w8, w9, #0, ge
	b.eq	LBB0_4
	b	LBB0_21
LBB0_18:
Lloh16:
	adrp	x8, _isa_io_base@GOTPAGE
Lloh17:
	ldr	x8, [x8, _isa_io_base@GOTPAGEOFF]
Lloh18:
	adrp	x9, _isa_io_limit@GOTPAGE
Lloh19:
	ldr	x9, [x9, _isa_io_limit@GOTPAGEOFF]
LBB0_19:
	ldr	x19, [x8]
	ldr	x8, [x9]
	add	x2, x8, x19
	ldr	w0, [x28]
	mov	x1, x19
	str	x2, [sp, #16]                   ; 8-byte Folded Spill
	bl	_INRANGE
	cbz	w0, LBB0_21
; %bb.20:
	ldr	w0, [x28, #4]
	mov	x1, x19
	ldr	x2, [sp, #16]                   ; 8-byte Folded Reload
	bl	_INRANGE
	cbnz	w0, LBB0_4
LBB0_21:
	mov	x0, #0
LBB0_22:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.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
lJTI0_1:
	.byte	(LBB0_19-LBB0_4)>>2
	.byte	(LBB0_17-LBB0_4)>>2
	.byte	(LBB0_18-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>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
	.comm	_isa_mem_base,8,3               ; @isa_mem_base
	.comm	_isa_mem_limit,8,3              ; @isa_mem_limit
	.comm	_isa_io_base,8,3                ; @isa_io_base
	.comm	_isa_io_limit,8,3               ; @isa_io_limit
.subsections_via_symbols
