	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl_socket_connect             ## -- Begin function ssl_socket_connect
	.p2align	4, 0x90
_ssl_socket_connect:                    ## @ssl_socket_connect
	.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	$520, %rsp                      ## imm = 0x208
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %edi
	callq	_socket_connect
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	leaq	12(%rbx), %r15
	movq	_MBEDTLS_SSL_IS_CLIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MBEDTLS_SSL_TRANSPORT_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MBEDTLS_SSL_PRESET_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_mbedtls_ssl_config_defaults
	testq	%rax, %rax
	jne	LBB0_10
## %bb.2:
	movq	_MBEDTLS_SSL_VERIFY_OPTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_mbedtls_ssl_conf_authmode
	leaq	20(%rbx), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_mbedtls_ssl_conf_ca_chain
	movq	_mbedtls_ctr_drbg_random@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	16(%rbx), %rdx
	movq	%r15, %rdi
	callq	_mbedtls_ssl_conf_rng
	movq	_ssl_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_mbedtls_ssl_conf_dbg
	leaq	4(%rbx), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_mbedtls_ssl_setup
	testq	%rax, %rax
	jne	LBB0_10
## %bb.3:
	movq	_mbedtls_net_send@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_mbedtls_net_recv@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%r8d, %r8d
	callq	_mbedtls_ssl_set_bio
	movq	_MBEDTLS_ERR_SSL_WANT_READ@GOTPCREL(%rip), %r15
	movq	_MBEDTLS_ERR_SSL_WANT_WRITE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_mbedtls_ssl_handshake
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	(%r15), %eax
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	(%r13), %eax
	je	LBB0_4
	jmp	LBB0_10
LBB0_7:
	movq	%r12, %rdi
	callq	_mbedtls_ssl_get_verify_result
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rdx
	leaq	-560(%rbp), %rdi
	movl	$512, %esi                      ## imm = 0x200
	movl	%eax, %ecx
	callq	_mbedtls_x509_crt_verify_info
LBB0_9:
	movl	(%rbx), %r14d
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r14d, %eax
	addq	$520, %rsp                      ## imm = 0x208
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_SSL_IS_CLIENT,4,2      ## @MBEDTLS_SSL_IS_CLIENT
	.comm	_MBEDTLS_SSL_TRANSPORT_STREAM,4,2 ## @MBEDTLS_SSL_TRANSPORT_STREAM
	.comm	_MBEDTLS_SSL_PRESET_DEFAULT,4,2 ## @MBEDTLS_SSL_PRESET_DEFAULT
	.comm	_MBEDTLS_SSL_VERIFY_OPTIONAL,4,2 ## @MBEDTLS_SSL_VERIFY_OPTIONAL
	.comm	_mbedtls_ctr_drbg_random,4,2    ## @mbedtls_ctr_drbg_random
	.comm	_ssl_debug,4,2                  ## @ssl_debug
	.comm	_stderr,4,2                     ## @stderr
	.comm	_mbedtls_net_send,4,2           ## @mbedtls_net_send
	.comm	_mbedtls_net_recv,4,2           ## @mbedtls_net_recv
	.comm	_MBEDTLS_ERR_SSL_WANT_READ,4,2  ## @MBEDTLS_ERR_SSL_WANT_READ
	.comm	_MBEDTLS_ERR_SSL_WANT_WRITE,4,2 ## @MBEDTLS_ERR_SSL_WANT_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"  ! "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl_socket_connect             ; -- Begin function ssl_socket_connect
	.p2align	2
_ssl_socket_connect:                    ; @ssl_socket_connect
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #528
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	w0, [x0]
	bl	_socket_connect
	cbnz	x0, LBB0_3
; %bb.1:
	add	x20, x19, #12
Lloh3:
	adrp	x8, _MBEDTLS_SSL_IS_CLIENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_SSL_IS_CLIENT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _MBEDTLS_SSL_TRANSPORT_STREAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MBEDTLS_SSL_TRANSPORT_STREAM@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _MBEDTLS_SSL_PRESET_DEFAULT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MBEDTLS_SSL_PRESET_DEFAULT@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_mbedtls_ssl_config_defaults
	cbnz	x0, LBB0_3
; %bb.2:
Lloh12:
	adrp	x8, _MBEDTLS_SSL_VERIFY_OPTIONAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBEDTLS_SSL_VERIFY_OPTIONAL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mbedtls_ssl_conf_authmode
	add	x1, x19, #20
	mov	x0, x20
	mov	x2, #0
	bl	_mbedtls_ssl_conf_ca_chain
Lloh15:
	adrp	x8, _mbedtls_ctr_drbg_random@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mbedtls_ctr_drbg_random@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, x19, #16
	mov	x0, x20
	bl	_mbedtls_ssl_conf_rng
Lloh18:
	adrp	x8, _ssl_debug@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ssl_debug@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_mbedtls_ssl_conf_dbg
	add	x21, x19, #4
	mov	x0, x21
	mov	x1, x20
	bl	_mbedtls_ssl_setup
	cbz	x0, LBB0_6
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldur	x8, [x29, #-56]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.5:
	add	sp, sp, #528
	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
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh27:
	adrp	x8, _mbedtls_net_send@GOTPAGE
Lloh28:
	ldr	x8, [x8, _mbedtls_net_send@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
Lloh30:
	adrp	x8, _mbedtls_net_recv@GOTPAGE
Lloh31:
	ldr	x8, [x8, _mbedtls_net_recv@GOTPAGEOFF]
Lloh32:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x19
	mov	x4, #0
	bl	_mbedtls_ssl_set_bio
Lloh33:
	adrp	x20, _MBEDTLS_ERR_SSL_WANT_READ@GOTPAGE
Lloh34:
	ldr	x20, [x20, _MBEDTLS_ERR_SSL_WANT_READ@GOTPAGEOFF]
Lloh35:
	adrp	x22, _MBEDTLS_ERR_SSL_WANT_WRITE@GOTPAGE
Lloh36:
	ldr	x22, [x22, _MBEDTLS_ERR_SSL_WANT_WRITE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_mbedtls_ssl_handshake
	cbz	w0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x8, x0
	ldr	w9, [x20]
	ldr	w10, [x22]
	mov	w0, #-1
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.eq	LBB0_7
	b	LBB0_4
LBB0_9:
	mov	x0, x21
	bl	_mbedtls_ssl_get_verify_result
	cbz	w0, LBB0_11
; %bb.10:
	mov	x3, x0
Lloh37:
	adrp	x2, l_.str@PAGE
Lloh38:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w1, #512
	bl	_mbedtls_x509_crt_verify_info
LBB0_11:
	ldr	w0, [x19]
	b	LBB0_4
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_SSL_IS_CLIENT,4,2      ; @MBEDTLS_SSL_IS_CLIENT
	.comm	_MBEDTLS_SSL_TRANSPORT_STREAM,4,2 ; @MBEDTLS_SSL_TRANSPORT_STREAM
	.comm	_MBEDTLS_SSL_PRESET_DEFAULT,4,2 ; @MBEDTLS_SSL_PRESET_DEFAULT
	.comm	_MBEDTLS_SSL_VERIFY_OPTIONAL,4,2 ; @MBEDTLS_SSL_VERIFY_OPTIONAL
	.comm	_mbedtls_ctr_drbg_random,4,2    ; @mbedtls_ctr_drbg_random
	.comm	_ssl_debug,4,2                  ; @ssl_debug
	.comm	_stderr,4,2                     ; @stderr
	.comm	_mbedtls_net_send,4,2           ; @mbedtls_net_send
	.comm	_mbedtls_net_recv,4,2           ; @mbedtls_net_recv
	.comm	_MBEDTLS_ERR_SSL_WANT_READ,4,2  ; @MBEDTLS_ERR_SSL_WANT_READ
	.comm	_MBEDTLS_ERR_SSL_WANT_WRITE,4,2 ; @MBEDTLS_ERR_SSL_WANT_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"  ! "

.subsections_via_symbols
