	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7146_set_vbi_capture
_saa7146_set_vbi_capture:               ## @saa7146_set_vbi_capture
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	_SAA7146_HPS_SYNC_PORT_A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	_CMD_E_FID_B@GOTPCREL(%rip), %rax
	cmoveq	_CMD_E_FID_A@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_CMD_O_FID_B@GOTPCREL(%rip), %rax
	cmoveq	_CMD_O_FID_A@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	(%rsi), %rax
	movq	40(%rax), %rcx
	movq	%rcx, -56(%rbp)
	movq	_vbi_pixel_to_capture@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movd	%edx, %xmm0
	pshufd	$80, %xmm0, %xmm1               ## xmm1 = xmm0[0,0,1,1]
	pslld	$5, %xmm0
	pslld	$4, %xmm1
	pblendw	$243, %xmm0, %xmm1              ## xmm1 = xmm0[0,1],xmm1[2,3],xmm0[4,5,6,7]
	pmovsxdq	%xmm1, %xmm0
	movq	%rcx, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, -72(%rbp)
	movl	%edx, -88(%rbp)
	movq	_ME1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	32(%rax), %ecx
	movl	%ecx, -84(%rbp)
	orl	$1048576, %edx                  ## imm = 0x100000
	movl	%edx, -80(%rbp)
	leaq	-88(%rbp), %rdx
	movl	$3, %esi
	callq	_saa7146_write_out_dma
	movq	_CMD_WR_REG@GOTPCREL(%rip), %rax
	movq	_MC2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	3(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$2, %edx
	orl	(%rax), %edx
	movslq	%edx, %rdi
	orq	$256, %rdi                      ## imm = 0x100
	callq	_WRITE_RPS1
	movq	_MASK_28@GOTPCREL(%rip), %rcx
	movq	_MASK_12@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	orq	(%rcx), %rdi
	callq	_WRITE_RPS1
	movq	_CMD_WR_REG_MASK@GOTPCREL(%rip), %rax
	movq	_MC1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	3(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$2, %edx
	orl	(%rax), %edx
	movslq	%edx, %rdi
	callq	_WRITE_RPS1
	movq	_MASK_04@GOTPCREL(%rip), %r12
	movq	_MASK_20@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	orq	(%r12), %rdi
	callq	_WRITE_RPS1
	movq	(%r13), %rdi
	orq	(%r12), %rdi
	callq	_WRITE_RPS1
	movq	_CMD_PAUSE@GOTPCREL(%rip), %rbx
	orq	(%rbx), %r15
	movq	%r15, %rdi
	callq	_WRITE_RPS1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	orq	(%rbx), %rdi
	callq	_WRITE_RPS1
	movq	_CMD_INTERRUPT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_WRITE_RPS1
	movq	_CMD_STOP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_WRITE_RPS1
	movq	_MASK_28@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_SAA7146_IER_ENABLE
	movq	_RPS_ADDR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%r14, %rdi
	callq	_saa7146_write
	movq	_MC1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MASK_13@GOTPCREL(%rip), %rax
	movq	_MASK_29@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_saa7146_write
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7146_HPS_SYNC_PORT_A,8,3    ## @SAA7146_HPS_SYNC_PORT_A
	.comm	_CMD_E_FID_A,8,3                ## @CMD_E_FID_A
	.comm	_CMD_E_FID_B,8,3                ## @CMD_E_FID_B
	.comm	_CMD_O_FID_A,8,3                ## @CMD_O_FID_A
	.comm	_CMD_O_FID_B,8,3                ## @CMD_O_FID_B
	.comm	_vbi_pixel_to_capture,4,2       ## @vbi_pixel_to_capture
	.comm	_ME1,4,2                        ## @ME1
	.comm	_CMD_WR_REG,4,2                 ## @CMD_WR_REG
	.comm	_MC2,4,2                        ## @MC2
	.comm	_MASK_28,8,3                    ## @MASK_28
	.comm	_MASK_12,8,3                    ## @MASK_12
	.comm	_CMD_WR_REG_MASK,4,2            ## @CMD_WR_REG_MASK
	.comm	_MC1,4,2                        ## @MC1
	.comm	_MASK_04,8,3                    ## @MASK_04
	.comm	_MASK_20,8,3                    ## @MASK_20
	.comm	_CMD_PAUSE,8,3                  ## @CMD_PAUSE
	.comm	_CMD_INTERRUPT,8,3              ## @CMD_INTERRUPT
	.comm	_CMD_STOP,8,3                   ## @CMD_STOP
	.comm	_RPS_ADDR1,4,2                  ## @RPS_ADDR1
	.comm	_MASK_13,4,2                    ## @MASK_13
	.comm	_MASK_29,4,2                    ## @MASK_29
	.no_dead_strip	_saa7146_set_vbi_capture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function saa7146_set_vbi_capture
lCPI0_0:
	.long	5                               ; 0x5
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_saa7146_set_vbi_capture:               ; @saa7146_set_vbi_capture
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _SAA7146_HPS_SYNC_PORT_A@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SAA7146_HPS_SYNC_PORT_A@GOTPAGEOFF]
Lloh2:
	adrp	x10, _CMD_E_FID_A@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CMD_E_FID_A@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x11, _CMD_E_FID_B@GOTPAGE
Lloh6:
	ldr	x11, [x11, _CMD_E_FID_B@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	x20, [x8]
Lloh7:
	adrp	x8, _CMD_O_FID_A@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CMD_O_FID_A@GOTPAGEOFF]
Lloh9:
	adrp	x9, _CMD_O_FID_B@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CMD_O_FID_B@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	x21, [x8]
	ldr	x8, [x1]
Lloh11:
	adrp	x9, _vbi_pixel_to_capture@GOTPAGE
Lloh12:
	ldr	x9, [x9, _vbi_pixel_to_capture@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	dup.2s	v0, w9
	ldr	x10, [x8, #40]
Lloh14:
	adrp	x11, lCPI0_0@PAGE
Lloh15:
	ldr	d1, [x11, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	dup.2d	v1, x10
	str	x10, [sp, #40]
	saddw.2d	v0, v1, v0
	stur	q0, [sp, #24]
	ldr	w8, [x8, #32]
Lloh16:
	adrp	x10, _ME1@GOTPAGE
Lloh17:
	ldr	x10, [x10, _ME1@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w8, w10, w8
	stp	w9, w8, [sp, #8]
	orr	w8, w9, #0x100000
	str	w8, [sp, #16]
	add	x2, sp, #8
	mov	w1, #3
	bl	_saa7146_write_out_dma
Lloh19:
	adrp	x8, _CMD_WR_REG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CMD_WR_REG@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _MC2@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MC2@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	orr	w8, w8, w9, asr #2
	sxtw	x8, w8
	orr	x0, x8, #0x100
	bl	_WRITE_RPS1
Lloh25:
	adrp	x23, _MASK_28@GOTPAGE
Lloh26:
	ldr	x23, [x23, _MASK_28@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh27:
	adrp	x9, _MASK_12@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MASK_12@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	orr	x0, x9, x8
	bl	_WRITE_RPS1
Lloh30:
	adrp	x8, _CMD_WR_REG_MASK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CMD_WR_REG_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x22, _MC1@GOTPAGE
Lloh34:
	ldr	x22, [x22, _MC1@GOTPAGEOFF]
	ldr	w9, [x22]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	orr	w8, w8, w9, asr #2
	sxtw	x0, w8
	bl	_WRITE_RPS1
Lloh35:
	adrp	x24, _MASK_04@GOTPAGE
Lloh36:
	ldr	x24, [x24, _MASK_04@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh37:
	adrp	x25, _MASK_20@GOTPAGE
Lloh38:
	ldr	x25, [x25, _MASK_20@GOTPAGEOFF]
	ldr	x9, [x25]
	orr	x0, x9, x8
	bl	_WRITE_RPS1
	ldr	x8, [x24]
	ldr	x9, [x25]
	orr	x0, x9, x8
	bl	_WRITE_RPS1
Lloh39:
	adrp	x24, _CMD_PAUSE@GOTPAGE
Lloh40:
	ldr	x24, [x24, _CMD_PAUSE@GOTPAGEOFF]
	ldr	x8, [x24]
	orr	x0, x8, x21
	bl	_WRITE_RPS1
	ldr	x8, [x24]
	orr	x0, x8, x20
	bl	_WRITE_RPS1
Lloh41:
	adrp	x8, _CMD_INTERRUPT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CMD_INTERRUPT@GOTPAGEOFF]
Lloh43:
	ldr	x0, [x8]
	bl	_WRITE_RPS1
Lloh44:
	adrp	x8, _CMD_STOP@GOTPAGE
Lloh45:
	ldr	x8, [x8, _CMD_STOP@GOTPAGEOFF]
Lloh46:
	ldr	x0, [x8]
	bl	_WRITE_RPS1
	ldr	x1, [x23]
	mov	x0, x19
	bl	_SAA7146_IER_ENABLE
Lloh47:
	adrp	x8, _RPS_ADDR1@GOTPAGE
Lloh48:
	ldr	x8, [x8, _RPS_ADDR1@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_saa7146_write
Lloh50:
	adrp	x8, _MASK_13@GOTPAGE
Lloh51:
	ldr	x8, [x8, _MASK_13@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh52:
	ldr	w8, [x8]
Lloh53:
	adrp	x9, _MASK_29@GOTPAGE
Lloh54:
	ldr	x9, [x9, _MASK_29@GOTPAGEOFF]
Lloh55:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_saa7146_write
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7146_HPS_SYNC_PORT_A,8,3    ; @SAA7146_HPS_SYNC_PORT_A
	.comm	_CMD_E_FID_A,8,3                ; @CMD_E_FID_A
	.comm	_CMD_E_FID_B,8,3                ; @CMD_E_FID_B
	.comm	_CMD_O_FID_A,8,3                ; @CMD_O_FID_A
	.comm	_CMD_O_FID_B,8,3                ; @CMD_O_FID_B
	.comm	_vbi_pixel_to_capture,4,2       ; @vbi_pixel_to_capture
	.comm	_ME1,4,2                        ; @ME1
	.comm	_CMD_WR_REG,4,2                 ; @CMD_WR_REG
	.comm	_MC2,4,2                        ; @MC2
	.comm	_MASK_28,8,3                    ; @MASK_28
	.comm	_MASK_12,8,3                    ; @MASK_12
	.comm	_CMD_WR_REG_MASK,4,2            ; @CMD_WR_REG_MASK
	.comm	_MC1,4,2                        ; @MC1
	.comm	_MASK_04,8,3                    ; @MASK_04
	.comm	_MASK_20,8,3                    ; @MASK_20
	.comm	_CMD_PAUSE,8,3                  ; @CMD_PAUSE
	.comm	_CMD_INTERRUPT,8,3              ; @CMD_INTERRUPT
	.comm	_CMD_STOP,8,3                   ; @CMD_STOP
	.comm	_RPS_ADDR1,4,2                  ; @RPS_ADDR1
	.comm	_MASK_13,4,2                    ; @MASK_13
	.comm	_MASK_29,4,2                    ; @MASK_29
	.no_dead_strip	_saa7146_set_vbi_capture
.subsections_via_symbols
