	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zoran_g_fmt_vid_overlay
_zoran_g_fmt_vid_overlay:               ## @zoran_g_fmt_vid_overlay
	.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	%rdx, %r15
	movq	%rsi, %rbx
	movq	16(%rsi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	movups	(%rbx), %xmm0
	movups	%xmm0, 4(%r15)
	addl	%eax, %eax
	movq	_BUZ_MAX_HEIGHT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_1
## %bb.2:
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_V4L2_FIELD_TOP@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BUZ_MAX_HEIGHT,4,2             ## @BUZ_MAX_HEIGHT
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_V4L2_FIELD_TOP,4,2             ## @V4L2_FIELD_TOP
	.no_dead_strip	_zoran_g_fmt_vid_overlay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zoran_g_fmt_vid_overlay
_zoran_g_fmt_vid_overlay:               ; @zoran_g_fmt_vid_overlay
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	ldr	x21, [x1, #16]
	mov	x0, x21
	bl	_mutex_lock
	ldr	q0, [x20]
	stur	q0, [x19, #4]
	fmov	w8, s0
Lloh0:
	adrp	x9, _BUZ_MAX_HEIGHT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BUZ_MAX_HEIGHT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh5:
	adrp	x11, _V4L2_FIELD_TOP@GOTPAGE
Lloh6:
	ldr	x11, [x11, _V4L2_FIELD_TOP@GOTPAGEOFF]
	cmp	w9, w8, lsl #1
	csel	x8, x10, x11, lt
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x21
	bl	_mutex_unlock
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BUZ_MAX_HEIGHT,4,2             ; @BUZ_MAX_HEIGHT
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_V4L2_FIELD_TOP,4,2             ; @V4L2_FIELD_TOP
	.no_dead_strip	_zoran_g_fmt_vid_overlay
.subsections_via_symbols
