	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpiphp_enumerate_slots        ## -- Begin function acpiphp_enumerate_slots
	.p2align	4, 0x90
_acpiphp_enumerate_slots:               ## @acpiphp_enumerate_slots
	.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	_acpiphp_disabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_ACPI_COMPANION
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rax, %r12
	movl	(%rax), %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movq	%rax, %r15
	leaq	28(%rax), %rdi
	callq	_INIT_LIST_HEAD
	leaq	24(%r15), %rdi
	callq	_kref_init
	movl	4(%rbx), %edi
	callq	_pci_dev_get
	movl	%eax, (%r15)
	movq	%rbx, 16(%r15)
	movq	%rbx, %rdi
	callq	_get_device
	xorl	%eax, %eax
	callq	_acpi_lock_hp_context
	movq	16(%r15), %rdi
	callq	_pci_is_root_bus
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movl	(%r13), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	%r15, 8(%rax)
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_acpi_set_hp_context
	jmp	LBB0_8
LBB0_6:
	movq	%r12, %rdi
	callq	_acpiphp_get_context
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%rax, 8(%r15)
	movq	%r15, 8(%rax)
	movl	(%rax), %edi
	callq	_get_bridge
LBB0_8:
	xorl	%eax, %eax
	callq	_acpi_unlock_hp_context
	movq	_bridge_mutex@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	addq	$4, %rdi
	movq	_bridge_list@GOTPCREL(%rip), %rsi
	callq	_list_add
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_ACPI_TYPE_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_acpiphp_add_context@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	$0, (%rsp)
	movl	%r14d, %esi
	movl	$1, %edx
	xorl	%r8d, %r8d
	movq	%r15, %r9
	callq	_acpi_walk_namespace
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_acpi_handle_err
	movq	%r15, %rdi
	callq	_cleanup_bridge
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_bridge                     ## TAILCALL
LBB0_10:
	xorl	%eax, %eax
	callq	_acpi_unlock_hp_context
	movq	%rbx, %rdi
	callq	_put_device
	movl	(%r15), %edi
	callq	_pci_dev_put
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_acpiphp_disabled,8,3           ## @acpiphp_disabled
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_bridge_mutex,4,2               ## @bridge_mutex
	.comm	_bridge_list,4,2                ## @bridge_list
	.comm	_ACPI_TYPE_DEVICE,4,2           ## @ACPI_TYPE_DEVICE
	.comm	_acpiphp_add_context,4,2        ## @acpiphp_add_context
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to register slots\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpiphp_enumerate_slots        ; -- Begin function acpiphp_enumerate_slots
	.p2align	2
_acpiphp_enumerate_slots:               ; @acpiphp_enumerate_slots
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _acpiphp_disabled@GOTPAGE
Lloh1:
	ldr	x8, [x8, _acpiphp_disabled@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x21, x0
	ldr	w0, [x0, #8]
	bl	_ACPI_COMPANION
	cbz	x0, LBB0_1
; %bb.3:
	mov	x22, x0
	ldr	w20, [x0]
Lloh3:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_1
; %bb.4:
	mov	x19, x0
	add	x0, x0, #28
	bl	_INIT_LIST_HEAD
	add	x0, x19, #24
	bl	_kref_init
	ldr	w0, [x21, #4]
	bl	_pci_dev_get
	str	w0, [x19]
	str	x21, [x19, #16]
	mov	x0, x21
	bl	_get_device
	bl	_acpi_lock_hp_context
	ldr	x0, [x19, #16]
	bl	_pci_is_root_bus
	cbz	x0, LBB0_7
; %bb.5:
	ldr	w1, [x23]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.6:
	mov	x1, x0
	str	x19, [x0, #8]
	mov	x0, x22
	bl	_acpi_set_hp_context
	b	LBB0_9
LBB0_7:
	mov	x0, x22
	bl	_acpiphp_get_context
	cbz	x0, LBB0_11
; %bb.8:
	str	x0, [x19, #8]
	str	x19, [x0, #8]
	ldr	w0, [x0]
	bl	_get_bridge
LBB0_9:
	bl	_acpi_unlock_hp_context
Lloh5:
	adrp	x21, _bridge_mutex@GOTPAGE
Lloh6:
	ldr	x21, [x21, _bridge_mutex@GOTPAGEOFF]
	mov	x0, x21
	bl	_mutex_lock
	add	x0, x19, #4
Lloh7:
	adrp	x1, _bridge_list@GOTPAGE
Lloh8:
	ldr	x1, [x1, _bridge_list@GOTPAGEOFF]
	bl	_list_add
	mov	x0, x21
	bl	_mutex_unlock
Lloh9:
	adrp	x8, _ACPI_TYPE_DEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ACPI_TYPE_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _acpiphp_add_context@GOTPAGE
Lloh13:
	ldr	x8, [x8, _acpiphp_add_context@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x1, x20
	mov	w2, #1
	mov	x4, #0
	mov	x5, x19
	mov	x6, #0
	bl	_acpi_walk_namespace
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_1
; %bb.10:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_acpi_handle_err
	mov	x0, x19
	bl	_cleanup_bridge
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_put_bridge
LBB0_11:
	bl	_acpi_unlock_hp_context
	mov	x0, x21
	bl	_put_device
	ldr	w0, [x19]
	bl	_pci_dev_put
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_acpiphp_disabled,8,3           ; @acpiphp_disabled
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_bridge_mutex,4,2               ; @bridge_mutex
	.comm	_bridge_list,4,2                ; @bridge_list
	.comm	_ACPI_TYPE_DEVICE,4,2           ; @ACPI_TYPE_DEVICE
	.comm	_acpiphp_add_context,4,2        ; @acpiphp_add_context
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to register slots\n"

.subsections_via_symbols
