	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ticket_key_callback
_ticket_key_callback:                   ## @ticket_key_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
	movl	%r8d, %r14d
	movq	%rcx, %r15
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	_session_tickets@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_pthread_rwlock_rdlock
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_EVP_MAX_IV_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_RAND_bytes
	xorl	%edi, %edi
	callq	_time
	addq	$8, %rbx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_find_ticket_for_encryption
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %rbx
	movb	$1, %r15b
	jmp	LBB0_9
LBB0_3:
	cmpq	$0, 8(%rbx)
	je	LBB0_11
## %bb.4:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	movq	(%rax,%r15,8), %r14
	movl	16(%r14), %edi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	cmpq	8(%rbx), %r15
	jne	LBB0_5
LBB0_11:
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_8:
	xorl	%eax, %eax
	callq	_EVP_aes_256_cbc
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_EVP_sha256
	movq	_UINT64_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	callq	_new_ticket
	movq	%rax, %rbx
	testq	%rax, %rax
	sete	%r15b
LBB0_9:
	movl	16(%rbx), %esi
	movq	%r13, %rdi
	movl	$4, %edx
	callq	_memcpy
	movl	12(%rbx), %r14d
	movq	%rbx, %rdi
	callq	_session_ticket_get_cipher_key
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	%eax, %ecx
	movq	%r12, %r8
	callq	_EVP_EncryptInit_ex
	movl	%eax, %edi
	callq	_assert
	movq	%rbx, %rdi
	callq	_session_ticket_get_hmac_key
	movl	%eax, %r14d
	movl	8(%rbx), %edi
	callq	_EVP_MD_block_size
	movl	8(%rbx), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%r8d, %r8d
	callq	_HMAC_Init_ex
	movl	%eax, %edi
	callq	_assert
	movl	$1, %r14d
	testb	%r15b, %r15b
	jne	LBB0_15
## %bb.10:
	movq	%rbx, %rdi
	callq	_free_ticket
	jmp	LBB0_15
LBB0_12:
	movl	12(%r14), %r13d
	movq	%r14, %rdi
	callq	_session_ticket_get_cipher_key
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	xorl	%edx, %edx
	movl	%eax, %ecx
	movq	%r12, %r8
	callq	_EVP_DecryptInit_ex
	movl	%eax, %edi
	callq	_assert
	movq	%r14, %rdi
	callq	_session_ticket_get_hmac_key
	movl	%eax, %r12d
	movl	8(%r14), %edi
	callq	_EVP_MD_block_size
	movl	8(%r14), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	%eax, %edx
	xorl	%r8d, %r8d
	callq	_HMAC_Init_ex
	movl	%eax, %edi
	callq	_assert
	testq	%r15, %r15
	je	LBB0_14
## %bb.13:
	movq	16(%rbx), %rax
	movq	-8(%rax,%r15,8), %rax
	movq	(%rax), %rbx
	xorl	%edi, %edi
	callq	_time
	movl	$2, %r14d
	cmpq	%rax, %rbx
	jle	LBB0_15
LBB0_14:
	movl	$1, %r14d
LBB0_15:
	movq	_session_tickets@GOTPCREL(%rip), %rdi
	callq	_pthread_rwlock_unlock
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_session_tickets,24,3           ## @session_tickets
	.comm	_EVP_MAX_IV_LENGTH,4,2          ## @EVP_MAX_IV_LENGTH
	.comm	_UINT64_MAX,4,2                 ## @UINT64_MAX
	.no_dead_strip	_ticket_key_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ticket_key_callback
_ticket_key_callback:                   ; @ticket_key_callback
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x4
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x23, x0
Lloh0:
	adrp	x22, _session_tickets@GOTPAGE
Lloh1:
	ldr	x22, [x22, _session_tickets@GOTPAGEOFF]
	mov	x0, x22
	bl	_pthread_rwlock_rdlock
	cbz	w24, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _EVP_MAX_IV_LENGTH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EVP_MAX_IV_LENGTH@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_RAND_bytes
	mov	x0, #0
	bl	_time
	mov	x1, x0
	add	x0, x22, #8
	bl	_find_ticket_for_encryption
	cbz	x0, LBB0_8
; %bb.2:
	mov	x22, x0
	mov	w24, #1
	b	LBB0_9
LBB0_3:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_7
; %bb.4:
	mov	x25, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #16]
	ldr	x24, [x8, x25, lsl #3]
	ldr	w0, [x24, #16]
	mov	x1, x23
	mov	w2, #4
	bl	_memcmp
	cbz	x0, LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #1
	ldr	x8, [x22, #8]
	cmp	x25, x8
	b.ne	LBB0_5
LBB0_7:
	mov	w19, #0
	b	LBB0_12
LBB0_8:
	bl	_EVP_aes_256_cbc
	mov	x22, x0
	bl	_EVP_sha256
	mov	x1, x0
Lloh5:
	adrp	x8, _UINT64_MAX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _UINT64_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x22
	mov	w2, #0
	mov	w4, #1
	bl	_new_ticket
	mov	x22, x0
	cmp	x0, #0
	cset	w24, eq
LBB0_9:
	ldr	w1, [x22, #16]
	mov	x0, x23
	mov	w2, #4
	bl	_memcpy
	ldr	w23, [x22, #12]
	mov	x0, x22
	bl	_session_ticket_get_cipher_key
	mov	x3, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, #0
	mov	x4, x20
	bl	_EVP_EncryptInit_ex
	bl	_assert
	mov	x0, x22
	bl	_session_ticket_get_hmac_key
	mov	x20, x0
	ldr	w0, [x22, #8]
	bl	_EVP_MD_block_size
	mov	x2, x0
	ldr	w3, [x22, #8]
	mov	x0, x19
	mov	x1, x20
	mov	x4, #0
	bl	_HMAC_Init_ex
	bl	_assert
	tbnz	w24, #0, LBB0_11
; %bb.10:
	mov	x0, x22
	bl	_free_ticket
LBB0_11:
	mov	w19, #1
LBB0_12:
Lloh8:
	adrp	x0, _session_tickets@GOTPAGE
Lloh9:
	ldr	x0, [x0, _session_tickets@GOTPAGEOFF]
	bl	_pthread_rwlock_unlock
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	w23, [x24, #12]
	mov	x0, x24
	bl	_session_ticket_get_cipher_key
	mov	x3, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, #0
	mov	x4, x20
	bl	_EVP_DecryptInit_ex
	bl	_assert
	mov	x0, x24
	bl	_session_ticket_get_hmac_key
	mov	x20, x0
	ldr	w0, [x24, #8]
	bl	_EVP_MD_block_size
	mov	x2, x0
	ldr	w3, [x24, #8]
	mov	x0, x19
	mov	x1, x20
	mov	x4, #0
	bl	_HMAC_Init_ex
	bl	_assert
	cbz	x25, LBB0_11
; %bb.14:
	ldr	x8, [x22, #16]
	add	x8, x8, x25, lsl #3
	ldur	x8, [x8, #-8]
	ldr	x19, [x8]
	mov	x0, #0
	bl	_time
	cmp	x19, x0
	b.gt	LBB0_11
; %bb.15:
	mov	w19, #2
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_session_tickets,24,3           ; @session_tickets
	.comm	_EVP_MAX_IV_LENGTH,4,2          ; @EVP_MAX_IV_LENGTH
	.comm	_UINT64_MAX,4,2                 ; @UINT64_MAX
	.no_dead_strip	_ticket_key_callback
.subsections_via_symbols
