	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ebus_activate_resource
_ebus_activate_resource:                ## @ebus_activate_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
	movq	%r8, %r14
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movl	%esi, %ebx
	movl	%edi, %r15d
	callq	_device_get_softc
	movq	%rax, %r13
	movq	_EBUS_PCI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_10
## %bb.1:
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_10
## %bb.2:
	cmpl	$0, 4(%r13)
	jle	LBB0_8
## %bb.3:
	movl	$8, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %r15
	leaq	(%r15,%r12), %rsi
	movq	%r14, %rdi
	callq	_rman_is_region_manager
	testq	%rax, %rax
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	4(%r13), %rax
	addq	$16, %r12
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_10:
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%r12d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%r14, %r8
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bus_generic_activate_resource  ## TAILCALL
LBB0_5:
	movq	-8(%r15,%r12), %rdi
	callq	_rman_get_bustag
	movl	%eax, %ebx
	movq	-8(%r15,%r12), %rdi
	callq	_rman_get_bushandle
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_rman_get_start
	movq	%rax, %r13
	movq	-8(%r15,%r12), %rdi
	callq	_rman_get_start
	subq	%rax, %r13
	movq	%r14, %rdi
	callq	_rman_get_size
	leaq	-48(%rbp), %r8
	movl	%ebx, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%r13, %rdx
	movl	%eax, %ecx
	callq	_bus_space_subregion
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_rman_set_bustag
	movl	-48(%rbp), %esi
	movq	%r14, %rdi
	callq	_rman_set_bushandle
	movq	%r14, %rdi
	callq	_rman_activate_resource
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUS_PCI,4,2                   ## @EBUS_PCI
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ebus_activate_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ebus_activate_resource
_ebus_activate_resource:                ; @ebus_activate_resource
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	bl	_device_get_softc
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _EBUS_PCI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EBUS_PCI@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh3:
	adrp	x9, _SYS_RES_IRQ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, #0
	ccmp	w9, w22, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, 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
	add	sp, sp, #80
	b	_bus_generic_activate_resource
LBB0_2:
	mov	x20, x0
	ldr	w8, [x0, #4]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x23, #0
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x24, [x20, #8]
	add	x8, x24, x23
	add	x1, x8, #8
	mov	x0, x19
	bl	_rman_is_region_manager
	cbnz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20, #4]
	add	x23, x23, #16
	cmp	x21, x8
	b.lt	LBB0_4
LBB0_6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_7:
	ldr	x0, [x24, x23]
	bl	_rman_get_bustag
	mov	x20, x0
	ldr	x0, [x24, x23]
	bl	_rman_get_bushandle
	mov	x21, x0
	mov	x0, x19
	bl	_rman_get_start
	mov	x22, x0
	ldr	x0, [x24, x23]
	bl	_rman_get_start
	sub	x22, x22, x0
	mov	x0, x19
	bl	_rman_get_size
	mov	x3, x0
	add	x4, sp, #12
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_bus_space_subregion
	cbnz	w0, LBB0_9
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	bl	_rman_set_bustag
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_rman_set_bushandle
	mov	x0, x19
	bl	_rman_activate_resource
LBB0_9:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUS_PCI,4,2                   ; @EBUS_PCI
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ebus_activate_resource
.subsections_via_symbols
