	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_client_handshake_loop
_tls_client_handshake_loop:             ## @tls_client_handshake_loop
	.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	$200, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -184(%rbp)                ## 8-byte Spill
	movq	(%rdi), %r15
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movq	$0, -64(%rbp)
	leaq	24(%r15), %rax
	movq	%rax, -192(%rbp)                ## 8-byte Spill
	cmpq	$0, 24(%r15)
	je	LBB0_2
## %bb.1:
	cmpq	$0, 64(%r15)
	jne	LBB0_6
	jmp	LBB0_4
LBB0_2:
	movq	$0, (%r15)
	movq	_SCHANNEL_INITIAL_BUFFER_SIZE@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	-192(%rbp), %rdi                ## 8-byte Reload
	callq	_av_reallocp
	testl	%eax, %eax
	js	LBB0_48
## %bb.3:
	movq	(%r12), %rax
	movq	%rax, 8(%r15)
	cmpq	$0, 64(%r15)
	jne	LBB0_6
LBB0_4:
	leaq	64(%r15), %rdi
	movq	$0, 72(%r15)
	movq	_SCHANNEL_INITIAL_BUFFER_SIZE@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	callq	_av_reallocp
	testl	%eax, %eax
	js	LBB0_48
## %bb.5:
	movq	(%r12), %rax
	movq	%rax, 56(%r15)
LBB0_6:
	leaq	52(%r15), %rax
	movq	%rax, -224(%rbp)                ## 8-byte Spill
	leaq	48(%r15), %rax
	movq	%rax, -200(%rbp)                ## 8-byte Spill
	leaq	44(%r15), %rax
	movq	%rax, -216(%rbp)                ## 8-byte Spill
	leaq	40(%r15), %rax
	movq	%rax, -208(%rbp)                ## 8-byte Spill
	movq	_SECBUFFER_TOKEN@GOTPCREL(%rip), %r13
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	leaq	L_.str.2(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movl	$1, %r14d
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	8(%r15), %rcx
	subq	%rax, %rcx
	movq	_SCHANNEL_FREE_BUFFER_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	cmpq	%rsi, %rcx
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	addq	%rax, %rsi
	movq	%rsi, 8(%r15)
	movq	-192(%rbp), %rdi                ## 8-byte Reload
	callq	_av_reallocp
	testl	%eax, %eax
	js	LBB0_49
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	32(%r15), %edi
	movq	(%r15), %rax
	leaq	(,%rax,4), %rsi
	addq	24(%r15), %rsi
	movl	8(%r15), %edx
	subl	%eax, %edx
	callq	_ffurl_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_46
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %edi
	addq	(%r15), %rdi
	movq	%rdi, (%r15)
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r15), %rdi
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r13), %rbx
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_av_malloc
	movl	(%r15), %ecx
	leaq	-176(%rbp), %r14
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_init_sec_buffer
	movq	_SECBUFFER_EMPTY@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	leaq	-152(%rbp), %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_init_sec_buffer
	leaq	-228(%rbp), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$2, %edx
	callq	_init_sec_buffer_desc
	movq	-160(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_45
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	24(%r15), %rsi
	movl	(%r15), %edx
	callq	_memcpy
	movq	(%r13), %rsi
	leaq	-128(%rbp), %r14
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_init_sec_buffer
	movq	_SECBUFFER_ALERT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-104(%rbp), %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_init_sec_buffer
	movq	(%rbx), %rsi
	leaq	-80(%rbp), %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_init_sec_buffer
	leaq	-232(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$3, %edx
	callq	_init_sec_buffer_desc
	movl	16(%r15), %ecx
	movl	36(%r15), %edx
	movq	-224(%rbp), %rdi                ## 8-byte Reload
	movq	-200(%rbp), %rsi                ## 8-byte Reload
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	-208(%rbp)                      ## 8-byte Folded Reload
	pushq	-216(%rbp)                      ## 8-byte Folded Reload
	pushq	%rbx
	pushq	$0
	pushq	$0
	pushq	%r12
	callq	_InitializeSecurityContext
	addq	$48, %rsp
	movq	%rax, %rbx
	leaq	-160(%rbp), %rdi
	callq	_av_freep
	movq	_SEC_E_INCOMPLETE_MESSAGE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_7
## %bb.16:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_SEC_I_INCOMPLETE_CREDENTIALS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_ISC_REQ_USE_SUPPLIED_CREDS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r15)
	je	LBB0_44
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_SEC_I_CONTINUE_NEEDED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_SEC_E_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_50
LBB0_20:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-128(%rbp), %rax
	cmpq	(%r13), %rax
	jne	LBB0_24
## %bb.21:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	-120(%rbp), %edx
	testl	%edx, %edx
	jle	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	32(%r15), %edi
	movq	-112(%rbp), %rsi
	callq	_ffurl_write
	testl	%eax, %eax
	js	LBB0_52
## %bb.23:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	-120(%rbp), %eax
	jne	LBB0_52
LBB0_24:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-112(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_8 Depth=1
	callq	_FreeContextBuffer
	movq	$0, -112(%rbp)
LBB0_26:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-104(%rbp), %rax
	cmpq	(%r13), %rax
	jne	LBB0_30
## %bb.27:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	-96(%rbp), %edx
	testl	%edx, %edx
	jle	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	32(%r15), %edi
	movq	-88(%rbp), %rsi
	callq	_ffurl_write
	testl	%eax, %eax
	js	LBB0_52
## %bb.29:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	-96(%rbp), %eax
	jne	LBB0_52
LBB0_30:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-88(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_8 Depth=1
	callq	_FreeContextBuffer
	movq	$0, -88(%rbp)
LBB0_32:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-80(%rbp), %rax
	cmpq	(%r13), %rax
	jne	LBB0_36
## %bb.33:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	-72(%rbp), %edx
	testl	%edx, %edx
	jle	LBB0_36
## %bb.34:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	32(%r15), %edi
	movq	-64(%rbp), %rsi
	callq	_ffurl_write
	testl	%eax, %eax
	js	LBB0_52
## %bb.35:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	-72(%rbp), %eax
	jne	LBB0_52
LBB0_36:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_38
## %bb.37:                              ##   in Loop: Header=BB0_8 Depth=1
	callq	_FreeContextBuffer
	movq	$0, -64(%rbp)
LBB0_38:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-152(%rbp), %rax
	movq	_SECBUFFER_EXTRA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_42
## %bb.39:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	-144(%rbp), %edx
	testl	%edx, %edx
	jle	LBB0_42
## %bb.40:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r15), %rax
	cmpq	%rdx, %rax
	jle	LBB0_43
## %bb.41:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	24(%r15), %rdi
	leaq	(%rdi,%rax,4), %rsi
	movq	%rdx, %rax
	shlq	$2, %rax
	subq	%rax, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memmove
	movslq	-144(%rbp), %rax
	movq	%rax, (%r15)
	xorl	%r14d, %r14d
	movq	_SEC_I_CONTINUE_NEEDED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_8
	jmp	LBB0_43
LBB0_42:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	$0, (%r15)
LBB0_43:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, %r14d
	movq	_SEC_I_CONTINUE_NEEDED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_8
	jmp	LBB0_54
LBB0_44:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	leaq	L_.str.3(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	_ISC_REQ_USE_SUPPLIED_CREDS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r15)
	jmp	LBB0_8
LBB0_48:
	movl	%eax, %ebx
	jmp	LBB0_57
LBB0_45:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_53
LBB0_46:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_57
LBB0_49:
	movl	%eax, %ebx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r15)
	jmp	LBB0_57
LBB0_50:
	movq	_SEC_E_WRONG_PRINCIPAL@GOTPCREL(%rip), %rax
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	cmpq	(%rax), %rbx
	jne	LBB0_55
## %bb.51:
	leaq	L_.str.5(%rip), %rdx
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_56
LBB0_52:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_53:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_57
LBB0_54:
	xorl	%ebx, %ebx
	jmp	LBB0_63
LBB0_55:
	leaq	L_.str.6(%rip), %rdx
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_av_log
LBB0_56:
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_57:
	movq	-112(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_59
## %bb.58:
	callq	_FreeContextBuffer
	movq	$0, -112(%rbp)
LBB0_59:
	movq	-88(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_61
## %bb.60:
	callq	_FreeContextBuffer
	movq	$0, -88(%rbp)
LBB0_61:
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_63
## %bb.62:
	callq	_FreeContextBuffer
LBB0_63:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_65
## %bb.64:
	movl	%ebx, %eax
	addq	$200, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_65:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SCHANNEL_INITIAL_BUFFER_SIZE,8,3 ## @SCHANNEL_INITIAL_BUFFER_SIZE
	.comm	_SCHANNEL_FREE_BUFFER_SIZE,8,3  ## @SCHANNEL_FREE_BUFFER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read handshake response\n"

	.comm	_SECBUFFER_TOKEN,8,3            ## @SECBUFFER_TOKEN
	.comm	_SECBUFFER_EMPTY,8,3            ## @SECBUFFER_EMPTY
L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate input buffer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SECBUFFER_ALERT,8,3            ## @SECBUFFER_ALERT
	.comm	_SEC_E_INCOMPLETE_MESSAGE,8,3   ## @SEC_E_INCOMPLETE_MESSAGE
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.2:                               ## @.str.2
	.asciz	"Received incomplete handshake, need more data\n"

	.comm	_SEC_I_INCOMPLETE_CREDENTIALS,8,3 ## @SEC_I_INCOMPLETE_CREDENTIALS
	.comm	_ISC_REQ_USE_SUPPLIED_CREDS,4,2 ## @ISC_REQ_USE_SUPPLIED_CREDS
	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
L_.str.3:                               ## @.str.3
	.asciz	"Client certificate has been requested, ignoring\n"

	.comm	_SEC_I_CONTINUE_NEEDED,8,3      ## @SEC_I_CONTINUE_NEEDED
	.comm	_SEC_E_OK,8,3                   ## @SEC_E_OK
L_.str.4:                               ## @.str.4
	.asciz	"Failed to send handshake data\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_SEC_E_WRONG_PRINCIPAL,8,3      ## @SEC_E_WRONG_PRINCIPAL
L_.str.5:                               ## @.str.5
	.asciz	"SNI or certificate check failed\n"

L_.str.6:                               ## @.str.6
	.asciz	"Creating security context failed (0x%lx)\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.comm	_SECBUFFER_EXTRA,8,3            ## @SECBUFFER_EXTRA
	.no_dead_strip	_tls_client_handshake_loop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_client_handshake_loop
_tls_client_handshake_loop:             ; @tls_client_handshake_loop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #320
	.cfi_def_cfa_offset 320
	stp	x28, x27, [sp, #224]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #240]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #256]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #272]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #288]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #304]            ; 16-byte Folded Spill
	add	x29, sp, #304
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x27, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldr	x20, [x0]
	str	xzr, [sp, #192]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #160]
	stp	q0, q0, [sp, #128]
	mov	x9, x20
	ldr	x8, [x9, #24]!
	stp	x9, x0, [sp, #40]               ; 16-byte Folded Spill
	cbnz	x8, LBB0_3
; %bb.1:
	str	xzr, [x20]
Lloh3:
	adrp	x19, _SCHANNEL_INITIAL_BUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x19, [x19, _SCHANNEL_INITIAL_BUFFER_SIZE@GOTPAGEOFF]
	ldr	x1, [x19]
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	bl	_av_reallocp
	tbnz	w0, #31, LBB0_52
; %bb.2:
	ldr	x8, [x19]
	str	x8, [x20, #8]
LBB0_3:
	mov	x0, x20
	ldr	x8, [x0, #64]!
	cbnz	x8, LBB0_6
; %bb.4:
	str	xzr, [x20, #72]
Lloh5:
	adrp	x19, _SCHANNEL_INITIAL_BUFFER_SIZE@GOTPAGE
Lloh6:
	ldr	x19, [x19, _SCHANNEL_INITIAL_BUFFER_SIZE@GOTPAGEOFF]
	ldr	x1, [x19]
	bl	_av_reallocp
	tbnz	w0, #31, LBB0_52
; %bb.5:
	ldr	x8, [x19]
	str	x8, [x20, #56]
LBB0_6:
	add	x8, sp, #80
	add	x21, x8, #24
	add	x10, x8, #16
	add	x8, sp, #128
	add	x9, x8, #24
	stp	x9, x10, [sp, #56]              ; 16-byte Folded Spill
Lloh7:
	adrp	x19, _SECBUFFER_TOKEN@GOTPAGE
Lloh8:
	ldr	x19, [x19, _SECBUFFER_TOKEN@GOTPAGEOFF]
	add	x24, x8, #48
	add	x25, x20, #52
	add	x26, x20, #48
	add	x22, x20, #44
	add	x23, x20, #40
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
Lloh9:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x0, [sp, #48]                   ; 8-byte Folded Reload
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_av_log
	mov	w27, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x10, [x20]
Lloh14:
	adrp	x9, _SCHANNEL_FREE_BUFFER_SIZE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SCHANNEL_FREE_BUFFER_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	sub	x10, x10, x8
	cmp	x10, x9
	b.ge	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x1, x9, x8
	str	x1, [x20, #8]
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	bl	_av_reallocp
	tbnz	w0, #31, LBB0_47
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	cbz	w27, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x20, #32]
	ldr	x8, [x20, #24]
	ldr	x9, [x20]
	add	x1, x8, x9, lsl #2
	ldr	w8, [x20, #8]
	sub	w2, w8, w9
	bl	_ffurl_read
	mov	x28, x0
	tbnz	w0, #31, LBB0_46
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x20]
	add	x0, x8, w28, uxtw
	str	x0, [x20]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [x20]
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x27, [x19]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_av_malloc
	mov	x2, x0
	ldr	w3, [x20]
	add	x0, sp, #80
	mov	x1, x27
	bl	_init_sec_buffer
Lloh17:
	adrp	x27, _SECBUFFER_EMPTY@GOTPAGE
Lloh18:
	ldr	x27, [x27, _SECBUFFER_EMPTY@GOTPAGEOFF]
	ldr	x1, [x27]
	mov	x0, x21
	mov	x2, #0
	mov	w3, #0
	bl	_init_sec_buffer
	add	x0, sp, #72
	add	x1, sp, #80
	mov	w2, #2
	bl	_init_sec_buffer_desc
	ldr	x0, [sp, #96]
	cbz	x0, LBB0_45
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x1, [x20, #24]
	ldr	w2, [x20]
	bl	_memcpy
	ldr	x1, [x19]
	add	x0, sp, #128
	mov	x2, #0
	mov	w3, #0
	bl	_init_sec_buffer
Lloh19:
	adrp	x8, _SECBUFFER_ALERT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SECBUFFER_ALERT@GOTPAGEOFF]
Lloh21:
	ldr	x1, [x8]
	ldr	x0, [sp, #56]                   ; 8-byte Folded Reload
	mov	x2, #0
	mov	w3, #0
	bl	_init_sec_buffer
	ldr	x1, [x27]
	mov	x0, x24
	mov	x2, #0
	mov	w3, #0
	bl	_init_sec_buffer
	add	x0, sp, #76
	add	x1, sp, #128
	mov	w2, #3
	bl	_init_sec_buffer_desc
	ldr	w2, [x20, #36]
	ldr	w3, [x20, #16]
	stp	x22, x23, [sp, #16]
	add	x6, sp, #72
	add	x8, sp, #76
	stp	xzr, x8, [sp]
	mov	x0, x25
	mov	x1, x26
	mov	w4, #0
	mov	w5, #0
	mov	w7, #0
	bl	_InitializeSecurityContext
	mov	x28, x0
	ldr	x0, [sp, #64]                   ; 8-byte Folded Reload
	bl	_av_freep
Lloh22:
	adrp	x8, _SEC_E_INCOMPLETE_MESSAGE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SEC_E_INCOMPLETE_MESSAGE@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cmp	x28, x8
	b.eq	LBB0_7
; %bb.16:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh25:
	adrp	x8, _SEC_I_INCOMPLETE_CREDENTIALS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SEC_I_INCOMPLETE_CREDENTIALS@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cmp	x28, x8
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x20, #16]
Lloh28:
	adrp	x9, _ISC_REQ_USE_SUPPLIED_CREDS@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ISC_REQ_USE_SUPPLIED_CREDS@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_44
LBB0_18:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh31:
	adrp	x8, _SEC_I_CONTINUE_NEEDED@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SEC_I_CONTINUE_NEEDED@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	cmp	x28, x8
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh34:
	adrp	x8, _SEC_E_OK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SEC_E_OK@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	cmp	x28, x8
	b.ne	LBB0_48
LBB0_20:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #128]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w2, [sp, #136]
	cmp	w2, #1
	b.lt	LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x20, #32]
	ldr	x1, [sp, #144]
	bl	_ffurl_write
	tbnz	w0, #31, LBB0_50
; %bb.23:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp, #136]
	cmp	w0, w8
	b.ne	LBB0_50
LBB0_24:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [sp, #144]
	cbz	x0, LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_8 Depth=1
	bl	_FreeContextBuffer
	str	xzr, [sp, #144]
LBB0_26:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #152]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_30
; %bb.27:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w2, [sp, #160]
	cmp	w2, #1
	b.lt	LBB0_30
; %bb.28:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x20, #32]
	ldr	x1, [sp, #168]
	bl	_ffurl_write
	tbnz	w0, #31, LBB0_50
; %bb.29:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp, #160]
	cmp	w0, w8
	b.ne	LBB0_50
LBB0_30:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [sp, #168]
	cbz	x0, LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_8 Depth=1
	bl	_FreeContextBuffer
	str	xzr, [sp, #168]
LBB0_32:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #176]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_36
; %bb.33:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w2, [sp, #184]
	cmp	w2, #1
	b.lt	LBB0_36
; %bb.34:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x20, #32]
	ldr	x1, [sp, #192]
	bl	_ffurl_write
	tbnz	w0, #31, LBB0_50
; %bb.35:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp, #184]
	cmp	w0, w8
	b.ne	LBB0_50
LBB0_36:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [sp, #192]
	cbz	x0, LBB0_38
; %bb.37:                               ;   in Loop: Header=BB0_8 Depth=1
	bl	_FreeContextBuffer
	str	xzr, [sp, #192]
LBB0_38:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #104]
Lloh37:
	adrp	x9, _SECBUFFER_EXTRA@GOTPAGE
Lloh38:
	ldr	x9, [x9, _SECBUFFER_EXTRA@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_42
; %bb.39:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w2, [sp, #112]
	cmp	w2, #0
	b.le	LBB0_42
; %bb.40:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x20]
	cmp	x8, x2
	b.le	LBB0_43
; %bb.41:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [x20, #24]
	add	x8, x0, x8, lsl #2
	sub	x1, x8, x2, lsl #2
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memmove
	mov	w27, #0
	ldrsw	x8, [sp, #112]
	str	x8, [x20]
Lloh40:
	adrp	x8, _SEC_I_CONTINUE_NEEDED@GOTPAGE
Lloh41:
	ldr	x8, [x8, _SEC_I_CONTINUE_NEEDED@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	cmp	x28, x8
	b.eq	LBB0_8
	b	LBB0_43
LBB0_42:                                ;   in Loop: Header=BB0_8 Depth=1
	str	xzr, [x20]
LBB0_43:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh43:
	adrp	x8, _SEC_I_CONTINUE_NEEDED@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SEC_I_CONTINUE_NEEDED@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	mov	w27, #1
	cmp	x28, x8
	b.eq	LBB0_8
	b	LBB0_60
LBB0_44:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh46:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh47:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	ldr	x0, [sp, #48]                   ; 8-byte Folded Reload
Lloh49:
	adrp	x2, l_.str.3@PAGE
Lloh50:
	add	x2, x2, l_.str.3@PAGEOFF
	bl	_av_log
	mov	w27, #0
Lloh51:
	adrp	x8, _ISC_REQ_USE_SUPPLIED_CREDS@GOTPAGE
Lloh52:
	ldr	x8, [x8, _ISC_REQ_USE_SUPPLIED_CREDS@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	orr	w8, w9, w8
	str	w8, [x20, #16]
	b	LBB0_8
LBB0_45:
Lloh54:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh55:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
Lloh57:
	adrp	x2, l_.str.1@PAGE
Lloh58:
	add	x2, x2, l_.str.1@PAGEOFF
	ldr	x0, [sp, #48]                   ; 8-byte Folded Reload
	bl	_av_log
Lloh59:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh60:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_51
LBB0_46:
Lloh61:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh62:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh63:
	ldr	w1, [x8]
Lloh64:
	adrp	x2, l_.str@PAGE
Lloh65:
	add	x2, x2, l_.str@PAGEOFF
	ldr	x0, [sp, #48]                   ; 8-byte Folded Reload
	bl	_av_log
	ldr	x0, [sp, #144]
	cbnz	x0, LBB0_53
	b	LBB0_54
LBB0_47:
	mov	x28, x0
	stp	xzr, xzr, [x20]
	ldr	x0, [sp, #144]
	cbnz	x0, LBB0_53
	b	LBB0_54
LBB0_48:
Lloh66:
	adrp	x8, _SEC_E_WRONG_PRINCIPAL@GOTPAGE
Lloh67:
	ldr	x8, [x8, _SEC_E_WRONG_PRINCIPAL@GOTPAGEOFF]
Lloh68:
	ldr	x8, [x8]
Lloh69:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh70:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh71:
	ldr	w1, [x9]
	cmp	x28, x8
	b.ne	LBB0_61
; %bb.49:
Lloh72:
	adrp	x2, l_.str.5@PAGE
Lloh73:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_62
LBB0_50:
Lloh74:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh75:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh76:
	ldr	w1, [x8]
Lloh77:
	adrp	x2, l_.str.4@PAGE
Lloh78:
	add	x2, x2, l_.str.4@PAGEOFF
	ldr	x0, [sp, #48]                   ; 8-byte Folded Reload
	bl	_av_log
Lloh79:
	adrp	x8, _EIO@GOTPAGE
Lloh80:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_51:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_52:
	mov	x28, x0
	ldr	x0, [sp, #144]
	cbz	x0, LBB0_54
LBB0_53:
	bl	_FreeContextBuffer
	str	xzr, [sp, #144]
LBB0_54:
	ldr	x0, [sp, #168]
	cbz	x0, LBB0_56
; %bb.55:
	bl	_FreeContextBuffer
	str	xzr, [sp, #168]
LBB0_56:
	ldr	x0, [sp, #192]
	cbz	x0, LBB0_58
; %bb.57:
	bl	_FreeContextBuffer
LBB0_58:
	ldur	x8, [x29, #-96]
Lloh81:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh82:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh83:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_63
; %bb.59:
	mov	x0, x28
	ldp	x29, x30, [sp, #304]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #288]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #272]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #256]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #240]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #224]            ; 16-byte Folded Reload
	add	sp, sp, #320
	ret
LBB0_60:
	mov	w28, #0
	b	LBB0_58
LBB0_61:
	str	x28, [sp]
Lloh84:
	adrp	x2, l_.str.6@PAGE
Lloh85:
	add	x2, x2, l_.str.6@PAGEOFF
LBB0_62:
	ldr	x0, [sp, #48]                   ; 8-byte Folded Reload
	bl	_av_log
Lloh86:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh87:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh88:
	ldr	w28, [x8]
	ldr	x0, [sp, #144]
	cbnz	x0, LBB0_53
	b	LBB0_54
LBB0_63:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpLdrGot	Lloh79, Lloh80
	.loh AdrpAdd	Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpAdd	Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.cfi_endproc
                                        ; -- End function
	.comm	_SCHANNEL_INITIAL_BUFFER_SIZE,8,3 ; @SCHANNEL_INITIAL_BUFFER_SIZE
	.comm	_SCHANNEL_FREE_BUFFER_SIZE,8,3  ; @SCHANNEL_FREE_BUFFER_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read handshake response\n"

	.comm	_SECBUFFER_TOKEN,8,3            ; @SECBUFFER_TOKEN
	.comm	_SECBUFFER_EMPTY,8,3            ; @SECBUFFER_EMPTY
l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate input buffer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SECBUFFER_ALERT,8,3            ; @SECBUFFER_ALERT
	.comm	_SEC_E_INCOMPLETE_MESSAGE,8,3   ; @SEC_E_INCOMPLETE_MESSAGE
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.2:                               ; @.str.2
	.asciz	"Received incomplete handshake, need more data\n"

	.comm	_SEC_I_INCOMPLETE_CREDENTIALS,8,3 ; @SEC_I_INCOMPLETE_CREDENTIALS
	.comm	_ISC_REQ_USE_SUPPLIED_CREDS,4,2 ; @ISC_REQ_USE_SUPPLIED_CREDS
	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
l_.str.3:                               ; @.str.3
	.asciz	"Client certificate has been requested, ignoring\n"

	.comm	_SEC_I_CONTINUE_NEEDED,8,3      ; @SEC_I_CONTINUE_NEEDED
	.comm	_SEC_E_OK,8,3                   ; @SEC_E_OK
l_.str.4:                               ; @.str.4
	.asciz	"Failed to send handshake data\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_SEC_E_WRONG_PRINCIPAL,8,3      ; @SEC_E_WRONG_PRINCIPAL
l_.str.5:                               ; @.str.5
	.asciz	"SNI or certificate check failed\n"

l_.str.6:                               ; @.str.6
	.asciz	"Creating security context failed (0x%lx)\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.comm	_SECBUFFER_EXTRA,8,3            ; @SECBUFFER_EXTRA
	.no_dead_strip	_tls_client_handshake_loop
.subsections_via_symbols
