	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_key_update
_test_key_update:                       ## @test_key_update
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -96(%rbp)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_TLS_server_method
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_TLS_client_method
	movq	_TLS1_3_VERSION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_cert@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movq	_privkey@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	leaq	-104(%rbp), %r8
	leaq	-112(%rbp), %r9
	movl	%r14d, %edi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	pushq	%r11
	pushq	%r10
	callq	_create_ssl_ctx_pair
	addq	$16, %rsp
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_19
## %bb.1:
	movq	-104(%rbp), %rdi
	movq	-112(%rbp), %rsi
	leaq	-96(%rbp), %rdx
	leaq	-88(%rbp), %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_create_ssl_objects
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_18
## %bb.2:
	movq	-96(%rbp), %rdi
	movq	-88(%rbp), %rsi
	movq	_SSL_ERROR_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_create_ssl_connection
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_18
## %bb.3:
	movb	$1, %r12b
	movq	_NUM_KEY_UPDATE_MESSAGES@GOTPCREL(%rip), %r13
	movq	_SSL_KEY_UPDATE_REQUESTED@GOTPCREL(%rip), %r14
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	cmpl	$0, (%r13)
	jle	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rax
	testb	$1, %r12b
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	_SSL_KEY_UPDATE_NOT_REQUESTED@GOTPCREL(%rip), %rax
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	-88(%rbp), %rdi
	movl	(%rax), %esi
	callq	_SSL_key_update
	movl	%eax, %edi
	callq	_TEST_true
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	-88(%rbp), %rdi
	callq	_SSL_do_handshake
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_19
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=2
	incl	%r15d
	cmpl	(%r13), %r15d
	jl	LBB0_6
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-88(%rbp), %r15
	leaq	L_.str(%rip), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_SSL_write
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_strlen
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_TEST_int_eq
	testl	%eax, %eax
	je	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-96(%rbp), %rdi
	leaq	-80(%rbp), %rsi
	movl	$20, %edx
	callq	_SSL_read
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_strlen
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_TEST_int_eq
	testl	%eax, %eax
	je	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-96(%rbp), %r15
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_SSL_write
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_strlen
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_TEST_int_eq
	testl	%eax, %eax
	je	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-88(%rbp), %rdi
	leaq	-80(%rbp), %rsi
	movl	$20, %edx
	callq	_SSL_read
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_strlen
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_TEST_int_eq
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	xorb	$1, %r12b
	testb	$1, %r12b
	movl	$0, %r12d
	je	LBB0_4
LBB0_16:
	xorl	%ebx, %ebx
	testl	%eax, %eax
	setne	%bl
	jmp	LBB0_19
LBB0_18:
	xorl	%ebx, %ebx
LBB0_19:
	movq	-96(%rbp), %rdi
	callq	_SSL_free
	movq	-88(%rbp), %rdi
	callq	_SSL_free
	movq	-104(%rbp), %rdi
	callq	_SSL_CTX_free
	movq	-112(%rbp), %rdi
	callq	_SSL_CTX_free
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.20:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"A test message"

	.comm	_TLS1_3_VERSION,4,2             ## @TLS1_3_VERSION
	.comm	_cert,4,2                       ## @cert
	.comm	_privkey,4,2                    ## @privkey
	.comm	_SSL_ERROR_NONE,4,2             ## @SSL_ERROR_NONE
	.comm	_NUM_KEY_UPDATE_MESSAGES,4,2    ## @NUM_KEY_UPDATE_MESSAGES
	.comm	_SSL_KEY_UPDATE_NOT_REQUESTED,4,2 ## @SSL_KEY_UPDATE_NOT_REQUESTED
	.comm	_SSL_KEY_UPDATE_REQUESTED,4,2   ## @SSL_KEY_UPDATE_REQUESTED
	.no_dead_strip	_test_key_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_key_update
_test_key_update:                       ; @test_key_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	stp	xzr, xzr, [sp, #16]
	stp	xzr, xzr, [sp]
	bl	_TLS_server_method
	mov	x19, x0
	bl	_TLS_client_method
	mov	x1, x0
Lloh3:
	adrp	x8, _TLS1_3_VERSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TLS1_3_VERSION@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _cert@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cert@GOTPAGEOFF]
Lloh8:
	ldr	w6, [x8]
Lloh9:
	adrp	x8, _privkey@GOTPAGE
Lloh10:
	ldr	x8, [x8, _privkey@GOTPAGEOFF]
Lloh11:
	ldr	w7, [x8]
	add	x4, sp, #16
	add	x5, sp, #24
	mov	x0, x19
	mov	w3, #0
	bl	_create_ssl_ctx_pair
	bl	_TEST_true
	cbz	w0, LBB0_15
; %bb.1:
	ldp	x0, x1, [sp, #16]
	mov	x2, sp
	add	x3, sp, #8
	mov	x4, #0
	mov	x5, #0
	bl	_create_ssl_objects
	bl	_TEST_true
	cbz	w0, LBB0_15
; %bb.2:
	ldp	x0, x1, [sp]
Lloh12:
	adrp	x8, _SSL_ERROR_NONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SSL_ERROR_NONE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	bl	_create_ssl_connection
	bl	_TEST_true
	cbz	w0, LBB0_15
; %bb.3:
	mov	w23, #1
Lloh15:
	adrp	x21, _NUM_KEY_UPDATE_MESSAGES@GOTPAGE
Lloh16:
	ldr	x21, [x21, _NUM_KEY_UPDATE_MESSAGES@GOTPAGEOFF]
Lloh17:
	adrp	x22, _SSL_KEY_UPDATE_NOT_REQUESTED@GOTPAGE
Lloh18:
	ldr	x22, [x22, _SSL_KEY_UPDATE_NOT_REQUESTED@GOTPAGEOFF]
Lloh19:
	adrp	x24, _SSL_KEY_UPDATE_REQUESTED@GOTPAGE
Lloh20:
	ldr	x24, [x24, _SSL_KEY_UPDATE_REQUESTED@GOTPAGEOFF]
Lloh21:
	adrp	x19, l_.str@PAGE
Lloh22:
	add	x19, x19, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w20, #0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [sp, #8]
	tst	w23, #0x1
	csel	x8, x22, x24, ne
	ldr	w1, [x8]
	bl	_SSL_key_update
	bl	_TEST_true
	cbz	w0, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x0, [sp, #8]
	bl	_SSL_do_handshake
	bl	_TEST_true
	cbz	w0, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_6
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x20, [sp, #8]
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_SSL_write
	mov	x20, x0
	mov	x0, x19
	bl	_strlen
	mov	x1, x0
	mov	x0, x20
	bl	_TEST_int_eq
	cbz	w0, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp]
	add	x1, sp, #36
	mov	w2, #20
	bl	_SSL_read
	mov	x20, x0
	mov	x0, x19
	bl	_strlen
	mov	x1, x0
	mov	x0, x20
	bl	_TEST_int_eq
	cbz	w0, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x20, [sp]
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_SSL_write
	mov	x20, x0
	mov	x0, x19
	bl	_strlen
	mov	x1, x0
	mov	x0, x20
	bl	_TEST_int_eq
	cbz	w0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #8]
	add	x1, sp, #36
	mov	w2, #20
	bl	_SSL_read
	mov	x20, x0
	mov	x0, x19
	bl	_strlen
	mov	x1, x0
	mov	x0, x20
	bl	_TEST_int_eq
	cbz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	eor	w8, w23, #0x1
	mov	w23, #0
	tbz	w8, #0, LBB0_4
LBB0_14:
	cmp	w0, #0
	cset	w19, ne
	b	LBB0_16
LBB0_15:
	mov	w19, #0
LBB0_16:
	ldr	x0, [sp]
	bl	_SSL_free
	ldr	x0, [sp, #8]
	bl	_SSL_free
	ldr	x0, [sp, #16]
	bl	_SSL_CTX_free
	ldr	x0, [sp, #24]
	bl	_SSL_CTX_free
	ldr	x8, [sp, #56]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"A test message"

	.comm	_TLS1_3_VERSION,4,2             ; @TLS1_3_VERSION
	.comm	_cert,4,2                       ; @cert
	.comm	_privkey,4,2                    ; @privkey
	.comm	_SSL_ERROR_NONE,4,2             ; @SSL_ERROR_NONE
	.comm	_NUM_KEY_UPDATE_MESSAGES,4,2    ; @NUM_KEY_UPDATE_MESSAGES
	.comm	_SSL_KEY_UPDATE_NOT_REQUESTED,4,2 ; @SSL_KEY_UPDATE_NOT_REQUESTED
	.comm	_SSL_KEY_UPDATE_REQUESTED,4,2   ; @SSL_KEY_UPDATE_REQUESTED
	.no_dead_strip	_test_key_update
.subsections_via_symbols
