	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_shutdown_device
_qib_shutdown_device:                   ## @qib_shutdown_device
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %ecx
	movq	_QIB_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	je	LBB0_1
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r14
	orl	%ecx, %eax
	movl	%eax, (%rdi)
	cmpl	$0, 4(%rdi)
	je	LBB0_5
## %bb.2:
	movl	$24, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r14), %r13
	leaq	(%rbx,%r13), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	movq	_QIBL_LINKINIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_QIBL_LINKDOWN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_QIBL_LINKARMED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_QIBL_LINKACTIVE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_QIBL_LINKV@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	andl	%eax, -24(%r13,%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	movq	_QIB_STATUS_IB_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_QIB_STATUS_IB_CONF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	movq	-16(%r13,%rbx), %rcx
	andl	%eax, (%rcx)
	incq	%r12
	movl	4(%r14), %eax
	addq	$32, %rbx
	cmpq	%rax, %r12
	jb	LBB0_3
## %bb.4:
	movl	(%r14), %eax
LBB0_5:
	movq	_QIB_INITTED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, (%r14)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*48(%r14)
	cmpl	$0, 4(%r14)
	je	LBB0_8
## %bb.6:
	xorl	%r15d, %r15d
	movq	_QIB_SENDCTRL_CLEAR@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r14), %rbx
	addq	%r15, %rbx
	movq	_QIB_RCVCTRL_CTXT_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QIB_RCVCTRL_TAILUPD_DIS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_QIB_RCVCTRL_INTRAVAIL_DIS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_QIB_RCVCTRL_PKEY_ENB@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	*40(%r14)
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	*16(%r14)
	incq	%r13
	movl	4(%r14), %eax
	addq	$32, %r15
	cmpq	%rax, %r13
	jb	LBB0_7
LBB0_8:
	movl	$20, %edi
	callq	_udelay
	cmpl	$0, 4(%r14)
	je	LBB0_15
## %bb.9:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r15, %rdi
	callq	_qib_free_pportdata
	incq	%r13
	movl	4(%r14), %eax
	addq	$32, %rbx
	cmpq	%rax, %r13
	jae	LBB0_15
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r14), %r12
	leaq	(%r12,%rbx), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	*24(%r14)
	movq	_QIB_HAS_SEND_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r15, %rdi
	callq	_qib_teardown_sdma
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_QIB_SENDCTRL_SEND_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QIB_SENDCTRL_AVAIL_DIS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	*16(%r14)
	movq	%r15, %rdi
	callq	*8(%r14)
	movq	16(%r12,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	callq	_destroy_workqueue
	movq	$0, 16(%r12,%rbx)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_QIB_SHUTDOWN,4,2               ## @QIB_SHUTDOWN
	.comm	_QIBL_LINKDOWN,4,2              ## @QIBL_LINKDOWN
	.comm	_QIBL_LINKINIT,4,2              ## @QIBL_LINKINIT
	.comm	_QIBL_LINKARMED,4,2             ## @QIBL_LINKARMED
	.comm	_QIBL_LINKACTIVE,4,2            ## @QIBL_LINKACTIVE
	.comm	_QIBL_LINKV,4,2                 ## @QIBL_LINKV
	.comm	_QIB_STATUS_IB_CONF,4,2         ## @QIB_STATUS_IB_CONF
	.comm	_QIB_STATUS_IB_READY,4,2        ## @QIB_STATUS_IB_READY
	.comm	_QIB_INITTED,4,2                ## @QIB_INITTED
	.comm	_QIB_RCVCTRL_TAILUPD_DIS,4,2    ## @QIB_RCVCTRL_TAILUPD_DIS
	.comm	_QIB_RCVCTRL_CTXT_DIS,4,2       ## @QIB_RCVCTRL_CTXT_DIS
	.comm	_QIB_RCVCTRL_INTRAVAIL_DIS,4,2  ## @QIB_RCVCTRL_INTRAVAIL_DIS
	.comm	_QIB_RCVCTRL_PKEY_ENB,4,2       ## @QIB_RCVCTRL_PKEY_ENB
	.comm	_QIB_SENDCTRL_CLEAR,4,2         ## @QIB_SENDCTRL_CLEAR
	.comm	_QIB_HAS_SEND_DMA,4,2           ## @QIB_HAS_SEND_DMA
	.comm	_QIB_SENDCTRL_AVAIL_DIS,4,2     ## @QIB_SENDCTRL_AVAIL_DIS
	.comm	_QIB_SENDCTRL_SEND_DIS,4,2      ## @QIB_SENDCTRL_SEND_DIS
	.no_dead_strip	_qib_shutdown_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_shutdown_device
_qib_shutdown_device:                   ; @qib_shutdown_device
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _QIB_SHUTDOWN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QIB_SHUTDOWN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
LBB0_1:
	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
	ret
LBB0_2:
	mov	x19, x0
	orr	w8, w9, w8
	str	w8, [x0]
	ldr	w9, [x0, #4]
	cbz	w9, LBB0_6
; %bb.3:
	mov	x21, #0
	mov	x22, #0
Lloh3:
	adrp	x25, _QIBL_LINKARMED@GOTPAGE
Lloh4:
	ldr	x25, [x25, _QIBL_LINKARMED@GOTPAGEOFF]
Lloh5:
	adrp	x26, _QIBL_LINKACTIVE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _QIBL_LINKACTIVE@GOTPAGEOFF]
Lloh7:
	adrp	x27, _QIBL_LINKV@GOTPAGE
Lloh8:
	ldr	x27, [x27, _QIBL_LINKV@GOTPAGEOFF]
Lloh9:
	adrp	x28, _QIB_STATUS_IB_CONF@GOTPAGE
Lloh10:
	ldr	x28, [x28, _QIB_STATUS_IB_CONF@GOTPAGEOFF]
Lloh11:
	adrp	x23, _QIB_STATUS_IB_READY@GOTPAGE
Lloh12:
	ldr	x23, [x23, _QIB_STATUS_IB_READY@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	add	x24, x8, x21
	add	x20, x24, #24
	mov	x0, x20
	bl	_spin_lock_irq
Lloh13:
	adrp	x8, _QIBL_LINKDOWN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _QIBL_LINKDOWN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _QIBL_LINKINIT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _QIBL_LINKINIT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w8, w8, w9
	ldr	w9, [x26]
	orr	w8, w8, w9
	ldr	w9, [x27]
	orr	w8, w8, w9
	ldr	w9, [x24]
	bic	w8, w9, w8
	str	w8, [x24]
	mov	x0, x20
	bl	_spin_unlock_irq
	ldr	w8, [x28]
	ldr	w9, [x23]
	orr	w8, w9, w8
	ldr	x9, [x24, #8]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
	add	x22, x22, #1
	ldr	w8, [x19, #4]
	add	x21, x21, #32
	cmp	x22, x8
	b.lo	LBB0_4
; %bb.5:
	ldr	w8, [x19]
LBB0_6:
Lloh19:
	adrp	x9, _QIB_INITTED@GOTPAGE
Lloh20:
	ldr	x9, [x9, _QIB_INITTED@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19]
	ldr	x8, [x19, #48]
	mov	x0, x19
	mov	w1, #0
	blr	x8
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_9
; %bb.7:
	mov	x21, #0
	mov	x22, #0
Lloh22:
	adrp	x23, _QIB_RCVCTRL_TAILUPD_DIS@GOTPAGE
Lloh23:
	ldr	x23, [x23, _QIB_RCVCTRL_TAILUPD_DIS@GOTPAGEOFF]
Lloh24:
	adrp	x24, _QIB_RCVCTRL_CTXT_DIS@GOTPAGE
Lloh25:
	ldr	x24, [x24, _QIB_RCVCTRL_CTXT_DIS@GOTPAGEOFF]
Lloh26:
	adrp	x25, _QIB_RCVCTRL_INTRAVAIL_DIS@GOTPAGE
Lloh27:
	ldr	x25, [x25, _QIB_RCVCTRL_INTRAVAIL_DIS@GOTPAGEOFF]
Lloh28:
	adrp	x26, _QIB_RCVCTRL_PKEY_ENB@GOTPAGE
Lloh29:
	ldr	x26, [x26, _QIB_RCVCTRL_PKEY_ENB@GOTPAGEOFF]
Lloh30:
	adrp	x27, _QIB_SENDCTRL_CLEAR@GOTPAGE
Lloh31:
	ldr	x27, [x27, _QIB_SENDCTRL_CLEAR@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x19, #32]
	add	x20, x8, x21
	ldr	w8, [x23]
	ldr	w10, [x24]
	orr	w8, w10, w8
	ldr	w10, [x25]
	orr	w8, w8, w10
	ldr	w10, [x26]
	orr	w1, w8, w10
	mov	x0, x20
	mov	w2, #-1
	blr	x9
	ldr	x8, [x19, #16]
	ldr	w1, [x27]
	mov	x0, x20
	blr	x8
	add	x22, x22, #1
	ldr	w8, [x19, #4]
	add	x21, x21, #32
	cmp	x22, x8
	b.lo	LBB0_8
LBB0_9:
	mov	w0, #20
	bl	_udelay
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_1
; %bb.10:
	mov	x21, #0
	mov	x22, #0
Lloh32:
	adrp	x23, _QIB_HAS_SEND_DMA@GOTPAGE
Lloh33:
	ldr	x23, [x23, _QIB_HAS_SEND_DMA@GOTPAGEOFF]
Lloh34:
	adrp	x24, _QIB_SENDCTRL_AVAIL_DIS@GOTPAGE
Lloh35:
	ldr	x24, [x24, _QIB_SENDCTRL_AVAIL_DIS@GOTPAGEOFF]
Lloh36:
	adrp	x25, _QIB_SENDCTRL_SEND_DIS@GOTPAGE
Lloh37:
	ldr	x25, [x25, _QIB_SENDCTRL_SEND_DIS@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	bl	_qib_free_pportdata
	add	x22, x22, #1
	ldr	w8, [x19, #4]
	add	x21, x21, #32
	cmp	x22, x8
	b.hs	LBB0_1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldp	x9, x8, [x19, #24]
	add	x20, x8, x21
	mov	x0, x20
	mov	w1, #0
	blr	x9
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	bl	_qib_teardown_sdma
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x19, #16]
	ldr	w9, [x24]
	ldr	w10, [x25]
	orr	w1, w10, w9
	mov	x0, x20
	blr	x8
	ldr	x8, [x19, #8]
	mov	x0, x20
	blr	x8
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_destroy_workqueue
	str	xzr, [x20, #16]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_QIB_SHUTDOWN,4,2               ; @QIB_SHUTDOWN
	.comm	_QIBL_LINKDOWN,4,2              ; @QIBL_LINKDOWN
	.comm	_QIBL_LINKINIT,4,2              ; @QIBL_LINKINIT
	.comm	_QIBL_LINKARMED,4,2             ; @QIBL_LINKARMED
	.comm	_QIBL_LINKACTIVE,4,2            ; @QIBL_LINKACTIVE
	.comm	_QIBL_LINKV,4,2                 ; @QIBL_LINKV
	.comm	_QIB_STATUS_IB_CONF,4,2         ; @QIB_STATUS_IB_CONF
	.comm	_QIB_STATUS_IB_READY,4,2        ; @QIB_STATUS_IB_READY
	.comm	_QIB_INITTED,4,2                ; @QIB_INITTED
	.comm	_QIB_RCVCTRL_TAILUPD_DIS,4,2    ; @QIB_RCVCTRL_TAILUPD_DIS
	.comm	_QIB_RCVCTRL_CTXT_DIS,4,2       ; @QIB_RCVCTRL_CTXT_DIS
	.comm	_QIB_RCVCTRL_INTRAVAIL_DIS,4,2  ; @QIB_RCVCTRL_INTRAVAIL_DIS
	.comm	_QIB_RCVCTRL_PKEY_ENB,4,2       ; @QIB_RCVCTRL_PKEY_ENB
	.comm	_QIB_SENDCTRL_CLEAR,4,2         ; @QIB_SENDCTRL_CLEAR
	.comm	_QIB_HAS_SEND_DMA,4,2           ; @QIB_HAS_SEND_DMA
	.comm	_QIB_SENDCTRL_AVAIL_DIS,4,2     ; @QIB_SENDCTRL_AVAIL_DIS
	.comm	_QIB_SENDCTRL_SEND_DIS,4,2      ; @QIB_SENDCTRL_SEND_DIS
	.no_dead_strip	_qib_shutdown_device
.subsections_via_symbols
