	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function offload_close
_offload_close:                         ## @offload_close
	.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	_tdev2adap
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_T3C_DATA
	movq	%rax, %r15
	movq	_OFFLOAD_DEVMAP_BIT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_cxgb3_remove_clients
	movq	(%rbx), %rdi
	movq	_offload_attr_group@GOTPCREL(%rip), %rsi
	callq	_sysfs_remove_group
	movq	%r15, %rdi
	callq	_flush_work
	movq	$0, (%rbx)
	movq	%rbx, %rdi
	callq	_cxgb3_set_dummy_ops
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_t3_tp_set_offload_mode
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	cmpl	$0, (%r14)
	jne	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_cxgb_down
LBB0_3:
	movq	%r14, %rdi
	callq	_cxgb3_offload_deactivate
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OFFLOAD_DEVMAP_BIT,4,2         ## @OFFLOAD_DEVMAP_BIT
	.comm	_offload_attr_group,4,2         ## @offload_attr_group
	.no_dead_strip	_offload_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function offload_close
_offload_close:                         ; @offload_close
	.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	x20, x0
	bl	_tdev2adap
	mov	x19, x0
	mov	x0, x20
	bl	_T3C_DATA
	mov	x21, x0
Lloh0:
	adrp	x22, _OFFLOAD_DEVMAP_BIT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _OFFLOAD_DEVMAP_BIT@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_test_bit
	cbz	w0, LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_cxgb3_remove_clients
	ldr	x0, [x20]
Lloh2:
	adrp	x1, _offload_attr_group@GOTPAGE
Lloh3:
	ldr	x1, [x1, _offload_attr_group@GOTPAGEOFF]
	bl	_sysfs_remove_group
	mov	x0, x21
	bl	_flush_work
	str	xzr, [x20]
	mov	x0, x20
	bl	_cxgb3_set_dummy_ops
	mov	x0, x19
	mov	w1, #0
	bl	_t3_tp_set_offload_mode
	ldr	w0, [x22]
	mov	x1, x19
	bl	_clear_bit
	ldr	w8, [x19]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	bl	_cxgb_down
LBB0_3:
	mov	x0, x19
	bl	_cxgb3_offload_deactivate
LBB0_4:
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_OFFLOAD_DEVMAP_BIT,4,2         ; @OFFLOAD_DEVMAP_BIT
	.comm	_offload_attr_group,4,2         ; @offload_attr_group
	.no_dead_strip	_offload_close
.subsections_via_symbols
