	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_av_sync_delay              ## -- Begin function drm_av_sync_delay
	.p2align	4, 0x90
_drm_av_sync_delay:                     ## @drm_av_sync_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_8
## %bb.1:
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rsi)
	setne	%cl
	cmpl	$0, 4(%rax)
	setne	%al
	andb	%cl, %al
	movzbl	%al, %ecx
	movq	(%rdi), %rax
	movl	(%rax,%rcx,4), %eax
	cmpl	$255, %eax
	je	LBB0_8
## %bb.2:
	movq	8(%rdi), %rdx
	movl	(%rdx,%rcx,4), %ebx
	cmpl	$255, %ebx
	je	LBB0_8
## %bb.3:
	xorl	%r15d, %r15d
	movl	$0, %r14d
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leal	(%rax,%rax), %edi
	addl	$-2, %edi
	movl	$500, %esi                      ## imm = 0x1F4
	callq	_min
	movl	%eax, %r14d
LBB0_5:
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.6:
	leal	(%rbx,%rbx), %edi
	addl	$-2, %edi
	movl	$500, %esi                      ## imm = 0x1F4
	callq	_min
	movl	%eax, %r15d
LBB0_7:
	subl	%r14d, %r15d
	movl	%r15d, %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_max                            ## TAILCALL
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_av_sync_delay              ; -- Begin function drm_av_sync_delay
	.p2align	2
_drm_av_sync_delay:                     ; @drm_av_sync_delay
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #16]
	ldr	w9, [x8]
	cbz	w9, LBB0_6
; %bb.1:
	ldr	w9, [x1]
Lloh0:
	adrp	x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	ldr	w8, [x8, #4]
	ccmp	w8, #0, #4, ne
	cset	w8, ne
	ldr	x10, [x0]
	lsl	x9, x8, #2
	ldr	w8, [x10, x9]
	cmp	w8, #255
	b.eq	LBB0_6
; %bb.2:
	ldr	x10, [x0, #8]
	ldr	w20, [x10, x9]
	cmp	w20, #255
	b.eq	LBB0_6
; %bb.3:
	cbz	w8, LBB0_7
; %bb.4:
	lsl	w8, w8, #1
	sub	w0, w8, #2
	mov	w1, #500
	bl	_min
	mov	x19, x0
	cbz	w20, LBB0_8
LBB0_5:
	lsl	w8, w20, #1
	sub	w0, w8, #2
	mov	w1, #500
	bl	_min
	b	LBB0_9
LBB0_6:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w19, #0
	cbnz	w20, LBB0_5
LBB0_8:
	mov	w0, #0
LBB0_9:
	sub	w0, w0, w19
	mov	w1, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_max
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
.subsections_via_symbols
