	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_send_server_hello
_tls_send_server_hello:                 ## @tls_send_server_hello
	.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
	movq	%rdi, %r15
	movq	$0, -56(%rbp)
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	$0, (%rsi)
	cmpq	$0, 40(%rdi)
	je	LBB0_2
## %bb.1:
	movq	16(%r15), %rax
	movq	8(%rax), %rdi
	movl	$1, %r14d
	testq	%rdi, %rdi
	jne	LBB0_6
LBB0_2:
	cmpq	$0, 32(%r15)
	jne	LBB0_5
## %bb.3:
	cmpq	$0, 24(%r15)
	je	LBB0_4
LBB0_5:
	movq	16(%r15), %rax
	movq	(%rax), %rdi
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_7
LBB0_6:
	leaq	-56(%rbp), %rsi
	callq	_os_readfile
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_8
	jmp	LBB0_7
LBB0_4:
	xorl	%r14d, %r14d
LBB0_7:
	movq	$0, -56(%rbp)
	xorl	%r12d, %r12d
LBB0_8:
	movq	%r15, %rdi
	callq	_tls_server_cert_chain_der_len
	cltq
	movq	-56(%rbp), %rcx
	leaq	(%rax,%rcx), %rbx
	addq	$1000, %rbx                     ## imm = 0x3E8
	movq	%rbx, %rdi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.11:
	movq	%rax, %r13
	movq	%rax, -48(%rbp)
	addq	%rax, %rbx
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_tls_write_server_hello
	testq	%rax, %rax
	js	LBB0_12
## %bb.13:
	cmpq	$0, 8(%r15)
	je	LBB0_18
## %bb.14:
	movq	%r12, %rdi
	callq	_os_free
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_tls_write_server_change_cipher_spec
	testq	%rax, %rax
	js	LBB0_16
## %bb.15:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_tls_write_server_finished
	testq	%rax, %rax
	js	LBB0_16
## %bb.17:
	movq	-48(%rbp), %rax
	subq	%r13, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	_CHANGE_CIPHER_SPEC@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
	movl	%eax, (%r15)
	jmp	LBB0_25
LBB0_16:
	movq	%r13, %rdi
	jmp	LBB0_10
LBB0_18:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_tls_write_server_certificate
	testq	%rax, %rax
	js	LBB0_12
## %bb.19:
	movq	-56(%rbp), %r9
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	movl	%r14d, %ecx
	movq	%r12, %r8
	callq	_tls_write_server_certificate_status
	testq	%rax, %rax
	js	LBB0_12
## %bb.20:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_tls_write_server_key_exchange
	testq	%rax, %rax
	js	LBB0_12
## %bb.21:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_tls_write_server_certificate_request
	testq	%rax, %rax
	js	LBB0_12
## %bb.22:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_tls_write_server_hello_done
	testq	%rax, %rax
	js	LBB0_12
## %bb.23:
	movq	%r12, %rdi
	callq	_os_free
	movq	-48(%rbp), %rax
	subq	%r13, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	_CLIENT_CERTIFICATE@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_12:
	movq	%r13, %rdi
	callq	_os_free
LBB0_9:
	movq	%r12, %rdi
LBB0_10:
	callq	_os_free
	xorl	%r13d, %r13d
LBB0_25:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHANGE_CIPHER_SPEC,4,2         ## @CHANGE_CIPHER_SPEC
	.comm	_CLIENT_CERTIFICATE,4,2         ## @CLIENT_CERTIFICATE
	.no_dead_strip	_tls_send_server_hello
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_send_server_hello
_tls_send_server_hello:                 ; @tls_send_server_hello
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	str	xzr, [sp]
	str	xzr, [x1]
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_3
; %bb.2:
	mov	w24, #1
	b	LBB0_6
LBB0_3:
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_7
LBB0_5:
	mov	w24, #0
	mov	w1, #0
	ldr	x8, [x19, #16]
	ldr	x0, [x8]
	cbz	x0, LBB0_8
LBB0_6:
	mov	x1, sp
	bl	_os_readfile
	mov	x22, x0
	mov	x1, x24
	cbnz	x0, LBB0_9
	b	LBB0_8
LBB0_7:
	mov	w1, #0
LBB0_8:
	mov	x22, #0
	str	xzr, [sp]
	mov	x24, x1
LBB0_9:
	mov	x0, x19
	bl	_tls_server_cert_chain_der_len
	add	w8, w0, #1000
	ldr	x9, [sp]
	add	x23, x9, w8, sxtw
	mov	x0, x23
	bl	_os_malloc
	mov	x21, x0
	cbz	x0, LBB0_16
; %bb.10:
	str	x21, [sp, #8]
	add	x23, x21, x23
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x23
	bl	_tls_write_server_hello
	tbnz	x0, #63, LBB0_24
; %bb.11:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_18
; %bb.12:
	mov	x0, x22
	bl	_os_free
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x23
	bl	_tls_write_server_change_cipher_spec
	tbnz	x0, #63, LBB0_17
; %bb.13:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x23
	bl	_tls_write_server_finished
	tbnz	x0, #63, LBB0_17
; %bb.14:
	ldr	x8, [sp, #8]
	sub	x8, x8, x21
	str	x8, [x20]
Lloh0:
	adrp	x8, _CHANGE_CIPHER_SPEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHANGE_CIPHER_SPEC@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_26
LBB0_16:
	mov	x0, x22
	bl	_os_free
	b	LBB0_26
LBB0_17:
	mov	x0, x21
	b	LBB0_25
LBB0_18:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x23
	bl	_tls_write_server_certificate
	tbnz	x0, #63, LBB0_24
; %bb.19:
	ldr	x5, [sp]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x23
	mov	x3, x24
	mov	x4, x22
	bl	_tls_write_server_certificate_status
	tbnz	x0, #63, LBB0_24
; %bb.20:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x23
	bl	_tls_write_server_key_exchange
	tbnz	x0, #63, LBB0_24
; %bb.21:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x23
	bl	_tls_write_server_certificate_request
	tbnz	x0, #63, LBB0_24
; %bb.22:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x23
	bl	_tls_write_server_hello_done
	tbnz	x0, #63, LBB0_24
; %bb.23:
	mov	x0, x22
	bl	_os_free
	ldr	x8, [sp, #8]
	sub	x8, x8, x21
	str	x8, [x20]
Lloh2:
	adrp	x8, _CLIENT_CERTIFICATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CLIENT_CERTIFICATE@GOTPAGEOFF]
	b	LBB0_15
LBB0_24:
	mov	x0, x21
	bl	_os_free
	mov	x0, x22
LBB0_25:
	bl	_os_free
	mov	x21, #0
LBB0_26:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_CHANGE_CIPHER_SPEC,4,2         ; @CHANGE_CIPHER_SPEC
	.comm	_CLIENT_CERTIFICATE,4,2         ; @CLIENT_CERTIFICATE
	.no_dead_strip	_tls_send_server_hello
.subsections_via_symbols
