	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_ctx
_setup_ctx:                             ## @setup_ctx
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_options_remote_is_address
	testq	%rax, %rax
	je	LBB0_22
## %bb.1:
	cmpq	$0, 16(%rbx)
	je	LBB0_22
## %bb.2:
	movl	8(%rbx), %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_fname_after_chroot
	movq	%rax, %r12
	movl	4(%rbx), %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_fname_after_chroot
	movq	%rax, %r14
	movl	(%rbx), %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_fname_after_chroot
	movq	%rax, %r15
	testq	%r12, %r12
	je	LBB0_5
## %bb.3:
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	testq	%r15, %r15
	jne	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_fatal_exit
LBB0_6:
	xorl	%eax, %eax
	callq	_SSLv23_client_method
	movl	%eax, %edi
	callq	_SSL_CTX_new
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	callq	_ssl_err
LBB0_8:
	movq	_SSL_OP_NO_SSLv2@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_SSL_CTX_set_options
	notl	%eax
	testl	%eax, (%r13)
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	callq	_ssl_err
LBB0_10:
	movq	_SSL_OP_NO_SSLv3@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_SSL_CTX_set_options
	notl	%eax
	testl	%eax, (%r13)
	je	LBB0_12
## %bb.11:
	leaq	L_.str.3(%rip), %rdi
	callq	_ssl_err
LBB0_12:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_SSL_CTX_use_certificate_chain_file
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.4(%rip), %rdi
	movq	%r15, %rsi
	callq	_ssl_path_err
LBB0_14:
	movq	_SSL_FILETYPE_PEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_SSL_CTX_use_PrivateKey_file
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	leaq	L_.str.5(%rip), %rdi
	movq	%r14, %rsi
	callq	_ssl_path_err
LBB0_16:
	movq	%rbx, %rdi
	callq	_SSL_CTX_check_private_key
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	leaq	L_.str.5(%rip), %rdi
	callq	_ssl_err
LBB0_18:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_SSL_CTX_load_verify_locations
	cmpl	$1, %eax
	je	LBB0_20
## %bb.19:
	leaq	L_.str.6(%rip), %rdi
	movq	%r12, %rsi
	callq	_ssl_path_err
LBB0_20:
	movq	_SSL_VERIFY_PEER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_SSL_CTX_set_verify
	movq	%r12, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_free
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_23
LBB0_22:
	xorl	%ebx, %ebx
LBB0_23:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory"

L_.str.1:                               ## @.str.1
	.asciz	"could not allocate SSL_CTX pointer"

	.comm	_SSL_OP_NO_SSLv2,4,2            ## @SSL_OP_NO_SSLv2
L_.str.2:                               ## @.str.2
	.asciz	"could not set SSL_OP_NO_SSLv2"

	.comm	_SSL_OP_NO_SSLv3,4,2            ## @SSL_OP_NO_SSLv3
L_.str.3:                               ## @.str.3
	.asciz	"could not set SSL_OP_NO_SSLv3"

L_.str.4:                               ## @.str.4
	.asciz	"Error setting up SSL_CTX client cert"

	.comm	_SSL_FILETYPE_PEM,4,2           ## @SSL_FILETYPE_PEM
L_.str.5:                               ## @.str.5
	.asciz	"Error setting up SSL_CTX client key"

L_.str.6:                               ## @.str.6
	.asciz	"Error setting up SSL_CTX verify, server cert"

	.comm	_SSL_VERIFY_PEER,4,2            ## @SSL_VERIFY_PEER
	.no_dead_strip	_setup_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_ctx
_setup_ctx:                             ; @setup_ctx
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	bl	_options_remote_is_address
	cbz	x0, LBB0_21
; %bb.1:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_21
; %bb.2:
	ldr	w0, [x21, #8]
	mov	x1, x21
	mov	w2, #1
	bl	_fname_after_chroot
	mov	x19, x0
	ldr	w0, [x21, #4]
	mov	x1, x21
	mov	w2, #1
	bl	_fname_after_chroot
	mov	x20, x0
	ldr	w0, [x21]
	mov	x1, x21
	mov	w2, #1
	bl	_fname_after_chroot
	mov	x21, x0
	cbz	x19, LBB0_5
; %bb.3:
	cbz	x20, LBB0_5
; %bb.4:
	cbnz	x21, LBB0_6
LBB0_5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal_exit
LBB0_6:
	bl	_SSLv23_client_method
	bl	_SSL_CTX_new
	mov	x22, x0
	cbnz	x0, LBB0_8
; %bb.7:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ssl_err
LBB0_8:
Lloh4:
	adrp	x23, _SSL_OP_NO_SSLv2@GOTPAGE
Lloh5:
	ldr	x23, [x23, _SSL_OP_NO_SSLv2@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x22
	bl	_SSL_CTX_set_options
	ldr	w8, [x23]
	bics	wzr, w8, w0
	b.eq	LBB0_10
; %bb.9:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ssl_err
LBB0_10:
Lloh8:
	adrp	x23, _SSL_OP_NO_SSLv3@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SSL_OP_NO_SSLv3@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x22
	bl	_SSL_CTX_set_options
	ldr	w8, [x23]
	bics	wzr, w8, w0
	b.eq	LBB0_12
; %bb.11:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ssl_err
LBB0_12:
	mov	x0, x22
	mov	x1, x21
	bl	_SSL_CTX_use_certificate_chain_file
	cbnz	w0, LBB0_14
; %bb.13:
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x21
	bl	_ssl_path_err
LBB0_14:
Lloh14:
	adrp	x8, _SSL_FILETYPE_PEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SSL_FILETYPE_PEM@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x20
	bl	_SSL_CTX_use_PrivateKey_file
	cbnz	w0, LBB0_16
; %bb.15:
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x20
	bl	_ssl_path_err
LBB0_16:
	mov	x0, x22
	bl	_SSL_CTX_check_private_key
	cbnz	w0, LBB0_18
; %bb.17:
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_ssl_err
LBB0_18:
	mov	x0, x22
	mov	x1, x19
	mov	x2, #0
	bl	_SSL_CTX_load_verify_locations
	cmp	w0, #1
	b.eq	LBB0_20
; %bb.19:
Lloh21:
	adrp	x0, l_.str.6@PAGE
Lloh22:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x19
	bl	_ssl_path_err
LBB0_20:
Lloh23:
	adrp	x8, _SSL_VERIFY_PEER@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SSL_VERIFY_PEER@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, #0
	bl	_SSL_CTX_set_verify
	mov	x0, x19
	bl	_free
	mov	x0, x20
	bl	_free
	mov	x0, x21
	bl	_free
	b	LBB0_22
LBB0_21:
	mov	x22, #0
LBB0_22:
	mov	x0, x22
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory"

l_.str.1:                               ; @.str.1
	.asciz	"could not allocate SSL_CTX pointer"

	.comm	_SSL_OP_NO_SSLv2,4,2            ; @SSL_OP_NO_SSLv2
l_.str.2:                               ; @.str.2
	.asciz	"could not set SSL_OP_NO_SSLv2"

	.comm	_SSL_OP_NO_SSLv3,4,2            ; @SSL_OP_NO_SSLv3
l_.str.3:                               ; @.str.3
	.asciz	"could not set SSL_OP_NO_SSLv3"

l_.str.4:                               ; @.str.4
	.asciz	"Error setting up SSL_CTX client cert"

	.comm	_SSL_FILETYPE_PEM,4,2           ; @SSL_FILETYPE_PEM
l_.str.5:                               ; @.str.5
	.asciz	"Error setting up SSL_CTX client key"

l_.str.6:                               ; @.str.6
	.asciz	"Error setting up SSL_CTX verify, server cert"

	.comm	_SSL_VERIFY_PEER,4,2            ; @SSL_VERIFY_PEER
	.no_dead_strip	_setup_ctx
.subsections_via_symbols
