	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_modify_qp                 ## -- Begin function mlx4_modify_qp
	.p2align	4, 0x90
_mlx4_modify_qp:                        ## @mlx4_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	$0, -64(%rbp)
	callq	_to_mqp
	movq	%rax, %r13
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_IBV_QP_PORT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.1:
	movl	48(%r12), %edi
	movl	8(%r14), %esi
	leaq	-56(%rbp), %rdx
	callq	_ibv_query_port
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_29
## %bb.2:
	movl	-56(%rbp), %eax
	movl	%eax, 24(%r13)
	movl	48(%r12), %edi
	leaq	-48(%rbp), %rsi
	callq	_ibv_query_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_29
## %bb.3:
	movl	(%r12), %eax
	cmpl	$129, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$128, %eax
	jne	LBB0_12
## %bb.5:
	movl	24(%r13), %eax
	movq	_IBV_LINK_LAYER_INFINIBAND@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.6:
	movq	_IBV_DEVICE_UD_IP_CSUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_12
## %bb.7:
	movq	_MLX4_CSUM_SUPPORT_UD_OVER_IB@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	movl	24(%r13), %eax
	movq	_IBV_LINK_LAYER_ETHERNET@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.9:
	movq	_IBV_DEVICE_RAW_IP_CSUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_12
## %bb.10:
	movq	_MLX4_CSUM_SUPPORT_RAW_OVER_ETH@GOTPCREL(%rip), %rax
LBB0_11:
	movq	_MLX4_RX_CSUM_VALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, (%r13)
LBB0_12:
	movq	8(%r12), %rax
	movq	_IBV_QPS_RESET@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_16
## %bb.13:
	movq	_IBV_QP_STATE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_16
## %bb.14:
	movq	(%r14), %rax
	movq	_IBV_QPS_INIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:
	movq	%r12, %rdi
	callq	_to_mqp
	movq	%rax, %rdi
	callq	_mlx4_qp_init_sq_ownership
LBB0_16:
	leaq	-64(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	movl	$4, %r8d
	callq	_ibv_cmd_modify_qp
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_17
LBB0_29:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_IBV_QP_STATE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	testl	%r15d, (%rax)
	je	LBB0_29
## %bb.18:
	movq	(%r14), %rax
	cmpq	(%r13), %rax
	jne	LBB0_29
## %bb.19:
	movq	16(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.20:
	callq	_to_mcq
	movl	%eax, %r14d
	movl	32(%r12), %r15d
	movq	40(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.22:
	callq	_to_msrq
	movq	%rax, %rdx
	jmp	LBB0_23
LBB0_21:
	xorl	%edx, %edx
LBB0_23:
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_mlx4_cq_clean
LBB0_24:
	movq	24(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_27
## %bb.25:
	cmpq	16(%r12), %rdi
	je	LBB0_27
## %bb.26:
	callq	_to_mcq
	movl	32(%r12), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_mlx4_cq_clean
LBB0_27:
	movq	%r12, %rdi
	callq	_to_mqp
	movq	%rax, %rdi
	callq	_mlx4_init_qp_indices
	movq	%r12, %rdi
	callq	_to_mqp
	cmpq	$0, 16(%rax)
	je	LBB0_29
## %bb.28:
	movq	%r12, %rdi
	callq	_to_mqp
	movq	8(%rax), %rax
	movq	$0, (%rax)
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_IBV_QP_PORT,4,2                ## @IBV_QP_PORT
	.comm	_IBV_LINK_LAYER_INFINIBAND,4,2  ## @IBV_LINK_LAYER_INFINIBAND
	.comm	_IBV_DEVICE_UD_IP_CSUM,4,2      ## @IBV_DEVICE_UD_IP_CSUM
	.comm	_MLX4_CSUM_SUPPORT_UD_OVER_IB,4,2 ## @MLX4_CSUM_SUPPORT_UD_OVER_IB
	.comm	_MLX4_RX_CSUM_VALID,4,2         ## @MLX4_RX_CSUM_VALID
	.comm	_IBV_LINK_LAYER_ETHERNET,4,2    ## @IBV_LINK_LAYER_ETHERNET
	.comm	_IBV_DEVICE_RAW_IP_CSUM,4,2     ## @IBV_DEVICE_RAW_IP_CSUM
	.comm	_MLX4_CSUM_SUPPORT_RAW_OVER_ETH,4,2 ## @MLX4_CSUM_SUPPORT_RAW_OVER_ETH
	.comm	_IBV_QPS_RESET,8,3              ## @IBV_QPS_RESET
	.comm	_IBV_QP_STATE,4,2               ## @IBV_QP_STATE
	.comm	_IBV_QPS_INIT,8,3               ## @IBV_QPS_INIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_modify_qp                 ; -- Begin function mlx4_modify_qp
	.p2align	2
_mlx4_modify_qp:                        ; @mlx4_modify_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	str	wzr, [sp, #24]
	bl	_to_mqp
	mov	x22, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh0:
	adrp	x8, _IBV_QP_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IBV_QP_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_12
; %bb.1:
	ldr	w0, [x19, #48]
	ldr	w1, [x20, #8]
	add	x2, sp, #16
	bl	_ibv_query_port
	cbnz	w0, LBB0_30
; %bb.2:
	ldr	w8, [sp, #16]
	str	w8, [x22, #24]
	ldr	w0, [x19, #48]
	add	x1, sp, #8
	bl	_ibv_query_device
	cbnz	w0, LBB0_30
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_8
; %bb.4:
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.5:
	ldr	w8, [x22, #24]
Lloh3:
	adrp	x9, _IBV_LINK_LAYER_INFINIBAND@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IBV_LINK_LAYER_INFINIBAND@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.6:
	ldr	w8, [sp, #8]
Lloh6:
	adrp	x9, _IBV_DEVICE_UD_IP_CSUM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IBV_DEVICE_UD_IP_CSUM@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.7:
Lloh9:
	adrp	x8, _MLX4_CSUM_SUPPORT_UD_OVER_IB@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLX4_CSUM_SUPPORT_UD_OVER_IB@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	ldr	w8, [x22, #24]
Lloh11:
	adrp	x9, _IBV_LINK_LAYER_ETHERNET@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IBV_LINK_LAYER_ETHERNET@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.9:
	ldr	w8, [sp, #8]
Lloh14:
	adrp	x9, _IBV_DEVICE_RAW_IP_CSUM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IBV_DEVICE_RAW_IP_CSUM@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.10:
Lloh17:
	adrp	x8, _MLX4_CSUM_SUPPORT_RAW_OVER_ETH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MLX4_CSUM_SUPPORT_RAW_OVER_ETH@GOTPAGEOFF]
LBB0_11:
Lloh19:
	adrp	x9, _MLX4_RX_CSUM_VALID@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MLX4_RX_CSUM_VALID@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x22]
	orr	w8, w8, w9
	str	w8, [x22]
LBB0_12:
	ldr	x8, [x19, #8]
Lloh22:
	adrp	x22, _IBV_QPS_RESET@GOTPAGE
Lloh23:
	ldr	x22, [x22, _IBV_QPS_RESET@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.13:
Lloh24:
	adrp	x8, _IBV_QP_STATE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IBV_QP_STATE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_16
; %bb.14:
	ldr	x8, [x20]
Lloh27:
	adrp	x9, _IBV_QPS_INIT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _IBV_QPS_INIT@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x19
	bl	_to_mqp
	bl	_mlx4_qp_init_sq_ownership
LBB0_16:
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	w4, #4
	bl	_ibv_cmd_modify_qp
	cbnz	w0, LBB0_30
; %bb.17:
Lloh30:
	adrp	x8, _IBV_QP_STATE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IBV_QP_STATE@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_29
; %bb.18:
	ldr	x8, [x20]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_29
; %bb.19:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_24
; %bb.20:
	bl	_to_mcq
	mov	x20, x0
	ldr	w21, [x19, #32]
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_22
; %bb.21:
	bl	_to_msrq
	mov	x2, x0
	b	LBB0_23
LBB0_22:
	mov	x2, #0
LBB0_23:
	mov	x0, x20
	mov	x1, x21
	bl	_mlx4_cq_clean
LBB0_24:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_27
; %bb.25:
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.eq	LBB0_27
; %bb.26:
	bl	_to_mcq
	ldr	w1, [x19, #32]
	mov	x2, #0
	bl	_mlx4_cq_clean
LBB0_27:
	mov	x0, x19
	bl	_to_mqp
	bl	_mlx4_init_qp_indices
	mov	x0, x19
	bl	_to_mqp
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_29
; %bb.28:
	mov	x0, x19
	bl	_to_mqp
	mov	x8, x0
	mov	w0, #0
	ldr	x8, [x8, #8]
	str	xzr, [x8]
	b	LBB0_30
LBB0_29:
	mov	w0, #0
LBB0_30:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_IBV_QP_PORT,4,2                ; @IBV_QP_PORT
	.comm	_IBV_LINK_LAYER_INFINIBAND,4,2  ; @IBV_LINK_LAYER_INFINIBAND
	.comm	_IBV_DEVICE_UD_IP_CSUM,4,2      ; @IBV_DEVICE_UD_IP_CSUM
	.comm	_MLX4_CSUM_SUPPORT_UD_OVER_IB,4,2 ; @MLX4_CSUM_SUPPORT_UD_OVER_IB
	.comm	_MLX4_RX_CSUM_VALID,4,2         ; @MLX4_RX_CSUM_VALID
	.comm	_IBV_LINK_LAYER_ETHERNET,4,2    ; @IBV_LINK_LAYER_ETHERNET
	.comm	_IBV_DEVICE_RAW_IP_CSUM,4,2     ; @IBV_DEVICE_RAW_IP_CSUM
	.comm	_MLX4_CSUM_SUPPORT_RAW_OVER_ETH,4,2 ; @MLX4_CSUM_SUPPORT_RAW_OVER_ETH
	.comm	_IBV_QPS_RESET,8,3              ; @IBV_QPS_RESET
	.comm	_IBV_QP_STATE,4,2               ; @IBV_QP_STATE
	.comm	_IBV_QPS_INIT,8,3               ; @IBV_QPS_INIT
.subsections_via_symbols
