	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cleanup_device_data
_cleanup_device_data:                   ## @cleanup_device_data
	.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
	movq	%rdi, %r15
	cmpl	$0, (%rdi)
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_QIB_STATUS_CHIP_PRESENT@GOTPCREL(%rip), %r14
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	%rbx, %rdi
	callq	_spin_lock
	movq	72(%r15), %rax
	movq	32(%rax,%rbx), %rdi
	callq	_kfree
	movq	72(%r15), %rax
	movq	$0, 32(%rax,%rbx)
	movq	24(%rax,%rbx), %rdi
	callq	_kfree
	movq	72(%r15), %rax
	movq	$0, 24(%rax,%rbx)
	movq	16(%rax,%rbx), %rdi
	callq	_kfree
	movq	72(%r15), %rax
	movq	$0, 16(%rax,%rbx)
	movq	8(%rax,%rbx), %rdi
	callq	_kfree
	movq	72(%r15), %rdi
	movq	$0, 8(%rdi,%rbx)
	addq	%rbx, %rdi
	callq	_spin_unlock
	incq	%r12
	movslq	(%r15), %rax
	addq	$48, %rbx
	cmpq	%rax, %r12
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	72(%r15), %rdi
	movq	40(%rdi,%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %ecx
	notl	%ecx
	andl	%ecx, (%rax)
	jmp	LBB0_4
LBB0_5:
	movq	%r15, %rdi
	callq	_qib_disable_wc
	movq	56(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.6:
	movq	48(%r15), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	64(%r15), %ecx
	callq	_dma_free_coherent
	movq	$0, 56(%r15)
LBB0_7:
	movq	40(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_18
## %bb.8:
	movq	32(%r15), %r12
	movl	4(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.9:
	xorl	%edx, %edx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	4(%r15), %eax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	incl	%edx
	cmpl	%eax, %edx
	jge	LBB0_17
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movl	8(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%ecx, %eax
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	imull	%edx, %eax
	addl	%eax, %ecx
	movslq	%eax, %r14
	movslq	%ecx, %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14,8), %rbx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=2
	incq	%r14
	addq	$8, %rbx
	cmpq	%r13, %r14
	jge	LBB0_15
LBB0_12:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$0, (%rbx)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	48(%r15), %rdi
	movq	(%r12,%r14,8), %rsi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_unmap_page
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_qib_release_user_pages
	movq	$0, (%rbx)
	jmp	LBB0_14
LBB0_17:
	movq	$0, 40(%r15)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_vfree
	movq	$0, 32(%r15)
	movq	%r12, %rdi
	callq	_vfree
LBB0_18:
	leaq	16(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	24(%r15), %r12
	movq	$0, 24(%r15)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	testq	%r12, %r12
	je	LBB0_22
## %bb.19:
	cmpl	$0, 12(%r15)
	jle	LBB0_22
## %bb.20:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx,8), %rsi
	movq	$0, (%r12,%rbx,8)
	movq	%r15, %rdi
	callq	_qib_free_ctxtdata
	incq	%rbx
	movslq	12(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_21
LBB0_22:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_QIB_STATUS_CHIP_PRESENT,4,2    ## @QIB_STATUS_CHIP_PRESENT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.no_dead_strip	_cleanup_device_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cleanup_device_data
_cleanup_device_data:                   ; @cleanup_device_data
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, #0
	mov	w21, #40
Lloh0:
	adrp	x22, _QIB_STATUS_CHIP_PRESENT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _QIB_STATUS_CHIP_PRESENT@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, x21
	sub	x0, x8, #40
	bl	_spin_lock
	ldr	x8, [x19, #72]
	add	x8, x8, x21
	ldur	x0, [x8, #-8]
	bl	_kfree
	ldr	x8, [x19, #72]
	add	x8, x8, x21
	stur	xzr, [x8, #-8]
	ldur	x0, [x8, #-16]
	bl	_kfree
	ldr	x8, [x19, #72]
	add	x8, x8, x21
	stur	xzr, [x8, #-16]
	ldur	x0, [x8, #-24]
	bl	_kfree
	ldr	x8, [x19, #72]
	add	x8, x8, x21
	stur	xzr, [x8, #-24]
	ldur	x0, [x8, #-32]
	bl	_kfree
	ldr	x8, [x19, #72]
	add	x8, x8, x21
	stur	xzr, [x8, #-32]
	sub	x0, x8, #40
	bl	_spin_unlock
	add	x20, x20, #1
	ldrsw	x8, [x19]
	add	x21, x21, #48
	cmp	x20, x8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #72]
	ldr	x9, [x8, x21]
	cbz	x9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x22]
	ldr	w11, [x9]
	bic	w10, w11, w10
	str	w10, [x9]
	b	LBB0_2
LBB0_5:
	mov	x0, x19
	bl	_qib_disable_wc
	ldr	x2, [x19, #56]
Lloh2:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	cbz	x2, LBB0_7
; %bb.6:
	ldr	x0, [x19, #48]
	ldr	w1, [x23]
	ldr	w3, [x19, #64]
	bl	_dma_free_coherent
	str	xzr, [x19, #56]
LBB0_7:
	ldr	x20, [x19, #40]
	cbz	x20, LBB0_18
; %bb.8:
	ldr	x21, [x19, #32]
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.9:
	mov	w24, #0
Lloh4:
	adrp	x25, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x19, #4]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w24, w24, #1
	cmp	w24, w8
	b.ge	LBB0_17
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mul	w8, w9, w24
	add	w9, w8, w9
	sxtw	x26, w8
	sxtw	x27, w9
	add	x22, x20, w8, sxtw #3
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=2
	add	x26, x26, #1
	add	x22, x22, #8
	cmp	x26, x27
	b.ge	LBB0_10
LBB0_15:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22]
	cbz	x8, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	x0, [x19, #48]
	ldr	x1, [x21, x26, lsl #3]
	ldr	w2, [x23]
	ldr	w3, [x25]
	bl	_pci_unmap_page
	mov	x0, x22
	mov	w1, #1
	bl	_qib_release_user_pages
	str	xzr, [x22]
	b	LBB0_14
LBB0_17:
	str	xzr, [x19, #40]
	mov	x0, x20
	bl	_vfree
	str	xzr, [x19, #32]
	mov	x0, x21
	bl	_vfree
LBB0_18:
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x20, [x19, #24]
	str	xzr, [x19, #24]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cbz	x20, LBB0_22
; %bb.19:
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.20:
	mov	x21, #0
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	lsl	x8, x21, #3
	ldr	x1, [x20, x8]
	str	xzr, [x20, x8]
	mov	x0, x19
	bl	_qib_free_ctxtdata
	add	x21, x21, #1
	ldrsw	x8, [x19, #12]
	cmp	x21, x8
	b.lt	LBB0_21
LBB0_22:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_QIB_STATUS_CHIP_PRESENT,4,2    ; @QIB_STATUS_CHIP_PRESENT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.no_dead_strip	_cleanup_device_data
.subsections_via_symbols
