	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5e_attach_encap
_mlx5e_attach_encap:                    ## @mlx5e_attach_encap
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -128(%rbp)                 ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movq	8(%rsi), %rbx
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movslq	%ecx, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rcx,8), %r13
	movq	%r13, %rdi
	callq	_ip_tunnel_info_af
	movw	%ax, -42(%rbp)                  ## 2-byte Spill
	movq	%r13, -112(%rbp)                ## 8-byte Spill
	leaq	52(%r13), %rax
	movq	%rax, -136(%rbp)
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	callq	_mlx5e_get_tc_tun
	movl	%eax, -144(%rbp)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	leaq	-144(%rbp), %r12
	movq	%r12, %rdi
	callq	_hash_encap_info
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_mlx5e_encap_get
	testq	%rax, %rax
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.3:
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r12, %rdi
	addq	$28, %rdi
	callq	_wait_for_completion
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpl	$0, (%r12)
	js	LBB0_22
## %bb.4:
	movq	-80(%rbp), %r13                 ## 8-byte Reload
LBB0_17:
	movq	16(%rbp), %r14
	movq	-120(%rbp), %r15                ## 8-byte Reload
	movq	(%r15), %rax
	movq	%r13, %rbx
	shlq	$4, %rbx
	movq	%r12, 8(%rax,%rbx)
	leaq	(%rax,%rbx), %rdi
	addq	$4, %rdi
	leaq	24(%r12), %rsi
	callq	_list_add
	movq	(%r15), %rax
	movl	%r13d, (%rax,%rbx)
	movq	16(%r12), %rax
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	_MLX5_ENCAP_ENTRY_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r15d, %r15d
	movl	$0, %eax
	testl	%ecx, 4(%r12)
	je	LBB0_19
## %bb.18:
	movl	8(%r12), %eax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%eax, 4(%rcx,%r13,8)
	movq	_MLX5_ESW_DEST_ENCAP_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rcx,%r13,8)
	movl	$1, %eax
LBB0_19:
	movl	%eax, (%r14)
	jmp	LBB0_20
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_NL_SET_ERR_MSG_MOD
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_24
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_21
## %bb.6:
	movq	%rax, %r12
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	leaq	48(%rax), %rdi
	movl	$1, %esi
	callq	_refcount_set
	leaq	28(%r12), %rbx
	movq	%rbx, %rdi
	callq	_init_completion
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_dup_tun_info
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	%r13, 40(%r12)
	movq	-104(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_mlx5e_tc_tun_init_encap_attr
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.10:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	24(%r12), %rdi
	callq	_INIT_LIST_HEAD
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx), %edi
	movq	%r12, %rsi
	addq	$32, %rsi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_hash_add_rcu
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movzwl	-42(%rbp), %ecx                 ## 2-byte Folded Reload
	cmpw	(%rax), %cx
	jne	LBB0_12
## %bb.11:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_mlx5e_tc_tun_create_header_ipv4
	movl	%eax, %r15d
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_22:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_23:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_mlx5e_encap_put
	jmp	LBB0_24
LBB0_21:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_20:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_24
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	%r13, %rdi
	callq	_kfree
	movq	%r12, %rdi
	callq	_kfree
LBB0_24:
	movl	%r15d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_AF_INET6@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	cmpw	(%rax), %cx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_mlx5e_tc_tun_create_header_ipv6
	movl	%eax, %r15d
LBB0_14:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_lock
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_complete_all
	testl	%r15d, %r15d
	je	LBB0_16
## %bb.15:
	movl	%r15d, (%r12)
	jmp	LBB0_23
LBB0_16:
	movl	$1, (%r12)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported tunnel"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AF_INET,2,1                    ## @AF_INET
	.comm	_AF_INET6,2,1                   ## @AF_INET6
	.comm	_MLX5_ENCAP_ENTRY_VALID,4,2     ## @MLX5_ENCAP_ENTRY_VALID
	.comm	_MLX5_ESW_DEST_ENCAP_VALID,4,2  ## @MLX5_ESW_DEST_ENCAP_VALID
	.no_dead_strip	_mlx5e_attach_encap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5e_attach_encap
_mlx5e_attach_encap:                    ; @mlx5e_attach_encap
	.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	x20, x6
	mov	x22, x5
	mov	x28, x4
	mov	x23, x3
	mov	x26, x2
	mov	x24, x1
	mov	x25, x0
	ldr	x8, [x0]
	ldr	x19, [x8]
	ldr	x27, [x1, #8]
	ldr	x8, [x27, #8]
	ldr	x8, [x8]
	ldr	x21, [x8, w3, sxtw #3]
	mov	x0, x21
	bl	_ip_tunnel_info_af
	str	w0, [sp, #28]                   ; 4-byte Folded Spill
	add	x8, x21, #52
	str	x8, [sp, #40]
	mov	x0, x26
	bl	_mlx5e_get_tc_tun
	str	w0, [sp, #32]
	cbz	w0, LBB0_5
; %bb.1:
	stp	x20, x22, [sp, #8]              ; 16-byte Folded Spill
	add	x0, sp, #32
	bl	_hash_encap_info
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_lock
	add	x1, sp, #32
	mov	x0, x25
	mov	x2, x20
	bl	_mlx5e_encap_get
	cbz	x0, LBB0_6
; %bb.2:
	mov	x22, x0
	mov	x0, x19
	bl	_mutex_unlock
	add	x0, x22, #28
	bl	_wait_for_completion
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x22]
	tbnz	w8, #31, LBB0_11
LBB0_3:
	sxtw	x20, w23
	ldr	x8, [x24]
	lsl	x21, x20, #4
	add	x8, x8, x21
	str	x22, [x8, #8]
	add	x0, x8, #4
	add	x1, x22, #24
	bl	_list_add
	ldr	x8, [x24]
	str	w23, [x8, x21]
	ldr	x8, [x22, #16]
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	str	x8, [x9]
	ldr	w8, [x22, #4]
Lloh0:
	adrp	x9, _MLX5_ENCAP_ENTRY_VALID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX5_ENCAP_ENTRY_VALID@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.4:
	ldr	w8, [x22, #8]
	ldr	x9, [x27]
	add	x9, x9, x20, lsl #3
Lloh3:
	adrp	x10, _MLX5_ESW_DEST_ENCAP_VALID@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MLX5_ESW_DEST_ENCAP_VALID@GOTPAGEOFF]
	str	w8, [x9, #4]
Lloh5:
	ldr	w8, [x10]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	mov	w8, #1
	b	LBB0_14
LBB0_5:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x28
	bl	_NL_SET_ERR_MSG_MOD
Lloh8:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w28, w8
	b	LBB0_18
LBB0_6:
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_15
; %bb.7:
	mov	x22, x0
	add	x0, x0, #48
	mov	w1, #1
	bl	_refcount_set
	add	x0, x22, #28
	str	x0, [sp]                        ; 8-byte Folded Spill
	bl	_init_completion
	mov	x0, x21
	bl	_dup_tun_info
	mov	x21, x0
	cbz	x0, LBB0_16
; %bb.8:
	str	x21, [x22, #40]
	mov	x0, x26
	mov	x1, x25
	mov	x2, x22
	mov	x3, x28
	bl	_mlx5e_tc_tun_init_encap_attr
	mov	x28, x0
	cbnz	w0, LBB0_17
; %bb.9:
	add	x0, x22, #24
	bl	_INIT_LIST_HEAD
	ldr	w0, [x19, #4]
	add	x1, x22, #32
	mov	x2, x20
	bl	_hash_add_rcu
	mov	x0, x19
	bl	_mutex_unlock
Lloh14:
	adrp	x8, _AF_INET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
	ldrh	w8, [x8]
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w9, w8
	b.ne	LBB0_19
; %bb.10:
	mov	x0, x25
	mov	x1, x26
	mov	x2, x22
	bl	_mlx5e_tc_tun_create_header_ipv4
	mov	x28, x0
	ldr	x20, [sp]                       ; 8-byte Folded Reload
	b	LBB0_22
LBB0_11:
Lloh16:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w28, w8
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x25
	mov	x1, x22
	bl	_mlx5e_encap_put
	b	LBB0_18
LBB0_13:
	mov	w8, #0
LBB0_14:
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
	mov	x0, x19
	bl	_mutex_unlock
	mov	w28, #0
	b	LBB0_18
LBB0_15:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w28, w8
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_18
LBB0_16:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w28, w8
LBB0_17:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	bl	_kfree
	mov	x0, x22
	bl	_kfree
LBB0_18:
	mov	x0, x28
	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
LBB0_19:
Lloh25:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
	ldrh	w8, [x8]
	cmp	w9, w8
	ldr	x20, [sp]                       ; 8-byte Folded Reload
	b.ne	LBB0_21
; %bb.20:
	mov	x0, x25
	mov	x1, x26
	mov	x2, x22
	bl	_mlx5e_tc_tun_create_header_ipv6
	mov	x28, x0
	b	LBB0_22
LBB0_21:
	mov	w28, #0
LBB0_22:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	bl	_complete_all
	cbz	w28, LBB0_24
; %bb.23:
	str	w28, [x22]
	b	LBB0_12
LBB0_24:
	mov	w8, #1
	str	w8, [x22]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported tunnel"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AF_INET,2,1                    ; @AF_INET
	.comm	_AF_INET6,2,1                   ; @AF_INET6
	.comm	_MLX5_ENCAP_ENTRY_VALID,4,2     ; @MLX5_ENCAP_ENTRY_VALID
	.comm	_MLX5_ESW_DEST_ENCAP_VALID,4,2  ; @MLX5_ESW_DEST_ENCAP_VALID
	.no_dead_strip	_mlx5e_attach_encap
.subsections_via_symbols
