	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipcomp6_tunnel_attach
_ipcomp6_tunnel_attach:                 ## @ipcomp6_tunnel_attach
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	24(%rdi), %r15d
	movl	28(%rdi), %ebx
	addq	$20, %rdi
	callq	_xfrm6_tunnel_spi_lookup
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	andl	%r15d, %ebx
	leaq	16(%r14), %rdx
	movq	_IPPROTO_IPV6@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_AF_INET6@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_init_net@GOTPCREL(%rip), %rdi
	movl	%ebx, %esi
	movq	%rax, %rcx
	callq	_xfrm_state_lookup_with_mark
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_5
LBB0_2:
	movq	%r14, %rdi
	callq	_ipcomp6_tunnel_create
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_xfrm_state_insert
	movq	%rbx, %rdi
	callq	_xfrm_state_hold
LBB0_5:
	movq	%rbx, 8(%r14)
	movq	%rbx, %rdi
	callq	_atomic_inc
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_init_net,4,2                   ## @init_net
	.comm	_IPPROTO_IPV6,4,2               ## @IPPROTO_IPV6
	.comm	_AF_INET6,4,2                   ## @AF_INET6
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ipcomp6_tunnel_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipcomp6_tunnel_attach
_ipcomp6_tunnel_attach:                 ; @ipcomp6_tunnel_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	ldp	w20, w21, [x0, #24]
	add	x0, x0, #20
	bl	_xfrm6_tunnel_spi_lookup
	cbz	x0, LBB0_2
; %bb.1:
	mov	x3, x0
	and	w1, w21, w20
	add	x2, x19, #16
Lloh0:
	adrp	x8, _IPPROTO_IPV6@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPPROTO_IPV6@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
Lloh3:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
Lloh6:
	adrp	x0, _init_net@GOTPAGE
Lloh7:
	ldr	x0, [x0, _init_net@GOTPAGEOFF]
	bl	_xfrm_state_lookup_with_mark
	mov	x20, x0
	cbnz	x0, LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_ipcomp6_tunnel_create
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	bl	_xfrm_state_insert
	mov	x0, x20
	bl	_xfrm_state_hold
LBB0_4:
	str	x20, [x19, #8]
	mov	x0, x20
	bl	_atomic_inc
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_init_net,4,2                   ; @init_net
	.comm	_IPPROTO_IPV6,4,2               ; @IPPROTO_IPV6
	.comm	_AF_INET6,4,2                   ; @AF_INET6
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ipcomp6_tunnel_attach
.subsections_via_symbols
