	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TLS_initiate
_TLS_initiate:                          ## @TLS_initiate
	.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
	movl	%esi, %r14d
	callq	_SSL_new
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_SSL_set_connect_state
	movq	_SSL_MODE_AUTO_RETRY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_SSL_set_mode
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_SSL_set_fd
	testl	%eax, %eax
	je	LBB0_10
## %bb.2:
	movq	_SSL_ERROR_WANT_READ@GOTPCREL(%rip), %r14
	movq	_SSL_ERROR_WANT_WRITE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_ERR_clear_error
	movq	%rbx, %rdi
	callq	_SSL_do_handshake
	movq	%rbx, %rdi
	cmpl	$1, %eax
	je	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %esi
	callq	_SSL_get_error
	cmpl	(%r14), %eax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	(%r15), %eax
	je	LBB0_3
## %bb.6:
	movq	_verb@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.7:
	leaq	L_str.6(%rip), %rdi
	jmp	LBB0_17
LBB0_8:
	movq	_verb@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_19
## %bb.9:
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_19
LBB0_10:
	movq	_verb@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.11:
	leaq	L_str.5(%rip), %rdi
	jmp	LBB0_17
LBB0_12:
	callq	_SSL_get_peer_certificate
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	%rax, %r14
	leaq	L_.str.4(%rip), %rdi
	movq	%rax, %rsi
	callq	_verb_cert
	movq	%r14, %rdi
	callq	_X509_free
	jmp	LBB0_20
LBB0_15:
	movq	_verb@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.16:
	leaq	L_str.7(%rip), %rdi
LBB0_17:
	callq	_puts
LBB0_18:
	movq	%rbx, %rdi
	callq	_SSL_free
LBB0_19:
	xorl	%ebx, %ebx
LBB0_20:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verb,8,3                       ## @verb
	.comm	_SSL_MODE_AUTO_RETRY,4,2        ## @SSL_MODE_AUTO_RETRY
	.comm	_SSL_ERROR_WANT_READ,4,2        ## @SSL_ERROR_WANT_READ
	.comm	_SSL_ERROR_WANT_WRITE,4,2       ## @SSL_ERROR_WANT_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str.4:                               ## @.str.4
	.asciz	"server SSL certificate"

L_str:                                  ## @str
	.asciz	"SSL_new error"

L_str.5:                                ## @str.5
	.asciz	"SSL_set_fd error"

L_str.6:                                ## @str.6
	.asciz	"SSL handshake failed"

L_str.7:                                ## @str.7
	.asciz	"Server presented no peer certificate"

	.no_dead_strip	_TLS_initiate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TLS_initiate
_TLS_initiate:                          ; @TLS_initiate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_SSL_new
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	bl	_SSL_set_connect_state
Lloh0:
	adrp	x8, _SSL_MODE_AUTO_RETRY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSL_MODE_AUTO_RETRY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_SSL_set_mode
	mov	x0, x19
	mov	x1, x20
	bl	_SSL_set_fd
	cbz	w0, LBB0_9
; %bb.2:
Lloh3:
	adrp	x20, _SSL_ERROR_WANT_READ@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SSL_ERROR_WANT_READ@GOTPAGEOFF]
Lloh5:
	adrp	x21, _SSL_ERROR_WANT_WRITE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _SSL_ERROR_WANT_WRITE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	bl	_ERR_clear_error
	mov	x0, x19
	bl	_SSL_do_handshake
	cmp	w0, #1
	b.eq	LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x0
	mov	x0, x19
	bl	_SSL_get_error
	ldr	w8, [x20]
	ldr	w9, [x21]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	b.eq	LBB0_3
; %bb.5:
Lloh7:
	adrp	x8, _verb@GOTPAGE
Lloh8:
	ldr	x8, [x8, _verb@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.6:
Lloh10:
	adrp	x0, l_str.6@PAGE
Lloh11:
	add	x0, x0, l_str.6@PAGEOFF
	b	LBB0_15
LBB0_7:
Lloh12:
	adrp	x8, _verb@GOTPAGE
Lloh13:
	ldr	x8, [x8, _verb@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.8:
Lloh15:
	adrp	x0, l_str@PAGE
Lloh16:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	b	LBB0_17
LBB0_9:
Lloh17:
	adrp	x8, _verb@GOTPAGE
Lloh18:
	ldr	x8, [x8, _verb@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.10:
Lloh20:
	adrp	x0, l_str.5@PAGE
Lloh21:
	add	x0, x0, l_str.5@PAGEOFF
	b	LBB0_15
LBB0_11:
	mov	x0, x19
	bl	_SSL_get_peer_certificate
	cbz	x0, LBB0_13
; %bb.12:
	mov	x20, x0
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	bl	_verb_cert
	mov	x0, x20
	bl	_X509_free
	b	LBB0_18
LBB0_13:
Lloh24:
	adrp	x8, _verb@GOTPAGE
Lloh25:
	ldr	x8, [x8, _verb@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.14:
Lloh27:
	adrp	x0, l_str.7@PAGE
Lloh28:
	add	x0, x0, l_str.7@PAGEOFF
LBB0_15:
	bl	_puts
LBB0_16:
	mov	x0, x19
	bl	_SSL_free
LBB0_17:
	mov	x19, #0
LBB0_18:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_verb,8,3                       ; @verb
	.comm	_SSL_MODE_AUTO_RETRY,4,2        ; @SSL_MODE_AUTO_RETRY
	.comm	_SSL_ERROR_WANT_READ,4,2        ; @SSL_ERROR_WANT_READ
	.comm	_SSL_ERROR_WANT_WRITE,4,2       ; @SSL_ERROR_WANT_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str.4:                               ; @.str.4
	.asciz	"server SSL certificate"

l_str:                                  ; @str
	.asciz	"SSL_new error"

l_str.5:                                ; @str.5
	.asciz	"SSL_set_fd error"

l_str.6:                                ; @str.6
	.asciz	"SSL handshake failed"

l_str.7:                                ; @str.7
	.asciz	"Server presented no peer certificate"

	.no_dead_strip	_TLS_initiate
.subsections_via_symbols
