	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tls_construct_certificate_request ## -- Begin function tls_construct_certificate_request
	.p2align	4, 0x90
_tls_construct_certificate_request:     ## @tls_construct_certificate_request
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_SSL_IS_TLS13
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	(%r15), %rax
	movq	_SSL_PHA_REQUEST_PENDING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.2:
	movq	24(%r15), %rdi
	callq	_OPENSSL_free
	movl	$32, 8(%r15)
	movl	$32, %edi
	callq	_OPENSSL_malloc
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_17
## %bb.3:
	movl	8(%r15), %esi
	movq	%rax, %rdi
	callq	_RAND_bytes
	testq	%rax, %rax
	jle	LBB0_17
## %bb.4:
	movq	24(%r15), %rsi
	movl	8(%r15), %edx
	movq	%r14, %rdi
	callq	_WPACKET_sub_memcpy_u8
	testl	%eax, %eax
	je	LBB0_17
## %bb.5:
	movq	%r15, %rdi
	callq	_tls13_restore_handshake_digest_for_pha
	testl	%eax, %eax
	jne	LBB0_19
	jmp	LBB0_6
LBB0_7:
	movq	%r14, %rdi
	callq	_WPACKET_start_sub_packet_u8
	testl	%eax, %eax
	je	LBB0_17
## %bb.8:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ssl3_get_req_cert_type
	testl	%eax, %eax
	je	LBB0_17
## %bb.9:
	movq	%r14, %rdi
	callq	_WPACKET_close
	testl	%eax, %eax
	je	LBB0_17
## %bb.10:
	movq	%r15, %rdi
	callq	_SSL_USE_SIGALGS
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	leaq	-32(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_tls12_get_psigalgs
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_WPACKET_start_sub_packet_u16
	testl	%eax, %eax
	je	LBB0_17
## %bb.12:
	movq	_WPACKET_FLAGS_NON_ZERO_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_WPACKET_set_flags
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:
	movq	-32(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rcx
	callq	_tls12_copy_sigalgs
	testl	%eax, %eax
	je	LBB0_17
## %bb.14:
	movq	%r14, %rdi
	callq	_WPACKET_close
	testl	%eax, %eax
	je	LBB0_17
LBB0_15:
	movq	%r15, %rdi
	callq	_get_ca_names
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_construct_ca_names
	testl	%eax, %eax
	jne	LBB0_20
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_17:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_SSLfatal
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_18:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_WPACKET_put_bytes_u8
	testl	%eax, %eax
	je	LBB0_21
LBB0_19:
	movq	_SSL_EXT_TLS1_3_CERTIFICATE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_tls_construct_extensions
	testl	%eax, %eax
	je	LBB0_22
LBB0_20:
	incl	16(%r15)
	movl	$1, 12(%r15)
	movl	$1, %ebx
	jmp	LBB0_22
LBB0_21:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_SSLfatal
LBB0_22:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSL_PHA_REQUEST_PENDING,8,3    ## @SSL_PHA_REQUEST_PENDING
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ## @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST,4,2 ## @SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ## @ERR_R_INTERNAL_ERROR
	.comm	_SSL_EXT_TLS1_3_CERTIFICATE_REQUEST,4,2 ## @SSL_EXT_TLS1_3_CERTIFICATE_REQUEST
	.comm	_WPACKET_FLAGS_NON_ZERO_LENGTH,4,2 ## @WPACKET_FLAGS_NON_ZERO_LENGTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tls_construct_certificate_request ; -- Begin function tls_construct_certificate_request
	.p2align	2
_tls_construct_certificate_request:     ; @tls_construct_certificate_request
	.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
	bl	_SSL_IS_TLS13
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _SSL_PHA_REQUEST_PENDING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SSL_PHA_REQUEST_PENDING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.2:
	ldr	x0, [x19, #24]
	bl	_OPENSSL_free
	mov	w8, #32
	str	w8, [x19, #8]
	mov	w0, #32
	bl	_OPENSSL_malloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_18
; %bb.3:
	ldr	w1, [x19, #8]
	bl	_RAND_bytes
	cmp	x0, #1
	b.lt	LBB0_18
; %bb.4:
	ldr	x1, [x19, #24]
	ldr	w2, [x19, #8]
	mov	x0, x20
	bl	_WPACKET_sub_memcpy_u8
	cbz	w0, LBB0_18
; %bb.5:
	mov	x0, x19
	bl	_tls13_restore_handshake_digest_for_pha
	cbnz	w0, LBB0_16
	b	LBB0_19
LBB0_6:
	mov	x0, x20
	bl	_WPACKET_start_sub_packet_u8
	cbz	w0, LBB0_18
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_ssl3_get_req_cert_type
	cbz	w0, LBB0_18
; %bb.8:
	mov	x0, x20
	bl	_WPACKET_close
	cbz	w0, LBB0_18
; %bb.9:
	mov	x0, x19
	bl	_SSL_USE_SIGALGS
	cbz	x0, LBB0_14
; %bb.10:
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #1
	bl	_tls12_get_psigalgs
	mov	x21, x0
	mov	x0, x20
	bl	_WPACKET_start_sub_packet_u16
	cbz	w0, LBB0_18
; %bb.11:
Lloh3:
	adrp	x8, _WPACKET_FLAGS_NON_ZERO_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WPACKET_FLAGS_NON_ZERO_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_WPACKET_set_flags
	cbz	w0, LBB0_18
; %bb.12:
	ldr	x2, [sp, #8]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	bl	_tls12_copy_sigalgs
	cbz	w0, LBB0_18
; %bb.13:
	mov	x0, x20
	bl	_WPACKET_close
	cbz	w0, LBB0_18
LBB0_14:
	mov	x0, x19
	bl	_get_ca_names
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_construct_ca_names
	cbnz	w0, LBB0_17
	b	LBB0_19
LBB0_15:
	mov	x0, x20
	mov	w1, #0
	bl	_WPACKET_put_bytes_u8
	cbz	w0, LBB0_18
LBB0_16:
Lloh6:
	adrp	x8, _SSL_EXT_TLS1_3_CERTIFICATE_REQUEST@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SSL_EXT_TLS1_3_CERTIFICATE_REQUEST@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x3, #0
	mov	w4, #0
	bl	_tls_construct_extensions
	cbz	w0, LBB0_19
LBB0_17:
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	mov	w0, #1
	stp	w0, w8, [x19, #12]
	b	LBB0_19
LBB0_18:
Lloh9:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _ERR_R_INTERNAL_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERR_R_INTERNAL_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_SSLfatal
	mov	w0, #0
LBB0_19:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SSL_PHA_REQUEST_PENDING,8,3    ; @SSL_PHA_REQUEST_PENDING
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ; @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST,4,2 ; @SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ; @ERR_R_INTERNAL_ERROR
	.comm	_SSL_EXT_TLS1_3_CERTIFICATE_REQUEST,4,2 ; @SSL_EXT_TLS1_3_CERTIFICATE_REQUEST
	.comm	_WPACKET_FLAGS_NON_ZERO_LENGTH,4,2 ; @WPACKET_FLAGS_NON_ZERO_LENGTH
.subsections_via_symbols
