	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_core_bus_device_unregister ## -- Begin function mlxsw_core_bus_device_unregister
	.p2align	4, 0x90
_mlxsw_core_bus_device_unregister:      ## @mlxsw_core_bus_device_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_priv_to_devlink
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_devlink_is_reload_failed
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_devlink_params_unpublish
LBB0_7:
	movl	32(%rbx), %edi
	callq	_mlxsw_thermal_fini
	movl	28(%rbx), %edi
	callq	_mlxsw_hwmon_fini
	movq	(%rbx), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	*%rcx
	movq	(%rbx), %rax
LBB0_9:
	testl	%r15d, %r15d
	jne	LBB0_12
## %bb.10:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_12:
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.14:
	movq	%rbx, %rdi
	callq	_mlxsw_emad_fini
	movl	24(%rbx), %edi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_mlxsw_ports_fini
	jmp	LBB0_15
LBB0_2:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_4:
	movq	%r14, %rdi
	callq	_devlink_unregister
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devlink_resources_unregister
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devlink_free                   ## TAILCALL
LBB0_13:
	movq	%r14, %rdi
	callq	_devlink_unregister
	movq	%rbx, %rdi
	callq	_mlxsw_emad_fini
	movl	24(%rbx), %edi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_mlxsw_ports_fini
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devlink_resources_unregister
LBB0_15:
	movq	16(%rbx), %rax
	movl	8(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_core_bus_device_unregister ; -- Begin function mlxsw_core_bus_device_unregister
	.p2align	2
_mlxsw_core_bus_device_unregister:      ; @mlxsw_core_bus_device_unregister
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x19, x0
	bl	_priv_to_devlink
	mov	x20, x0
	bl	_devlink_is_reload_failed
	cbz	x0, LBB0_3
; %bb.1:
	cbz	w21, LBB0_12
; %bb.2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_devlink_params_unpublish
LBB0_5:
	ldr	w0, [x19, #32]
	bl	_mlxsw_thermal_fini
	ldr	w0, [x19, #28]
	bl	_mlxsw_hwmon_fini
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_7
; %bb.6:
	mov	x0, x19
	blr	x9
	ldr	x8, [x19]
LBB0_7:
	cbnz	w21, LBB0_10
; %bb.8:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	blr	x8
LBB0_10:
	cbz	w21, LBB0_15
; %bb.11:
	mov	x0, x19
	bl	_mlxsw_emad_fini
	ldr	w0, [x19, #24]
	bl	_kfree
	mov	x0, x19
	bl	_mlxsw_ports_fini
	b	LBB0_16
LBB0_12:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.13:
	mov	x0, x19
	blr	x8
LBB0_14:
	mov	x0, x20
	bl	_devlink_unregister
	mov	x0, x20
	mov	x1, #0
	bl	_devlink_resources_unregister
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_devlink_free
LBB0_15:
	mov	x0, x20
	bl	_devlink_unregister
	mov	x0, x19
	bl	_mlxsw_emad_fini
	ldr	w0, [x19, #24]
	bl	_kfree
	mov	x0, x19
	bl	_mlxsw_ports_fini
	mov	x0, x20
	mov	x1, #0
	bl	_devlink_resources_unregister
LBB0_16:
	ldr	x8, [x19, #16]
	ldr	x1, [x8]
	ldr	w0, [x19, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x1
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
