	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_diag_remove                ## -- Begin function qib_diag_remove
	.p2align	4, 0x90
_qib_diag_remove:                       ## @qib_diag_remove
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_diagpkt_count@GOTPCREL(%rip), %rdi
	callq	_atomic_dec_and_test
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_diagpkt_cdev@GOTPCREL(%rip), %rdi
	movq	_diagpkt_device@GOTPCREL(%rip), %rsi
	callq	_qib_cdev_cleanup
LBB0_2:
	leaq	12(%r14), %rdi
	leaq	8(%r14), %rsi
	callq	_qib_cdev_cleanup
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_return_client
	jmp	LBB0_3
LBB0_4:
	movq	_client_pool@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rdi), %rax
	movq	%rax, (%rbx)
	callq	_kfree
	jmp	LBB0_6
LBB0_7:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_qib_unregister_observers       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_diagpkt_count,4,2              ## @diagpkt_count
	.comm	_diagpkt_cdev,4,2               ## @diagpkt_cdev
	.comm	_diagpkt_device,4,2             ## @diagpkt_device
	.comm	_client_pool,8,3                ## @client_pool
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_diag_remove                ; -- Begin function qib_diag_remove
	.p2align	2
_qib_diag_remove:                       ; @qib_diag_remove
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, _diagpkt_count@GOTPAGE
Lloh1:
	ldr	x0, [x0, _diagpkt_count@GOTPAGEOFF]
	bl	_atomic_dec_and_test
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, _diagpkt_cdev@GOTPAGE
Lloh3:
	ldr	x0, [x0, _diagpkt_cdev@GOTPAGEOFF]
Lloh4:
	adrp	x1, _diagpkt_device@GOTPAGE
Lloh5:
	ldr	x1, [x1, _diagpkt_device@GOTPAGEOFF]
	bl	_qib_cdev_cleanup
LBB0_2:
	add	x0, x19, #12
	add	x1, x19, #8
	bl	_qib_cdev_cleanup
	ldr	x0, [x19]
	cbz	x0, LBB0_4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	bl	_return_client
	ldr	x0, [x19]
	cbnz	x0, LBB0_3
LBB0_4:
Lloh6:
	adrp	x20, _client_pool@GOTPAGE
Lloh7:
	ldr	x20, [x20, _client_pool@GOTPAGEOFF]
	ldr	x0, [x20]
	cbz	x0, LBB0_6
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x0]
	str	x8, [x20]
	bl	_kfree
	ldr	x0, [x20]
	cbnz	x0, LBB0_5
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_qib_unregister_observers
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_diagpkt_count,4,2              ; @diagpkt_count
	.comm	_diagpkt_cdev,4,2               ; @diagpkt_cdev
	.comm	_diagpkt_device,4,2             ; @diagpkt_device
	.comm	_client_pool,8,3                ; @client_pool
.subsections_via_symbols
