	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl_get_new_session            ## -- Begin function ssl_get_new_session
	.p2align	4, 0x90
_ssl_get_new_session:                   ## @ssl_get_new_session
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %rbx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_SSL_SESSION_new
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_SSL_get_default_timeout
LBB0_4:
	movq	%rax, (%r14)
	movq	16(%rbx), %rdi
	callq	_SSL_SESSION_free
	movq	$0, 16(%rbx)
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.5:
	movq	%rbx, %rdi
	callq	_SSL_IS_TLS13
	testq	%rax, %rax
	je	LBB0_6
LBB0_8:
	movq	$0, 32(%r14)
LBB0_9:
	movl	(%rbx), %edx
	cmpl	$5, %edx
	jb	LBB0_11
## %bb.10:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_SSL_GET_NEW_SESSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_SSLfatal
LBB0_7:
	movq	%r14, %rdi
	callq	_SSL_SESSION_free
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_1:
	movq	_SSL_AD_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSL_F_SSL_GET_NEW_SESSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_SSLfatal
	jmp	LBB0_13
LBB0_11:
	movl	24(%r14), %edi
	movl	24(%rbx), %esi
	callq	_memcpy
	movl	(%rbx), %eax
	movl	%eax, 8(%r14)
	movq	%r14, 16(%rbx)
	movl	8(%rbx), %eax
	movl	%eax, 20(%r14)
	movq	_X509_V_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_TLS1_FLAGS_RECEIVED_EXTMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %r15d
	testl	%eax, 4(%rbx)
	je	LBB0_13
## %bb.12:
	movq	_SSL_SESS_FLAG_EXTMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%r14)
LBB0_13:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ssl_generate_session_id
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ## @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_SSL_GET_NEW_SESSION,4,2  ## @SSL_F_SSL_GET_NEW_SESSION
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ## @ERR_R_INTERNAL_ERROR
	.comm	_X509_V_OK,4,2                  ## @X509_V_OK
	.comm	_TLS1_FLAGS_RECEIVED_EXTMS,4,2  ## @TLS1_FLAGS_RECEIVED_EXTMS
	.comm	_SSL_SESS_FLAG_EXTMS,4,2        ## @SSL_SESS_FLAG_EXTMS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ssl_get_new_session            ; -- Begin function ssl_get_new_session
	.p2align	2
_ssl_get_new_session:                   ; @ssl_get_new_session
	.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	x21, x1
	mov	x20, x0
	bl	_SSL_SESSION_new
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20, #32]
	ldr	x0, [x8]
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_SSL_get_default_timeout
LBB0_3:
	str	x0, [x19]
	ldr	x0, [x20, #16]
	bl	_SSL_SESSION_free
	str	xzr, [x20, #16]
	cbz	w21, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_SSL_IS_TLS13
	cbz	x0, LBB0_14
LBB0_5:
	str	xzr, [x19, #32]
LBB0_6:
	ldr	w2, [x20]
	cmp	w2, #5
	b.lo	LBB0_10
; %bb.7:
Lloh0:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _SSL_F_SSL_GET_NEW_SESSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSL_F_SSL_GET_NEW_SESSION@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _ERR_R_INTERNAL_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERR_R_INTERNAL_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_SSLfatal
LBB0_8:
	mov	x0, x19
	bl	_SSL_SESSION_free
	mov	w0, #0
	b	LBB0_13
LBB0_9:
Lloh9:
	adrp	x8, _SSL_AD_INTERNAL_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SSL_AD_INTERNAL_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _SSL_F_SSL_GET_NEW_SESSION@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SSL_F_SSL_GET_NEW_SESSION@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_SSLfatal
	mov	w0, #0
	b	LBB0_13
LBB0_10:
	ldr	w0, [x19, #24]
	ldr	w1, [x20, #24]
	bl	_memcpy
	ldp	w8, w9, [x20]
	str	w8, [x19, #8]
	str	x19, [x20, #16]
	ldr	w8, [x20, #8]
Lloh18:
	adrp	x10, _X509_V_OK@GOTPAGE
Lloh19:
	ldr	x10, [x10, _X509_V_OK@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	stp	w10, w8, [x19, #16]
Lloh21:
	adrp	x8, _TLS1_FLAGS_RECEIVED_EXTMS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TLS1_FLAGS_RECEIVED_EXTMS@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_12
; %bb.11:
Lloh24:
	adrp	x8, _SSL_SESS_FLAG_EXTMS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SSL_SESS_FLAG_EXTMS@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	orr	w8, w9, w8
	str	w8, [x19, #12]
LBB0_12:
	mov	w0, #1
LBB0_13:
	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
LBB0_14:
	mov	x0, x20
	mov	x1, x19
	bl	_ssl_generate_session_id
	cbnz	w0, LBB0_6
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_SSL_AD_INTERNAL_ERROR,4,2      ; @SSL_AD_INTERNAL_ERROR
	.comm	_SSL_F_SSL_GET_NEW_SESSION,4,2  ; @SSL_F_SSL_GET_NEW_SESSION
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ; @ERR_R_INTERNAL_ERROR
	.comm	_X509_V_OK,4,2                  ; @X509_V_OK
	.comm	_TLS1_FLAGS_RECEIVED_EXTMS,4,2  ; @TLS1_FLAGS_RECEIVED_EXTMS
	.comm	_SSL_SESS_FLAG_EXTMS,4,2        ; @SSL_SESS_FLAG_EXTMS
.subsections_via_symbols
