	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function compute_target_delay
LCPI0_0:
	.quad	0x8000000000000000              ## double -0
	.quad	0x8000000000000000              ## double -0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_compute_target_delay:                  ## @compute_target_delay
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movsd	%xmm0, -32(%rbp)                ## 8-byte Spill
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_get_master_sync_type
	movq	_AV_SYNC_VIDEO_MASTER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	xorpd	%xmm0, %xmm0
	movsd	%xmm0, -24(%rbp)                ## 8-byte Spill
	movsd	-32(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	jmp	LBB0_13
LBB0_2:
	movq	%rbx, %rdi
	callq	_get_clock
	movsd	%xmm0, -24(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_get_master_clock
	movsd	-24(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	movsd	%xmm1, -24(%rbp)                ## 8-byte Spill
	movq	_AV_SYNC_THRESHOLD_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_AV_SYNC_THRESHOLD_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movsd	-32(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_FFMIN
	movl	%ebx, %edi
	callq	_FFMAX
	movaps	%xmm0, -48(%rbp)                ## 16-byte Spill
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_isnan
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_fabs
	movq	_AV_NOSYNC_THRESHOLD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_3
## %bb.5:
	movapd	LCPI0_0(%rip), %xmm0            ## xmm0 = [-0.0E+0,-0.0E+0]
	movapd	-48(%rbp), %xmm2                ## 16-byte Reload
	xorpd	%xmm2, %xmm0
	movsd	-24(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	ucomisd	%xmm1, %xmm0
	jae	LBB0_10
## %bb.6:
	ucomisd	%xmm2, %xmm1
	movsd	-32(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	jb	LBB0_11
## %bb.7:
	movq	_AV_SYNC_FRAMEDUP_THRESHOLD@GOTPCREL(%rip), %rax
	ucomisd	(%rax), %xmm0
	jbe	LBB0_11
## %bb.8:
	addsd	%xmm1, %xmm0
	jmp	LBB0_13
LBB0_3:
	movsd	-32(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
LBB0_13:
	testq	%r14, %r14
	je	LBB0_15
## %bb.14:
	movsd	%xmm0, (%r14)
	movsd	-24(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	movsd	%xmm1, 8(%r14)
LBB0_15:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	movsd	-32(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addsd	%xmm1, %xmm0
	xorl	%edi, %edi
	callq	_FFMAX
	jmp	LBB0_13
LBB0_11:
	ucomisd	%xmm2, %xmm1
	jb	LBB0_13
## %bb.12:
	addsd	%xmm0, %xmm0
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_SYNC_VIDEO_MASTER,8,3       ## @AV_SYNC_VIDEO_MASTER
	.comm	_AV_SYNC_THRESHOLD_MIN,4,2      ## @AV_SYNC_THRESHOLD_MIN
	.comm	_AV_SYNC_THRESHOLD_MAX,4,2      ## @AV_SYNC_THRESHOLD_MAX
	.comm	_AV_NOSYNC_THRESHOLD,8,3        ## @AV_NOSYNC_THRESHOLD
	.comm	_AV_SYNC_FRAMEDUP_THRESHOLD,8,3 ## @AV_SYNC_FRAMEDUP_THRESHOLD
	.comm	_AV_LOG_TRACE,4,2               ## @AV_LOG_TRACE
	.no_dead_strip	_compute_target_delay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compute_target_delay
_compute_target_delay:                  ; @compute_target_delay
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset b8, -40
	.cfi_offset b9, -48
	.cfi_offset b10, -56
	.cfi_offset b11, -64
	mov	x20, x1
	fmov	d8, d0
	mov	x19, x0
	mov	x0, x1
	bl	_get_master_sync_type
Lloh0:
	adrp	x8, _AV_SYNC_VIDEO_MASTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_SYNC_VIDEO_MASTER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	movi	d9, #0000000000000000
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.1:
	mov	x0, x20
	bl	_get_clock
	fmov	d9, d0
	mov	x0, x20
	bl	_get_master_clock
	fsub	d9, d9, d0
Lloh3:
	adrp	x8, _AV_SYNC_THRESHOLD_MIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_SYNC_THRESHOLD_MIN@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
Lloh6:
	adrp	x8, _AV_SYNC_THRESHOLD_MAX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_SYNC_THRESHOLD_MAX@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	fmov	d0, d8
	bl	_FFMIN
	mov	x0, x20
	bl	_FFMAX
	fmov	d10, d0
	fmov	d0, d9
	bl	_isnan
	cbnz	w0, LBB0_8
; %bb.2:
	fmov	d0, d9
	bl	_fabs
Lloh9:
	adrp	x8, _AV_NOSYNC_THRESHOLD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_NOSYNC_THRESHOLD@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_8
; %bb.3:
	fneg	d0, d10
	fcmp	d9, d0
	b.ls	LBB0_7
; %bb.4:
Lloh12:
	adrp	x8, _AV_SYNC_FRAMEDUP_THRESHOLD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_SYNC_FRAMEDUP_THRESHOLD@GOTPAGEOFF]
Lloh14:
	ldr	d0, [x8]
	fcmp	d9, d10
	fccmp	d0, d8, #0, ge
	b.mi	LBB0_11
; %bb.5:
	fcmp	d9, d10
	b.lt	LBB0_8
; %bb.6:
	fadd	d8, d8, d8
	cbnz	x19, LBB0_9
	b	LBB0_10
LBB0_7:
	fadd	d0, d9, d8
	mov	w0, #0
	bl	_FFMAX
	fmov	d8, d0
LBB0_8:
	cbz	x19, LBB0_10
LBB0_9:
	stp	d8, d9, [x19]
LBB0_10:
	fmov	d0, d8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	fadd	d8, d9, d8
	cbnz	x19, LBB0_9
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_SYNC_VIDEO_MASTER,8,3       ; @AV_SYNC_VIDEO_MASTER
	.comm	_AV_SYNC_THRESHOLD_MIN,4,2      ; @AV_SYNC_THRESHOLD_MIN
	.comm	_AV_SYNC_THRESHOLD_MAX,4,2      ; @AV_SYNC_THRESHOLD_MAX
	.comm	_AV_NOSYNC_THRESHOLD,8,3        ; @AV_NOSYNC_THRESHOLD
	.comm	_AV_SYNC_FRAMEDUP_THRESHOLD,8,3 ; @AV_SYNC_FRAMEDUP_THRESHOLD
	.comm	_AV_LOG_TRACE,4,2               ; @AV_LOG_TRACE
	.no_dead_strip	_compute_target_delay
.subsections_via_symbols
