	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	_weakrand_state@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	callq	_evutil_weakrand_seed_
	xorl	%eax, %eax
	callq	_event_init
	movq	_NEVENT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_ev@GOTPCREL(%rip), %r12
	movq	_time_cb@GOTPCREL(%rip), %r13
	leaq	-56(%rbp), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$4, %edi
	callq	_malloc
	movq	(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	(%r12), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax,%rbx,8)
	setne	%dil
	callq	_assert
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movl	(%r13), %esi
	movq	%rdi, %rdx
	callq	_evtimer_set
	movq	$0, -48(%rbp)
	movl	$50000, %edi                    ## imm = 0xC350
	callq	_rand_int
	movl	%eax, -56(%rbp)
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	%r15, %rsi
	callq	_evtimer_add
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	callq	_event_dispatch
	movq	_called@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movl	(%rbx), %ecx
	xorl	%eax, %eax
	cmpl	(%r14), %ecx
	setl	%al
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_weakrand_state,4,2             ## @weakrand_state
	.comm	_NEVENT,4,2                     ## @NEVENT
	.comm	_ev,8,3                         ## @ev
	.comm	_time_cb,4,2                    ## @time_cb
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d, %d\n"

	.comm	_called,4,2                     ## @called
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x0, _weakrand_state@GOTPAGE
Lloh1:
	ldr	x0, [x0, _weakrand_state@GOTPAGEOFF]
	mov	w1, #0
	bl	_evutil_weakrand_seed_
	bl	_event_init
Lloh2:
	adrp	x19, _NEVENT@GOTPAGE
Lloh3:
	ldr	x19, [x19, _NEVENT@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x20, #0
Lloh4:
	adrp	x21, _ev@GOTPAGE
Lloh5:
	ldr	x21, [x21, _ev@GOTPAGEOFF]
Lloh6:
	adrp	x22, _time_cb@GOTPAGE
Lloh7:
	ldr	x22, [x22, _time_cb@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #4
	bl	_malloc
	ldr	x8, [x21]
	lsl	x23, x20, #3
	str	x0, [x8, x23]
	ldr	x8, [x21]
	ldr	x8, [x8, x23]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x21]
	ldr	x0, [x8, x23]
	ldr	w1, [x22]
	mov	x2, x0
	bl	_evtimer_set
	str	xzr, [sp, #8]
	mov	w0, #50000
	bl	_rand_int
	str	w0, [sp]
	ldr	x8, [x21]
	ldr	x0, [x8, x23]
	mov	x1, sp
	bl	_evtimer_add
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_2
LBB0_3:
	bl	_event_dispatch
Lloh8:
	adrp	x20, _called@GOTPAGE
Lloh9:
	ldr	x20, [x20, _called@GOTPAGEOFF]
	ldr	w1, [x20]
	ldr	w2, [x19]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldr	w8, [x20]
	ldr	w9, [x19]
	cmp	w8, w9
	cset	w0, lt
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_weakrand_state,4,2             ; @weakrand_state
	.comm	_NEVENT,4,2                     ; @NEVENT
	.comm	_ev,8,3                         ; @ev
	.comm	_time_cb,4,2                    ; @time_cb
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d, %d\n"

	.comm	_called,4,2                     ; @called
.subsections_via_symbols
