	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apb_attach
_apb_attach:                            ## @apb_attach
	.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	%edi, %ebx
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, %edi
	callq	_pci_get_domain
	leaq	16(%r14), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	32(%r14), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, 32(%r14)
	movl	%ebx, %edi
	callq	_pci_get_bus
	leaq	40(%r14), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, 40(%r14)
	movq	_PCIR_PRIBUS_1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%ebx, %edi
	movq	%rax, %rdx
	movl	$1, %ecx
	callq	_pci_write_config
	movq	_PCIR_SECBUS_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$1, %edx
	callq	_pci_read_config
	leaq	24(%r14), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, 24(%r14)
	movq	_PCIR_SUBBUS_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$1, %edx
	callq	_pci_read_config
	movq	%rax, 16(%r14)
	movq	_PCIR_BRIDGECTL_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$2, %edx
	callq	_pci_read_config
	movq	%rax, 48(%r14)
	movq	_APBR_IOMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$1, %edx
	callq	_pci_read_config
	movq	%rax, 8(%r14)
	movq	_APBR_MEMMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$1, %edx
	callq	_pci_read_config
	movq	%rax, (%r14)
	movl	%ebx, %edi
	callq	_device_get_sysctl_ctx
	movq	%rax, %r12
	movl	%ebx, %edi
	callq	_device_get_sysctl_tree
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_SYSCTL_CHILDREN
	movq	_OID_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CTLFLAG_RD@GOTPCREL(%rip), %r15
	movl	(%r15), %r8d
	leaq	L_.str.1(%rip), %r10
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	pushq	%r10
	pushq	$0
	callq	_SYSCTL_ADD_UINT
	addq	$16, %rsp
	movq	%r13, %rdi
	callq	_SYSCTL_CHILDREN
	movq	_OID_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%r15), %r8d
	leaq	L_.str.3(%rip), %r10
	leaq	L_.str.2(%rip), %rcx
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	pushq	%r10
	pushq	$0
	callq	_SYSCTL_ADD_UINT
	addq	$16, %rsp
	movq	%r13, %rdi
	callq	_SYSCTL_CHILDREN
	movq	_OID_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%r15), %r8d
	leaq	L_.str.5(%rip), %r10
	leaq	L_.str.4(%rip), %rcx
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	pushq	%r10
	pushq	$0
	callq	_SYSCTL_ADD_UINT
	addq	$16, %rsp
	movq	%r13, %rdi
	callq	_SYSCTL_CHILDREN
	movq	_OID_AUTO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%r15), %r8d
	leaq	L_.str.7(%rip), %r10
	leaq	L_.str.6(%rip), %rcx
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	pushq	%r10
	pushq	$0
	callq	_SYSCTL_ADD_UINT
	addq	$16, %rsp
	movl	%ebx, %edi
	callq	_ofw_pcib_gen_setup
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	32(%r14), %rdx
	leaq	L_.str.8(%rip), %rsi
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	24(%r14), %rdx
	leaq	L_.str.9(%rip), %rsi
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	16(%r14), %rdx
	leaq	L_.str.10(%rip), %rsi
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_device_printf
	leaq	L_.str.11(%rip), %rsi
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	8(%r14), %rdi
	movq	_APB_IO_SCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_apb_map_print
	movl	$10, %edi
	callq	_putchar
	leaq	L_.str.13(%rip), %rsi
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	(%r14), %rdi
	movq	_APB_MEM_SCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_apb_map_print
	movl	$10, %edi
	callq	_putchar
LBB0_2:
	leaq	L_.str.14(%rip), %rsi
	movl	%ebx, %edi
	movl	$-1, %edx
	callq	_device_add_child
	movl	%ebx, %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bus_generic_attach             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIR_PRIBUS_1,4,2              ## @PCIR_PRIBUS_1
	.comm	_PCIR_SECBUS_1,4,2              ## @PCIR_SECBUS_1
	.comm	_PCIR_SUBBUS_1,4,2              ## @PCIR_SUBBUS_1
	.comm	_PCIR_BRIDGECTL_1,4,2           ## @PCIR_BRIDGECTL_1
	.comm	_APBR_IOMAP,4,2                 ## @APBR_IOMAP
	.comm	_APBR_MEMMAP,4,2                ## @APBR_MEMMAP
	.comm	_OID_AUTO,4,2                   ## @OID_AUTO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"domain"

	.comm	_CTLFLAG_RD,4,2                 ## @CTLFLAG_RD
L_.str.1:                               ## @.str.1
	.asciz	"Domain number"

L_.str.2:                               ## @.str.2
	.asciz	"pribus"

L_.str.3:                               ## @.str.3
	.asciz	"Primary bus number"

L_.str.4:                               ## @.str.4
	.asciz	"secbus"

L_.str.5:                               ## @.str.5
	.asciz	"Secondary bus number"

L_.str.6:                               ## @.str.6
	.asciz	"subbus"

L_.str.7:                               ## @.str.7
	.asciz	"Subordinate bus number"

	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.8:                               ## @.str.8
	.asciz	"  domain            %d\n"

L_.str.9:                               ## @.str.9
	.asciz	"  secondary bus     %d\n"

L_.str.10:                              ## @.str.10
	.asciz	"  subordinate bus   %d\n"

L_.str.11:                              ## @.str.11
	.asciz	"  I/O decode        "

	.comm	_APB_IO_SCALE,4,2               ## @APB_IO_SCALE
L_.str.13:                              ## @.str.13
	.asciz	"  memory decode     "

	.comm	_APB_MEM_SCALE,4,2              ## @APB_MEM_SCALE
L_.str.14:                              ## @.str.14
	.asciz	"pci"

	.no_dead_strip	_apb_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apb_attach
_apb_attach:                            ; @apb_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	mov	x0, x19
	bl	_pci_get_domain
	mov	x24, x20
	str	x0, [x24, #32]!
	mov	x0, x19
	bl	_pci_get_bus
	mov	x2, x0
	mov	x22, x20
	str	x0, [x22, #40]!
Lloh0:
	adrp	x8, _PCIR_PRIBUS_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIR_PRIBUS_1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_pci_write_config
Lloh3:
	adrp	x8, _PCIR_SECBUS_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCIR_SECBUS_1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_pci_read_config
	mov	x23, x20
	str	x0, [x23, #24]!
Lloh6:
	adrp	x8, _PCIR_SUBBUS_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCIR_SUBBUS_1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_pci_read_config
	mov	x21, x20
	str	x0, [x21, #16]!
Lloh9:
	adrp	x8, _PCIR_BRIDGECTL_1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCIR_BRIDGECTL_1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	bl	_pci_read_config
	str	x0, [x20, #48]
Lloh12:
	adrp	x8, _APBR_IOMAP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _APBR_IOMAP@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_pci_read_config
	str	x0, [x20, #8]
Lloh15:
	adrp	x8, _APBR_MEMMAP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _APBR_MEMMAP@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_pci_read_config
	str	x0, [x20]
	mov	x0, x19
	bl	_device_get_sysctl_ctx
	mov	x25, x0
	mov	x0, x19
	bl	_device_get_sysctl_tree
	mov	x26, x0
	bl	_SYSCTL_CHILDREN
	mov	x1, x0
Lloh18:
	adrp	x27, _OID_AUTO@GOTPAGE
Lloh19:
	ldr	x27, [x27, _OID_AUTO@GOTPAGEOFF]
	ldr	w2, [x27]
Lloh20:
	adrp	x28, _CTLFLAG_RD@GOTPAGE
Lloh21:
	ldr	x28, [x28, _CTLFLAG_RD@GOTPAGEOFF]
	ldr	w4, [x28]
Lloh22:
	adrp	x3, l_.str@PAGE
Lloh23:
	add	x3, x3, l_.str@PAGEOFF
Lloh24:
	adrp	x7, l_.str.1@PAGE
Lloh25:
	add	x7, x7, l_.str.1@PAGEOFF
	mov	x0, x25
	mov	x5, x24
	mov	w6, #0
	bl	_SYSCTL_ADD_UINT
	mov	x0, x26
	bl	_SYSCTL_CHILDREN
	mov	x1, x0
	ldr	w2, [x27]
	ldr	w4, [x28]
Lloh26:
	adrp	x3, l_.str.2@PAGE
Lloh27:
	add	x3, x3, l_.str.2@PAGEOFF
Lloh28:
	adrp	x7, l_.str.3@PAGE
Lloh29:
	add	x7, x7, l_.str.3@PAGEOFF
	mov	x0, x25
	mov	x5, x22
	mov	w6, #0
	bl	_SYSCTL_ADD_UINT
	mov	x0, x26
	bl	_SYSCTL_CHILDREN
	mov	x1, x0
	ldr	w2, [x27]
	ldr	w4, [x28]
Lloh30:
	adrp	x3, l_.str.4@PAGE
Lloh31:
	add	x3, x3, l_.str.4@PAGEOFF
Lloh32:
	adrp	x7, l_.str.5@PAGE
Lloh33:
	add	x7, x7, l_.str.5@PAGEOFF
	mov	x0, x25
	mov	x5, x23
	mov	w6, #0
	bl	_SYSCTL_ADD_UINT
	mov	x0, x26
	bl	_SYSCTL_CHILDREN
	mov	x1, x0
	ldr	w2, [x27]
	ldr	w4, [x28]
Lloh34:
	adrp	x3, l_.str.6@PAGE
Lloh35:
	add	x3, x3, l_.str.6@PAGEOFF
Lloh36:
	adrp	x7, l_.str.7@PAGE
Lloh37:
	add	x7, x7, l_.str.7@PAGEOFF
	mov	x0, x25
	mov	x5, x21
	mov	w6, #0
	bl	_SYSCTL_ADD_UINT
	mov	x0, x19
	bl	_ofw_pcib_gen_setup
Lloh38:
	adrp	x8, _bootverbose@GOTPAGE
Lloh39:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20, #32]
	str	x8, [sp]
Lloh41:
	adrp	x1, l_.str.8@PAGE
Lloh42:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	ldr	x8, [x20, #24]
	str	x8, [sp]
Lloh43:
	adrp	x1, l_.str.9@PAGE
Lloh44:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	ldr	x8, [x20, #16]
	str	x8, [sp]
Lloh45:
	adrp	x1, l_.str.10@PAGE
Lloh46:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh47:
	adrp	x1, l_.str.11@PAGE
Lloh48:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	ldr	x0, [x20, #8]
Lloh49:
	adrp	x8, _APB_IO_SCALE@GOTPAGE
Lloh50:
	ldr	x8, [x8, _APB_IO_SCALE@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	bl	_apb_map_print
	mov	w0, #10
	bl	_putchar
Lloh52:
	adrp	x1, l_.str.13@PAGE
Lloh53:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	ldr	x0, [x20]
Lloh54:
	adrp	x8, _APB_MEM_SCALE@GOTPAGE
Lloh55:
	ldr	x8, [x8, _APB_MEM_SCALE@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
	bl	_apb_map_print
	mov	w0, #10
	bl	_putchar
LBB0_2:
Lloh57:
	adrp	x1, l_.str.14@PAGE
Lloh58:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	x0, x19
	mov	w2, #-1
	bl	_device_add_child
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_bus_generic_attach
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIR_PRIBUS_1,4,2              ; @PCIR_PRIBUS_1
	.comm	_PCIR_SECBUS_1,4,2              ; @PCIR_SECBUS_1
	.comm	_PCIR_SUBBUS_1,4,2              ; @PCIR_SUBBUS_1
	.comm	_PCIR_BRIDGECTL_1,4,2           ; @PCIR_BRIDGECTL_1
	.comm	_APBR_IOMAP,4,2                 ; @APBR_IOMAP
	.comm	_APBR_MEMMAP,4,2                ; @APBR_MEMMAP
	.comm	_OID_AUTO,4,2                   ; @OID_AUTO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"domain"

	.comm	_CTLFLAG_RD,4,2                 ; @CTLFLAG_RD
l_.str.1:                               ; @.str.1
	.asciz	"Domain number"

l_.str.2:                               ; @.str.2
	.asciz	"pribus"

l_.str.3:                               ; @.str.3
	.asciz	"Primary bus number"

l_.str.4:                               ; @.str.4
	.asciz	"secbus"

l_.str.5:                               ; @.str.5
	.asciz	"Secondary bus number"

l_.str.6:                               ; @.str.6
	.asciz	"subbus"

l_.str.7:                               ; @.str.7
	.asciz	"Subordinate bus number"

	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.8:                               ; @.str.8
	.asciz	"  domain            %d\n"

l_.str.9:                               ; @.str.9
	.asciz	"  secondary bus     %d\n"

l_.str.10:                              ; @.str.10
	.asciz	"  subordinate bus   %d\n"

l_.str.11:                              ; @.str.11
	.asciz	"  I/O decode        "

	.comm	_APB_IO_SCALE,4,2               ; @APB_IO_SCALE
l_.str.13:                              ; @.str.13
	.asciz	"  memory decode     "

	.comm	_APB_MEM_SCALE,4,2              ; @APB_MEM_SCALE
l_.str.14:                              ; @.str.14
	.asciz	"pci"

	.no_dead_strip	_apb_attach
.subsections_via_symbols
