	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bttv_buffer_activate_video     ## -- Begin function bttv_buffer_activate_video
	.p2align	4, 0x90
_bttv_buffer_activate_video:            ## @bttv_buffer_activate_video
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %rsi
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	_VIDEOBUF_ACTIVE@GOTPCREL(%rip), %rcx
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.2:
	movq	(%rcx), %rcx
	movq	%rcx, 24(%rax)
	cmpq	%rsi, %rax
	je	LBB0_3
## %bb.5:
	movq	%rcx, 24(%rsi)
	cmpq	$0, 16(%rax)
	je	LBB0_7
## %bb.6:
	addq	$16, %rax
	movq	%rax, %rdi
	callq	_list_del
	movq	(%rbx), %rsi
LBB0_7:
	cmpq	$0, 16(%rsi)
	je	LBB0_10
## %bb.8:
	addq	$16, %rsi
	movq	%rsi, %rax
	jmp	LBB0_9
LBB0_14:
	testq	%rsi, %rsi
	je	LBB0_20
## %bb.15:
	movq	_VIDEOBUF_ACTIVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rsi)
	cmpq	$0, 16(%rsi)
	je	LBB0_17
## %bb.16:
	addq	$16, %rsi
	movq	%rsi, %rdi
	callq	_list_del
	movq	(%rbx), %rsi
LBB0_17:
	addq	$12, %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_bttv_apply_geo
	movq	(%rbx), %rsi
	addq	$12, %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bttv_apply_geo
	movq	_RISC_SLOT_O_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_bttv_risc_hook
	movq	_RISC_SLOT_E_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	addq	$8, %rdx
	movl	8(%rbx), %ecx
	movq	%r14, %rdi
	callq	_bttv_risc_hook
	movq	(%rbx), %rax
	movzbl	(%rax), %edi
	movq	_BT848_COLOR_FMT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-256, %esi
	callq	_btaor
	movq	(%rbx), %rax
	jmp	LBB0_18
LBB0_11:
	movq	(%rcx), %rcx
	movq	%rcx, 24(%rax)
	cmpq	$0, 16(%rax)
	je	LBB0_13
## %bb.12:
	addq	$16, %rax
	movq	%rax, %rdi
	callq	_list_del
	movq	16(%rbx), %rax
LBB0_13:
	addq	$12, %rax
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_bttv_apply_geo
	movq	16(%rbx), %rsi
	addq	$12, %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bttv_apply_geo
	movq	_RISC_SLOT_O_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rdx
	addq	$32, %rdx
	movl	8(%rbx), %ecx
	movq	%r14, %rdi
	callq	_bttv_risc_hook
	movq	_RISC_SLOT_E_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_bttv_risc_hook
	movq	16(%rbx), %rax
	movzbl	(%rax), %edi
	movq	_BT848_COLOR_FMT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-256, %esi
	callq	_btaor
	movq	16(%rbx), %rax
LBB0_18:
	movl	4(%rax), %edi
	andl	$15, %edi
	jmp	LBB0_19
LBB0_3:
	cmpq	$0, 16(%rax)
	je	LBB0_10
## %bb.4:
	addq	$16, %rax
LBB0_9:
	movq	%rax, %rdi
	callq	_list_del
LBB0_10:
	movq	16(%rbx), %rsi
	addq	$12, %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_bttv_apply_geo
	movq	(%rbx), %rsi
	addq	$12, %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bttv_apply_geo
	movq	_RISC_SLOT_O_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rdx
	addq	$32, %rdx
	movl	24(%rbx), %ecx
	movq	%r14, %rdi
	callq	_bttv_risc_hook
	movq	_RISC_SLOT_E_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	addq	$8, %rdx
	movl	8(%rbx), %ecx
	movq	%r14, %rdi
	callq	_bttv_risc_hook
	movq	(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	$240, %edx
	andl	(%rcx), %edx
	movl	(%rax), %edi
	andl	$15, %edi
	orl	%edx, %edi
	movq	_BT848_COLOR_FMT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-256, %esi
	callq	_btaor
	movq	(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	4(%rcx), %ecx
	andl	$10, %ecx
	movl	4(%rax), %edi
	andl	$5, %edi
	orl	%ecx, %edi
LBB0_19:
	movq	_BT848_COLOR_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-16, %esi
	callq	_btaor
LBB0_21:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_20:
	movq	_RISC_SLOT_O_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_bttv_risc_hook
	movq	_RISC_SLOT_E_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_bttv_risc_hook
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_VIDEOBUF_ACTIVE,8,3            ## @VIDEOBUF_ACTIVE
	.comm	_RISC_SLOT_O_FIELD,4,2          ## @RISC_SLOT_O_FIELD
	.comm	_RISC_SLOT_E_FIELD,4,2          ## @RISC_SLOT_E_FIELD
	.comm	_BT848_COLOR_FMT,4,2            ## @BT848_COLOR_FMT
	.comm	_BT848_COLOR_CTL,4,2            ## @BT848_COLOR_CTL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bttv_buffer_activate_video     ; -- Begin function bttv_buffer_activate_video
	.p2align	2
_bttv_buffer_activate_video:            ; @bttv_buffer_activate_video
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x1, #16]
	ldr	x8, [x1]
	cbz	x0, LBB0_7
; %bb.1:
	cbz	x8, LBB0_11
; %bb.2:
Lloh0:
	adrp	x9, _VIDEOBUF_ACTIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VIDEOBUF_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	str	x9, [x0, #24]
	cmp	x0, x8
	b.eq	LBB0_15
; %bb.3:
	str	x9, [x8, #24]
	ldr	x9, [x0, #16]!
	cbz	x9, LBB0_5
; %bb.4:
	bl	_list_del
	ldr	x8, [x19]
LBB0_5:
	ldr	x9, [x8, #16]!
	cbz	x9, LBB0_17
; %bb.6:
	mov	x0, x8
	b	LBB0_16
LBB0_7:
	cbz	x8, LBB0_20
; %bb.8:
Lloh3:
	adrp	x9, _VIDEOBUF_ACTIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VIDEOBUF_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	mov	x0, x8
	ldr	x10, [x0, #16]!
	str	x9, [x0, #8]
	cbz	x10, LBB0_10
; %bb.9:
	bl	_list_del
	ldr	x8, [x19]
LBB0_10:
	add	x1, x8, #12
	mov	x0, x20
	mov	w2, #1
	bl	_bttv_apply_geo
	ldr	x8, [x19]
	add	x1, x8, #12
	mov	x0, x20
	mov	w2, #0
	bl	_bttv_apply_geo
Lloh6:
	adrp	x8, _RISC_SLOT_O_FIELD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RISC_SLOT_O_FIELD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	bl	_bttv_risc_hook
Lloh9:
	adrp	x8, _RISC_SLOT_E_FIELD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RISC_SLOT_E_FIELD@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x8, [x19]
	add	x2, x8, #8
	ldr	w3, [x19, #8]
	mov	x0, x20
	bl	_bttv_risc_hook
	ldr	x8, [x19]
	ldrb	w0, [x8]
Lloh12:
	adrp	x8, _BT848_COLOR_FMT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BT848_COLOR_FMT@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	w1, #-256
	bl	_btaor
	ldr	x8, [x19]
	b	LBB0_14
LBB0_11:
Lloh15:
	adrp	x8, _VIDEOBUF_ACTIVE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VIDEOBUF_ACTIVE@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x8]
	mov	x8, x0
	ldr	x10, [x8, #16]!
	str	x9, [x8, #8]
	cbz	x10, LBB0_13
; %bb.12:
	mov	x0, x8
	bl	_list_del
	ldr	x0, [x19, #16]
LBB0_13:
	add	x1, x0, #12
	mov	x0, x20
	mov	w2, #1
	bl	_bttv_apply_geo
	ldr	x8, [x19, #16]
	add	x1, x8, #12
	mov	x0, x20
	mov	w2, #0
	bl	_bttv_apply_geo
Lloh18:
	adrp	x8, _RISC_SLOT_O_FIELD@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RISC_SLOT_O_FIELD@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	add	x2, x8, #32
	ldr	w3, [x19, #8]
	mov	x0, x20
	bl	_bttv_risc_hook
Lloh21:
	adrp	x8, _RISC_SLOT_E_FIELD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RISC_SLOT_E_FIELD@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	bl	_bttv_risc_hook
	ldr	x8, [x19, #16]
	ldrb	w0, [x8]
Lloh24:
	adrp	x8, _BT848_COLOR_FMT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BT848_COLOR_FMT@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	w1, #-256
	bl	_btaor
	ldr	x8, [x19, #16]
LBB0_14:
	ldr	w8, [x8, #4]
	and	w0, w8, #0xf
	b	LBB0_18
LBB0_15:
	ldr	x8, [x0, #16]!
	cbz	x8, LBB0_17
LBB0_16:
	bl	_list_del
LBB0_17:
	ldr	x8, [x19, #16]
	add	x1, x8, #12
	mov	x0, x20
	mov	w2, #1
	bl	_bttv_apply_geo
	ldr	x8, [x19]
	add	x1, x8, #12
	mov	x0, x20
	mov	w2, #0
	bl	_bttv_apply_geo
Lloh27:
	adrp	x8, _RISC_SLOT_O_FIELD@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RISC_SLOT_O_FIELD@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	add	x2, x8, #32
	ldr	w3, [x19, #24]
	mov	x0, x20
	bl	_bttv_risc_hook
Lloh30:
	adrp	x8, _RISC_SLOT_E_FIELD@GOTPAGE
Lloh31:
	ldr	x8, [x8, _RISC_SLOT_E_FIELD@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	ldr	x8, [x19]
	add	x2, x8, #8
	ldr	w3, [x19, #8]
	mov	x0, x20
	bl	_bttv_risc_hook
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	and	w0, w8, #0xf0
	ldr	x8, [x19]
	ldr	w8, [x8]
	bfxil	w0, w8, #0, #4
Lloh33:
	adrp	x8, _BT848_COLOR_FMT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _BT848_COLOR_FMT@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	w1, #-256
	bl	_btaor
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #4]
	mov	w9, #10
	and	w8, w8, w9
	ldr	x9, [x19]
	ldr	w9, [x9, #4]
	mov	w10, #5
	and	w9, w9, w10
	orr	w0, w9, w8
LBB0_18:
Lloh36:
	adrp	x8, _BT848_COLOR_CTL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _BT848_COLOR_CTL@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	w1, #-16
	bl	_btaor
LBB0_19:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_20:
Lloh39:
	adrp	x8, _RISC_SLOT_O_FIELD@GOTPAGE
Lloh40:
	ldr	x8, [x8, _RISC_SLOT_O_FIELD@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	bl	_bttv_risc_hook
Lloh42:
	adrp	x8, _RISC_SLOT_E_FIELD@GOTPAGE
Lloh43:
	ldr	x8, [x8, _RISC_SLOT_E_FIELD@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	bl	_bttv_risc_hook
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_VIDEOBUF_ACTIVE,8,3            ; @VIDEOBUF_ACTIVE
	.comm	_RISC_SLOT_O_FIELD,4,2          ; @RISC_SLOT_O_FIELD
	.comm	_RISC_SLOT_E_FIELD,4,2          ; @RISC_SLOT_E_FIELD
	.comm	_BT848_COLOR_FMT,4,2            ; @BT848_COLOR_FMT
	.comm	_BT848_COLOR_CTL,4,2            ; @BT848_COLOR_CTL
.subsections_via_symbols
