	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_session_file
_setup_session_file:                    ## @setup_session_file
	.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
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	_setup_session_file.st(%rip), %r12
	movl	_setup_session_file.st+4(%rip), %edi
	movq	%rdx, %rsi
	callq	_strcpy
	movq	_util_save_ticket_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, _setup_session_file.st(%rip)
	movq	%r12, (%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	leaq	_setup_session_file.ticket(%rip), %rdi
	movl	$1, %esi
	movl	$65536, %edx                    ## imm = 0x10000
	movq	%rax, %rcx
	callq	_fread
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_feof
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_fclose
	leaq	_setup_session_file.ticket(%rip), %rdi
	movq	%r12, %rsi
	callq	_ptls_iovec_init
	movl	%eax, (%r14)
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_setup_session_file.st,8,2 ## @setup_session_file.st
	.comm	_util_save_ticket_cb,4,2        ## @util_save_ticket_cb
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

.zerofill __DATA,__bss,_setup_session_file.ticket,65536,4 ## @setup_session_file.ticket
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"failed to load ticket from file:%s\n"

	.no_dead_strip	_setup_session_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_session_file
_setup_session_file:                    ; @setup_session_file
	.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, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _setup_session_file.st@PAGE
Lloh1:
	add	x22, x22, _setup_session_file.st@PAGEOFF
	ldr	w0, [x22, #4]
	mov	x1, x2
	bl	_strcpy
Lloh2:
	adrp	x8, _util_save_ticket_cb@GOTPAGE
Lloh3:
	ldr	x8, [x8, _util_save_ticket_cb@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x22]
	str	x22, [x21]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_fopen
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh7:
	adrp	x0, _setup_session_file.ticket@PAGE
Lloh8:
	add	x0, x0, _setup_session_file.ticket@PAGEOFF
	mov	w1, #1
	mov	w2, #65536
	mov	x3, x21
	bl	_fread
	cbz	x0, LBB0_5
; %bb.2:
	mov	x22, x0
	mov	x0, x21
	bl	_feof
	cbz	w0, LBB0_5
; %bb.3:
	mov	x0, x21
	bl	_fclose
Lloh9:
	adrp	x0, _setup_session_file.ticket@PAGE
Lloh10:
	add	x0, x0, _setup_session_file.ticket@PAGEOFF
	mov	x1, x22
	bl	_ptls_iovec_init
	str	w0, [x19]
LBB0_4:
	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_5:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_setup_session_file.st,8,2 ; @setup_session_file.st
	.comm	_util_save_ticket_cb,4,2        ; @util_save_ticket_cb
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

.zerofill __DATA,__bss,_setup_session_file.ticket,65536,2 ; @setup_session_file.ticket
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"failed to load ticket from file:%s\n"

	.no_dead_strip	_setup_session_file
.subsections_via_symbols
