	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_modify_qp                ## -- Begin function mthca_modify_qp
	.p2align	4, 0x90
_mthca_modify_qp:                       ## @mthca_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	%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
	movq	%rcx, %r13
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_to_mdev
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_mqp
	movq	%rax, %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	leaq	4(%r14), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_IB_QP_CUR_STATE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movl	(%r15), %r13d
	jmp	LBB0_3
LBB0_2:
	leaq	12(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movq	%r14, %r13
	addq	$16, %r13
	movq	%r13, %rdi
	callq	_spin_lock
	movl	(%r14), %eax
	movq	%r13, %rdi
	movl	%eax, %r13d
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
LBB0_3:
	movq	%r15, %rbx
	movq	_IB_QP_STATE@GOTPCREL(%rip), %rax
	movl	%r13d, %r15d
	testl	%r12d, (%rax)
	je	LBB0_5
## %bb.4:
	movl	4(%rbx), %r15d
LBB0_5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movl	%r13d, %edi
	movl	%r15d, %esi
	movl	%r12d, %ecx
	callq	_ib_modify_qp_is_ok
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	_IB_QP_PKEY_INDEX@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	je	LBB0_10
## %bb.8:
	movq	8(%rsi), %rdx
	movq	8(%rdi), %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_9
LBB0_10:
	movq	_IB_QP_PORT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_14
## %bb.11:
	movq	16(%rsi), %rdx
	testq	%rdx, %rdx
	je	LBB0_13
## %bb.12:
	cmpq	16(%rdi), %rdx
	jle	LBB0_14
LBB0_13:
	leaq	L_.str.2(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_mthca_dbg
	jmp	LBB0_23
LBB0_6:
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %ecx
	movl	%r15d, %r8d
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_mthca_dbg
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_23
LBB0_14:
	movq	_IB_QP_MAX_QP_RD_ATOMIC@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_17
## %bb.15:
	movq	24(%rsi), %rdx
	movq	24(%rdi), %rcx
	cmpq	%rcx, %rdx
	jle	LBB0_17
## %bb.16:
	leaq	L_.str.3(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_mthca_dbg
	jmp	LBB0_23
LBB0_9:
	decq	%rcx
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_mthca_dbg
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_23
LBB0_17:
	movq	_IB_QP_MAX_DEST_RD_ATOMIC@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_20
## %bb.18:
	movl	32(%rsi), %edx
	movb	(%rdi), %cl
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	%eax, %edx
	jle	LBB0_20
## %bb.19:
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_mthca_dbg
	jmp	LBB0_23
LBB0_20:
	cmpl	%r15d, %r13d
	jne	LBB0_22
## %bb.21:
	xorl	%r14d, %r14d
	movq	_IB_QPS_RESET@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	je	LBB0_23
LBB0_22:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%r15d, %r8d
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	callq	___mthca_modify_qp
	movl	%eax, %r14d
LBB0_23:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_QP_CUR_STATE,4,2            ## @IB_QP_CUR_STATE
	.comm	_IB_QP_STATE,4,2                ## @IB_QP_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad QP transition (transport %d) %d->%d with attr 0x%08x\n"

	.comm	_IB_QP_PKEY_INDEX,4,2           ## @IB_QP_PKEY_INDEX
L_.str.1:                               ## @.str.1
	.asciz	"P_Key index (%u) too large. max is %d\n"

	.comm	_IB_QP_PORT,4,2                 ## @IB_QP_PORT
L_.str.2:                               ## @.str.2
	.asciz	"Port number (%u) is invalid\n"

	.comm	_IB_QP_MAX_QP_RD_ATOMIC,4,2     ## @IB_QP_MAX_QP_RD_ATOMIC
L_.str.3:                               ## @.str.3
	.asciz	"Max rdma_atomic as initiator %u too large (max is %d)\n"

	.comm	_IB_QP_MAX_DEST_RD_ATOMIC,4,2   ## @IB_QP_MAX_DEST_RD_ATOMIC
L_.str.4:                               ## @.str.4
	.asciz	"Max rdma_atomic as responder %u too large (max %d)\n"

	.comm	_IB_QPS_RESET,4,2               ## @IB_QPS_RESET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_modify_qp                ; -- Begin function mthca_modify_qp
	.p2align	2
_mthca_modify_qp:                       ; @mthca_modify_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x3
	mov	x22, x2
	mov	x24, x1
	mov	x25, x0
	ldr	w0, [x0, #4]
	bl	_to_mdev
	mov	x20, x0
	mov	x0, x25
	bl	_to_mqp
	mov	x28, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
Lloh3:
	adrp	x8, _IB_QP_CUR_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_QP_CUR_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	str	x21, [sp, #24]                  ; 8-byte Folded Spill
	b.eq	LBB0_2
; %bb.1:
	ldr	w26, [x24]
	b	LBB0_3
LBB0_2:
	add	x21, x28, #12
	mov	x0, x21
	bl	_spin_lock_irq
	add	x27, x28, #16
	mov	x0, x27
	bl	_spin_lock
	ldr	w26, [x28]
	mov	x0, x27
	bl	_spin_unlock
	mov	x0, x21
	bl	_spin_unlock_irq
LBB0_3:
	neg	w21, w23
Lloh6:
	adrp	x8, _IB_QP_STATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_QP_STATE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	x27, x26
	tst	w8, w22
	b.eq	LBB0_5
; %bb.4:
	ldr	w27, [x24, #4]
LBB0_5:
	ldr	w2, [x25]
	mov	x0, x26
	mov	x1, x27
	mov	x3, x22
	bl	_ib_modify_qp_is_ok
	cbz	w0, LBB0_12
; %bb.6:
Lloh9:
	adrp	x8, _IB_QP_PKEY_INDEX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IB_QP_PKEY_INDEX@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_8
; %bb.7:
	ldr	x2, [x24, #8]
	ldr	x8, [x20, #8]
	cmp	x2, x8
	b.ge	LBB0_17
LBB0_8:
Lloh12:
	adrp	x8, _IB_QP_PORT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IB_QP_PORT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_14
; %bb.9:
	ldr	x2, [x24, #16]
	cbz	x2, LBB0_11
; %bb.10:
	ldr	x8, [x20, #16]
	cmp	x2, x8
	b.le	LBB0_14
LBB0_11:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_12:
	ldr	w2, [x28, #8]
	stp	x27, x22, [sp, #8]
	str	x26, [sp]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
LBB0_13:
	mov	x0, x20
	b	LBB0_19
LBB0_14:
Lloh19:
	adrp	x8, _IB_QP_MAX_QP_RD_ATOMIC@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IB_QP_MAX_QP_RD_ATOMIC@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_21
; %bb.15:
	ldr	x2, [x24, #24]
	ldr	x8, [x20, #24]
	cmp	x2, x8
	b.le	LBB0_21
; %bb.16:
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_17:
	sub	x8, x8, #1
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_18:
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
LBB0_19:
	bl	_mthca_dbg
LBB0_20:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_21:
Lloh26:
	adrp	x8, _IB_QP_MAX_DEST_RD_ATOMIC@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IB_QP_MAX_DEST_RD_ATOMIC@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_24
; %bb.22:
	ldr	w2, [x24, #32]
	ldr	w8, [x20]
	mov	w9, #1
	lsl	w8, w9, w8
	cmp	w2, w8
	b.le	LBB0_24
; %bb.23:
	str	x8, [sp]
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_13
LBB0_24:
	cmp	w26, w27
	b.ne	LBB0_27
; %bb.25:
Lloh31:
	adrp	x8, _IB_QPS_RESET@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IB_QPS_RESET@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	cmp	w26, w8
	b.ne	LBB0_27
; %bb.26:
	mov	w21, #0
	b	LBB0_20
LBB0_27:
	mov	x0, x25
	mov	x1, x24
	mov	x2, x22
	mov	x3, x26
	mov	x4, x27
	ldr	x5, [sp, #24]                   ; 8-byte Folded Reload
	bl	___mthca_modify_qp
	mov	x21, x0
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_QP_CUR_STATE,4,2            ; @IB_QP_CUR_STATE
	.comm	_IB_QP_STATE,4,2                ; @IB_QP_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad QP transition (transport %d) %d->%d with attr 0x%08x\n"

	.comm	_IB_QP_PKEY_INDEX,4,2           ; @IB_QP_PKEY_INDEX
l_.str.1:                               ; @.str.1
	.asciz	"P_Key index (%u) too large. max is %d\n"

	.comm	_IB_QP_PORT,4,2                 ; @IB_QP_PORT
l_.str.2:                               ; @.str.2
	.asciz	"Port number (%u) is invalid\n"

	.comm	_IB_QP_MAX_QP_RD_ATOMIC,4,2     ; @IB_QP_MAX_QP_RD_ATOMIC
l_.str.3:                               ; @.str.3
	.asciz	"Max rdma_atomic as initiator %u too large (max is %d)\n"

	.comm	_IB_QP_MAX_DEST_RD_ATOMIC,4,2   ; @IB_QP_MAX_DEST_RD_ATOMIC
l_.str.4:                               ; @.str.4
	.asciz	"Max rdma_atomic as responder %u too large (max %d)\n"

	.comm	_IB_QPS_RESET,4,2               ; @IB_QPS_RESET
.subsections_via_symbols
