	.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	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movsd	%xmm0, -24(%rbp)                ## 8-byte Spill
	callq	_get_master_sync_type
	movq	_AV_SYNC_VIDEO_MASTER@GOTPCREL(%rip), %rcx
	xorpd	%xmm1, %xmm1
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	jmp	LBB0_10
LBB0_2:
	leaq	8(%rbx), %rdi
	callq	_get_clock
	movapd	%xmm0, -48(%rbp)                ## 16-byte Spill
	movq	%rbx, %rdi
	callq	_get_master_clock
	movapd	-48(%rbp), %xmm1                ## 16-byte Reload
	subsd	%xmm0, %xmm1
	movapd	%xmm1, -48(%rbp)                ## 16-byte Spill
	movq	_AV_SYNC_THRESHOLD_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_AV_SYNC_THRESHOLD_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_FFMIN
	movl	%r14d, %edi
	callq	_FFMAX
	movaps	%xmm0, -64(%rbp)                ## 16-byte Spill
	movaps	-48(%rbp), %xmm0                ## 16-byte Reload
	callq	_isnan
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movaps	-48(%rbp), %xmm0                ## 16-byte Reload
	callq	_fabs
	cmpq	(%rbx), %rax
	jge	LBB0_8
## %bb.4:
	movapd	LCPI0_0(%rip), %xmm0            ## xmm0 = [-0.0E+0,-0.0E+0]
	movapd	-64(%rbp), %xmm2                ## 16-byte Reload
	xorpd	%xmm2, %xmm0
	movapd	-48(%rbp), %xmm1                ## 16-byte Reload
	ucomisd	%xmm1, %xmm0
	jae	LBB0_11
## %bb.5:
	ucomisd	%xmm2, %xmm1
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	jb	LBB0_12
## %bb.6:
	movq	_AV_SYNC_FRAMEDUP_THRESHOLD@GOTPCREL(%rip), %rax
	ucomisd	(%rax), %xmm0
	jbe	LBB0_12
## %bb.7:
	addsd	%xmm1, %xmm0
	jmp	LBB0_10
LBB0_8:
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
LBB0_9:
	movapd	-48(%rbp), %xmm1                ## 16-byte Reload
LBB0_10:
	movq	_AV_LOG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorpd	LCPI0_0(%rip), %xmm1
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	movsd	%xmm0, -24(%rbp)                ## 8-byte Spill
	callq	_av_log
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addsd	%xmm1, %xmm0
	xorl	%edi, %edi
	callq	_FFMAX
	jmp	LBB0_9
LBB0_12:
	ucomisd	%xmm2, %xmm1
	jb	LBB0_10
## %bb.13:
	addsd	%xmm0, %xmm0
	jmp	LBB0_10
	.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_SYNC_FRAMEDUP_THRESHOLD,8,3 ## @AV_SYNC_FRAMEDUP_THRESHOLD
	.comm	_AV_LOG_TRACE,4,2               ## @AV_LOG_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"video: delay=%0.3f A-V=%f\n"

	.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	x19, x0
	fmov	d8, d0
	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_9
; %bb.1:
	add	x0, x19, #8
	bl	_get_clock
	fmov	d9, d0
	mov	x0, x19
	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_9
; %bb.2:
	fmov	d0, d9
	bl	_fabs
	ldr	x8, [x19]
	cmp	x0, x8
	b.ge	LBB0_9
; %bb.3:
	fneg	d0, d10
	fcmp	d9, d0
	b.ls	LBB0_7
; %bb.4:
Lloh9:
	adrp	x8, _AV_SYNC_FRAMEDUP_THRESHOLD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_SYNC_FRAMEDUP_THRESHOLD@GOTPAGEOFF]
Lloh11:
	ldr	d0, [x8]
	fcmp	d9, d10
	fccmp	d0, d8, #0, ge
	b.mi	LBB0_8
; %bb.5:
	fcmp	d9, d10
	b.lt	LBB0_9
; %bb.6:
	fadd	d8, d8, d8
	b	LBB0_9
LBB0_7:
	fadd	d0, d9, d8
	mov	w0, #0
	bl	_FFMAX
	fmov	d8, d0
	b	LBB0_9
LBB0_8:
	fadd	d8, d9, d8
LBB0_9:
Lloh12:
	adrp	x8, _AV_LOG_TRACE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_TRACE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	fneg	d1, d9
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	fmov	d0, d8
	bl	_av_log
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.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_SYNC_FRAMEDUP_THRESHOLD,8,3 ; @AV_SYNC_FRAMEDUP_THRESHOLD
	.comm	_AV_LOG_TRACE,4,2               ; @AV_LOG_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"video: delay=%0.3f A-V=%f\n"

	.no_dead_strip	_compute_target_delay
.subsections_via_symbols
