	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shutdown_device
_shutdown_device:                       ## @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	_HFI1_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	je	LBB0_1
## %bb.26:
	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)
	movl	4(%rdi), %edx
	testl	%edx, %edx
	je	LBB0_7
## %bb.2:
	movq	24(%r14), %rax
	xorl	%ecx, %ecx
	movq	_HFI1_STATUS_IB_CONF@GOTPCREL(%rip), %rsi
	movq	_HFI1_STATUS_IB_READY@GOTPCREL(%rip), %rdi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	movl	%edx, %ebx
	addq	$32, %rax
	cmpq	%rbx, %rcx
	jae	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, 24(%rax)
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rdi), %edx
	orl	(%rsi), %edx
	notl	%edx
	andl	%edx, (%rbx)
	movl	4(%r14), %edx
	jmp	LBB0_5
LBB0_6:
	movl	(%r14), %eax
LBB0_7:
	movq	_HFI1_INITTED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, (%r14)
	movq	_IS_FIRST_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IS_LAST_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_set_intr_bits
	movq	%r14, %rdi
	callq	_msix_clean_up_interrupts
	cmpl	$0, 4(%r14)
	jne	LBB0_8
LBB0_15:
	movl	$20, %edi
	callq	_udelay
	cmpl	$0, 4(%r14)
	je	LBB0_25
## %bb.16:
	xorl	%r13d, %r13d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	incl	%ebx
	cmpl	4(%r14), %ebx
	jae	LBB0_15
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, 8(%r14)
	movq	_HFI1_RCVCTRL_PKEY_DIS@GOTPCREL(%rip), %r13
	movq	_HFI1_RCVCTRL_ONE_PKT_EGR_DIS@GOTPCREL(%rip), %r12
	jle	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_hfi1_rcd_get_by_index
	movq	%rax, %r15
	movq	_HFI1_RCVCTRL_CTXT_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HFI1_RCVCTRL_TAILUPD_DIS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_HFI1_RCVCTRL_INTRAVAIL_DIS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	orl	(%r13), %esi
	orl	(%r12), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_hfi1_rcvctrl
	movq	%r15, %rdi
	callq	_hfi1_rcd_put
	incl	%ebx
	cmpl	8(%r14), %ebx
	jl	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$0, 12(%r14)
	jle	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_sc_flush
	incq	%rbx
	movslq	12(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_13
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%r13
	movl	4(%r14), %eax
	cmpq	%rax, %r13
	jae	LBB0_25
LBB0_17:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	movq	24(%r14), %rax
	movq	%r13, %r12
	shlq	$5, %r12
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%r12), %rbx
	cmpl	$0, 12(%r14)
	jle	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r14), %rax
	movl	(%rax,%r15,4), %edi
	callq	_sc_disable
	incq	%r15
	movslq	12(%r14), %rax
	cmpq	%rax, %r15
	jl	LBB0_19
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	_PSC_GLOBAL_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pio_send_control
	movq	%rbx, %rdi
	callq	_shutdown_led_override
	movq	%rbx, %rdi
	callq	_hfi1_quiet_serdes
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx,%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	leaq	(%rbx,%r12), %r15
	addq	$16, %r15
	callq	_destroy_workqueue
	movq	$0, (%r15)
LBB0_22:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	8(%rbx,%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_17 Depth=1
	addq	%r12, %rbx
	addq	$8, %rbx
	callq	_destroy_workqueue
	movq	$0, (%rbx)
	jmp	LBB0_24
LBB0_25:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdma_exit                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HFI1_SHUTDOWN,4,2              ## @HFI1_SHUTDOWN
	.comm	_HFI1_STATUS_IB_CONF,4,2        ## @HFI1_STATUS_IB_CONF
	.comm	_HFI1_STATUS_IB_READY,4,2       ## @HFI1_STATUS_IB_READY
	.comm	_HFI1_INITTED,4,2               ## @HFI1_INITTED
	.comm	_IS_FIRST_SOURCE,4,2            ## @IS_FIRST_SOURCE
	.comm	_IS_LAST_SOURCE,4,2             ## @IS_LAST_SOURCE
	.comm	_HFI1_RCVCTRL_TAILUPD_DIS,4,2   ## @HFI1_RCVCTRL_TAILUPD_DIS
	.comm	_HFI1_RCVCTRL_CTXT_DIS,4,2      ## @HFI1_RCVCTRL_CTXT_DIS
	.comm	_HFI1_RCVCTRL_INTRAVAIL_DIS,4,2 ## @HFI1_RCVCTRL_INTRAVAIL_DIS
	.comm	_HFI1_RCVCTRL_PKEY_DIS,4,2      ## @HFI1_RCVCTRL_PKEY_DIS
	.comm	_HFI1_RCVCTRL_ONE_PKT_EGR_DIS,4,2 ## @HFI1_RCVCTRL_ONE_PKT_EGR_DIS
	.comm	_PSC_GLOBAL_DISABLE,4,2         ## @PSC_GLOBAL_DISABLE
	.no_dead_strip	_shutdown_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shutdown_device
_shutdown_device:                       ; @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, _HFI1_SHUTDOWN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HFI1_SHUTDOWN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.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	w11, [x0, #4]
	cbz	w11, LBB0_8
; %bb.3:
	mov	x8, #0
	ldr	x9, [x19, #24]
Lloh3:
	adrp	x10, _HFI1_STATUS_IB_CONF@GOTPAGE
Lloh4:
	ldr	x10, [x10, _HFI1_STATUS_IB_CONF@GOTPAGEOFF]
Lloh5:
	adrp	x12, _HFI1_STATUS_IB_READY@GOTPAGE
Lloh6:
	ldr	x12, [x12, _HFI1_STATUS_IB_READY@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x8, #1
	add	x9, x9, #32
	cmp	x8, w11, uxtw
	b.hs	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [x9, #24]
	ldr	x13, [x9]
	cbz	x13, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w11, [x10]
	ldr	w14, [x12]
	orr	w11, w14, w11
	ldr	w14, [x13]
	bic	w11, w14, w11
	str	w11, [x13]
	ldr	w11, [x19, #4]
	b	LBB0_4
LBB0_7:
	ldr	w8, [x19]
LBB0_8:
Lloh7:
	adrp	x9, _HFI1_INITTED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _HFI1_INITTED@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19]
Lloh10:
	adrp	x8, _IS_FIRST_SOURCE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IS_FIRST_SOURCE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _IS_LAST_SOURCE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IS_LAST_SOURCE@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_set_intr_bits
	mov	x0, x19
	bl	_msix_clean_up_interrupts
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_17
; %bb.9:
	mov	w22, #0
Lloh16:
	adrp	x23, _HFI1_RCVCTRL_TAILUPD_DIS@GOTPAGE
Lloh17:
	ldr	x23, [x23, _HFI1_RCVCTRL_TAILUPD_DIS@GOTPAGEOFF]
Lloh18:
	adrp	x24, _HFI1_RCVCTRL_CTXT_DIS@GOTPAGE
Lloh19:
	ldr	x24, [x24, _HFI1_RCVCTRL_CTXT_DIS@GOTPAGEOFF]
Lloh20:
	adrp	x25, _HFI1_RCVCTRL_INTRAVAIL_DIS@GOTPAGE
Lloh21:
	ldr	x25, [x25, _HFI1_RCVCTRL_INTRAVAIL_DIS@GOTPAGEOFF]
Lloh22:
	adrp	x26, _HFI1_RCVCTRL_PKEY_DIS@GOTPAGE
Lloh23:
	ldr	x26, [x26, _HFI1_RCVCTRL_PKEY_DIS@GOTPAGEOFF]
Lloh24:
	adrp	x27, _HFI1_RCVCTRL_ONE_PKT_EGR_DIS@GOTPAGE
Lloh25:
	ldr	x27, [x27, _HFI1_RCVCTRL_ONE_PKT_EGR_DIS@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w22, w22, #1
	ldr	w8, [x19, #4]
	cmp	w22, w8
	b.hs	LBB0_17
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w20, #0
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	x1, x20
	bl	_hfi1_rcd_get_by_index
	mov	x21, x0
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w8, w8, w9
	ldr	w9, [x26]
	orr	w8, w8, w9
	ldr	w9, [x27]
	orr	w1, w8, w9
	mov	x0, x19
	mov	x2, x21
	bl	_hfi1_rcvctrl
	mov	x0, x21
	bl	_hfi1_rcd_put
	add	w20, w20, #1
	ldr	w8, [x19, #8]
	cmp	w20, w8
	b.lt	LBB0_13
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x20, #0
LBB0_16:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x20, lsl #2]
	bl	_sc_flush
	add	x20, x20, #1
	ldrsw	x8, [x19, #12]
	cmp	x20, x8
	b.lt	LBB0_16
	b	LBB0_10
LBB0_17:
	mov	w0, #20
	bl	_udelay
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_27
; %bb.18:
	mov	x21, #0
Lloh26:
	adrp	x22, _PSC_GLOBAL_DISABLE@GOTPAGE
Lloh27:
	ldr	x22, [x22, _PSC_GLOBAL_DISABLE@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x21, x21, #1
	ldr	w8, [x19, #4]
	cmp	x21, x8
	b.hs	LBB0_27
LBB0_20:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_22 Depth 2
	ldr	x23, [x19, #24]
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x20, #0
LBB0_22:                                ;   Parent Loop BB0_20 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x20, lsl #2]
	bl	_sc_disable
	add	x20, x20, #1
	ldrsw	x8, [x19, #12]
	cmp	x20, x8
	b.lt	LBB0_22
LBB0_23:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x20, x23, x21, lsl #5
	ldr	w1, [x22]
	mov	x0, x19
	bl	_pio_send_control
	mov	x0, x20
	bl	_shutdown_led_override
	mov	x0, x20
	bl	_hfi1_quiet_serdes
	ldr	x0, [x20, #16]!
	cbz	x0, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_20 Depth=1
	bl	_destroy_workqueue
	str	xzr, [x20]
LBB0_25:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x20, x23, x21, lsl #5
	ldr	x0, [x20, #8]!
	cbz	x0, LBB0_19
; %bb.26:                               ;   in Loop: Header=BB0_20 Depth=1
	bl	_destroy_workqueue
	str	xzr, [x20]
	b	LBB0_19
LBB0_27:
	mov	x0, x19
	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	_sdma_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_HFI1_SHUTDOWN,4,2              ; @HFI1_SHUTDOWN
	.comm	_HFI1_STATUS_IB_CONF,4,2        ; @HFI1_STATUS_IB_CONF
	.comm	_HFI1_STATUS_IB_READY,4,2       ; @HFI1_STATUS_IB_READY
	.comm	_HFI1_INITTED,4,2               ; @HFI1_INITTED
	.comm	_IS_FIRST_SOURCE,4,2            ; @IS_FIRST_SOURCE
	.comm	_IS_LAST_SOURCE,4,2             ; @IS_LAST_SOURCE
	.comm	_HFI1_RCVCTRL_TAILUPD_DIS,4,2   ; @HFI1_RCVCTRL_TAILUPD_DIS
	.comm	_HFI1_RCVCTRL_CTXT_DIS,4,2      ; @HFI1_RCVCTRL_CTXT_DIS
	.comm	_HFI1_RCVCTRL_INTRAVAIL_DIS,4,2 ; @HFI1_RCVCTRL_INTRAVAIL_DIS
	.comm	_HFI1_RCVCTRL_PKEY_DIS,4,2      ; @HFI1_RCVCTRL_PKEY_DIS
	.comm	_HFI1_RCVCTRL_ONE_PKT_EGR_DIS,4,2 ; @HFI1_RCVCTRL_ONE_PKT_EGR_DIS
	.comm	_PSC_GLOBAL_DISABLE,4,2         ; @PSC_GLOBAL_DISABLE
	.no_dead_strip	_shutdown_device
.subsections_via_symbols
