	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function main
LCPI0_0:
	.quad	0x412e848000000000              ## double 1.0E+6
LCPI0_1:
	.quad	0x4059000000000000              ## double 100
LCPI0_2:
	.quad	0x4049000000000000              ## double 50
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_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	%r14
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_AF_UNIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rcx
	xorl	%edx, %edx
	callq	_evutil_socketpair
	movl	$1, %ebx
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	callq	_event_base_new
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %r14
	movq	_timeout_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_evtimer_new
	movq	%rax, -40(%rbp)
	movl	-28(%rbp), %esi
	movq	_EV_WRITE@GOTPCREL(%rip), %rax
	movq	_EV_PERSIST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_write_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %r8
	movq	%r14, %rdi
	callq	_event_new
	movq	%rax, -48(%rbp)
	movabsq	$2147483648000001, %rax         ## imm = 0x7A12000000001
	movq	%rax, -88(%rbp)
	movq	-40(%rbp), %rdi
	leaq	-88(%rbp), %rsi
	callq	_evtimer_add
	movq	-48(%rbp), %rdi
	xorl	%esi, %esi
	callq	_event_add
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_start_cpu_usage_timer
	movq	%r14, %rdi
	callq	_event_base_dispatch
	movq	-48(%rbp), %rdi
	callq	_event_free
	movq	-40(%rbp), %rdi
	callq	_event_free
	movq	%r14, %rdi
	callq	_event_base_free
	leaq	-72(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_get_cpu_usage
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movsd	-64(%rbp), %xmm1                ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	cvttsd2si	%xmm1, %esi
	mulsd	-72(%rbp), %xmm0
	cvttsd2si	%xmm0, %edx
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	mulsd	LCPI0_1(%rip), %xmm0
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	xorl	%ebx, %ebx
	ucomisd	LCPI0_2(%rip), %xmm0
	seta	%bl
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_UNIX,4,2                    ## @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_timeout_cb,4,2                 ## @timeout_cb
	.comm	_EV_WRITE,4,2                   ## @EV_WRITE
	.comm	_EV_PERSIST,4,2                 ## @EV_PERSIST
	.comm	_write_cb,4,2                   ## @write_cb
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usec used=%d, usec passed=%d, cpu usage=%.2f%%\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function main
lCPI0_0:
	.long	1                               ; 0x1
	.long	500000                          ; 0x7a120
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _AF_UNIX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AF_UNIX@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	sub	x3, x29, #32
	mov	w2, #0
	bl	_evutil_socketpair
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	bl	_event_base_new
	cbz	x0, LBB0_3
; %bb.2:
	mov	x19, x0
Lloh9:
	adrp	x8, _timeout_cb@GOTPAGE
Lloh10:
	ldr	x8, [x8, _timeout_cb@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #48
	bl	_evtimer_new
	str	x0, [sp, #48]
	ldur	w1, [x29, #-28]
Lloh12:
	adrp	x8, _EV_WRITE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EV_WRITE@GOTPAGEOFF]
Lloh14:
	adrp	x9, _EV_PERSIST@GOTPAGE
Lloh15:
	ldr	x9, [x9, _EV_PERSIST@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh18:
	adrp	x8, _write_cb@GOTPAGE
Lloh19:
	ldr	x8, [x8, _write_cb@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	sub	x4, x29, #40
	mov	x0, x19
	bl	_event_new
	stur	x0, [x29, #-40]
Lloh21:
	adrp	x8, lCPI0_0@PAGE
Lloh22:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #40]
	ldr	x0, [sp, #48]
	add	x1, sp, #40
	bl	_evtimer_add
	ldur	x0, [x29, #-40]
	mov	x1, #0
	bl	_event_add
	add	x0, sp, #32
	bl	_start_cpu_usage_timer
	mov	x0, x19
	bl	_event_base_dispatch
	ldur	x0, [x29, #-40]
	bl	_event_free
	ldr	x0, [sp, #48]
	bl	_event_free
	mov	x0, x19
	bl	_event_base_free
	add	x0, sp, #32
	add	x1, sp, #16
	add	x2, sp, #8
	add	x3, sp, #24
	bl	_get_cpu_usage
	ldr	d0, [sp, #8]
	mov	x8, #145685290680320
	movk	x8, #16686, lsl #48
	fmov	d1, x8
	fmul	d0, d0, d1
	fcvtzs	w1, d0
	ldr	d0, [sp, #16]
	fmul	d0, d0, d1
	fcvtzs	w2, d0
	ldr	d0, [sp, #24]
	mov	x8, #4636737291354636288
	fmov	d1, x8
	fmul	d0, d0, d1
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldr	d0, [sp, #24]
	mov	x8, #4632233691727265792
	fmov	d1, x8
	fcmp	d0, d1
	cset	w0, gt
	b	LBB0_4
LBB0_3:
	mov	w0, #1
LBB0_4:
	ldur	x8, [x29, #-24]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdr	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_UNIX,4,2                    ; @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_timeout_cb,4,2                 ; @timeout_cb
	.comm	_EV_WRITE,4,2                   ; @EV_WRITE
	.comm	_EV_PERSIST,4,2                 ; @EV_PERSIST
	.comm	_write_cb,4,2                   ; @write_cb
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usec used=%d, usec passed=%d, cpu usage=%.2f%%\n"

.subsections_via_symbols
