	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iobus_alloc_resource
_iobus_alloc_resource:                  ## @iobus_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movl	%r8d, %r15d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r12d
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	_device_get_softc
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movl	%r14d, %r8d
	notl	%r8d
	andl	24(%rbp), %r8d
	cmpl	$130, %ebx
	je	LBB0_3
## %bb.1:
	cmpl	$129, %ebx
	je	LBB0_5
## %bb.2:
	cmpl	$128, %ebx
	jne	LBB0_6
LBB0_3:
	movq	%rax, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	movl	16(%rbp), %ecx
	movl	%r12d, %r9d
	callq	_rman_reserve_resource
	testq	%rax, %rax
	je	LBB0_4
## %bb.8:
	movq	%rax, %r13
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %esi
	movq	%rax, %rdi
	callq	_rman_set_rid
	testl	%r14d, 24(%rbp)
	je	LBB0_12
## %bb.9:
	movl	(%r15), %edx
	movl	%r12d, %edi
	movl	%ebx, %esi
	movq	%r13, %rcx
	callq	_bus_activate_resource
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movl	%r12d, %edi
	callq	_device_get_nameunit
	leaq	L_.str.2(%rip), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_device_printf
	movq	%r13, %rdi
	callq	_rman_release_resource
	jmp	LBB0_11
LBB0_5:
	movl	%r8d, (%rsp)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	$129, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%r15d, %ecx
	movl	%r13d, %r8d
	movl	16(%rbp), %r9d
	callq	_bus_alloc_resource
	jmp	LBB0_13
LBB0_6:
	movl	%r12d, %edi
	callq	_device_get_nameunit
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_4:
	movl	%r12d, %edi
	callq	_device_get_nameunit
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_device_printf
LBB0_11:
	xorl	%r13d, %r13d
LBB0_12:
	movq	%r13, %rax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown resource request from %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to reserve resource for %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to activate resource for %s\n"

	.no_dead_strip	_iobus_alloc_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iobus_alloc_resource
_iobus_alloc_resource:                  ; @iobus_alloc_resource
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x24, x7
	mov	x23, x6
	mov	x25, x5
	mov	x26, x4
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	bl	_device_get_softc
Lloh0:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	w27, [x8]
	bic	w6, w24, w27
	cmp	w22, #130
	b.eq	LBB0_3
; %bb.1:
	cmp	w22, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	w22, #128
	b.ne	LBB0_8
LBB0_3:
	mov	x1, x26
	mov	x2, x25
	mov	x3, x23
	mov	x4, x6
	mov	x5, x20
	bl	_rman_reserve_resource
	mov	x23, x0
	cbz	x0, LBB0_10
; %bb.4:
	and	w24, w27, w24
	ldr	w1, [x21]
	mov	x0, x23
	bl	_rman_set_rid
	cbz	w24, LBB0_11
; %bb.5:
	ldr	w2, [x21]
	mov	x0, x20
	mov	x1, x22
	mov	x3, x23
	bl	_bus_activate_resource
	cbz	x0, LBB0_11
; %bb.6:
	mov	x0, x20
	bl	_device_get_nameunit
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	mov	x0, x23
	bl	_rman_release_resource
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	mov	w1, #129
	mov	x2, x21
	mov	x3, x26
	mov	x4, x25
	mov	x5, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_bus_alloc_resource
LBB0_8:
	mov	x0, x20
	bl	_device_get_nameunit
	mov	x2, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
LBB0_9:
	mov	x23, #0
	b	LBB0_11
LBB0_10:
	mov	x0, x20
	bl	_device_get_nameunit
	mov	x2, x0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_device_printf
LBB0_11:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown resource request from %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to reserve resource for %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to activate resource for %s\n"

	.no_dead_strip	_iobus_alloc_resource
.subsections_via_symbols
