	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tls13_update_key               ## -- Begin function tls13_update_key
	.p2align	4, 0x90
_tls13_update_key:                      ## @tls13_update_key
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_ssl_handshake_md
	movq	%rax, %rdi
	callq	_EVP_MD_size
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_EVP_MAX_MD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	xorl	%eax, %eax
	cmpl	%r13d, (%rbx)
	setne	%al
	movq	8(%rbx,%rax,8), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.1:
	movq	_ENC_WRITE_STATE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	24(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	64(%rbx), %r12
	leaq	48(%rbx), %rdi
	callq	_RECORD_LAYER_reset_write_sequence
	jmp	LBB0_3
LBB0_2:
	movq	32(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	56(%rbx), %r12
	leaq	48(%rbx), %rdi
	callq	_RECORD_LAYER_reset_read_sequence
LBB0_3:
	movq	%rbx, %rdi
	callq	_ssl_handshake_md
	movl	44(%rbx), %ecx
	subq	$8, %rsp
	leaq	_tls13_update_key.application_traffic(%rip), %r10
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movq	%rax, %rdx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %r8
	xorl	%r9d, %r9d
	pushq	%r12
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	%r15
	pushq	$11
	pushq	%r10
	callq	_derive_secret_key_and_iv
	addq	$48, %rsp
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_memcpy
	movq	_ENC_WRITE_STATE_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movl	$1, %r14d
LBB0_5:
	movq	%r15, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_OPENSSL_cleanse
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
_tls13_update_key.application_traffic:  ## @tls13_update_key.application_traffic
	.asciz	"traffic upd"

	.comm	_EVP_MAX_MD_SIZE,4,2            ## @EVP_MAX_MD_SIZE
	.comm	_ENC_WRITE_STATE_INVALID,4,2    ## @ENC_WRITE_STATE_INVALID
	.comm	_ENC_WRITE_STATE_VALID,4,2      ## @ENC_WRITE_STATE_VALID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tls13_update_key               ; -- Begin function tls13_update_key
	.p2align	2
_tls13_update_key:                      ; @tls13_update_key
	.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
	sub	sp, sp, #16
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	bl	_ssl_handshake_md
	bl	_EVP_MD_size
	mov	x22, x0
Lloh3:
	adrp	x8, _EVP_MAX_MD_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVP_MAX_MD_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	x9, x20
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	ldr	w8, [x19]
	cmp	w8, w23
	mov	w8, #16
	mov	w9, #8
	csel	x8, x9, x8, eq
	ldr	x24, [x19, x8]
	cbz	w23, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _ENC_WRITE_STATE_INVALID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENC_WRITE_STATE_INVALID@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	ldr	x25, [x19, #24]
	ldr	x26, [x19, #64]
	add	x0, x19, #48
	bl	_RECORD_LAYER_reset_write_sequence
	b	LBB0_3
LBB0_2:
	ldr	x25, [x19, #32]
	ldr	x26, [x19, #56]
	add	x0, x19, #48
	bl	_RECORD_LAYER_reset_read_sequence
LBB0_3:
	mov	x0, x19
	bl	_ssl_handshake_md
	mov	x2, x0
	ldr	w3, [x19, #44]
	sub	sp, sp, #32
	stp	x25, x26, [sp, #8]
	str	x21, [sp]
Lloh11:
	adrp	x6, _tls13_update_key.application_traffic@PAGE
Lloh12:
	add	x6, x6, _tls13_update_key.application_traffic@PAGEOFF
	mov	x0, x19
	mov	x1, x23
	mov	x4, x24
	mov	x5, #0
	mov	w7, #11
	bl	_derive_secret_key_and_iv
	add	sp, sp, #32
	cbz	w0, LBB0_5
; %bb.4:
	mov	x0, x24
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
Lloh13:
	adrp	x8, _ENC_WRITE_STATE_VALID@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENC_WRITE_STATE_VALID@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	mov	w19, #1
	b	LBB0_6
LBB0_5:
	mov	w19, #0
LBB0_6:
	mov	x0, x21
	mov	x1, x20
	bl	_OPENSSL_cleanse
	ldur	x8, [x29, #-72]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	sub	sp, x29, #64
	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_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_tls13_update_key.application_traffic:  ; @tls13_update_key.application_traffic
	.asciz	"traffic upd"

	.comm	_EVP_MAX_MD_SIZE,4,2            ; @EVP_MAX_MD_SIZE
	.comm	_ENC_WRITE_STATE_INVALID,4,2    ; @ENC_WRITE_STATE_INVALID
	.comm	_ENC_WRITE_STATE_VALID,4,2      ; @ENC_WRITE_STATE_VALID
.subsections_via_symbols
