	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipoib_init_qp                  ## -- Begin function ipoib_init_qp
	.p2align	4, 0x90
_ipoib_init_qp:                         ## @ipoib_init_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	%rdi, %r14
	movq	_IPOIB_PKEY_ASSIGNED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r14), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_IB_QPS_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	$0, -48(%rbp)
	movl	8(%r14), %eax
	movl	%eax, -52(%rbp)
	movl	4(%r14), %eax
	movq	_IB_QP_QKEY@GOTPCREL(%rip), %rcx
	movq	_IB_QP_PORT@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	orl	(%rcx), %ebx
	movl	%eax, -56(%rbp)
	movq	_IB_QP_PKEY_INDEX@GOTPCREL(%rip), %r13
	orl	(%r13), %ebx
	movq	_IB_QP_STATE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r14), %edi
	leaq	-72(%rbp), %rsi
	movl	%ebx, %edx
	callq	_ib_modify_qp
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_9
LBB0_1:
	movl	$-1, %r15d
	jmp	LBB0_11
LBB0_4:
	movq	_IB_QPS_RTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	(%r14), %edi
	leaq	-72(%rbp), %rsi
	movl	%ebx, %edx
	callq	_ib_modify_qp
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_6:
	movq	_IB_QPS_RTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	_IB_QP_SQ_PSN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r13), %edx
	notl	%edx
	andl	%ebx, %edx
	movl	(%r14), %edi
	leaq	-72(%rbp), %rsi
	callq	_ib_modify_qp
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
LBB0_9:
	movq	%r14, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_ipoib_warn
	movq	_IB_QP_STATE@GOTPCREL(%rip), %rcx
	movq	_IB_QPS_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movl	(%r14), %edi
	movl	(%rcx), %edx
	leaq	-72(%rbp), %rsi
	callq	_ib_modify_qp
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ipoib_warn
LBB0_11:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%r15d, %r15d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_IPOIB_PKEY_ASSIGNED,4,2        ## @IPOIB_PKEY_ASSIGNED
	.comm	_IB_QPS_INIT,4,2                ## @IB_QPS_INIT
	.comm	_IB_QP_QKEY,4,2                 ## @IB_QP_QKEY
	.comm	_IB_QP_PORT,4,2                 ## @IB_QP_PORT
	.comm	_IB_QP_PKEY_INDEX,4,2           ## @IB_QP_PKEY_INDEX
	.comm	_IB_QP_STATE,4,2                ## @IB_QP_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to modify QP to init, ret = %d\n"

	.comm	_IB_QPS_RTR,4,2                 ## @IB_QPS_RTR
L_.str.1:                               ## @.str.1
	.asciz	"failed to modify QP to RTR, ret = %d\n"

	.comm	_IB_QPS_RTS,4,2                 ## @IB_QPS_RTS
	.comm	_IB_QP_SQ_PSN,4,2               ## @IB_QP_SQ_PSN
L_.str.2:                               ## @.str.2
	.asciz	"failed to modify QP to RTS, ret = %d\n"

	.comm	_IB_QPS_RESET,4,2               ## @IB_QPS_RESET
L_.str.3:                               ## @.str.3
	.asciz	"Failed to modify QP to RESET state\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipoib_init_qp                  ; -- Begin function ipoib_init_qp
	.p2align	2
_ipoib_init_qp:                         ; @ipoib_init_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _IPOIB_PKEY_ASSIGNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPOIB_PKEY_ASSIGNED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #12
	bl	_test_bit
	cbz	w0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _IB_QPS_INIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_QPS_INIT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	str	xzr, [sp, #40]
	ldur	d0, [x19, #4]
	str	d0, [sp, #32]
Lloh6:
	adrp	x8, _IB_QP_QKEY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_QP_QKEY@GOTPAGEOFF]
Lloh8:
	adrp	x24, _IB_QP_PORT@GOTPAGE
Lloh9:
	ldr	x24, [x24, _IB_QP_PORT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x24]
	orr	w8, w9, w8
Lloh11:
	adrp	x23, _IB_QP_PKEY_INDEX@GOTPAGE
Lloh12:
	ldr	x23, [x23, _IB_QP_PKEY_INDEX@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w8, w9
Lloh13:
	adrp	x22, _IB_QP_STATE@GOTPAGE
Lloh14:
	ldr	x22, [x22, _IB_QP_STATE@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w21, w8, w9
	ldr	w0, [x19]
	add	x1, sp, #16
	mov	x2, x21
	bl	_ib_modify_qp
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
	str	x20, [sp]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ipoib_warn
	b	LBB0_8
LBB0_3:
	mov	w20, #-1
	b	LBB0_10
LBB0_4:
Lloh17:
	adrp	x8, _IB_QPS_RTR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IB_QPS_RTR@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	ldr	w8, [x24]
	bic	w20, w21, w8
	ldr	w0, [x19]
	add	x1, sp, #16
	mov	x2, x20
	bl	_ib_modify_qp
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
	str	x21, [sp]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ipoib_warn
	mov	x20, x21
	b	LBB0_8
LBB0_6:
Lloh22:
	adrp	x8, _IB_QPS_RTS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IB_QPS_RTS@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [sp, #16]
Lloh25:
	adrp	x8, _IB_QP_SQ_PSN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IB_QP_SQ_PSN@GOTPAGEOFF]
	str	xzr, [sp, #24]
Lloh27:
	ldr	w8, [x8]
	orr	w8, w8, w20
	ldr	w9, [x23]
	bic	w2, w8, w9
	ldr	w0, [x19]
	add	x1, sp, #16
	bl	_ib_modify_qp
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.7:
	str	x20, [sp]
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ipoib_warn
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
LBB0_8:
Lloh30:
	adrp	x8, _IB_QPS_RESET@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IB_QPS_RESET@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	ldr	w0, [x19]
	ldr	w2, [x22]
	add	x1, sp, #16
	bl	_ib_modify_qp
	cbz	w0, LBB0_10
; %bb.9:
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_ipoib_warn
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_IPOIB_PKEY_ASSIGNED,4,2        ; @IPOIB_PKEY_ASSIGNED
	.comm	_IB_QPS_INIT,4,2                ; @IB_QPS_INIT
	.comm	_IB_QP_QKEY,4,2                 ; @IB_QP_QKEY
	.comm	_IB_QP_PORT,4,2                 ; @IB_QP_PORT
	.comm	_IB_QP_PKEY_INDEX,4,2           ; @IB_QP_PKEY_INDEX
	.comm	_IB_QP_STATE,4,2                ; @IB_QP_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to modify QP to init, ret = %d\n"

	.comm	_IB_QPS_RTR,4,2                 ; @IB_QPS_RTR
l_.str.1:                               ; @.str.1
	.asciz	"failed to modify QP to RTR, ret = %d\n"

	.comm	_IB_QPS_RTS,4,2                 ; @IB_QPS_RTS
	.comm	_IB_QP_SQ_PSN,4,2               ; @IB_QP_SQ_PSN
l_.str.2:                               ; @.str.2
	.asciz	"failed to modify QP to RTS, ret = %d\n"

	.comm	_IB_QPS_RESET,4,2               ; @IB_QPS_RESET
l_.str.3:                               ; @.str.3
	.asciz	"Failed to modify QP to RESET state\n"

.subsections_via_symbols
