	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_fpga_ipsec_init           ## -- Begin function mlx5_fpga_ipsec_init
	.p2align	4, 0x90
_mlx5_fpga_ipsec_init:                  ## @mlx5_fpga_ipsec_init
	.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, %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movq	$0, -48(%rbp)
	movq	(%rdi), %r15
	callq	_mlx5_fpga_is_ipsec_device
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_13
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%r15, 40(%rax)
	movl	32(%rax), %edx
	movq	%r15, %rdi
	movl	$4, %esi
	callq	_mlx5_fpga_get_sbu_caps
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_mlx5_fpga_err
LBB0_11:
	movl	%ebx, %r14d
	jmp	LBB0_12
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_5:
	movq	(%r15), %rdi
	addq	$28, %rdi
	callq	_INIT_LIST_HEAD
	movq	(%r15), %rdi
	addq	$24, %rdi
	callq	_spin_lock_init
	movq	_SBU_QP_QUEUE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	%rax, -64(%rbp)
	movq	_mlx5_fpga_ipsec_recv@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	%r15, -80(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mlx5_fpga_sbu_conn_create
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_mlx5_fpga_err
LBB0_12:
	movq	(%r15), %rdi
	callq	_kfree
	movq	$0, (%r15)
LBB0_13:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r15), %rdi
	movq	%r12, 16(%rdi)
	movq	_rhash_sa@GOTPCREL(%rip), %rsi
	callq	_rhashtable_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	(%r15), %rdi
	addq	$12, %rdi
	callq	_mutex_init
	movq	_RB_ROOT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rdi
	movl	%eax, 8(%rdi)
	addq	$4, %rdi
	callq	_mutex_init
	movq	%r13, %rdi
	callq	_mlx5_fpga_ipsec_enable_supported_caps
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_mlx5_fpga_err
	movq	(%r15), %rdi
	callq	_rhashtable_destroy
LBB0_10:
	movq	%r12, %rdi
	callq	_mlx5_fpga_sbu_conn_destroy
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to retrieve IPSec extended capabilities: %d\n"

	.comm	_SBU_QP_QUEUE_SIZE,8,3          ## @SBU_QP_QUEUE_SIZE
	.comm	_mlx5_fpga_ipsec_recv,4,2       ## @mlx5_fpga_ipsec_recv
L_.str.1:                               ## @.str.1
	.asciz	"Error creating IPSec command connection %d\n"

	.comm	_rhash_sa,4,2                   ## @rhash_sa
	.comm	_RB_ROOT,4,2                    ## @RB_ROOT
L_.str.2:                               ## @.str.2
	.asciz	"Failed to enable IPSec extended capabilities: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_fpga_ipsec_init           ; -- Begin function mlx5_fpga_ipsec_init
	.p2align	2
_mlx5_fpga_ipsec_init:                  ; @mlx5_fpga_ipsec_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
	str	xzr, [sp, #32]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	ldr	x19, [x0]
	bl	_mlx5_fpga_is_ipsec_device
	cbz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.2:
	str	x19, [x0, #40]
	ldr	w2, [x0, #32]
	mov	x0, x19
	mov	w1, #4
	bl	_mlx5_fpga_get_sbu_caps
	cbz	w0, LBB0_6
; %bb.3:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
	mov	w21, #0
	b	LBB0_10
LBB0_5:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_6:
	ldr	x8, [x19]
	add	x0, x8, #28
	bl	_INIT_LIST_HEAD
	ldr	x8, [x19]
	add	x0, x8, #24
	bl	_spin_lock_init
Lloh8:
	adrp	x8, _SBU_QP_QUEUE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SBU_QP_QUEUE_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	stp	x8, x8, [sp, #16]
Lloh11:
	adrp	x8, _mlx5_fpga_ipsec_recv@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mlx5_fpga_ipsec_recv@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	str	x19, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_mlx5_fpga_sbu_conn_create
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.7:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x21, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x19
	mov	x2, x21
	bl	_mlx5_fpga_err
LBB0_9:
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_11:
	ldr	x0, [x19]
	str	x22, [x0, #16]
Lloh16:
	adrp	x1, _rhash_sa@GOTPAGE
Lloh17:
	ldr	x1, [x1, _rhash_sa@GOTPAGEOFF]
	bl	_rhashtable_init
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.12:
	ldr	x8, [x19]
	add	x0, x8, #12
	bl	_mutex_init
Lloh18:
	adrp	x8, _RB_ROOT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RB_ROOT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	x9, [x19]
	str	w8, [x9, #8]
	add	x0, x9, #4
	bl	_mutex_init
	mov	x0, x20
	bl	_mlx5_fpga_ipsec_enable_supported_caps
	mov	x21, x0
	cbz	w0, LBB0_10
; %bb.13:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_mlx5_fpga_err
	ldr	x0, [x19]
	bl	_rhashtable_destroy
LBB0_14:
	mov	x0, x22
	bl	_mlx5_fpga_sbu_conn_destroy
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to retrieve IPSec extended capabilities: %d\n"

	.comm	_SBU_QP_QUEUE_SIZE,8,3          ; @SBU_QP_QUEUE_SIZE
	.comm	_mlx5_fpga_ipsec_recv,4,2       ; @mlx5_fpga_ipsec_recv
l_.str.1:                               ; @.str.1
	.asciz	"Error creating IPSec command connection %d\n"

	.comm	_rhash_sa,4,2                   ; @rhash_sa
	.comm	_RB_ROOT,4,2                    ; @RB_ROOT
l_.str.2:                               ; @.str.2
	.asciz	"Failed to enable IPSec extended capabilities: %d\n"

.subsections_via_symbols
