	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_siw_verbs_modify_qp            ## -- Begin function siw_verbs_modify_qp
	.p2align	4, 0x90
_siw_verbs_modify_qp:                   ## @siw_verbs_modify_qp
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	callq	_to_siw_qp
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.1:
	movq	%rax, %r14
	leaq	-48(%rbp), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_IB_QP_ACCESS_FLAGS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.2:
	movl	(%r15), %eax
	movq	_IB_ACCESS_REMOTE_READ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_SIW_RDMA_READ_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, -40(%rbp)
LBB0_4:
	movq	_SIW_QP_ATTR_ACCESS_FLAGS@GOTPCREL(%rip), %rcx
	movq	_IB_ACCESS_REMOTE_WRITE@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_6
## %bb.5:
	movq	_SIW_RDMA_WRITE_ENABLED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, -40(%rbp)
LBB0_6:
	movl	(%rcx), %r12d
	movq	_IB_ACCESS_MW_BIND@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	_SIW_RDMA_BIND_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -40(%rbp)
LBB0_8:
	movq	_IB_QP_STATE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_12
## %bb.9:
	movq	_ib_qp_state_to_string@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_siw_dbg_qp
	movq	_ib_qp_state_to_siw_qp_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -48(%rbp)
	movq	_SIW_QP_STATE_RTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_11
## %bb.10:
	movl	$1, 4(%r14)
LBB0_11:
	movq	_SIW_QP_ATTR_STATE@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
LBB0_12:
	testl	%r12d, %r12d
	je	LBB0_15
## %bb.13:
	movq	%r14, %rdi
	callq	_down_write
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_siw_qp_modify
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_up_write
	jmp	LBB0_16
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QP_ACCESS_FLAGS,4,2         ## @IB_QP_ACCESS_FLAGS
	.comm	_SIW_QP_ATTR_ACCESS_FLAGS,4,2   ## @SIW_QP_ATTR_ACCESS_FLAGS
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ## @IB_ACCESS_REMOTE_READ
	.comm	_SIW_RDMA_READ_ENABLED,4,2      ## @SIW_RDMA_READ_ENABLED
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ## @IB_ACCESS_REMOTE_WRITE
	.comm	_SIW_RDMA_WRITE_ENABLED,4,2     ## @SIW_RDMA_WRITE_ENABLED
	.comm	_IB_ACCESS_MW_BIND,4,2          ## @IB_ACCESS_MW_BIND
	.comm	_SIW_RDMA_BIND_ENABLED,4,2      ## @SIW_RDMA_BIND_ENABLED
	.comm	_IB_QP_STATE,4,2                ## @IB_QP_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"desired IB QP state: %s\n"

	.comm	_ib_qp_state_to_string,8,3      ## @ib_qp_state_to_string
	.comm	_ib_qp_state_to_siw_qp_state,8,3 ## @ib_qp_state_to_siw_qp_state
	.comm	_SIW_QP_STATE_RTS,8,3           ## @SIW_QP_STATE_RTS
	.comm	_SIW_QP_ATTR_STATE,4,2          ## @SIW_QP_ATTR_STATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_siw_verbs_modify_qp            ; -- Begin function siw_verbs_modify_qp
	.p2align	2
_siw_verbs_modify_qp:                   ; @siw_verbs_modify_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x20, x1
	bl	_to_siw_qp
	cbz	w22, LBB0_15
; %bb.1:
	mov	x19, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x8, _IB_QP_ACCESS_FLAGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_QP_ACCESS_FLAGS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_8
; %bb.2:
Lloh3:
	adrp	x9, _SIW_QP_ATTR_ACCESS_FLAGS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SIW_QP_ATTR_ACCESS_FLAGS@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh5:
	adrp	x10, _IB_ACCESS_REMOTE_READ@GOTPAGE
Lloh6:
	ldr	x10, [x10, _IB_ACCESS_REMOTE_READ@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x10, _SIW_RDMA_READ_ENABLED@GOTPAGE
Lloh9:
	ldr	x10, [x10, _SIW_RDMA_READ_ENABLED@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	ldr	w11, [sp, #8]
	orr	w10, w11, w10
	str	w10, [sp, #8]
LBB0_4:
	ldr	w21, [x9]
Lloh11:
	adrp	x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh14:
	adrp	x9, _SIW_RDMA_WRITE_ENABLED@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SIW_RDMA_WRITE_ENABLED@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	ldr	w10, [sp, #8]
	orr	w9, w10, w9
	str	w9, [sp, #8]
LBB0_6:
Lloh17:
	adrp	x9, _IB_ACCESS_MW_BIND@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IB_ACCESS_MW_BIND@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
Lloh20:
	adrp	x8, _SIW_RDMA_BIND_ENABLED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SIW_RDMA_BIND_ENABLED@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	orr	w8, w9, w8
	str	w8, [sp, #8]
	b	LBB0_9
LBB0_8:
	mov	w21, #0
LBB0_9:
Lloh23:
	adrp	x8, _IB_QP_STATE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IB_QP_STATE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_13
; %bb.10:
Lloh26:
	adrp	x8, _ib_qp_state_to_string@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ib_qp_state_to_string@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	ldr	w2, [x8, x9, lsl #2]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_siw_dbg_qp
Lloh31:
	adrp	x8, _ib_qp_state_to_siw_qp_state@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ib_qp_state_to_siw_qp_state@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	ldr	x8, [x8, x9, lsl #3]
	str	x8, [sp]
Lloh34:
	adrp	x9, _SIW_QP_STATE_RTS@GOTPAGE
Lloh35:
	ldr	x9, [x9, _SIW_QP_STATE_RTS@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_12
; %bb.11:
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_12:
Lloh37:
	adrp	x8, _SIW_QP_ATTR_STATE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SIW_QP_ATTR_STATE@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_13:
	cbz	w21, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_down_write
	mov	x1, sp
	mov	x0, x19
	mov	x2, x21
	bl	_siw_qp_modify
	mov	x20, x0
	mov	x0, x19
	bl	_up_write
	b	LBB0_16
LBB0_15:
	mov	w20, #0
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QP_ACCESS_FLAGS,4,2         ; @IB_QP_ACCESS_FLAGS
	.comm	_SIW_QP_ATTR_ACCESS_FLAGS,4,2   ; @SIW_QP_ATTR_ACCESS_FLAGS
	.comm	_IB_ACCESS_REMOTE_READ,4,2      ; @IB_ACCESS_REMOTE_READ
	.comm	_SIW_RDMA_READ_ENABLED,4,2      ; @SIW_RDMA_READ_ENABLED
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ; @IB_ACCESS_REMOTE_WRITE
	.comm	_SIW_RDMA_WRITE_ENABLED,4,2     ; @SIW_RDMA_WRITE_ENABLED
	.comm	_IB_ACCESS_MW_BIND,4,2          ; @IB_ACCESS_MW_BIND
	.comm	_SIW_RDMA_BIND_ENABLED,4,2      ; @SIW_RDMA_BIND_ENABLED
	.comm	_IB_QP_STATE,4,2                ; @IB_QP_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"desired IB QP state: %s\n"

	.comm	_ib_qp_state_to_string,8,3      ; @ib_qp_state_to_string
	.comm	_ib_qp_state_to_siw_qp_state,8,3 ; @ib_qp_state_to_siw_qp_state
	.comm	_SIW_QP_STATE_RTS,8,3           ; @SIW_QP_STATE_RTS
	.comm	_SIW_QP_ATTR_STATE,4,2          ; @SIW_QP_ATTR_STATE
.subsections_via_symbols
