	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generate_cookie_callback       ## -- Begin function generate_cookie_callback
	.p2align	4, 0x90
_generate_cookie_callback:              ## @generate_cookie_callback
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	$0, -56(%rbp)
	movq	_cookie_initialized@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_4
## %bb.1:
	movq	_cookie_secret@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_COOKIE_SECRET_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RAND_bytes
	testq	%rax, %rax
	jle	LBB0_2
## %bb.3:
	movl	$1, (%rbx)
LBB0_4:
	movq	%r13, %rdi
	callq	_SSL_is_dtls
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_BIO_ADDR_new
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_SSL_get_rbio
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_BIO_dgram_get_peer
	movq	%r12, %r13
	jmp	LBB0_9
LBB0_8:
	movq	_ourpeer@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	xorl	%r12d, %r12d
LBB0_9:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_BIO_ADDR_rawaddress
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	xorl	%edi, %edi
	cmpq	$0, -56(%rbp)
	setne	%dil
	callq	_OPENSSL_assert
	movq	%r13, %rdi
	callq	_BIO_ADDR_rawport
	movw	%ax, -42(%rbp)
	movq	-56(%rbp), %rdi
	addq	$2, %rdi
	movq	%rdi, -56(%rbp)
	leaq	L_.str.3(%rip), %rsi
	callq	_app_malloc
	movq	%rax, %rbx
	leaq	-42(%rbp), %rsi
	movq	%rax, %rdi
	movl	$2, %edx
	callq	_memcpy
	leaq	2(%rbx), %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_BIO_ADDR_rawaddress
	xorl	%eax, %eax
	callq	_EVP_sha1
	movq	_cookie_secret@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_COOKIE_SECRET_LENGTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	-56(%rbp), %r8
	movq	%r15, (%rsp)
	movl	%eax, %edi
	movq	%rbx, %rcx
	movq	%r14, %r9
	callq	_HMAC
	movq	%rbx, %rdi
	callq	_OPENSSL_free
	movq	%r12, %rdi
	callq	_BIO_ADDR_free
	movl	$1, %ebx
	jmp	LBB0_12
LBB0_10:
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_BIO_printf
	jmp	LBB0_12
LBB0_6:
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_BIO_printf
	jmp	LBB0_12
LBB0_2:
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_BIO_printf
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cookie_initialized,4,2         ## @cookie_initialized
	.comm	_cookie_secret,4,2              ## @cookie_secret
	.comm	_COOKIE_SECRET_LENGTH,4,2       ## @COOKIE_SECRET_LENGTH
	.comm	_bio_err,4,2                    ## @bio_err
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error setting random cookie secret\n"

L_.str.1:                               ## @.str.1
	.asciz	"memory full\n"

	.comm	_ourpeer,8,3                    ## @ourpeer
L_.str.2:                               ## @.str.2
	.asciz	"Failed getting peer address\n"

L_.str.3:                               ## @.str.3
	.asciz	"cookie generate buffer"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generate_cookie_callback       ; -- Begin function generate_cookie_callback
	.p2align	2
_generate_cookie_callback:              ; @generate_cookie_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x21, _cookie_initialized@GOTPAGE
Lloh1:
	ldr	x21, [x21, _cookie_initialized@GOTPAGEOFF]
	ldr	w8, [x21]
	cbnz	w8, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _cookie_secret@GOTPAGE
Lloh3:
	ldr	x8, [x8, _cookie_secret@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _COOKIE_SECRET_LENGTH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _COOKIE_SECRET_LENGTH@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_RAND_bytes
	cmp	x0, #0
	b.le	LBB0_11
; %bb.2:
	mov	w8, #1
	str	w8, [x21]
LBB0_3:
	mov	x0, x22
	bl	_SSL_is_dtls
	cbz	x0, LBB0_6
; %bb.4:
	bl	_BIO_ADDR_new
	cbz	x0, LBB0_10
; %bb.5:
	mov	x21, x0
	mov	x0, x22
	bl	_SSL_get_rbio
	mov	x1, x21
	bl	_BIO_dgram_get_peer
	mov	x22, x21
	b	LBB0_7
LBB0_6:
	mov	x21, #0
Lloh8:
	adrp	x8, _ourpeer@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ourpeer@GOTPAGEOFF]
Lloh10:
	ldr	x22, [x8]
LBB0_7:
	add	x2, sp, #8
	mov	x0, x22
	mov	x1, #0
	bl	_BIO_ADDR_rawaddress
	cbz	w0, LBB0_9
; %bb.8:
	ldr	x8, [sp, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_OPENSSL_assert
	mov	x0, x22
	bl	_BIO_ADDR_rawport
	strh	w0, [sp, #6]
	ldr	x8, [sp, #8]
	add	x0, x8, #2
	str	x0, [sp, #8]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_app_malloc
	mov	x23, x0
	add	x1, sp, #6
	mov	w2, #2
	bl	_memcpy
	add	x1, x23, #2
	mov	x0, x22
	mov	x2, #0
	bl	_BIO_ADDR_rawaddress
	bl	_EVP_sha1
Lloh13:
	adrp	x8, _cookie_secret@GOTPAGE
Lloh14:
	ldr	x8, [x8, _cookie_secret@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _COOKIE_SECRET_LENGTH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _COOKIE_SECRET_LENGTH@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	ldr	x4, [sp, #8]
	mov	x3, x23
	mov	x5, x20
	mov	x6, x19
	bl	_HMAC
	mov	x0, x23
	bl	_OPENSSL_free
	mov	x0, x21
	bl	_BIO_ADDR_free
	mov	w0, #1
	b	LBB0_13
LBB0_9:
Lloh19:
	adrp	x8, _bio_err@GOTPAGE
Lloh20:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_10:
Lloh24:
	adrp	x8, _bio_err@GOTPAGE
Lloh25:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh29:
	adrp	x8, _bio_err@GOTPAGE
Lloh30:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
LBB0_12:
	bl	_BIO_printf
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_cookie_initialized,4,2         ; @cookie_initialized
	.comm	_cookie_secret,4,2              ; @cookie_secret
	.comm	_COOKIE_SECRET_LENGTH,4,2       ; @COOKIE_SECRET_LENGTH
	.comm	_bio_err,4,2                    ; @bio_err
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error setting random cookie secret\n"

l_.str.1:                               ; @.str.1
	.asciz	"memory full\n"

	.comm	_ourpeer,8,3                    ; @ourpeer
l_.str.2:                               ; @.str.2
	.asciz	"Failed getting peer address\n"

l_.str.3:                               ; @.str.3
	.asciz	"cookie generate buffer"

.subsections_via_symbols
