	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_udp_set_kernel_tunneling       ## -- Begin function udp_set_kernel_tunneling
	.p2align	4, 0x90
_udp_set_kernel_tunneling:              ## @udp_set_kernel_tunneling
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	%rbx, %rdi
	callq	_sotoinpcb
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	%rbx, %rdi
	callq	_INP_WLOCK
	movq	%rbx, %rdi
	callq	_intoudpcb
	cmpq	$0, 16(%rax)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, 8(%rax)
	je	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_INP_WUNLOCK
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r12, 16(%rax)
	movq	%r15, 8(%rax)
	movq	%r14, (%rax)
	movq	%rbx, %rdi
	callq	_INP_WUNLOCK
	xorl	%eax, %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_DGRAM,8,3                 ## @SOCK_DGRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"udp_set_kernel_tunneling: !dgram"

L_.str.1:                               ## @.str.1
	.asciz	"udp_set_kernel_tunneling: inp == NULL"

	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_udp_set_kernel_tunneling       ; -- Begin function udp_set_kernel_tunneling
	.p2align	2
_udp_set_kernel_tunneling:              ; @udp_set_kernel_tunneling
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SOCK_DGRAM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SOCK_DGRAM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	mov	x0, x22
	bl	_sotoinpcb
	mov	x22, x0
	cmp	x0, #0
	cset	w0, ne
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	mov	x0, x22
	bl	_INP_WLOCK
	mov	x0, x22
	bl	_intoudpcb
	ldr	x8, [x0, #16]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
LBB0_2:
	mov	x0, x22
	bl	_INP_WUNLOCK
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
LBB0_3:
	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
LBB0_4:
	stp	x20, x21, [x0, #8]
	str	x19, [x0]
	mov	x0, x22
	bl	_INP_WUNLOCK
	mov	w0, #0
	b	LBB0_3
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_DGRAM,8,3                 ; @SOCK_DGRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"udp_set_kernel_tunneling: !dgram"

l_.str.1:                               ; @.str.1
	.asciz	"udp_set_kernel_tunneling: inp == NULL"

	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
