	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tls_construct_ctos_key_share   ## -- Begin function tls_construct_ctos_key_share
	.p2align	4, 0x90
_tls_construct_ctos_key_share:          ## @tls_construct_ctos_key_share
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	_TLSEXT_TYPE_key_share@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_WPACKET_put_bytes_u16
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	callq	_WPACKET_start_sub_packet_u16
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_WPACKET_start_sub_packet_u16
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	leaq	-40(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_tls1_get_supported_groups
	movq	(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_6
LBB0_12:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_add_key_share
	movq	_EXT_RETURN_FAIL@GOTPCREL(%rip), %rbx
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:
	movq	%r15, %rdi
	callq	_WPACKET_close
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	movq	%r15, %rdi
	callq	_WPACKET_close
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movq	_EXT_RETURN_SENT@GOTPCREL(%rip), %rbx
	jmp	LBB0_17
LBB0_3:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_SSLfatal
	movq	_EXT_RETURN_FAIL@GOTPCREL(%rip), %rbx
LBB0_17:
	movl	(%rbx), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, -48(%rbp)
	je	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	movq	_SSL_SECOP_CURVE_SUPPORTED@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-40(%rbp), %rax
	movq	(%rax,%rbx,8), %rsi
	movl	(%r12), %edx
	movq	%r14, %rdi
	callq	_tls_group_allowed
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	cmpq	-48(%rbp), %rbx
	jb	LBB0_8
	jmp	LBB0_11
LBB0_16:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_SSLfatal
	jmp	LBB0_17
LBB0_10:
	movq	-40(%rbp), %rax
	movq	(%rax,%rbx,8), %rdx
	testq	%rdx, %rdx
	jne	LBB0_12
LBB0_11:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SSL_R_NO_SUITABLE_KEY_SHARE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_TLSEXT_TYPE_key_share,4,2      ## @TLSEXT_TYPE_key_share
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ## @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE,4,2 ## @SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ## @ERR_R_INTERNAL_ERROR
	.comm	_EXT_RETURN_FAIL,4,2            ## @EXT_RETURN_FAIL
	.comm	_SSL_SECOP_CURVE_SUPPORTED,4,2  ## @SSL_SECOP_CURVE_SUPPORTED
	.comm	_SSL_R_NO_SUITABLE_KEY_SHARE,4,2 ## @SSL_R_NO_SUITABLE_KEY_SHARE
	.comm	_EXT_RETURN_SENT,4,2            ## @EXT_RETURN_SENT
	.comm	_EXT_RETURN_NOT_SENT,4,2        ## @EXT_RETURN_NOT_SENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tls_construct_ctos_key_share   ; -- Begin function tls_construct_ctos_key_share
	.p2align	2
_tls_construct_ctos_key_share:          ; @tls_construct_ctos_key_share
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x19, x0
	stp	xzr, xzr, [sp]
Lloh0:
	adrp	x8, _TLSEXT_TYPE_key_share@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TLSEXT_TYPE_key_share@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_WPACKET_put_bytes_u16
	cbz	w0, LBB0_8
; %bb.1:
	mov	x0, x20
	bl	_WPACKET_start_sub_packet_u16
	cbz	w0, LBB0_8
; %bb.2:
	mov	x0, x20
	bl	_WPACKET_start_sub_packet_u16
	cbz	w0, LBB0_8
; %bb.3:
	mov	x1, sp
	add	x2, sp, #8
	mov	x0, x19
	bl	_tls1_get_supported_groups
	ldr	x2, [x19]
	cbz	x2, LBB0_12
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_add_key_share
	cbz	w0, LBB0_10
; %bb.5:
	mov	x0, x20
	bl	_WPACKET_close
	cbz	w0, LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_WPACKET_close
	cbz	w0, LBB0_8
; %bb.7:
Lloh3:
	adrp	x8, _EXT_RETURN_SENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXT_RETURN_SENT@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
Lloh5:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _ERR_R_INTERNAL_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERR_R_INTERNAL_ERROR@GOTPAGEOFF]
LBB0_9:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_SSLfatal
LBB0_10:
Lloh13:
	adrp	x8, _EXT_RETURN_FAIL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EXT_RETURN_FAIL@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_12:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_17
; %bb.13:
	mov	x21, #0
Lloh15:
	adrp	x22, _SSL_SECOP_CURVE_SUPPORTED@GOTPAGE
Lloh16:
	ldr	x22, [x22, _SSL_SECOP_CURVE_SUPPORTED@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp]
	ldr	x1, [x8, x21, lsl #3]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_tls_group_allowed
	cbnz	w0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x21, x21, #1
	ldr	x8, [sp, #8]
	cmp	x21, x8
	b.lo	LBB0_14
	b	LBB0_17
LBB0_16:
	ldr	x8, [sp]
	ldr	x2, [x8, x21, lsl #3]
	cbnz	x2, LBB0_4
LBB0_17:
Lloh17:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
Lloh23:
	adrp	x8, _SSL_R_NO_SUITABLE_KEY_SHARE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SSL_R_NO_SUITABLE_KEY_SHARE@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_TLSEXT_TYPE_key_share,4,2      ; @TLSEXT_TYPE_key_share
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ; @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE,4,2 ; @SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ; @ERR_R_INTERNAL_ERROR
	.comm	_EXT_RETURN_FAIL,4,2            ; @EXT_RETURN_FAIL
	.comm	_SSL_SECOP_CURVE_SUPPORTED,4,2  ; @SSL_SECOP_CURVE_SUPPORTED
	.comm	_SSL_R_NO_SUITABLE_KEY_SHARE,4,2 ; @SSL_R_NO_SUITABLE_KEY_SHARE
	.comm	_EXT_RETURN_SENT,4,2            ; @EXT_RETURN_SENT
	.comm	_EXT_RETURN_NOT_SENT,4,2        ; @EXT_RETURN_NOT_SENT
.subsections_via_symbols
