	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function select_server_ctx
_select_server_ctx:                     ## @select_server_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	_TLSEXT_NAMETYPE_host_name@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SSL_get_servername
	movq	%rax, %rbx
	movq	_ex_data_idx@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_SSL_get_ex_data
	movq	_SSL_TLSEXT_ERR_NOACK@GOTPCREL(%rip), %r12
	movq	_SSL_TEST_SERVERNAME_SERVER1@GOTPCREL(%rip), %r14
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_2
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jne	LBB0_4
## %bb.8:
	movq	_SSL_TLSEXT_ERR_ALERT_FATAL@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_2:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_SSL_set_SSL_CTX
	movq	%r13, %rdi
	movl	$-1, %esi
	callq	_SSL_clear_options
	movq	%r15, %rdi
	callq	_SSL_CTX_get_options
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_SSL_set_options
	movq	_SSL_TLSEXT_ERR_OK@GOTPCREL(%rip), %r12
	movq	_SSL_TEST_SERVERNAME_SERVER2@GOTPCREL(%rip), %r14
	jmp	LBB0_3
LBB0_6:
	movq	_SSL_TLSEXT_ERR_OK@GOTPCREL(%rip), %r12
LBB0_3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_4:
	movq	(%r14), %rcx
	movq	%rcx, (%rax)
LBB0_9:
	movl	(%r12), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TLSEXT_NAMETYPE_host_name,4,2  ## @TLSEXT_NAMETYPE_host_name
	.comm	_ex_data_idx,4,2                ## @ex_data_idx
	.comm	_SSL_TEST_SERVERNAME_SERVER1,8,3 ## @SSL_TEST_SERVERNAME_SERVER1
	.comm	_SSL_TLSEXT_ERR_NOACK,4,2       ## @SSL_TLSEXT_ERR_NOACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"server2"

	.comm	_SSL_TEST_SERVERNAME_SERVER2,8,3 ## @SSL_TEST_SERVERNAME_SERVER2
	.comm	_SSL_TLSEXT_ERR_OK,4,2          ## @SSL_TLSEXT_ERR_OK
L_.str.1:                               ## @.str.1
	.asciz	"server1"

	.comm	_SSL_TLSEXT_ERR_ALERT_FATAL,4,2 ## @SSL_TLSEXT_ERR_ALERT_FATAL
	.no_dead_strip	_select_server_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function select_server_ctx
_select_server_ctx:                     ; @select_server_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	x22, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _TLSEXT_NAMETYPE_host_name@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TLSEXT_NAMETYPE_host_name@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_SSL_get_servername
	mov	x23, x0
Lloh3:
	adrp	x8, _ex_data_idx@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ex_data_idx@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_SSL_get_ex_data
	mov	x19, x0
	cbz	x23, LBB0_4
; %bb.1:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_strcmp
	cbz	x0, LBB0_5
; %bb.2:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_strcmp
	cbz	x0, LBB0_6
; %bb.3:
	cbz	w22, LBB0_10
LBB0_4:
Lloh10:
	adrp	x8, _SSL_TLSEXT_ERR_NOACK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SSL_TLSEXT_ERR_NOACK@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	mov	x1, x21
	bl	_SSL_set_SSL_CTX
	mov	x0, x20
	mov	w1, #-1
	bl	_SSL_clear_options
	mov	x0, x21
	bl	_SSL_CTX_get_options
	mov	x1, x0
	mov	x0, x20
	bl	_SSL_set_options
Lloh12:
	adrp	x8, _SSL_TLSEXT_ERR_OK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SSL_TLSEXT_ERR_OK@GOTPAGEOFF]
Lloh14:
	adrp	x9, _SSL_TEST_SERVERNAME_SERVER2@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SSL_TEST_SERVERNAME_SERVER2@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh16:
	adrp	x8, _SSL_TLSEXT_ERR_OK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SSL_TLSEXT_ERR_OK@GOTPAGEOFF]
LBB0_7:
Lloh18:
	adrp	x9, _SSL_TEST_SERVERNAME_SERVER1@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SSL_TEST_SERVERNAME_SERVER1@GOTPAGEOFF]
LBB0_8:
	ldr	x9, [x9]
	str	x9, [x19]
LBB0_9:
	ldr	w0, [x8]
	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
LBB0_10:
Lloh20:
	adrp	x8, _SSL_TLSEXT_ERR_ALERT_FATAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SSL_TLSEXT_ERR_ALERT_FATAL@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_TLSEXT_NAMETYPE_host_name,4,2  ; @TLSEXT_NAMETYPE_host_name
	.comm	_ex_data_idx,4,2                ; @ex_data_idx
	.comm	_SSL_TEST_SERVERNAME_SERVER1,8,3 ; @SSL_TEST_SERVERNAME_SERVER1
	.comm	_SSL_TLSEXT_ERR_NOACK,4,2       ; @SSL_TLSEXT_ERR_NOACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"server2"

	.comm	_SSL_TEST_SERVERNAME_SERVER2,8,3 ; @SSL_TEST_SERVERNAME_SERVER2
	.comm	_SSL_TLSEXT_ERR_OK,4,2          ; @SSL_TLSEXT_ERR_OK
l_.str.1:                               ; @.str.1
	.asciz	"server1"

	.comm	_SSL_TLSEXT_ERR_ALERT_FATAL,4,2 ; @SSL_TLSEXT_ERR_ALERT_FATAL
	.no_dead_strip	_select_server_ctx
.subsections_via_symbols
