	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function localbus_alloc_resource
_localbus_alloc_resource:               ## @localbus_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
	pushq	%rax
	.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, %r13
	movl	%edx, %r12d
	movl	%esi, %r15d
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %edi
	movl	%r9d, %esi
	callq	_RMAN_IS_DEFAULT_RANGE
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%r15d, %edi
	callq	_device_get_ivars
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r13
	movq	_SYS_RES_IOPORT@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_5:
	movq	%r13, %rdi
	addq	$4, %rdi
	movl	(%r13), %edx
	movl	%r12d, %esi
	callq	_resource_list_find
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movl	8(%rax), %ebx
	movl	(%rax), %r10d
	movl	4(%rax), %r14d
	jmp	LBB0_9
LBB0_1:
	movl	16(%rbp), %r10d
LBB0_9:
	movl	24(%rbp), %eax
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	movl	%r12d, %edx
	movq	%r13, %rcx
	movl	%ebx, %r8d
	movl	%r14d, %r9d
	pushq	%rax
	pushq	%r10
	callq	_bus_generic_alloc_resource
	addq	$24, %rsp
	jmp	LBB0_10
LBB0_6:
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %ecx
	callq	_device_printf
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_RES_IOPORT,4,2             ## @SYS_RES_IOPORT
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no default resources for rid = %d, type = %d\n"

	.no_dead_strip	_localbus_alloc_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function localbus_alloc_resource
_localbus_alloc_resource:               ; @localbus_alloc_resource
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x7
	mov	x26, x6
	mov	x25, x5
	mov	x24, x4
	mov	x23, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	mov	x0, x4
	mov	x1, x5
	bl	_RMAN_IS_DEFAULT_RANGE
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x22
	bl	_device_get_ivars
	cbz	x0, LBB0_6
; %bb.2:
	mov	x23, x0
Lloh0:
	adrp	x8, _SYS_RES_IOPORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_RES_IOPORT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SYS_RES_MEMORY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w20
	csel	w20, w9, w20, eq
	ldr	w2, [x0], #4
	mov	x1, x20
	bl	_resource_list_find
	cbz	x0, LBB0_5
; %bb.3:
	ldp	w25, w24, [x0, #4]
	ldr	w26, [x0]
LBB0_4:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	x3, x23
	mov	x4, x24
	mov	x5, x25
	mov	x6, x26
	mov	x7, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_bus_generic_alloc_resource
LBB0_5:
	ldr	w2, [x23]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	bl	_device_printf
LBB0_6:
	mov	x0, #0
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_RES_IOPORT,4,2             ; @SYS_RES_IOPORT
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no default resources for rid = %d, type = %d\n"

	.no_dead_strip	_localbus_alloc_resource
.subsections_via_symbols
