	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buffer_activate
_buffer_activate:                       ## @buffer_activate
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_ts_dbg
	movq	$0, (%rbx)
	cmpl	$0, 8(%r14)
	je	LBB0_2
## %bb.1:
	movq	(%r14), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_V4L2_FIELD_TOP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_3:
	testq	%r15, %r15
	cmoveq	%rbx, %r15
	movq	_V4L2_FIELD_TOP@GOTPCREL(%rip), %r12
	cmpq	%rax, (%r12)
	jne	LBB0_4
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	movq	_V4L2_FIELD_BOTTOM@GOTPCREL(%rip), %r12
	movq	%rbx, %r13
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %r13
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
LBB0_6:
	movq	%rbx, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_ts_dbg
	movl	$5, %edi
	callq	_SAA7134_RS_BA1
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_saa7134_buffer_base
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_saa_writel
	movl	$5, %edi
	callq	_SAA7134_RS_BA2
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_saa7134_buffer_base
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_saa_writel
	movq	(%r12), %rax
	movq	%rax, (%r14)
	movq	%r14, %rdi
	callq	_saa7134_set_dmabits
	leaq	12(%r14), %rdi
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_TS_BUFFER_TIMEOUT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rax), %rsi
	callq	_mod_timer
	cmpl	$0, 8(%r14)
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_saa7134_ts_start
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"buffer_activate [%p]"

	.comm	_V4L2_FIELD_TOP,8,3             ## @V4L2_FIELD_TOP
L_.str.1:                               ## @.str.1
	.asciz	"- [top]     buf=%p next=%p\n"

	.comm	_V4L2_FIELD_BOTTOM,8,3          ## @V4L2_FIELD_BOTTOM
L_.str.2:                               ## @.str.2
	.asciz	"- [bottom]  buf=%p next=%p\n"

	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_TS_BUFFER_TIMEOUT,8,3          ## @TS_BUFFER_TIMEOUT
	.no_dead_strip	_buffer_activate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buffer_activate
_buffer_activate:                       ; @buffer_activate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ts_dbg
	str	xzr, [x20]
	ldr	w9, [x19, #8]
Lloh2:
	adrp	x8, _V4L2_FIELD_TOP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_FIELD_TOP@GOTPAGEOFF]
	cbz	w9, LBB0_2
; %bb.1:
	ldr	x9, [x19]
	b	LBB0_3
LBB0_2:
	ldr	x9, [x8]
	str	x9, [x19]
LBB0_3:
	cmp	x21, #0
	csel	x10, x20, x21, eq
	ldr	x11, [x8]
Lloh4:
	adrp	x12, l_.str.2@PAGE
Lloh5:
	add	x12, x12, l_.str.2@PAGEOFF
Lloh6:
	adrp	x13, l_.str.1@PAGE
Lloh7:
	add	x13, x13, l_.str.1@PAGEOFF
	cmp	x11, x9
	csel	x0, x13, x12, eq
	csel	x21, x20, x10, eq
	csel	x22, x10, x20, eq
	str	x10, [sp]
Lloh8:
	adrp	x9, _V4L2_FIELD_BOTTOM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_FIELD_BOTTOM@GOTPAGEOFF]
	csel	x23, x9, x8, eq
	mov	x1, x20
	bl	_ts_dbg
	mov	w0, #5
	bl	_SAA7134_RS_BA1
	mov	x20, x0
	mov	x0, x21
	bl	_saa7134_buffer_base
	mov	x1, x0
	mov	x0, x20
	bl	_saa_writel
	mov	w0, #5
	bl	_SAA7134_RS_BA2
	mov	x20, x0
	mov	x0, x22
	bl	_saa7134_buffer_base
	mov	x1, x0
	mov	x0, x20
	bl	_saa_writel
	ldr	x8, [x23]
	str	x8, [x19]
	mov	x0, x19
	bl	_saa7134_set_dmabits
Lloh10:
	adrp	x8, _jiffies@GOTPAGE
Lloh11:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
	add	x0, x19, #12
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _TS_BUFFER_TIMEOUT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TS_BUFFER_TIMEOUT@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_mod_timer
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_saa7134_ts_start
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"buffer_activate [%p]"

	.comm	_V4L2_FIELD_TOP,8,3             ; @V4L2_FIELD_TOP
l_.str.1:                               ; @.str.1
	.asciz	"- [top]     buf=%p next=%p\n"

	.comm	_V4L2_FIELD_BOTTOM,8,3          ; @V4L2_FIELD_BOTTOM
l_.str.2:                               ; @.str.2
	.asciz	"- [bottom]  buf=%p next=%p\n"

	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_TS_BUFFER_TIMEOUT,8,3          ; @TS_BUFFER_TIMEOUT
	.no_dead_strip	_buffer_activate
.subsections_via_symbols
