	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen_events                     ## -- Begin function gen_events
	.p2align	4, 0x90
_gen_events:                            ## @gen_events
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	testl	%esi, %esi
	jle	LBB0_9
## %bb.1:
	movl	%esi, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%r12, %rbx
	je	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx,4), %eax
	movl	%eax, %edx
	negl	%edx
	cmovsl	%eax, %edx
	movl	%edx, %r15d
	andl	$1073741823, %r15d              ## imm = 0x3FFFFFFF
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpl	$1073741825, %edx               ## imm = 0x40000001
	setb	%cl
	cmovbl	%edx, %r15d
	movl	%r15d, %eax
	cltd
	movq	_engineN@GOTPCREL(%rip), %rsi
	idivl	(%rsi)
	movq	_uf@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movb	%cl, %al
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	movq	_userN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	setl	%dil
	callq	_assert
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%r14
	cmpq	%r14, %r12
	je	LBB0_8
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%r14, %rbx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r14,4), %r13d
	testl	%r13d, %r13d
	js	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	xorl	%edi, %edi
	movq	_userN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	setl	%dil
	callq	_assert
	movl	%r15d, %eax
	cltd
	movq	_engineN@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movslq	%eax, %rdi
	shlq	$2, %rdi
	movq	_v@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	andl	$1073741823, %r13d              ## imm = 0x3FFFFFFF
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r13,2), %esi
	movq	_max_user_events@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_vct_add_lim
	jmp	LBB0_7
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_engineN,4,2                    ## @engineN
	.comm	_uf,4,2                         ## @uf
	.comm	_userN,4,2                      ## @userN
	.comm	_v,8,3                          ## @v
	.comm	_max_user_events,4,2            ## @max_user_events
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen_events                     ; -- Begin function gen_events
	.p2align	2
_gen_events:                            ; @gen_events
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cmp	w1, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x0
	mov	x20, #0
Lloh0:
	adrp	x22, _engineN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _engineN@GOTPAGEOFF]
Lloh2:
	adrp	x24, _userN@GOTPAGE
Lloh3:
	ldr	x24, [x24, _userN@GOTPAGEOFF]
Lloh4:
	adrp	x27, _max_user_events@GOTPAGE
Lloh5:
	ldr	x27, [x27, _max_user_events@GOTPAGEOFF]
	mov	w28, w1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	cmp	x20, x28
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w8, [x19, x20, lsl #2]
	cmp	w8, #0
	cneg	w8, w8, mi
	mov	w9, #1
	movk	w9, #16384, lsl #16
	cmp	w8, w9
	cset	w21, lo
	and	w9, w8, #0x3fffffff
	mov	w10, #1073741824
	cmp	w8, w10
	csel	w23, w9, w8, hi
	ldr	w8, [x22]
	sdiv	w9, w23, w8
	msub	w8, w9, w8, w23
Lloh6:
	adrp	x9, _uf@GOTPAGE
Lloh7:
	ldr	x9, [x9, _uf@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24]
	cmp	w23, w8
	cset	w0, lt
	bl	_assert
	mov	x25, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x25, x25, #1
	cmp	x28, x25
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x20, x25
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w26, [x19, x25, lsl #2]
	tbnz	w26, #31, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w8, [x24]
	cmp	w26, w8
	cset	w0, lt
	bl	_assert
Lloh9:
	adrp	x8, _v@GOTPAGE
Lloh10:
	ldr	x8, [x8, _v@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w9, [x22]
	sdiv	w9, w23, w9
	add	x0, x8, w9, sxtw #2
	mov	x1, x21
	bfi	w1, w26, #1, #30
	ldr	w2, [x27]
	bl	_vct_add_lim
	b	LBB0_5
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_engineN,4,2                    ; @engineN
	.comm	_uf,4,2                         ; @uf
	.comm	_userN,4,2                      ; @userN
	.comm	_v,8,3                          ; @v
	.comm	_max_user_events,4,2            ; @max_user_events
.subsections_via_symbols
