	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bt3c_pccard_attach
_bt3c_pccard_attach:                    ## @bt3c_pccard_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movslq	%eax, %rbx
	leaq	8(%rbx), %r15
	movq	$0, 8(%rbx)
	movq	_SYS_RES_IOPORT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %r12
	movl	(%r12), %r8d
	movl	%r14d, %edi
	movq	%r15, %rdx
	movl	$8, %ecx
	callq	_bus_alloc_resource_anywhere
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rdi
	callq	_rman_get_bustag
	movl	%eax, 96(%rbx)
	movq	16(%rbx), %rdi
	callq	_rman_get_bushandle
	movl	%eax, 92(%rbx)
	leaq	24(%rbx), %rdx
	movq	$0, 24(%rbx)
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %ecx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	leaq	40(%rbx), %rcx
	movq	$0, 40(%rbx)
	movq	_INTR_TYPE_TTY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_bt3c_intr@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movq	%rcx, (%rsp)
	movl	%r14d, %edi
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	movq	%rbx, %r9
	callq	_bus_setup_intr
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movl	%r14d, %edi
	callq	_device_printf
LBB0_14:
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_swi_remove
	movq	$0, 48(%rbx)
LBB0_16:
	movq	32(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.17:
	movq	40(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_19
## %bb.18:
	movl	%r14d, %edi
	movq	%rcx, %rsi
	callq	_bus_teardown_intr
	movq	32(%rbx), %rcx
LBB0_19:
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%rbx), %rdx
	movl	%r14d, %edi
	callq	_bus_release_resource
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
LBB0_20:
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_22
## %bb.21:
	movl	(%r13), %esi
	movq	(%r15), %rdx
	movl	%r14d, %edi
	callq	_bus_release_resource
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r15)
LBB0_22:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_23:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	48(%rbx), %r12
	movq	$0, 48(%rbx)
	movl	%r14d, %edi
	callq	_device_get_nameunit
	movq	_bt3c_swi_intr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_SWI_TTY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%r12, (%rsp)
	movq	_tty_intr_event@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	movq	%rbx, %rcx
	xorl	%r9d, %r9d
	callq	_swi_add
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	leaq	56(%rbx), %r12
	movq	_typestruct@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	callq	_ng_make_node_common
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	jmp	LBB0_13
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_2
LBB0_11:
	movq	(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%r14d, %edi
	callq	_device_get_nameunit
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_ng_name_node
	testq	%rax, %rax
	je	LBB0_24
## %bb.12:
	leaq	L_.str.5(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	movq	(%r12), %rdi
	callq	_NG_NODE_UNREF
LBB0_13:
	movq	$0, (%r12)
	jmp	LBB0_14
LBB0_24:
	movl	%r14d, 88(%rbx)
	movq	_NG_BT3C_WARN_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 84(%rbx)
	movq	_BT3C_DEFAULTQLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	68(%rbx), %r15
	movl	%eax, 72(%rbx)
	leaq	76(%rbx), %rdi
	movl	%eax, 80(%rbx)
	movq	_MTX_DEF@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	leaq	L_.str.6(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_mtx_init
	movl	(%r12), %ecx
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	_NG_BT3C_W4_PKT_IND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movl	$1, (%rbx)
	movq	56(%rbx), %rdi
	movq	%rbx, %rsi
	callq	_NG_NODE_SET_PRIVATE
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_RES_IOPORT,4,2             ## @SYS_RES_IOPORT
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not allocate I/O ports\n"

	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
L_.str.1:                               ## @.str.1
	.asciz	"Could not allocate IRQ\n"

	.comm	_INTR_TYPE_TTY,4,2              ## @INTR_TYPE_TTY
	.comm	_bt3c_intr,4,2                  ## @bt3c_intr
L_.str.2:                               ## @.str.2
	.asciz	"Could not setup ISR\n"

	.comm	_tty_intr_event,4,2             ## @tty_intr_event
	.comm	_bt3c_swi_intr,4,2              ## @bt3c_swi_intr
	.comm	_SWI_TTY,4,2                    ## @SWI_TTY
L_.str.3:                               ## @.str.3
	.asciz	"Could not setup SWI ISR\n"

	.comm	_typestruct,4,2                 ## @typestruct
L_.str.4:                               ## @.str.4
	.asciz	"Could not create Netgraph node\n"

L_.str.5:                               ## @.str.5
	.asciz	"Could not name Netgraph node\n"

	.comm	_NG_BT3C_WARN_LEVEL,4,2         ## @NG_BT3C_WARN_LEVEL
	.comm	_BT3C_DEFAULTQLEN,4,2           ## @BT3C_DEFAULTQLEN
L_.str.6:                               ## @.str.6
	.asciz	"BT3C inq"

	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
L_.str.7:                               ## @.str.7
	.asciz	"BT3C outq"

	.comm	_NG_BT3C_W4_PKT_IND,4,2         ## @NG_BT3C_W4_PKT_IND
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_bt3c_pccard_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bt3c_pccard_attach
_bt3c_pccard_attach:                    ; @bt3c_pccard_attach
	.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	x20, x0
	bl	_device_get_softc
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x19, w0
	mov	x21, x19
	str	xzr, [x21, #8]!
Lloh0:
	adrp	x24, _SYS_RES_IOPORT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SYS_RES_IOPORT@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh2:
	adrp	x23, _RF_ACTIVE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _RF_ACTIVE@GOTPAGEOFF]
	ldr	w4, [x23]
	mov	x0, x20
	mov	x2, x21
	mov	w3, #8
	bl	_bus_alloc_resource_anywhere
	str	x0, [x19, #16]
Lloh4:
	adrp	x25, _SYS_RES_IRQ@GOTPAGE
Lloh5:
	ldr	x25, [x25, _SYS_RES_IRQ@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.1:
	bl	_rman_get_bustag
	str	w0, [x19, #96]
	ldr	x0, [x19, #16]
	bl	_rman_get_bushandle
	mov	x22, x19
	str	xzr, [x22, #24]!
	str	w0, [x22, #68]
	ldr	w1, [x25]
	ldr	w3, [x23]
	mov	x0, x20
	mov	x2, x22
	bl	_bus_alloc_resource_any
	str	x0, [x22, #8]
	cbz	x0, LBB0_5
; %bb.2:
	mov	x1, x0
	mov	x6, x19
	str	xzr, [x6, #40]!
Lloh6:
	adrp	x8, _INTR_TYPE_TTY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INTR_TYPE_TTY@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _bt3c_intr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _bt3c_intr@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x3, #0
	mov	x5, x19
	bl	_bus_setup_intr
	cbz	x0, LBB0_16
; %bb.3:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x20
	bl	_device_printf
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_8
LBB0_7:
	bl	_swi_remove
	str	xzr, [x19, #48]
LBB0_8:
	ldr	x3, [x19, #32]
	cbz	x3, LBB0_12
; %bb.9:
	ldr	x2, [x19, #40]
	cbz	x2, LBB0_11
; %bb.10:
	mov	x0, x20
	mov	x1, x3
	bl	_bus_teardown_intr
	ldr	x3, [x19, #32]
LBB0_11:
	ldr	w1, [x25]
	ldr	x2, [x19, #24]
	mov	x0, x20
	bl	_bus_release_resource
	stp	xzr, xzr, [x19, #24]
LBB0_12:
	ldr	x3, [x19, #16]
	cbz	x3, LBB0_14
; %bb.13:
	ldr	w1, [x24]
	ldr	x2, [x21]
	mov	x0, x20
	bl	_bus_release_resource
	stp	xzr, xzr, [x21]
LBB0_14:
Lloh18:
	adrp	x8, _ENXIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
LBB0_15:
	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
LBB0_16:
	mov	x22, x19
	str	xzr, [x22, #48]!
	mov	x0, x20
	bl	_device_get_nameunit
	mov	x1, x0
Lloh21:
	adrp	x8, _bt3c_swi_intr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _bt3c_swi_intr@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
Lloh24:
	adrp	x8, _SWI_TTY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SWI_TTY@GOTPAGEOFF]
Lloh26:
	ldr	w4, [x8]
Lloh27:
	adrp	x0, _tty_intr_event@GOTPAGE
Lloh28:
	ldr	x0, [x0, _tty_intr_event@GOTPAGEOFF]
	mov	x3, x19
	mov	w5, #0
	mov	x6, x22
	bl	_swi_add
	tbnz	x0, #63, LBB0_19
; %bb.17:
	add	x22, x19, #56
Lloh29:
	adrp	x0, _typestruct@GOTPAGE
Lloh30:
	ldr	x0, [x0, _typestruct@GOTPAGEOFF]
	mov	x1, x22
	bl	_ng_make_node_common
	cbz	x0, LBB0_20
; %bb.18:
Lloh31:
	adrp	x1, l_.str.4@PAGE
Lloh32:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_device_printf
	b	LBB0_22
LBB0_19:
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_20:
	ldr	x23, [x22]
	mov	x0, x20
	bl	_device_get_nameunit
	mov	x1, x0
	mov	x0, x23
	bl	_ng_name_node
	cbz	x0, LBB0_23
; %bb.21:
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_device_printf
	ldr	x0, [x22]
	bl	_NG_NODE_UNREF
LBB0_22:
	str	xzr, [x22]
	ldr	x0, [x19, #48]
	cbnz	x0, LBB0_7
	b	LBB0_8
LBB0_23:
	str	w20, [x19, #88]
Lloh37:
	adrp	x8, _NG_BT3C_WARN_LEVEL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _NG_BT3C_WARN_LEVEL@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
Lloh40:
	adrp	x9, _BT3C_DEFAULTQLEN@GOTPAGE
Lloh41:
	ldr	x9, [x9, _BT3C_DEFAULTQLEN@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	add	x20, x19, #68
	str	w9, [x19, #72]
	add	x0, x19, #76
	stp	w9, w8, [x19, #80]
Lloh43:
	adrp	x21, _MTX_DEF@GOTPAGE
Lloh44:
	ldr	x21, [x21, _MTX_DEF@GOTPAGEOFF]
	ldr	w3, [x21]
Lloh45:
	adrp	x1, l_.str.6@PAGE
Lloh46:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x2, #0
	bl	_mtx_init
	ldr	w3, [x21]
Lloh47:
	adrp	x1, l_.str.7@PAGE
Lloh48:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	bl	_mtx_init
Lloh49:
	adrp	x8, _NG_BT3C_W4_PKT_IND@GOTPAGE
Lloh50:
	ldr	x8, [x8, _NG_BT3C_W4_PKT_IND@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	str	w8, [x19, #64]
	mov	w8, #1
	str	w8, [x19]
	ldr	x0, [x19, #56]
	mov	x1, x19
	bl	_NG_NODE_SET_PRIVATE
	mov	w0, #0
	b	LBB0_15
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_RES_IOPORT,4,2             ; @SYS_RES_IOPORT
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not allocate I/O ports\n"

	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
l_.str.1:                               ; @.str.1
	.asciz	"Could not allocate IRQ\n"

	.comm	_INTR_TYPE_TTY,4,2              ; @INTR_TYPE_TTY
	.comm	_bt3c_intr,4,2                  ; @bt3c_intr
l_.str.2:                               ; @.str.2
	.asciz	"Could not setup ISR\n"

	.comm	_tty_intr_event,4,2             ; @tty_intr_event
	.comm	_bt3c_swi_intr,4,2              ; @bt3c_swi_intr
	.comm	_SWI_TTY,4,2                    ; @SWI_TTY
l_.str.3:                               ; @.str.3
	.asciz	"Could not setup SWI ISR\n"

	.comm	_typestruct,4,2                 ; @typestruct
l_.str.4:                               ; @.str.4
	.asciz	"Could not create Netgraph node\n"

l_.str.5:                               ; @.str.5
	.asciz	"Could not name Netgraph node\n"

	.comm	_NG_BT3C_WARN_LEVEL,4,2         ; @NG_BT3C_WARN_LEVEL
	.comm	_BT3C_DEFAULTQLEN,4,2           ; @BT3C_DEFAULTQLEN
l_.str.6:                               ; @.str.6
	.asciz	"BT3C inq"

	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
l_.str.7:                               ; @.str.7
	.asciz	"BT3C outq"

	.comm	_NG_BT3C_W4_PKT_IND,4,2         ; @NG_BT3C_W4_PKT_IND
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_bt3c_pccard_attach
.subsections_via_symbols
