	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dr_action_create_reformat_action
_dr_action_create_reformat_action:      ## @dr_action_create_reformat_action
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	(%rcx), %edx
	leal	-130(%rdx), %eax
	cmpl	$2, %eax
	jb	LBB0_6
## %bb.1:
	cmpl	$128, %edx
	je	LBB0_11
## %bb.2:
	movl	$0, %eax
	cmpl	$129, %edx
	je	LBB0_17
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_mlx5dr_info
	jmp	LBB0_4
LBB0_6:
	cmpl	$131, %edx
	jne	LBB0_7
## %bb.8:
	movq	_MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_11:
	movq	_HDR_LEN_L2_ONLY@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	je	LBB0_13
## %bb.12:
	movq	_HDR_LEN_L2_VLAN@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	je	LBB0_13
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_7:
	movq	_MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	movl	8(%r12), %edi
	leaq	-36(%rbp), %r8
	movq	%r14, %rdx
	movq	%r15, %rcx
	callq	_mlx5dr_cmd_create_reformat_ctx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.10:
	movl	-36(%rbp), %eax
	movl	%eax, 32(%rbx)
	movq	%r14, 24(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_13:
	movl	4(%r12), %edi
	movq	_DR_CHUNK_SIZE_8@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mlx5dr_icm_alloc_chunk
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movl	(%rax), %eax
	subl	(%r12), %eax
	movq	_ACTION_CACHE_LINE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, 8(%rbx)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_dr_actions_l2_rewrite
	movl	%eax, %r14d
	movl	$0, %eax
	testl	%r14d, %r14d
	je	LBB0_17
## %bb.16:
	movq	16(%rbx), %rdi
	callq	_mlx5dr_icm_free_chunk
	movl	%r14d, %eax
LBB0_17:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL,4,2 ## @MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL
	.comm	_MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL,4,2 ## @MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL
	.comm	_HDR_LEN_L2_ONLY,8,3            ## @HDR_LEN_L2_ONLY
	.comm	_HDR_LEN_L2_VLAN,8,3            ## @HDR_LEN_L2_VLAN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DR_CHUNK_SIZE_8,4,2            ## @DR_CHUNK_SIZE_8
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ACTION_CACHE_LINE_SIZE,4,2     ## @ACTION_CACHE_LINE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reformat type is not supported %d\n"

	.no_dead_strip	_dr_action_create_reformat_action
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dr_action_create_reformat_action
_dr_action_create_reformat_action:      ; @dr_action_create_reformat_action
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w2, [x3]
	sub	w8, w2, #130
	cmp	w8, #2
	b.lo	LBB0_4
; %bb.1:
	cmp	w2, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w2, #129
	b.ne	LBB0_10
; %bb.3:
	mov	w21, #0
	b	LBB0_13
LBB0_4:
Lloh0:
	adrp	x8, _MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL@GOTPAGEOFF]
	cmp	w2, #131
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
	ldr	w0, [x22, #8]
	add	x4, sp, #12
	mov	x2, x20
	mov	x3, x21
	bl	_mlx5dr_cmd_create_reformat_ctx
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.5:
	ldr	w8, [sp, #12]
	str	w8, [x19, #32]
	str	x20, [x19, #24]
	b	LBB0_13
LBB0_6:
Lloh4:
	adrp	x8, _HDR_LEN_L2_ONLY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HDR_LEN_L2_ONLY@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _HDR_LEN_L2_VLAN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _HDR_LEN_L2_VLAN@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x20
	ccmp	x9, x20, #4, ne
	b.ne	LBB0_11
; %bb.7:
	ldr	w0, [x22, #4]
Lloh10:
	adrp	x8, _DR_CHUNK_SIZE_8@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DR_CHUNK_SIZE_8@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_mlx5dr_icm_alloc_chunk
	str	x0, [x19, #16]
	cbz	x0, LBB0_14
; %bb.8:
	ldr	w8, [x0]
	ldr	w9, [x22]
	sub	w8, w8, w9
Lloh13:
	adrp	x9, _ACTION_CACHE_LINE_SIZE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ACTION_CACHE_LINE_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	str	w8, [x19, #8]
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_dr_actions_l2_rewrite
	mov	x21, x0
	cbz	w0, LBB0_13
; %bb.9:
	ldr	x0, [x19, #16]
	bl	_mlx5dr_icm_free_chunk
	b	LBB0_13
LBB0_10:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_mlx5dr_info
LBB0_11:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	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
	add	sp, sp, #64
	ret
LBB0_14:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL,4,2 ; @MLX5_REFORMAT_TYPE_L2_TO_L2_TUNNEL
	.comm	_MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL,4,2 ; @MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL
	.comm	_HDR_LEN_L2_ONLY,8,3            ; @HDR_LEN_L2_ONLY
	.comm	_HDR_LEN_L2_VLAN,8,3            ; @HDR_LEN_L2_VLAN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DR_CHUNK_SIZE_8,4,2            ; @DR_CHUNK_SIZE_8
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ACTION_CACHE_LINE_SIZE,4,2     ; @ACTION_CACHE_LINE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reformat type is not supported %d\n"

	.no_dead_strip	_dr_action_create_reformat_action
.subsections_via_symbols
