	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function finddelay
LCPI0_0:
	.quad	0x0000000000000000              ## double 0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_finddelay:                             ## @finddelay
	.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, %r14
	movsd	%xmm4, -56(%rbp)                ## 8-byte Spill
	callq	_greatcircle
	movq	_debug@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	cvttsd2si	%xmm0, %esi
	movq	_MILE@GOTPCREL(%rip), %rax
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	divsd	(%rax), %xmm0
	leaq	L_.str(%rip), %rdi
	movb	$1, %al
	callq	_printf
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
LBB0_2:
	movl	$1, %ebx
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	movl	$1, %edi
	callq	_waveangle
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm0, %xmm1
	leaq	L_.str.2(%rip), %r13
	jbe	LBB0_8
## %bb.3:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	leaq	L_.str.3(%rip), %r14
	leaq	L_.str.1(%rip), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	movl	%ebx, %edi
	callq	_waveangle
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r12)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$2, %ebx
	movq	%r14, %rdx
	cmovaeq	%r13, %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_6
LBB0_7:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_8:
	cmpq	$0, (%r12)
	je	LBB0_10
## %bb.9:
	cmpl	$2, %ebx
	leaq	L_.str.3(%rip), %rdx
	cmovaeq	%r13, %rdx
	movq	_RADPERDEG@GOTPCREL(%rip), %rax
	divsd	(%rax), %xmm0
	leaq	L_.str.4(%rip), %rdi
	movl	%ebx, %esi
	movb	$1, %al
	callq	_printf
LBB0_10:
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	movl	%ebx, %edi
	callq	_propdelay
	movsd	%xmm0, (%r14)
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,8,3                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"great circle distance %g km %g miles\n"

	.comm	_MILE,8,3                       ## @MILE
L_.str.1:                               ## @.str.1
	.asciz	"tried %d hop%s, no good\n"

L_.str.2:                               ## @.str.2
	.asciz	"s"

L_.str.3:                               ## @.str.3
	.space	1

L_.str.4:                               ## @.str.4
	.asciz	"%d hop%s okay, wave angle is %g\n"

	.comm	_RADPERDEG,8,3                  ## @RADPERDEG
	.no_dead_strip	_finddelay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function finddelay
_finddelay:                             ; @finddelay
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x0
	fmov	d8, d4
	bl	_greatcircle
	fmov	d9, d0
Lloh0:
	adrp	x22, _debug@GOTPAGE
Lloh1:
	ldr	x22, [x22, _debug@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_2
; %bb.1:
	fcvtzs	w1, d9
Lloh2:
	adrp	x8, _MILE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MILE@GOTPAGEOFF]
Lloh4:
	ldr	d0, [x8]
	fdiv	d0, d9, d0
	str	d0, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
LBB0_2:
	mov	w20, #1
	fmov	d0, d9
	fmov	d1, d8
	mov	w0, #1
	bl	_waveangle
	fcmp	d0, #0.0
Lloh7:
	adrp	x23, l_.str.3@PAGE
Lloh8:
	add	x23, x23, l_.str.3@PAGEOFF
Lloh9:
	adrp	x24, l_.str.2@PAGE
Lloh10:
	add	x24, x24, l_.str.2@PAGEOFF
	b.pl	LBB0_7
; %bb.3:
	mov	w20, #1
Lloh11:
	adrp	x21, l_.str.1@PAGE
Lloh12:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w20, w20, #1
	fmov	d0, d9
	fmov	d1, d8
	mov	x0, x20
	bl	_waveangle
	fcmp	d0, #0.0
	b.pl	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	cbz	x8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w20, #1
	csel	x8, x24, x23, hi
	str	x8, [sp]
	mov	x0, x21
	mov	x1, x20
	bl	_printf
	b	LBB0_4
LBB0_7:
	ldr	x8, [x22]
	cbz	x8, LBB0_9
; %bb.8:
	cmp	w20, #1
	csel	x8, x24, x23, hi
Lloh13:
	adrp	x9, _RADPERDEG@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RADPERDEG@GOTPAGEOFF]
Lloh15:
	ldr	d1, [x9]
	fdiv	d0, d0, d1
	str	d0, [sp, #8]
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	bl	_printf
LBB0_9:
	fmov	d0, d9
	fmov	d1, d8
	mov	x0, x20
	bl	_propdelay
	str	d0, [x19]
	mov	x0, x20
	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	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,8,3                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"great circle distance %g km %g miles\n"

	.comm	_MILE,8,3                       ; @MILE
l_.str.1:                               ; @.str.1
	.asciz	"tried %d hop%s, no good\n"

l_.str.2:                               ; @.str.2
	.asciz	"s"

l_.str.3:                               ; @.str.3
	.space	1

l_.str.4:                               ; @.str.4
	.asciz	"%d hop%s okay, wave angle is %g\n"

	.comm	_RADPERDEG,8,3                  ; @RADPERDEG
	.no_dead_strip	_finddelay
.subsections_via_symbols
