	.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	_NBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	(,%r12,8), %r14
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	testl	%r12d, %r12d
	jle	LBB0_1
## %bb.9:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	___bzero
	xorl	%ebx, %ebx
	leaq	-60(%rbp), %r14
	movq	_NBUF@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_get_systime
	movsd	(%r15,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	movq	%r14, %rdi
	callq	_LFPTOD
	incq	%rbx
	movslq	(%r13), %r12
	cmpq	%r12, %rbx
	jl	LBB0_10
## %bb.2:
	movq	_average@GOTPCREL(%rip), %r13
	movq	$0, (%r13)
	cmpl	$3, %r12d
	jl	LBB0_1
## %bb.3:
	movsd	(%r15), %xmm1                   ## xmm1 = mem[0],zero
	xorl	%eax, %eax
	movq	_NBUF@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%rax), %rbx
	movsd	8(%r15,%rax,8), %xmm0           ## xmm0 = mem[0],zero
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movsd	%xmm0, (%r15,%rax,8)
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addsd	(%r13), %xmm0
	movsd	%xmm0, (%r13)
	movslq	(%r14), %rcx
	leaq	-2(%rcx), %r12
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	movq	%rbx, %rax
	cmpq	%r12, %rbx
	jl	LBB0_4
## %bb.5:
	cmpl	$3, %ecx
	jl	LBB0_23
## %bb.6:
	movl	%r12d, %eax
	movl	$1, %ecx
	xorl	%edx, %edx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rdx
	incq	%rcx
	cmpq	%rax, %rdx
	je	LBB0_23
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movsd	(%r15,%rdx,8), %xmm2            ## xmm2 = mem[0],zero
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rcx, %rdi
	andq	$-2, %rdi
	xorl	%esi, %esi
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=2
	movsd	%xmm1, 8(%r15,%rsi,8)
	movsd	%xmm2, (%r15,%rdx,8)
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=2
	addq	$2, %rsi
	cmpq	%rsi, %rdi
	je	LBB0_19
LBB0_12:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsd	(%r15,%rsi,8), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm2, %xmm1
	jbe	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	movsd	%xmm2, (%r15,%rsi,8)
	movsd	%xmm1, (%r15,%rdx,8)
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_12 Depth=2
	movapd	%xmm2, %xmm1
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=2
	movsd	8(%r15,%rsi,8), %xmm2           ## xmm2 = mem[0],zero
	ucomisd	%xmm1, %xmm2
	ja	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=2
	movapd	%xmm1, %xmm2
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	xorl	%esi, %esi
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=1
	testb	$1, %cl
	je	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_7 Depth=1
	movsd	(%r15,%rsi,8), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm2, %xmm1
	jbe	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_7 Depth=1
	movsd	%xmm2, (%r15,%rsi,8)
	movsd	%xmm1, (%r15,%rdx,8)
	jmp	LBB0_22
LBB0_1:
	addl	$-2, %r12d
	xorpd	%xmm0, %xmm0
LBB0_23:
	xorps	%xmm1, %xmm1
	cvtsi2sd	%r12d, %xmm1
	divsd	%xmm1, %xmm0
	movq	_average@GOTPCREL(%rip), %rax
	movsd	%xmm0, (%rax)
	movq	_stderr@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r13), %edi
	movsd	(%r15), %xmm0                   ## xmm0 = mem[0],zero
	leaq	L_.str.3(%rip), %r14
	movq	%r14, %rsi
	xorl	%edx, %edx
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	movsd	8(%r15), %xmm0                  ## xmm0 = mem[0],zero
	movq	%r14, %rsi
	movl	$1, %edx
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	movsd	16(%r15), %xmm0                 ## xmm0 = mem[0],zero
	movq	%r14, %rsi
	movl	$2, %edx
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	movsd	24(%r15), %xmm0                 ## xmm0 = mem[0],zero
	movq	%r14, %rsi
	movl	$3, %edx
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	movsd	32(%r15), %xmm0                 ## xmm0 = mem[0],zero
	movq	%r14, %rsi
	movl	$4, %edx
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	movsd	40(%r15), %xmm0                 ## xmm0 = mem[0],zero
	movq	%r14, %rsi
	movl	$5, %edx
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	movsd	48(%r15), %xmm0                 ## xmm0 = mem[0],zero
	movq	%r14, %rsi
	movl	$6, %edx
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	movsd	56(%r15), %xmm0                 ## xmm0 = mem[0],zero
	movq	%r14, %rsi
	movl	$7, %edx
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	movsd	64(%r15), %xmm0                 ## xmm0 = mem[0],zero
	movq	%r14, %rsi
	movl	$8, %edx
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	movsd	72(%r15), %xmm0                 ## xmm0 = mem[0],zero
	movq	%r14, %rsi
	movl	$9, %edx
	movb	$1, %al
	callq	_fprintf
	movl	(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_NBUF@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	addl	$-12, %eax
	movslq	%eax, %rbx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movsd	(%r15,%rbx,8), %xmm0            ## xmm0 = mem[0],zero
	movq	%r14, %rsi
	movl	%ebx, %edx
	movb	$1, %al
	callq	_fprintf
	incq	%rbx
	movslq	(%r12), %rax
	addq	$-2, %rax
	cmpq	%rax, %rbx
	jl	LBB0_24
## %bb.25:
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_NBUF,4,2                       ## @NBUF
	.comm	_average,8,3                    ## @average
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%13.9f\n"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Average %13.9f\n"

L_.str.2:                               ## @.str.2
	.asciz	"First rank\n"

L_.str.3:                               ## @.str.3
	.asciz	"%2d %13.9f\n"

L_.str.4:                               ## @.str.4
	.asciz	"Last rank\n"

.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:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.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
	.cfi_offset b8, -72
	.cfi_offset b9, -80
	sub	sp, sp, #16
Lloh0:
	adrp	x21, _NBUF@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NBUF@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	x1, x8, #3
	mov	x9, x1
Lloh2:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh3:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x1, #15
	and	x10, x10, #0xffffffff0
	sub	x19, x9, x10
	mov	sp, x19
Lloh4:
	adrp	x22, _average@GOTPAGE
Lloh5:
	ldr	x22, [x22, _average@GOTPAGEOFF]
	cmp	w8, #0
	b.le	LBB0_13
; %bb.1:
	mov	x0, x19
	bl	_bzero
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	x0, x29, #68
	bl	_get_systime
	ldr	d0, [x19, x20, lsl #3]
	sub	x0, x29, #68
	bl	_LFPTOD
	add	x20, x20, #1
	ldrsw	x8, [x21]
	cmp	x20, x8
	b.lt	LBB0_2
; %bb.3:
	str	xzr, [x22]
	cmp	w8, #3
	b.lt	LBB0_13
; %bb.4:
	mov	x9, #0
	ldr	d1, [x19]
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x23, x9, #1
	add	x8, x19, x9, lsl #3
	ldr	d9, [x8, #8]
	fsub	d8, d9, d1
	str	d8, [x8]
	mov	x0, x20
	fmov	d0, d8
	bl	_printf
	ldr	d0, [x22]
	fadd	d0, d8, d0
	str	d0, [x22]
	ldrsw	x10, [x21]
	sub	x8, x10, #2
	fmov	d1, d9
	mov	x9, x23
	cmp	x23, x8
	b.lt	LBB0_5
; %bb.6:
	cmp	w10, #3
	b.lt	LBB0_14
; %bb.7:
	mov	x9, #0
	mov	w10, w8
	mov	w11, #1
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x9, x9, #1
	add	x11, x11, #1
	cmp	x9, x10
	b.eq	LBB0_14
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	mov	x12, #0
	ldr	d1, [x19, x9, lsl #3]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	x12, x12, #1
	cmp	x11, x12
	b.eq	LBB0_8
LBB0_11:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	d2, [x19, x12, lsl #3]
	fcmp	d2, d1
	b.le	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	str	d1, [x19, x12, lsl #3]
	str	d2, [x19, x9, lsl #3]
	fmov	d1, d2
	b	LBB0_10
LBB0_13:
	sub	w8, w8, #2
	movi	d0, #0000000000000000
LBB0_14:
	scvtf	d1, w8
	fdiv	d0, d0, d1
	str	d0, [x22]
Lloh8:
	adrp	x22, _stderr@GOTPAGE
Lloh9:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	ldr	w0, [x22]
	str	d0, [sp, #-16]!
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	ldr	w0, [x22]
	ldr	d0, [x19]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	str	xzr, [sp]
Lloh14:
	adrp	x20, l_.str.3@PAGE
Lloh15:
	add	x20, x20, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
	ldr	d0, [x19, #8]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	mov	w8, #1
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
	ldr	d0, [x19, #16]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	mov	w8, #2
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
	ldr	d0, [x19, #24]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	mov	w8, #3
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
	ldr	d0, [x19, #32]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	mov	w8, #4
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
	ldr	d0, [x19, #40]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	mov	w8, #5
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
	ldr	d0, [x19, #48]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	mov	w8, #6
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
	ldr	d0, [x19, #56]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	mov	w8, #7
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
	ldr	d0, [x19, #64]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	mov	w8, #8
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
	ldr	d0, [x19, #72]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	mov	w8, #9
	str	x8, [sp]
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	ldr	w0, [x22]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	ldr	w8, [x21]
	sub	w8, w8, #12
	sxtw	x23, w8
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	ldr	d0, [x19, x23, lsl #3]
	sub	sp, sp, #16
	str	d0, [sp, #8]
	str	x23, [sp]
	mov	x1, x20
	bl	_fprintf
	add	sp, sp, #16
	add	x23, x23, #1
	ldrsw	x8, [x21]
	sub	x8, x8, #2
	cmp	x23, x8
	b.lt	LBB0_15
; %bb.16:
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_NBUF,4,2                       ; @NBUF
	.comm	_average,8,3                    ; @average
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%13.9f\n"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Average %13.9f\n"

l_.str.2:                               ; @.str.2
	.asciz	"First rank\n"

l_.str.3:                               ; @.str.3
	.asciz	"%2d %13.9f\n"

l_.str.4:                               ; @.str.4
	.asciz	"Last rank\n"

.subsections_via_symbols
