	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_session_init
_tls_session_init:                      ## @tls_session_init
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_gc_new
	movl	%eax, -32(%rbp)
	movq	_D_TLS_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dmsg
	movups	(%rbx), %xmm0
	movups	16(%rbx), %xmm1
	movups	32(%rbx), %xmm2
	movups	%xmm2, 32(%rsp)
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_CLEAR
	movq	%r14, 32(%rbx)
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_session_id_defined
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_session_id_random
	jmp	LBB0_2
LBB0_3:
	movq	32(%rbx), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	setg	%dil
	callq	_ASSERT
	movq	32(%rbx), %rdi
	cmpl	$1, (%rdi)
	movq	40(%rdi), %rax
	jne	LBB0_7
## %bb.4:
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	movq	_P_CONTROL_HARD_RESET_CLIENT_V1@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_7:
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_P_CONTROL_HARD_RESET_SERVER_V2@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	movq	_P_CONTROL_HARD_RESET_SERVER_V1@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_9:
	cmpq	$0, 32(%rdi)
	jne	LBB0_10
## %bb.11:
	movq	_P_CONTROL_HARD_RESET_CLIENT_V2@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_P_CONTROL_HARD_RESET_CLIENT_V3@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	leaq	16(%rbx), %r14
	movq	16(%rdi), %rax
	movq	%rax, 16(%rbx)
	movl	24(%rdi), %eax
	movl	%eax, 24(%rbx)
	addq	$12, %rdi
	callq	_BUF_SIZE
	movl	%eax, %edi
	callq	_alloc_buf
	movl	%eax, 24(%rbx)
	movq	32(%rbx), %rax
	movl	4(%rax), %edx
	movl	8(%rax), %esi
	movl	28(%rbx), %r8d
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	callq	_packet_id_init
	movl	20(%rbx), %edi
	movq	%r14, %rsi
	callq	_packet_id_persist_load_obj
	movq	_KS_PRIMARY@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	8(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_key_state_init
	movl	(%r15), %r14d
	leaq	-32(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_session_id_print
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dmsg
	movq	%r15, %rdi
	callq	_gc_free
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D_TLS_DEBUG,4,2                ## @D_TLS_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TLS: tls_session_init: entry"

	.comm	_P_CONTROL_HARD_RESET_SERVER_V1,4,2 ## @P_CONTROL_HARD_RESET_SERVER_V1
	.comm	_P_CONTROL_HARD_RESET_CLIENT_V1,4,2 ## @P_CONTROL_HARD_RESET_CLIENT_V1
	.comm	_P_CONTROL_HARD_RESET_SERVER_V2,4,2 ## @P_CONTROL_HARD_RESET_SERVER_V2
	.comm	_P_CONTROL_HARD_RESET_CLIENT_V3,4,2 ## @P_CONTROL_HARD_RESET_CLIENT_V3
	.comm	_P_CONTROL_HARD_RESET_CLIENT_V2,4,2 ## @P_CONTROL_HARD_RESET_CLIENT_V2
L_.str.1:                               ## @.str.1
	.asciz	"TLS_WRAP"

	.comm	_KS_PRIMARY,8,3                 ## @KS_PRIMARY
L_.str.2:                               ## @.str.2
	.asciz	"TLS: tls_session_init: new session object, sid=%s"

	.no_dead_strip	_tls_session_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_session_init
_tls_session_init:                      ; @tls_session_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x1
	mov	x20, x0
	bl	_gc_new
	stur	w0, [x29, #-40]
Lloh0:
	adrp	x21, _D_TLS_DEBUG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _D_TLS_DEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dmsg
	ldp	q0, q1, [x19]
	stp	q0, q1, [sp, #16]
	ldr	q0, [x19, #32]
	str	q0, [sp, #48]
	add	x0, sp, #16
	bl	_CLEAR
	str	x20, [x19, #32]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_session_id_defined
	cbnz	w0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_session_id_random
	b	LBB0_1
LBB0_3:
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, gt
	bl	_ASSERT
	ldr	x8, [x19, #32]
	ldr	w10, [x8]
	ldr	x9, [x8, #40]
	cmp	w10, #1
	b.ne	LBB0_5
; %bb.4:
Lloh4:
	adrp	x10, _P_CONTROL_HARD_RESET_SERVER_V1@GOTPAGE
Lloh5:
	ldr	x10, [x10, _P_CONTROL_HARD_RESET_SERVER_V1@GOTPAGEOFF]
Lloh6:
	adrp	x11, _P_CONTROL_HARD_RESET_CLIENT_V1@GOTPAGE
Lloh7:
	ldr	x11, [x11, _P_CONTROL_HARD_RESET_CLIENT_V1@GOTPAGEOFF]
	cmp	x9, #0
	csel	x9, x11, x10, eq
	b	LBB0_8
LBB0_5:
	cbz	x9, LBB0_7
; %bb.6:
Lloh8:
	adrp	x9, _P_CONTROL_HARD_RESET_SERVER_V2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _P_CONTROL_HARD_RESET_SERVER_V2@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh10:
	adrp	x9, _P_CONTROL_HARD_RESET_CLIENT_V3@GOTPAGE
Lloh11:
	ldr	x9, [x9, _P_CONTROL_HARD_RESET_CLIENT_V3@GOTPAGEOFF]
	ldr	x10, [x8, #32]
Lloh12:
	adrp	x11, _P_CONTROL_HARD_RESET_CLIENT_V2@GOTPAGE
Lloh13:
	ldr	x11, [x11, _P_CONTROL_HARD_RESET_CLIENT_V2@GOTPAGEOFF]
	cmp	x10, #0
	csel	x9, x11, x9, eq
LBB0_8:
	ldr	w9, [x9]
	str	w9, [x19, #40]
	ldr	x9, [x8, #16]
	ldr	w10, [x8, #24]
	str	w10, [x19, #24]
	mov	x20, x19
	str	x9, [x20, #16]!
	add	x0, x8, #12
	bl	_BUF_SIZE
	bl	_alloc_buf
	str	w0, [x19, #24]
	ldr	x8, [x19, #32]
	ldp	w2, w1, [x8, #4]
	ldr	w4, [x19, #28]
Lloh14:
	adrp	x3, l_.str.1@PAGE
Lloh15:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_packet_id_init
	ldr	w0, [x19, #20]
	mov	x1, x20
	bl	_packet_id_persist_load_obj
	ldr	x8, [x19, #8]
Lloh16:
	adrp	x9, _KS_PRIMARY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _KS_PRIMARY@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_key_state_init
	ldr	w20, [x21]
	sub	x1, x29, #40
	mov	x0, x19
	bl	_session_id_print
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dmsg
	sub	x0, x29, #40
	bl	_gc_free
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_D_TLS_DEBUG,4,2                ; @D_TLS_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TLS: tls_session_init: entry"

	.comm	_P_CONTROL_HARD_RESET_SERVER_V1,4,2 ; @P_CONTROL_HARD_RESET_SERVER_V1
	.comm	_P_CONTROL_HARD_RESET_CLIENT_V1,4,2 ; @P_CONTROL_HARD_RESET_CLIENT_V1
	.comm	_P_CONTROL_HARD_RESET_SERVER_V2,4,2 ; @P_CONTROL_HARD_RESET_SERVER_V2
	.comm	_P_CONTROL_HARD_RESET_CLIENT_V3,4,2 ; @P_CONTROL_HARD_RESET_CLIENT_V3
	.comm	_P_CONTROL_HARD_RESET_CLIENT_V2,4,2 ; @P_CONTROL_HARD_RESET_CLIENT_V2
l_.str.1:                               ; @.str.1
	.asciz	"TLS_WRAP"

	.comm	_KS_PRIMARY,8,3                 ; @KS_PRIMARY
l_.str.2:                               ; @.str.2
	.asciz	"TLS: tls_session_init: new session object, sid=%s"

	.no_dead_strip	_tls_session_init
.subsections_via_symbols
