	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_disarm_piobufs_set         ## -- Begin function qib_disarm_piobufs_set
	.p2align	4, 0x90
_qib_disarm_piobufs_set:                ## @qib_disarm_piobufs_set
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_QIB_MAX_IB_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	(%r15), %r12d
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	leaq	(,%r12,8), %rsi
	movq	%r14, %rdi
	callq	___bzero
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.3:
	leaq	24(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rax), %rcx
	movq	%rax, (%r14,%rcx,8)
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%r12d
	addl	$2, %r13d
	cmpl	%r12d, %ebx
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_21
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_is_sdma_buf
	testq	%rax, %rax
	jne	LBB0_6
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_lock_irqsave
	movq	8(%r15), %rsi
	movl	%r12d, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_16
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	40(%r15), %esi
	movl	%r12d, %edi
	callq	___set_bit
	jmp	LBB0_20
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r15), %rsi
	movl	%r13d, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_17
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	32(%r15), %rbx
	movl	28(%r15), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%r12d, %edi
	callq	_QIB_SENDCTRL_DISARM_BUF
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	*%rbx
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	jmp	LBB0_21
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_find_ctxt
	testq	%rax, %rax
	jne	LBB0_18
	jmp	LBB0_19
LBB0_7:
	movl	(%r15), %r12d
LBB0_8:
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movl	%r12d, %eax
	cmpq	%rax, %rbx
	jae	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	callq	_qib_cancel_sends
	movl	(%r15), %r12d
	jmp	LBB0_12
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_QIB_MAX_IB_PORTS,4,2           ## @QIB_MAX_IB_PORTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_disarm_piobufs_set         ; -- Begin function qib_disarm_piobufs_set
	.p2align	2
_qib_disarm_piobufs_set:                ; @qib_disarm_piobufs_set
	.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
	sub	sp, sp, #16
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _QIB_MAX_IB_PORTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QIB_MAX_IB_PORTS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	w23, [x0]
	cbz	w23, LBB0_2
; %bb.1:
	lsl	x1, x23, #3
	mov	x0, x20
	bl	_bzero
LBB0_2:
	cbz	w21, LBB0_15
; %bb.3:
	mov	w23, #0
	mov	w24, #0
	add	x25, x19, #24
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x0]
	str	x0, [x20, x8, lsl #3]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w24, w24, #1
	add	w23, w23, #2
	cmp	w21, w24
	b.eq	LBB0_14
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_is_sdma_buf
	cbnz	x0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	bl	_spin_lock_irqsave
	ldr	x1, [x19, #8]
	mov	x0, x24
	bl	_test_bit
	cbz	x0, LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x19, #40]
	mov	x0, x24
	bl	___set_bit
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x19, #16]
	mov	x0, x23
	bl	_test_bit
	cbz	x0, LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x27, [x19, #32]
	ldr	w26, [x19, #28]
	mov	x0, x24
	bl	_QIB_SENDCTRL_DISARM_BUF
	mov	x1, x0
	mov	x0, x26
	blr	x27
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	bl	_spin_unlock_irqrestore
	b	LBB0_5
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_find_ctxt
	cbnz	x0, LBB0_9
	b	LBB0_11
LBB0_14:
	ldr	w23, [x19]
LBB0_15:
	cbz	w23, LBB0_20
; %bb.16:
	mov	x21, #0
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x21, x21, #1
	cmp	x21, w23, uxtw
	b.hs	LBB0_20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, x21, lsl #3]
	cbz	x0, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	bl	_qib_cancel_sends
	ldr	w23, [x19]
	b	LBB0_17
LBB0_20:
	ldur	x8, [x29, #-88]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	sub	sp, x29, #80
	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_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_QIB_MAX_IB_PORTS,4,2           ; @QIB_MAX_IB_PORTS
.subsections_via_symbols
