	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcma_bus_unregister            ## -- Begin function bcma_bus_unregister
	.p2align	4, 0x90
_bcma_bus_unregister:                   ## @bcma_bus_unregister
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_bcma_gpio_unregister
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_bcma_err
	jmp	LBB0_4
LBB0_2:
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_bcma_err
LBB0_4:
	movq	_BCMA_CORE_MIPS_74K@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcma_find_core
	movq	%rax, %r14
	movq	_BCMA_CORE_PCIE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcma_find_core
	movq	%rax, %r15
	movq	_BCMA_CORE_4706_MAC_GBIT_COMMON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcma_find_core
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_bcma_unregister_cores
	movq	%r12, %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_kfree
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Some GPIOs are still in use.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Can not unregister GPIO driver: %i\n"

	.comm	_BCMA_CORE_MIPS_74K,4,2         ## @BCMA_CORE_MIPS_74K
	.comm	_BCMA_CORE_PCIE,4,2             ## @BCMA_CORE_PCIE
	.comm	_BCMA_CORE_4706_MAC_GBIT_COMMON,4,2 ## @BCMA_CORE_4706_MAC_GBIT_COMMON
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcma_bus_unregister            ; -- Begin function bcma_bus_unregister
	.p2align	2
_bcma_bus_unregister:                   ; @bcma_bus_unregister
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_bcma_gpio_unregister
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	cbz	w0, LBB0_5
; %bb.3:
	str	x0, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_bcma_err
LBB0_5:
Lloh7:
	adrp	x8, _BCMA_CORE_MIPS_74K@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BCMA_CORE_MIPS_74K@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bcma_find_core
	mov	x20, x0
Lloh10:
	adrp	x8, _BCMA_CORE_PCIE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BCMA_CORE_PCIE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bcma_find_core
	mov	x21, x0
Lloh13:
	adrp	x8, _BCMA_CORE_4706_MAC_GBIT_COMMON@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BCMA_CORE_4706_MAC_GBIT_COMMON@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bcma_find_core
	mov	x22, x0
	mov	x0, x19
	bl	_bcma_unregister_cores
	mov	x0, x22
	bl	_kfree
	mov	x0, x21
	bl	_kfree
	mov	x0, x20
	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
	add	sp, sp, #64
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Some GPIOs are still in use.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Can not unregister GPIO driver: %i\n"

	.comm	_BCMA_CORE_MIPS_74K,4,2         ; @BCMA_CORE_MIPS_74K
	.comm	_BCMA_CORE_PCIE,4,2             ; @BCMA_CORE_PCIE
	.comm	_BCMA_CORE_4706_MAC_GBIT_COMMON,4,2 ; @BCMA_CORE_4706_MAC_GBIT_COMMON
.subsections_via_symbols
