	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_events_http                ## -- Begin function get_events_http
	.p2align	4, 0x90
_get_events_http:                       ## @get_events_http
	.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, %r12
	movq	_quick_fix@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_debug_buff@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ds@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_2:
	movq	%r12, %rdi
	callq	_qkey_fix_timeout
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_get_qtype
	movq	_Q_WATCHCAT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_get_watchcat_id
	movl	40(%r12), %esi
	movq	(%r12), %rcx
	movl	4(%rcx), %edx
	movl	%eax, %edi
	callq	_update_watchcat
LBB0_4:
	movq	32(%r12), %rsi
	incq	%rsi
	movq	%rsi, 24(%r12)
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
	movq	8(%r12), %rbx
	movq	_CLOCK_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_utime
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.5:
	movb	$1, %cl
	movq	_sum_delay@GOTPCREL(%rip), %r13
	movq	_max_delay@GOTPCREL(%rip), %r15
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%rbx), %rax
	xorl	%ecx, %ecx
	testq	%rax, %rax
	je	LBB0_17
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rbx
	testb	$1, %cl
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	___may_wait@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rbx), %rax
	movq	_ds@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	_debug_buff@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	8388608(%rcx), %rdx
	cmpq	%rdx, %rax
	jg	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	addq	$16777216, %rcx                 ## imm = 0x1000000
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	setl	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	setg	%dil
	callq	_assert
	movq	8(%rbx), %rsi
	cmpl	$2, (%rsi)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	addq	$4, %rsi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %r14
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
	movq	_ds@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	(%rbx), %rdx
	movq	8(%rbx), %rsi
	decq	%rdx
	callq	_write_str
	addq	%rax, (%r15)
	leaq	L_.str.5(%rip), %rdi
	movq	%r14, %r15
	xorl	%eax, %eax
	callq	_debug
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	16(%rbx), %edi
	movl	16(%r12), %esi
	callq	_max
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	movsd	(%r13), %xmm0                   ## xmm0 = mem[0],zero
	movq	_cnt_delay@GOTPCREL(%rip), %rax
	incl	(%rax)
	addsd	%xmm1, %xmm0
	movq	_events_sent@GOTPCREL(%rip), %rax
	incl	(%rax)
	movsd	%xmm0, (%r13)
	ucomisd	(%r15), %xmm1
	jbe	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	movsd	%xmm1, (%r15)
	jmp	LBB0_16
LBB0_10:
	movq	(%r12), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_critical
	movq	_debug_error@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_17:
	movq	%rbx, 8(%r12)
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
	movq	_debug_error@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_19
## %bb.18:
	movq	_http_failed@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	incl	12(%rcx)
	movq	_buff_overflow_cnt@GOTPCREL(%rip), %rcx
	incl	(%rcx)
	movl	$0, (%rax)
	movq	_debug_buff@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ds@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
LBB0_19:
	movq	(%r12), %rdi
	callq	_queue_fix
	movq	_debug_buff@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_quick_fix,4,2                  ## @quick_fix
	.comm	_debug_buff,8,3                 ## @debug_buff
	.comm	_ds,8,3                         ## @ds
	.comm	_Q_WATCHCAT,8,3                 ## @Q_WATCHCAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"{\"ts\":\"%d\""

L_.str.1:                               ## @.str.1
	.asciz	",\"events\":["

	.comm	_CLOCK_MONOTONIC,4,2            ## @CLOCK_MONOTONIC
L_.str.2:                               ## @.str.2
	.asciz	","

	.comm	___may_wait,8,3                 ## @__may_wait
L_.str.3:                               ## @.str.3
	.asciz	"Queue %s overflow\n"

	.comm	_debug_error,4,2                ## @debug_error
L_.str.4:                               ## @.str.4
	.asciz	"%s"

L_.str.5:                               ## @.str.5
	.asciz	"\""

	.comm	_sum_delay,8,3                  ## @sum_delay
	.comm	_cnt_delay,4,2                  ## @cnt_delay
	.comm	_events_sent,4,2                ## @events_sent
	.comm	_max_delay,8,3                  ## @max_delay
L_.str.6:                               ## @.str.6
	.asciz	"]}"

	.comm	_http_failed,8,3                ## @http_failed
	.comm	_buff_overflow_cnt,4,2          ## @buff_overflow_cnt
L_.str.7:                               ## @.str.7
	.asciz	"{\"failed\":3}"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_events_http                ; -- Begin function get_events_http
	.p2align	2
_get_events_http:                       ; @get_events_http
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x19, x0
Lloh0:
	adrp	x8, _quick_fix@GOTPAGE
Lloh1:
	ldr	x8, [x8, _quick_fix@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x23, _debug_buff@GOTPAGE
Lloh4:
	ldr	x23, [x23, _debug_buff@GOTPAGEOFF]
Lloh5:
	adrp	x24, _ds@GOTPAGE
Lloh6:
	ldr	x24, [x24, _ds@GOTPAGEOFF]
	cbnz	w8, LBB0_2
; %bb.1:
	ldr	x8, [x23]
	str	x8, [x24]
LBB0_2:
	mov	x0, x19
	bl	_qkey_fix_timeout
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_get_qtype
Lloh7:
	adrp	x8, _Q_WATCHCAT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _Q_WATCHCAT@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_get_watchcat_id
	ldr	w1, [x19, #40]
	ldr	x8, [x19]
	ldr	w2, [x8, #4]
	bl	_update_watchcat
LBB0_4:
	ldr	x8, [x19, #32]
	add	x8, x8, #1
	str	x8, [x19, #24]
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_debug
	ldr	x26, [x19, #8]
Lloh14:
	adrp	x8, _CLOCK_MONOTONIC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CLOCK_MONOTONIC@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_get_utime
	ldr	x8, [x26, #24]
	cbz	x8, LBB0_17
; %bb.5:
	fmov	d8, d0
	mov	w9, #1
	mov	w28, #16777216
Lloh17:
	adrp	x25, _sum_delay@GOTPAGE
Lloh18:
	ldr	x25, [x25, _sum_delay@GOTPAGEOFF]
Lloh19:
	adrp	x27, _cnt_delay@GOTPAGE
Lloh20:
	ldr	x27, [x27, _cnt_delay@GOTPAGEOFF]
Lloh21:
	adrp	x20, _events_sent@GOTPAGE
Lloh22:
	ldr	x20, [x20, _events_sent@GOTPAGEOFF]
Lloh23:
	adrp	x22, _max_delay@GOTPAGE
Lloh24:
	ldr	x22, [x22, _max_delay@GOTPAGEOFF]
Lloh25:
	adrp	x21, l_.str.5@PAGE
Lloh26:
	add	x21, x21, l_.str.5@PAGEOFF
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w9, #0
	ldr	x8, [x26, #24]
	cbz	x8, LBB0_17
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x26, x8
	tbz	w9, #0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh27:
	adrp	x8, ___may_wait@GOTPAGE
Lloh28:
	ldr	x8, [x8, ___may_wait@GOTPAGEOFF]
Lloh29:
	str	xzr, [x8]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
Lloh30:
	adrp	x0, l_.str.2@PAGE
Lloh31:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_debug
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x24]
	ldr	x10, [x26]
	ldr	x8, [x23]
	add	x11, x8, #2048, lsl #12         ; =8388608
	add	x9, x10, x9
	cmp	x9, x11
	b.gt	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x8, x28
	cmp	x9, x8
	cset	w0, lt
	bl	_assert
	ldr	x8, [x26]
	cmp	x8, #0
	cset	w0, gt
	bl	_assert
	ldr	x8, [x26, #8]
	ldr	w9, [x8]
	cmp	w9, #2
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x8, #4
	str	x8, [sp]
Lloh32:
	adrp	x0, l_.str.4@PAGE
Lloh33:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_debug
	ldr	x0, [x24]
	ldp	x8, x1, [x26]
	sub	x2, x8, #1
	bl	_write_str
	ldr	x8, [x24]
	add	x8, x8, x0
	str	x8, [x24]
	mov	x0, x21
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_debug
	ldr	w0, [x26, #16]
	ldr	w1, [x19, #16]
	bl	_max
	fsub	d0, d8, d0
	ldr	d1, [x25]
	fadd	d1, d1, d0
	str	d1, [x25]
	ldr	w8, [x27]
	add	w8, w8, #1
	str	w8, [x27]
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	ldr	d1, [x22]
	fcmp	d0, d1
	b.le	LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	str	d0, [x22]
	b	LBB0_6
LBB0_16:
	ldr	x8, [x19]
	ldr	w1, [x8]
Lloh34:
	adrp	x0, l_.str.3@PAGE
Lloh35:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_critical
	mov	w8, #1
Lloh36:
	adrp	x9, _debug_error@GOTPAGE
Lloh37:
	ldr	x9, [x9, _debug_error@GOTPAGEOFF]
Lloh38:
	str	w8, [x9]
LBB0_17:
	str	x26, [x19, #8]
Lloh39:
	adrp	x0, l_.str.6@PAGE
Lloh40:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_debug
Lloh41:
	adrp	x10, _debug_error@GOTPAGE
Lloh42:
	ldr	x10, [x10, _debug_error@GOTPAGEOFF]
	ldr	w8, [x10]
	cbz	w8, LBB0_19
; %bb.18:
Lloh43:
	adrp	x8, _http_failed@GOTPAGE
Lloh44:
	ldr	x8, [x8, _http_failed@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	ldr	w9, [x8, #12]
	add	w9, w9, #1
	str	w9, [x8, #12]
Lloh46:
	adrp	x8, _buff_overflow_cnt@GOTPAGE
Lloh47:
	ldr	x8, [x8, _buff_overflow_cnt@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	str	wzr, [x10]
	ldr	x8, [x23]
	str	x8, [x24]
Lloh48:
	adrp	x0, l_.str.7@PAGE
Lloh49:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_debug
LBB0_19:
	ldr	x0, [x19]
	bl	_queue_fix
	ldr	x0, [x23]
	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
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_quick_fix,4,2                  ; @quick_fix
	.comm	_debug_buff,8,3                 ; @debug_buff
	.comm	_ds,8,3                         ; @ds
	.comm	_Q_WATCHCAT,8,3                 ; @Q_WATCHCAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"{\"ts\":\"%d\""

l_.str.1:                               ; @.str.1
	.asciz	",\"events\":["

	.comm	_CLOCK_MONOTONIC,4,2            ; @CLOCK_MONOTONIC
l_.str.2:                               ; @.str.2
	.asciz	","

	.comm	___may_wait,8,3                 ; @__may_wait
l_.str.3:                               ; @.str.3
	.asciz	"Queue %s overflow\n"

	.comm	_debug_error,4,2                ; @debug_error
l_.str.4:                               ; @.str.4
	.asciz	"%s"

l_.str.5:                               ; @.str.5
	.asciz	"\""

	.comm	_sum_delay,8,3                  ; @sum_delay
	.comm	_cnt_delay,4,2                  ; @cnt_delay
	.comm	_events_sent,4,2                ; @events_sent
	.comm	_max_delay,8,3                  ; @max_delay
l_.str.6:                               ; @.str.6
	.asciz	"]}"

	.comm	_http_failed,8,3                ; @http_failed
	.comm	_buff_overflow_cnt,4,2          ; @buff_overflow_cnt
l_.str.7:                               ; @.str.7
	.asciz	"{\"failed\":3}"

.subsections_via_symbols
