	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hts_wakeup                     ## -- Begin function hts_wakeup
	.p2align	4, 0x90
_hts_wakeup:                            ## @hts_wakeup
	.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, %r15
	callq	_HTS_DATA
	movq	%rax, %rbx
	movl	12(%rax), %eax
	movq	_key_user_id@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	movl	8(%rbx), %eax
	movq	_req_ts@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	(%rbx), %eax
	movq	_req_mode@GOTPCREL(%rip), %r13
	movl	%eax, (%r13)
	movq	(%r15), %rax
	movq	_conn_expect_query@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	sete	%cl
	movq	_conn_wait_net@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movq	(%r12), %rax
	movq	%rax, (%r15)
	movq	%r15, %rdi
	callq	_clear_connection_timeout
	movq	_QF_KEEPALIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_conn_write_close@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movl	$-1, 8(%r15)
LBB0_2:
	testb	$16, (%r13)
	movl	(%r14), %edi
	movq	_req_ts@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_R@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	%r14, %rbx
	jne	LBB0_7
## %bb.3:
	xorl	%edx, %edx
	callq	_get_history
	movl	%eax, %r14d
	movl	(%rbx), %edi
	movl	$1, %esi
	callq	_get_timestamp
	testl	%eax, %eax
	js	LBB0_8
LBB0_4:
	testl	%r14d, %r14d
	js	LBB0_9
## %bb.5:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_http_return_history
	testl	%eax, %eax
	jns	LBB0_11
## %bb.6:
	negl	%eax
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_write_http_error
	jmp	LBB0_11
LBB0_7:
	xorl	%edx, %edx
	callq	_get_persistent_history
	movl	%eax, %r14d
	movl	(%rbx), %edi
	callq	_get_persistent_timestamp
	testl	%eax, %eax
	jns	LBB0_4
LBB0_8:
	movq	_http_failed@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	incl	12(%rax)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	$-1, %edx
	jmp	LBB0_10
LBB0_9:
	movq	_http_failed@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	incl	4(%rcx)
	leaq	_hts_wakeup.tmp_buff(%rip), %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_sprintf
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
LBB0_10:
	callq	_http_return
LBB0_11:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_hts_wakeup.tmp_buff,4096,4 ## @hts_wakeup.tmp_buff
	.comm	_key_user_id,4,2                ## @key_user_id
	.comm	_req_ts,4,2                     ## @req_ts
	.comm	_req_mode,4,2                   ## @req_mode
	.comm	_conn_expect_query,8,3          ## @conn_expect_query
	.comm	_conn_wait_net,8,3              ## @conn_wait_net
	.comm	_QF_KEEPALIVE,4,2               ## @QF_KEEPALIVE
	.comm	_conn_write_close,8,3           ## @conn_write_close
	.comm	_R,4,2                          ## @R
	.comm	_http_failed,8,3                ## @http_failed
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"{\"failed\":3}\r\n"

L_.str.1:                               ## @.str.1
	.asciz	"{\"failed\":1,\"ts\":%d}\r\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hts_wakeup                     ; -- Begin function hts_wakeup
	.p2align	2
_hts_wakeup:                            ; @hts_wakeup
	.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	x19, x0
	bl	_HTS_DATA
	mov	x20, x0
Lloh0:
	adrp	x21, _key_user_id@GOTPAGE
Lloh1:
	ldr	x21, [x21, _key_user_id@GOTPAGEOFF]
	ldp	w9, w8, [x0, #8]
	str	w8, [x21]
Lloh2:
	adrp	x22, _req_ts@GOTPAGE
Lloh3:
	ldr	x22, [x22, _req_ts@GOTPAGEOFF]
	str	w9, [x22]
Lloh4:
	adrp	x23, _req_mode@GOTPAGE
Lloh5:
	ldr	x23, [x23, _req_mode@GOTPAGEOFF]
	ldr	w8, [x0]
	str	w8, [x23]
	ldr	x8, [x19]
Lloh6:
	adrp	x24, _conn_expect_query@GOTPAGE
Lloh7:
	ldr	x24, [x24, _conn_expect_query@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
Lloh8:
	adrp	x9, _conn_wait_net@GOTPAGE
Lloh9:
	ldr	x9, [x9, _conn_wait_net@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x8, [x24]
	str	x8, [x19]
	mov	x0, x19
	bl	_clear_connection_timeout
	ldr	w8, [x20, #4]
Lloh11:
	adrp	x9, _QF_KEEPALIVE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _QF_KEEPALIVE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
Lloh14:
	adrp	x8, _conn_write_close@GOTPAGE
Lloh15:
	ldr	x8, [x8, _conn_write_close@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	w8, #-1
	str	w8, [x19, #8]
LBB0_2:
	ldr	w0, [x21]
	ldr	w1, [x22]
Lloh17:
	adrp	x22, _R@GOTPAGE
Lloh18:
	ldr	x22, [x22, _R@GOTPAGEOFF]
	ldr	w3, [x22]
	ldrb	w8, [x23]
	tbnz	w8, #4, LBB0_7
; %bb.3:
	mov	w2, #0
	bl	_get_history
	mov	x20, x0
	ldr	w0, [x21]
	mov	w1, #1
	bl	_get_timestamp
	mov	x3, x0
	tbnz	w0, #31, LBB0_8
LBB0_4:
	tbnz	w20, #31, LBB0_9
; %bb.5:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_http_return_history
	tbz	w0, #31, LBB0_11
; %bb.6:
	neg	w1, w0
	mov	x0, x19
	bl	_write_http_error
	b	LBB0_11
LBB0_7:
	mov	w2, #0
	bl	_get_persistent_history
	mov	x20, x0
	ldr	w0, [x21]
	bl	_get_persistent_timestamp
	mov	x3, x0
	tbz	w0, #31, LBB0_4
LBB0_8:
Lloh19:
	adrp	x8, _http_failed@GOTPAGE
Lloh20:
	ldr	x8, [x8, _http_failed@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldr	w9, [x8, #12]
	add	w9, w9, #1
	str	w9, [x8, #12]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #-1
	b	LBB0_10
LBB0_9:
Lloh24:
	adrp	x8, _http_failed@GOTPAGE
Lloh25:
	ldr	x8, [x8, _http_failed@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	ldr	w9, [x8, #4]
	add	w9, w9, #1
	str	w9, [x8, #4]
Lloh27:
	adrp	x20, _hts_wakeup.tmp_buff@PAGE
Lloh28:
	add	x20, x20, _hts_wakeup.tmp_buff@PAGEOFF
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x3
	bl	_sprintf
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
LBB0_10:
	bl	_http_return
LBB0_11:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_hts_wakeup.tmp_buff,4096,0 ; @hts_wakeup.tmp_buff
	.comm	_key_user_id,4,2                ; @key_user_id
	.comm	_req_ts,4,2                     ; @req_ts
	.comm	_req_mode,4,2                   ; @req_mode
	.comm	_conn_expect_query,8,3          ; @conn_expect_query
	.comm	_conn_wait_net,8,3              ; @conn_wait_net
	.comm	_QF_KEEPALIVE,4,2               ; @QF_KEEPALIVE
	.comm	_conn_write_close,8,3           ; @conn_write_close
	.comm	_R,4,2                          ; @R
	.comm	_http_failed,8,3                ; @http_failed
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"{\"failed\":3}\r\n"

l_.str.1:                               ; @.str.1
	.asciz	"{\"failed\":1,\"ts\":%d}\r\n"

.subsections_via_symbols
