	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_default_udp_check_perm         ## -- Begin function default_udp_check_perm
	.p2align	4, 0x90
_default_udp_check_perm:                ## @default_udp_check_perm
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movzbl	%r15b, %edx
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	callq	_vkprintf
	movl	%r15d, %edx
	andl	$127, %edx
	movq	_UDP_CRYPTO_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	LBB0_3
## %bb.1:
	movq	_UDP_CRYPTO_AES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_vkprintf
	movl	$-1, %ebx
	jmp	LBB0_8
LBB0_3:
	movq	(%rbx), %rsi
	movq	_PID@GOTPCREL(%rip), %rdi
	xorl	%r12d, %r12d
	movl	$0, %ecx
	cmpq	(%rdi), %rsi
	jne	LBB0_5
## %bb.4:
	movq	_UDP_ALLOW_UNENC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_5:
	movsbl	%r15b, %r13d
	sarl	$7, %r13d
	andl	%ecx, %r13d
	movl	(%r14), %ecx
	decl	%ecx
	cmpl	$2, %ecx
	cmovael	%r12d, %r13d
	shrl	$8, %r15d
	movl	$0, %ebx
	cmpl	%eax, %edx
	je	LBB0_7
## %bb.6:
	movq	_UDP_ALLOW_ENC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_7:
	xorl	%eax, %eax
	callq	_get_crypto_key_id
	xorl	%r15d, %eax
	testl	$4095, %eax                     ## imm = 0xFFF
	cmovnel	%r12d, %ebx
	orl	%r13d, %ebx
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	movl	%ebx, %edx
	callq	_vkprintf
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"default_udp_check_perm: crypto_flags = 0x%02x\n"

	.comm	_UDP_ALLOW_UNENC,4,2            ## @UDP_ALLOW_UNENC
	.comm	_UDP_CRYPTO_NONE,4,2            ## @UDP_CRYPTO_NONE
	.comm	_UDP_CRYPTO_AES,4,2             ## @UDP_CRYPTO_AES
L_.str.1:                               ## @.str.1
	.asciz	"unknown crypto protocol %d\n"

	.comm	_PID,8,3                        ## @PID
	.comm	_UDP_ALLOW_ENC,4,2              ## @UDP_ALLOW_ENC
L_.str.2:                               ## @.str.2
	.asciz	"check_perm returns %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_default_udp_check_perm         ; -- Begin function default_udp_check_perm
	.p2align	2
_default_udp_check_perm:                ; @default_udp_check_perm
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	and	w2, w1, #0xff
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_vkprintf
	and	w2, w19, #0x7f
Lloh2:
	adrp	x8, _UDP_CRYPTO_NONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _UDP_CRYPTO_NONE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _UDP_CRYPTO_AES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _UDP_CRYPTO_AES@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w2, w8
	ccmp	w2, w9, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x9, _UDP_ALLOW_UNENC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _UDP_ALLOW_UNENC@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	ldr	x10, [x21]
Lloh11:
	adrp	x11, _PID@GOTPAGE
Lloh12:
	ldr	x11, [x11, _PID@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
	cmp	x10, x11
	csel	w9, w9, wzr, eq
	lsl	w10, w19, #24
	and	w9, w9, w10, asr #31
	ldr	w10, [x20]
	sub	w10, w10, #1
	cmp	w10, #2
	csel	w20, w9, wzr, lo
Lloh14:
	adrp	x9, _UDP_ALLOW_ENC@GOTPAGE
Lloh15:
	ldr	x9, [x9, _UDP_ALLOW_ENC@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w2, w8
	csel	w21, wzr, w9, eq
	bl	_get_crypto_key_id
	eor	w8, w0, w19, lsr #8
	tst	w8, #0xfff
	csel	w8, w21, wzr, eq
	orr	w19, w8, w20
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	mov	x2, x19
	bl	_vkprintf
	b	LBB0_3
LBB0_2:
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_vkprintf
	mov	w19, #-1
LBB0_3:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"default_udp_check_perm: crypto_flags = 0x%02x\n"

	.comm	_UDP_ALLOW_UNENC,4,2            ; @UDP_ALLOW_UNENC
	.comm	_UDP_CRYPTO_NONE,4,2            ; @UDP_CRYPTO_NONE
	.comm	_UDP_CRYPTO_AES,4,2             ; @UDP_CRYPTO_AES
l_.str.1:                               ; @.str.1
	.asciz	"unknown crypto protocol %d\n"

	.comm	_PID,8,3                        ; @PID
	.comm	_UDP_ALLOW_ENC,4,2              ; @UDP_ALLOW_ENC
l_.str.2:                               ; @.str.2
	.asciz	"check_perm returns %d\n"

.subsections_via_symbols
