	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_fpga_conn_init_qp
_mlx5_fpga_conn_init_qp:                ## @mlx5_fpga_conn_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	16(%rdi), %r14
	movq	8(%r14), %r13
	movl	(%rdi), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_mlx5_fpga_dbg
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_MLX5_ST_SZ_BYTES
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_st@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MLX5_QP_ST_RC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_MLX5_SET
	movq	_pm_state@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MLX5_QP_PM_MIGRATED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_MLX5_SET
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_primary_address_path@GOTPCREL(%rip), %r13
	movl	4(%r13), %edx
	movq	_MLX5_FPGA_PKEY_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_MLX5_SET
	movl	(%r13), %edx
	movq	_MLX5_FPGA_PORT_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_MLX5_SET
	movq	_pd@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	16(%r12), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_MLX5_SET
	movq	_cqn_snd@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%r12), %ecx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_MLX5_SET
	movq	_cqn_rcv@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%r12), %ecx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_MLX5_SET
	movq	_dbr_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%r12), %ecx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_MLX5_SET64
	movq	_MLX5_CMD_OP_RST2INIT_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%edx, %edx
	movq	%rbx, %rcx
	movq	%r12, %r8
	callq	_mlx5_core_qp_modify
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_mlx5_fpga_warn
	movl	%r12d, %r15d
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_4:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Modifying QP %u to INIT\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_st,4,2                         ## @st
	.comm	_MLX5_QP_ST_RC,4,2              ## @MLX5_QP_ST_RC
	.comm	_pm_state,4,2                   ## @pm_state
	.comm	_MLX5_QP_PM_MIGRATED,4,2        ## @MLX5_QP_PM_MIGRATED
	.comm	_primary_address_path,8,2       ## @primary_address_path
	.comm	_MLX5_FPGA_PKEY_INDEX,4,2       ## @MLX5_FPGA_PKEY_INDEX
	.comm	_MLX5_FPGA_PORT_NUM,4,2         ## @MLX5_FPGA_PORT_NUM
	.comm	_pd,4,2                         ## @pd
	.comm	_cqn_snd,4,2                    ## @cqn_snd
	.comm	_cqn_rcv,4,2                    ## @cqn_rcv
	.comm	_dbr_addr,4,2                   ## @dbr_addr
	.comm	_MLX5_CMD_OP_RST2INIT_QP,4,2    ## @MLX5_CMD_OP_RST2INIT_QP
L_.str.1:                               ## @.str.1
	.asciz	"qp_modify RST2INIT failed: %d\n"

	.no_dead_strip	_mlx5_fpga_conn_init_qp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_fpga_conn_init_qp
_mlx5_fpga_conn_init_qp:                ; @mlx5_fpga_conn_init_qp
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	ldr	x19, [x0, #16]
	ldr	x22, [x19, #8]
	ldr	w2, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx5_fpga_dbg
	mov	x0, #0
	bl	_MLX5_ST_SZ_BYTES
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _st@GOTPAGE
Lloh6:
	ldr	x8, [x8, _st@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _MLX5_QP_ST_RC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLX5_QP_ST_RC@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x20
	bl	_MLX5_SET
Lloh11:
	adrp	x8, _pm_state@GOTPAGE
Lloh12:
	ldr	x8, [x8, _pm_state@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x8, _MLX5_QP_PM_MIGRATED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MLX5_QP_PM_MIGRATED@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x20
	bl	_MLX5_SET
Lloh17:
	adrp	x23, _primary_address_path@GOTPAGE
Lloh18:
	ldr	x23, [x23, _primary_address_path@GOTPAGEOFF]
	ldr	w2, [x23, #4]
Lloh19:
	adrp	x8, _MLX5_FPGA_PKEY_INDEX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MLX5_FPGA_PKEY_INDEX@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x20
	bl	_MLX5_SET
	ldr	w2, [x23]
Lloh22:
	adrp	x8, _MLX5_FPGA_PORT_NUM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MLX5_FPGA_PORT_NUM@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x20
	bl	_MLX5_SET
Lloh25:
	adrp	x8, _pd@GOTPAGE
Lloh26:
	ldr	x8, [x8, _pd@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	ldr	x8, [x21, #16]
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x20
	bl	_MLX5_SET
Lloh28:
	adrp	x8, _cqn_snd@GOTPAGE
Lloh29:
	ldr	x8, [x8, _cqn_snd@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	ldr	w3, [x21, #8]
	mov	x0, x20
	mov	x1, x20
	bl	_MLX5_SET
Lloh31:
	adrp	x8, _cqn_rcv@GOTPAGE
Lloh32:
	ldr	x8, [x8, _cqn_rcv@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	ldr	w3, [x21, #8]
	mov	x0, x20
	mov	x1, x20
	bl	_MLX5_SET
Lloh34:
	adrp	x8, _dbr_addr@GOTPAGE
Lloh35:
	ldr	x8, [x8, _dbr_addr@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
	ldr	w3, [x21, #4]
	mov	x0, x20
	mov	x1, x20
	bl	_MLX5_SET64
Lloh37:
	adrp	x8, _MLX5_CMD_OP_RST2INIT_QP@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MLX5_CMD_OP_RST2INIT_QP@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #0
	mov	x3, x20
	mov	x4, x21
	bl	_mlx5_core_qp_modify
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.2:
Lloh40:
	adrp	x1, l_.str.1@PAGE
Lloh41:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_mlx5_fpga_warn
	b	LBB0_4
LBB0_3:
Lloh42:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	mov	x0, x20
	bl	_kfree
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Modifying QP %u to INIT\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_st,4,2                         ; @st
	.comm	_MLX5_QP_ST_RC,4,2              ; @MLX5_QP_ST_RC
	.comm	_pm_state,4,2                   ; @pm_state
	.comm	_MLX5_QP_PM_MIGRATED,4,2        ; @MLX5_QP_PM_MIGRATED
	.comm	_primary_address_path,8,2       ; @primary_address_path
	.comm	_MLX5_FPGA_PKEY_INDEX,4,2       ; @MLX5_FPGA_PKEY_INDEX
	.comm	_MLX5_FPGA_PORT_NUM,4,2         ; @MLX5_FPGA_PORT_NUM
	.comm	_pd,4,2                         ; @pd
	.comm	_cqn_snd,4,2                    ; @cqn_snd
	.comm	_cqn_rcv,4,2                    ; @cqn_rcv
	.comm	_dbr_addr,4,2                   ; @dbr_addr
	.comm	_MLX5_CMD_OP_RST2INIT_QP,4,2    ; @MLX5_CMD_OP_RST2INIT_QP
l_.str.1:                               ; @.str.1
	.asciz	"qp_modify RST2INIT failed: %d\n"

	.no_dead_strip	_mlx5_fpga_conn_init_qp
.subsections_via_symbols
