	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_eswitch_add_termtbl_rule  ## -- Begin function mlx5_eswitch_add_termtbl_rule
	.p2align	4, 0x90
_mlx5_eswitch_add_termtbl_rule:         ## @mlx5_eswitch_add_termtbl_rule
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, %rbx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %r15d
	movl	$0, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%r8, %rdi
	callq	_mlx5_eswitch_termtbl_actions_move
	movq	_MLX5_FLOW_CONTEXT_ACTION_FWD_DEST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -48(%rbp)
	testl	%r15d, %r15d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	movl	%r15d, %r13d
	leaq	(,%r13,8), %rax
	leaq	(%rax,%rax,2), %r14
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	xorl	%eax, %eax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	$24, %r12
	cmpq	%r12, %r14
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%r12), %rdi
	movq	_MLX5_FLOW_DESTINATION_TYPE_VPORT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rdi
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r12), %rdx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	leaq	-48(%rbp), %rsi
	callq	_mlx5_eswitch_termtbl_get_create
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movslq	%esi, %rsi
	movq	%rbx, (%rax,%rsi,8)
	incl	%esi
	movq	_MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15,%r12)
	movq	(%rbx), %rax
	movq	%rax, 8(%r15,%r12)
	movl	$1, %eax
	jmp	LBB0_6
LBB0_7:
	testl	%eax, %eax
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.8:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdx
	movq	%r15, %rcx
	movl	16(%rbp), %r8d
	callq	_mlx5_add_flow_rules
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_11
	jmp	LBB0_19
LBB0_1:
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_mlx5_eswitch_termtbl_actions_move
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_9:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_esw_warn
LBB0_10:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
LBB0_11:
	leaq	-48(%rbp), %rdi
	movq	%r12, %rsi
	callq	_mlx5_eswitch_termtbl_actions_move
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jle	LBB0_18
## %bb.12:
	movl	%eax, %r14d
	leaq	8(%rcx), %rdi
	xorl	%r15d, %r15d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%esi, %eax
	leaq	(%rax,%rax,2), %r12
	leaq	(%rcx,%r12,8), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_MLX5_FLOW_DESTINATION_TYPE_VPORT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx,%r12,8)
	movl	12(%rbx), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 20(%rcx,%r12,8)
	movl	8(%rbx), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 16(%rcx,%r12,8)
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_mlx5_eswitch_termtbl_put
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r15
	cmpq	%r14, %r15
	je	LBB0_18
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax,%r15,8), %rbx
	movq	(%rbx), %rax
	movq	%rdi, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rax, (%rdx)
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	incq	%rsi
	addq	$24, %rdx
	cmpq	%rsi, %r13
	jne	LBB0_14
	jmp	LBB0_17
LBB0_18:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	16(%rbp), %r8d
	callq	_mlx5_add_flow_rules
	movq	%rax, %rbx
LBB0_19:
	movq	%rbx, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,4,2 ## @MLX5_FLOW_CONTEXT_ACTION_FWD_DEST
	.comm	_MLX5_FLOW_DESTINATION_TYPE_VPORT,8,3 ## @MLX5_FLOW_DESTINATION_TYPE_VPORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create termination table\n"

	.comm	_MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE,8,3 ## @MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_eswitch_add_termtbl_rule  ; -- Begin function mlx5_eswitch_add_termtbl_rule
	.p2align	2
_mlx5_eswitch_add_termtbl_rule:         ; @mlx5_eswitch_add_termtbl_rule
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x6
	mov	x20, x5
	mov	x21, x4
	mov	x24, x3
	stp	x1, x2, [sp, #8]                ; 16-byte Folded Spill
	mov	x25, x0
	str	wzr, [sp, #40]
	add	x1, sp, #40
	mov	x0, x4
	bl	_mlx5_eswitch_termtbl_actions_move
Lloh0:
	adrp	x8, _MLX5_FLOW_CONTEXT_ACTION_FWD_DEST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_FLOW_CONTEXT_ACTION_FWD_DEST@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [sp, #40]
	orr	w8, w9, w8
	str	w8, [sp, #40]
	cmp	w19, #0
	str	x21, [sp, #32]                  ; 8-byte Folded Spill
	str	w19, [sp, #28]                  ; 4-byte Folded Spill
	b.le	LBB0_8
; %bb.1:
	mov	x23, #0
	mov	w27, #0
	mov	w8, #0
	mov	w28, w19
	add	x9, x28, w19, uxtw #1
	lsl	x21, x9, #3
Lloh3:
	adrp	x22, _MLX5_FLOW_DESTINATION_TYPE_VPORT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MLX5_FLOW_DESTINATION_TYPE_VPORT@GOTPAGEOFF]
Lloh5:
	adrp	x19, _MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE@GOTPAGE
Lloh6:
	ldr	x19, [x19, _MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #24
	cmp	x21, x23
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, x20, x23
	ldr	x9, [x2]
	ldr	x10, [x22]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #40
	mov	x0, x25
	bl	_mlx5_eswitch_termtbl_get_create
	mov	x26, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24]
	str	x26, [x8, w27, sxtw #3]
	add	w27, w27, #1
	ldr	x8, [x19]
	add	x9, x20, x23
	ldr	x10, [x26]
	stp	x8, x10, [x9]
	mov	w8, #1
	b	LBB0_2
LBB0_6:
	cbz	w8, LBB0_10
; %bb.7:
	ldp	x0, x1, [sp, #8]                ; 16-byte Folded Reload
	ldr	x19, [sp, #32]                  ; 8-byte Folded Reload
	mov	x2, x19
	mov	x3, x20
	ldr	w4, [sp, #28]                   ; 4-byte Folded Reload
	bl	_mlx5_add_flow_rules
	mov	x26, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_11
	b	LBB0_19
LBB0_8:
	add	x0, sp, #40
	mov	x1, x21
	bl	_mlx5_eswitch_termtbl_actions_move
	b	LBB0_18
LBB0_9:
	ldr	w0, [x25]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_esw_warn
LBB0_10:
	ldr	x19, [sp, #32]                  ; 8-byte Folded Reload
LBB0_11:
	add	x0, sp, #40
	mov	x1, x19
	bl	_mlx5_eswitch_termtbl_actions_move
	cmp	w27, #1
	b.lt	LBB0_18
; %bb.12:
	mov	x21, #0
	add	x23, x20, #8
	mov	w19, w27
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	and	x8, x8, #0xffffffff
	mov	w9, #24
	madd	x27, x8, x9, x20
	mov	x0, x27
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	x8, [x22]
	str	x8, [x27]
	ldr	d0, [x26, #8]
	str	d0, [x27, #16]
	mov	x0, x25
	mov	x1, x26
	bl	_mlx5_eswitch_termtbl_put
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x21, x21, #1
	cmp	x21, x19
	b.eq	LBB0_18
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	mov	x8, #0
	ldr	x9, [x24]
	ldr	x26, [x9, x21, lsl #3]
	ldr	x9, [x26]
	mov	x10, x23
LBB0_16:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x11, [x10]
	cmp	x11, x9
	b.eq	LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	add	x8, x8, #1
	add	x10, x10, #24
	cmp	x28, x8
	b.ne	LBB0_16
	b	LBB0_14
LBB0_18:
	ldp	x0, x1, [sp, #8]                ; 16-byte Folded Reload
	ldr	x2, [sp, #32]                   ; 8-byte Folded Reload
	mov	x3, x20
	ldr	w4, [sp, #28]                   ; 4-byte Folded Reload
	bl	_mlx5_add_flow_rules
	mov	x26, x0
LBB0_19:
	mov	x0, x26
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,4,2 ; @MLX5_FLOW_CONTEXT_ACTION_FWD_DEST
	.comm	_MLX5_FLOW_DESTINATION_TYPE_VPORT,8,3 ; @MLX5_FLOW_DESTINATION_TYPE_VPORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create termination table\n"

	.comm	_MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE,8,3 ; @MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE
.subsections_via_symbols
