	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vbi_workaround
_vbi_workaround:                        ## @vbi_workaround
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	16(%rdi), %r15
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DECLARE_WAITQUEUE
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_DEB_VBI
	movl	(%r12), %edi
	movl	$4096, %ebx                     ## imm = 0x1000
	leaq	-44(%rbp), %rdx
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_pci_alloc_consistent
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_BASE_EVEN3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_BASE_ODD3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_vbi_pixel_to_capture@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	addl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_PROT_ADDR3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	-44(%rbp), %ebx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_saa7146_write
	movq	_PITCH3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_BASE_PAGE3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_saa7146_write
	movq	_NUM_LINE_BYTE3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$131072, %edx                   ## imm = 0x20000
	orl	(%r14), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_MC2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MASK_04@GOTPCREL(%rip), %rcx
	movq	_MASK_20@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%rcx), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_CMD_WR_REG@GOTPCREL(%rip), %r14
	movq	_BRS_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	leal	3(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	orl	(%r14), %edi
	orl	$256, %edi                      ## imm = 0x100
	callq	_WRITE_RPS1
	movl	$-1073741684, %edi              ## imm = 0xC000008C
	callq	_WRITE_RPS1
	movq	_SAA7146_USE_PORT_B_FOR_VBI@GOTPCREL(%rip), %rax
	movq	8(%r12), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_DEB_D
	movq	_CMD_PAUSE@GOTPCREL(%rip), %r15
	movq	_CMD_OAN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	orl	(%r15), %edi
	movq	_CMD_SIG1@GOTPCREL(%rip), %r13
	orl	(%r13), %edi
	movq	_CMD_E_FID_B@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_WRITE_RPS1
	movl	(%rbx), %edi
	movq	_BRS_CTRL@GOTPCREL(%rip), %rbx
	orl	(%r15), %edi
	orl	(%r13), %edi
	movq	_CMD_O_FID_B@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	callq	_DEB_D
	movq	_MASK_10@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CMD_PAUSE@GOTPCREL(%rip), %rax
LBB0_5:
	orl	(%rax), %edi
	callq	_WRITE_RPS1
	movq	_CMD_UPLOAD@GOTPCREL(%rip), %r15
	movq	_MASK_08@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	orl	(%r15), %edi
	callq	_WRITE_RPS1
	movl	(%rbx), %eax
	leal	3(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	orl	(%r14), %edi
	orl	$256, %edi                      ## imm = 0x100
	callq	_WRITE_RPS1
	movq	_vbi_pixel_to_capture@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	shll	$7, %eax
	movl	$221184, %edi                   ## imm = 0x36000
	subl	%eax, %edi
	movq	_MASK_19@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_WRITE_RPS1
	movq	_CMD_PAUSE@GOTPCREL(%rip), %rax
	movl	(%r13), %edi
	orl	(%rax), %edi
	callq	_WRITE_RPS1
	movl	(%r13), %edi
	orl	(%r15), %edi
	callq	_WRITE_RPS1
	movq	_NUM_LINE_BYTE3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	3(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	movq	_CMD_WR_REG@GOTPCREL(%rip), %r14
	orl	(%r14), %edi
	orl	$256, %edi                      ## imm = 0x100
	callq	_WRITE_RPS1
	movl	$131072, %edi                   ## imm = 0x20000
	movq	_vbi_pixel_to_capture@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_WRITE_RPS1
	movl	(%rbx), %eax
	leal	3(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	orl	(%r14), %edi
	orl	$256, %edi                      ## imm = 0x100
	callq	_WRITE_RPS1
	movl	$2690560, %edi                  ## imm = 0x290E00
	callq	_WRITE_RPS1
	movl	(%r13), %edi
	movq	_CMD_PAUSE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_WRITE_RPS1
	movl	(%r13), %edi
	orl	(%r15), %edi
	movq	_MASK_04@GOTPCREL(%rip), %rbx
	orl	(%rbx), %edi
	callq	_WRITE_RPS1
	movq	_MC1@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	leal	3(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	orl	(%r14), %edi
	orl	$256, %edi                      ## imm = 0x100
	callq	_WRITE_RPS1
	movl	(%rbx), %edi
	movq	_MASK_20@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	%rax, %r15
	callq	_WRITE_RPS1
	movq	_CMD_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WRITE_RPS1
	movq	_CMD_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WRITE_RPS1
	movq	_MC2@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_MASK_31@GOTPCREL(%rip), %rax
	movq	_MASK_15@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_NUM_LINE_BYTE3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$65538, %edx                    ## imm = 0x10002
	callq	_saa7146_write
	movl	(%r14), %esi
	movl	(%r15), %edx
	orl	(%rbx), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_MASK_28@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_SAA7146_IER_ENABLE
	movq	_wait@GOTPCREL(%rip), %r14
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_add_wait_queue
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	_RPS_ADDR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movl	(%r13), %esi
	movq	_MASK_13@GOTPCREL(%rip), %rcx
	movq	_MASK_29@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%rcx), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	xorl	%eax, %eax
	callq	_schedule
	leaq	L_.str.3(%rip), %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_DEB_VBI
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_remove_wait_queue
	movq	_TASK_RUNNING@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	___set_current_state
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_SAA7146_IER_DISABLE
	movl	(%r13), %esi
	movq	_MASK_20@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_current@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	_MC2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_MASK_15@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MASK_31@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_NUM_LINE_BYTE3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$65538, %edx                    ## imm = 0x10002
	callq	_saa7146_write
	movl	(%rbx), %esi
	movq	_MASK_20@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_MASK_04@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_MASK_28@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_SAA7146_IER_ENABLE
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_add_wait_queue
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	_RPS_ADDR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_MC1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MASK_29@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MASK_13@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	%r14, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_schedule
	leaq	L_.str.3(%rip), %rdi
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_DEB_VBI
	movq	%r15, %rdi
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_remove_wait_queue
	movl	(%rbx), %edi
	callq	___set_current_state
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_SAA7146_IER_DISABLE
	movq	_MC1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MASK_20@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_7
LBB0_8:
	movq	_RPS_ADDR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_saa7146_read
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DEB_VBI
	movq	_MC1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MASK_29@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_saa7146_write
	movl	(%r12), %edi
	movl	-44(%rbp), %ecx
	movl	$4096, %esi                     ## imm = 0x1000
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_pci_free_consistent
	movq	_EINTR@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
LBB0_9:
	subl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	(%r12), %edi
	movl	-44(%rbp), %ecx
	movl	$4096, %esi                     ## imm = 0x1000
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_pci_free_consistent
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_current,4,2                    ## @current
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dev:%p\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BASE_EVEN3,4,2                 ## @BASE_EVEN3
	.comm	_BASE_ODD3,4,2                  ## @BASE_ODD3
	.comm	_vbi_pixel_to_capture,4,2       ## @vbi_pixel_to_capture
	.comm	_PROT_ADDR3,4,2                 ## @PROT_ADDR3
	.comm	_PITCH3,4,2                     ## @PITCH3
	.comm	_BASE_PAGE3,4,2                 ## @BASE_PAGE3
	.comm	_NUM_LINE_BYTE3,4,2             ## @NUM_LINE_BYTE3
	.comm	_MC2,4,2                        ## @MC2
	.comm	_MASK_04,4,2                    ## @MASK_04
	.comm	_MASK_20,4,2                    ## @MASK_20
	.comm	_CMD_WR_REG,4,2                 ## @CMD_WR_REG
	.comm	_BRS_CTRL,4,2                   ## @BRS_CTRL
	.comm	_SAA7146_USE_PORT_B_FOR_VBI,4,2 ## @SAA7146_USE_PORT_B_FOR_VBI
L_.str.1:                               ## @.str.1
	.asciz	"...using port b\n"

	.comm	_CMD_PAUSE,4,2                  ## @CMD_PAUSE
	.comm	_CMD_OAN,4,2                    ## @CMD_OAN
	.comm	_CMD_SIG1,4,2                   ## @CMD_SIG1
	.comm	_CMD_E_FID_B,4,2                ## @CMD_E_FID_B
	.comm	_CMD_O_FID_B,4,2                ## @CMD_O_FID_B
L_.str.2:                               ## @.str.2
	.asciz	"...using port a\n"

	.comm	_MASK_10,4,2                    ## @MASK_10
	.comm	_CMD_UPLOAD,4,2                 ## @CMD_UPLOAD
	.comm	_MASK_08,4,2                    ## @MASK_08
	.comm	_MASK_19,4,2                    ## @MASK_19
	.comm	_MC1,4,2                        ## @MC1
	.comm	_CMD_INTERRUPT,4,2              ## @CMD_INTERRUPT
	.comm	_CMD_STOP,4,2                   ## @CMD_STOP
	.comm	_MASK_31,4,2                    ## @MASK_31
	.comm	_MASK_15,4,2                    ## @MASK_15
	.comm	_MASK_28,4,2                    ## @MASK_28
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_RPS_ADDR1,4,2                  ## @RPS_ADDR1
	.comm	_MASK_13,4,2                    ## @MASK_13
	.comm	_MASK_29,4,2                    ## @MASK_29
L_.str.3:                               ## @.str.3
	.asciz	"brs bug workaround %d/1\n"

	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
L_.str.4:                               ## @.str.4
	.asciz	"aborted (rps:0x%08x)\n"

	.comm	_EINTR,4,2                      ## @EINTR
	.no_dead_strip	_vbi_workaround
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vbi_workaround
_vbi_workaround:                        ; @vbi_workaround
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _current@GOTPAGE
Lloh4:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_DECLARE_WAITQUEUE
	str	x19, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DEB_VBI
	ldr	w0, [x19]
	add	x2, sp, #28
	mov	w1, #4096
	bl	_pci_alloc_consistent
	cbz	x0, LBB0_3
; %bb.1:
	stp	x20, x0, [sp, #8]               ; 16-byte Folded Spill
Lloh8:
	adrp	x8, _BASE_EVEN3@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BASE_EVEN3@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w2, [sp, #28]
	mov	x0, x19
	bl	_saa7146_write
Lloh11:
	adrp	x8, _BASE_ODD3@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BASE_ODD3@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w8, [sp, #28]
Lloh14:
	adrp	x22, _vbi_pixel_to_capture@GOTPAGE
Lloh15:
	ldr	x22, [x22, _vbi_pixel_to_capture@GOTPAGEOFF]
	ldr	w9, [x22]
	add	w2, w9, w8
	mov	x0, x19
	bl	_saa7146_write
Lloh16:
	adrp	x8, _PROT_ADDR3@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PROT_ADDR3@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w8, [sp, #28]
	add	w2, w8, #1, lsl #12             ; =4096
	mov	x0, x19
	bl	_saa7146_write
Lloh19:
	adrp	x8, _PITCH3@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PITCH3@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_saa7146_write
Lloh22:
	adrp	x8, _BASE_PAGE3@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BASE_PAGE3@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_saa7146_write
Lloh25:
	adrp	x28, _NUM_LINE_BYTE3@GOTPAGE
Lloh26:
	ldr	x28, [x28, _NUM_LINE_BYTE3@GOTPAGEOFF]
	ldr	w1, [x28]
	ldr	w8, [x22]
	orr	w2, w8, #0x20000
	mov	x0, x19
	bl	_saa7146_write
Lloh27:
	adrp	x8, _MC2@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MC2@GOTPAGEOFF]
Lloh29:
	adrp	x21, _MASK_04@GOTPAGE
Lloh30:
	ldr	x21, [x21, _MASK_04@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	ldr	w8, [x21]
Lloh32:
	adrp	x27, _MASK_20@GOTPAGE
Lloh33:
	ldr	x27, [x27, _MASK_20@GOTPAGEOFF]
	ldr	w9, [x27]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_saa7146_write
Lloh34:
	adrp	x23, _CMD_WR_REG@GOTPAGE
Lloh35:
	ldr	x23, [x23, _CMD_WR_REG@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh36:
	adrp	x25, _BRS_CTRL@GOTPAGE
Lloh37:
	ldr	x25, [x25, _BRS_CTRL@GOTPAGEOFF]
	ldr	w9, [x25]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	orr	w8, w8, w9, asr #2
	orr	w0, w8, #0x100
	bl	_WRITE_RPS1
	mov	w0, #140
	movk	w0, #49152, lsl #16
	bl	_WRITE_RPS1
Lloh38:
	adrp	x8, _SAA7146_USE_PORT_B_FOR_VBI@GOTPAGE
Lloh39:
	ldr	x8, [x8, _SAA7146_USE_PORT_B_FOR_VBI@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
Lloh41:
	adrp	x26, _CMD_PAUSE@GOTPAGE
Lloh42:
	ldr	x26, [x26, _CMD_PAUSE@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh43:
	adrp	x0, l_.str.1@PAGE
Lloh44:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DEB_D
	ldr	w8, [x26]
Lloh45:
	adrp	x20, _CMD_OAN@GOTPAGE
Lloh46:
	ldr	x20, [x20, _CMD_OAN@GOTPAGEOFF]
	ldr	w9, [x20]
	orr	w8, w9, w8
Lloh47:
	adrp	x24, _CMD_SIG1@GOTPAGE
Lloh48:
	ldr	x24, [x24, _CMD_SIG1@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w8, w9
Lloh49:
	adrp	x9, _CMD_E_FID_B@GOTPAGE
Lloh50:
	ldr	x9, [x9, _CMD_E_FID_B@GOTPAGEOFF]
Lloh51:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_WRITE_RPS1
	ldr	w8, [x26]
	ldr	w9, [x20]
	orr	w8, w9, w8
	ldr	w9, [x24]
	orr	w8, w8, w9
Lloh52:
	adrp	x9, _CMD_O_FID_B@GOTPAGE
Lloh53:
	ldr	x9, [x9, _CMD_O_FID_B@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh54:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh55:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh56:
	adrp	x0, l_.str.2@PAGE
Lloh57:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DEB_D
Lloh58:
	adrp	x8, _MASK_10@GOTPAGE
Lloh59:
	ldr	x8, [x8, _MASK_10@GOTPAGEOFF]
Lloh60:
	ldr	w8, [x8]
Lloh61:
	adrp	x9, _CMD_PAUSE@GOTPAGE
Lloh62:
	ldr	x9, [x9, _CMD_PAUSE@GOTPAGEOFF]
LBB0_5:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_WRITE_RPS1
Lloh63:
	adrp	x20, _CMD_UPLOAD@GOTPAGE
Lloh64:
	ldr	x20, [x20, _CMD_UPLOAD@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh65:
	adrp	x24, _MASK_08@GOTPAGE
Lloh66:
	ldr	x24, [x24, _MASK_08@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w0, w9, w8
	bl	_WRITE_RPS1
	ldr	w8, [x23]
	ldr	w9, [x25]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	orr	w8, w8, w9, asr #2
	orr	w0, w8, #0x100
	bl	_WRITE_RPS1
	ldr	w8, [x22]
	mov	w9, #24576
	movk	w9, #3, lsl #16
	sub	w8, w9, w8, lsl #7
Lloh67:
	adrp	x9, _MASK_19@GOTPAGE
Lloh68:
	ldr	x9, [x9, _MASK_19@GOTPAGEOFF]
Lloh69:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_WRITE_RPS1
	ldr	w8, [x26]
	ldr	w9, [x24]
	orr	w0, w9, w8
	bl	_WRITE_RPS1
	ldr	w8, [x20]
	ldr	w9, [x24]
	orr	w0, w9, w8
	bl	_WRITE_RPS1
	ldr	w8, [x23]
	ldr	w9, [x28]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	orr	w8, w8, w9, asr #2
	orr	w0, w8, #0x100
	bl	_WRITE_RPS1
	ldr	w8, [x22]
	orr	w0, w8, #0x20000
	bl	_WRITE_RPS1
	ldr	w8, [x23]
	ldr	w9, [x25]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	orr	w8, w8, w9, asr #2
	orr	w0, w8, #0x100
	bl	_WRITE_RPS1
	mov	w0, #3584
	movk	w0, #41, lsl #16
	bl	_WRITE_RPS1
	ldr	w8, [x26]
	ldr	w9, [x24]
	orr	w0, w9, w8
	bl	_WRITE_RPS1
	ldr	w8, [x20]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x21]
	orr	w0, w8, w9
	bl	_WRITE_RPS1
	ldr	w8, [x23]
	mov	x20, x28
Lloh70:
	adrp	x28, _MC1@GOTPAGE
Lloh71:
	ldr	x28, [x28, _MC1@GOTPAGEOFF]
	ldr	w9, [x28]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	orr	w8, w8, w9, asr #2
	orr	w0, w8, #0x100
	bl	_WRITE_RPS1
	ldr	w8, [x27]
	ldr	w9, [x21]
	orr	w0, w9, w8
	bl	_WRITE_RPS1
Lloh72:
	adrp	x8, _CMD_INTERRUPT@GOTPAGE
Lloh73:
	ldr	x8, [x8, _CMD_INTERRUPT@GOTPAGEOFF]
Lloh74:
	ldr	w0, [x8]
	bl	_WRITE_RPS1
Lloh75:
	adrp	x8, _CMD_STOP@GOTPAGE
Lloh76:
	ldr	x8, [x8, _CMD_STOP@GOTPAGEOFF]
Lloh77:
	ldr	w0, [x8]
	bl	_WRITE_RPS1
Lloh78:
	adrp	x8, _MASK_31@GOTPAGE
Lloh79:
	ldr	x8, [x8, _MASK_31@GOTPAGEOFF]
	mov	x22, x21
Lloh80:
	adrp	x21, _MC2@GOTPAGE
Lloh81:
	ldr	x21, [x21, _MC2@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh82:
	ldr	w8, [x8]
Lloh83:
	adrp	x9, _MASK_15@GOTPAGE
Lloh84:
	ldr	x9, [x9, _MASK_15@GOTPAGEOFF]
Lloh85:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_saa7146_write
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #2
	movk	w2, #1, lsl #16
	bl	_saa7146_write
	ldr	w1, [x21]
	ldr	w8, [x22]
	ldr	w9, [x27]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_saa7146_write
Lloh86:
	adrp	x26, _MASK_28@GOTPAGE
Lloh87:
	ldr	x26, [x26, _MASK_28@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x19
	bl	_SAA7146_IER_ENABLE
Lloh88:
	adrp	x22, _wait@GOTPAGE
Lloh89:
	ldr	x22, [x22, _wait@GOTPAGEOFF]
	ldr	x24, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x24
	mov	x1, x22
	bl	_add_wait_queue
Lloh90:
	adrp	x8, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh91:
	ldr	x8, [x8, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh92:
	ldr	w0, [x8]
	bl	_set_current_state
Lloh93:
	adrp	x8, _RPS_ADDR1@GOTPAGE
Lloh94:
	ldr	x8, [x8, _RPS_ADDR1@GOTPAGEOFF]
Lloh95:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	mov	x0, x19
	bl	_saa7146_write
Lloh96:
	adrp	x23, _MASK_13@GOTPAGE
Lloh97:
	ldr	x23, [x23, _MASK_13@GOTPAGEOFF]
	ldr	w1, [x28]
	ldr	w8, [x23]
Lloh98:
	adrp	x9, _MASK_29@GOTPAGE
Lloh99:
	ldr	x9, [x9, _MASK_29@GOTPAGEOFF]
Lloh100:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_saa7146_write
	bl	_schedule
	str	xzr, [sp]
Lloh101:
	adrp	x0, l_.str.3@PAGE
Lloh102:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DEB_VBI
	mov	x0, x24
	mov	x1, x22
	bl	_remove_wait_queue
Lloh103:
	adrp	x25, _TASK_RUNNING@GOTPAGE
Lloh104:
	ldr	x25, [x25, _TASK_RUNNING@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	___set_current_state
	ldr	w1, [x26]
	mov	x0, x19
	bl	_SAA7146_IER_DISABLE
	ldr	w1, [x28]
	mov	x20, x27
	ldr	w2, [x27]
	mov	x0, x19
	bl	_saa7146_write
Lloh105:
	adrp	x22, _current@GOTPAGE
Lloh106:
	ldr	x22, [x22, _current@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_signal_pending
	cbnz	x0, LBB0_7
; %bb.6:
	ldr	w1, [x21]
Lloh107:
	adrp	x8, _MASK_31@GOTPAGE
Lloh108:
	ldr	x8, [x8, _MASK_31@GOTPAGEOFF]
Lloh109:
	ldr	w8, [x8]
Lloh110:
	adrp	x9, _MASK_15@GOTPAGE
Lloh111:
	ldr	x9, [x9, _MASK_15@GOTPAGEOFF]
Lloh112:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_saa7146_write
Lloh113:
	adrp	x8, _NUM_LINE_BYTE3@GOTPAGE
Lloh114:
	ldr	x8, [x8, _NUM_LINE_BYTE3@GOTPAGEOFF]
Lloh115:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	movk	w2, #1, lsl #16
	bl	_saa7146_write
	ldr	w1, [x21]
Lloh116:
	adrp	x8, _MASK_04@GOTPAGE
Lloh117:
	ldr	x8, [x8, _MASK_04@GOTPAGEOFF]
Lloh118:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_saa7146_write
	ldr	w1, [x26]
	mov	x0, x19
	bl	_SAA7146_IER_ENABLE
	mov	x21, x22
Lloh119:
	adrp	x22, _wait@GOTPAGE
Lloh120:
	ldr	x22, [x22, _wait@GOTPAGEOFF]
	mov	x0, x24
	mov	x1, x22
	bl	_add_wait_queue
Lloh121:
	adrp	x8, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh122:
	ldr	x8, [x8, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh123:
	ldr	w0, [x8]
	bl	_set_current_state
Lloh124:
	adrp	x8, _RPS_ADDR1@GOTPAGE
Lloh125:
	ldr	x8, [x8, _RPS_ADDR1@GOTPAGEOFF]
Lloh126:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	mov	x0, x19
	bl	_saa7146_write
	ldr	w1, [x28]
	ldr	w8, [x23]
Lloh127:
	adrp	x9, _MASK_29@GOTPAGE
Lloh128:
	ldr	x9, [x9, _MASK_29@GOTPAGEOFF]
Lloh129:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_saa7146_write
	bl	_schedule
	mov	w8, #1
	str	x8, [sp]
Lloh130:
	adrp	x0, l_.str.3@PAGE
Lloh131:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DEB_VBI
	mov	x0, x24
	mov	x1, x22
	bl	_remove_wait_queue
	ldr	w0, [x25]
	bl	___set_current_state
	ldr	w1, [x26]
	mov	x0, x19
	bl	_SAA7146_IER_DISABLE
	ldr	w1, [x28]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_saa7146_write
	ldr	w0, [x21]
	bl	_signal_pending
	cbz	x0, LBB0_10
LBB0_7:
Lloh132:
	adrp	x8, _RPS_ADDR1@GOTPAGE
Lloh133:
	ldr	x8, [x8, _RPS_ADDR1@GOTPAGEOFF]
Lloh134:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_saa7146_read
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh135:
	adrp	x0, l_.str.4@PAGE
Lloh136:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DEB_VBI
	ldr	w1, [x28]
Lloh137:
	adrp	x8, _MASK_29@GOTPAGE
Lloh138:
	ldr	x8, [x8, _MASK_29@GOTPAGEOFF]
Lloh139:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_saa7146_write
	ldr	w0, [x19]
	ldr	w3, [sp, #28]
	mov	w1, #4096
	ldr	x2, [sp, #16]                   ; 8-byte Folded Reload
	bl	_pci_free_consistent
Lloh140:
	adrp	x8, _EINTR@GOTPAGE
Lloh141:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	ldr	w0, [x19]
	ldr	w3, [sp, #28]
	mov	w1, #4096
	ldr	x2, [sp, #16]                   ; 8-byte Folded Reload
	bl	_pci_free_consistent
	mov	w0, #0
	b	LBB0_9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh31
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh105, Lloh106
	.loh AdrpLdrGot	Lloh103, Lloh104
	.loh AdrpAdd	Lloh101, Lloh102
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGot	Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh90, Lloh91, Lloh92
	.loh AdrpLdrGot	Lloh88, Lloh89
	.loh AdrpLdrGot	Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGot	Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh82
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpAdd	Lloh130, Lloh131
	.loh AdrpLdrGotLdr	Lloh127, Lloh128, Lloh129
	.loh AdrpLdrGotLdr	Lloh124, Lloh125, Lloh126
	.loh AdrpLdrGotLdr	Lloh121, Lloh122, Lloh123
	.loh AdrpLdrGot	Lloh119, Lloh120
	.loh AdrpLdrGotLdr	Lloh116, Lloh117, Lloh118
	.loh AdrpLdrGotLdr	Lloh113, Lloh114, Lloh115
	.loh AdrpLdrGotLdr	Lloh110, Lloh111, Lloh112
	.loh AdrpLdrGotLdr	Lloh107, Lloh108, Lloh109
	.loh AdrpLdrGot	Lloh140, Lloh141
	.loh AdrpLdrGotLdr	Lloh137, Lloh138, Lloh139
	.loh AdrpAdd	Lloh135, Lloh136
	.loh AdrpLdrGotLdr	Lloh132, Lloh133, Lloh134
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_current,4,2                    ; @current
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dev:%p\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BASE_EVEN3,4,2                 ; @BASE_EVEN3
	.comm	_BASE_ODD3,4,2                  ; @BASE_ODD3
	.comm	_vbi_pixel_to_capture,4,2       ; @vbi_pixel_to_capture
	.comm	_PROT_ADDR3,4,2                 ; @PROT_ADDR3
	.comm	_PITCH3,4,2                     ; @PITCH3
	.comm	_BASE_PAGE3,4,2                 ; @BASE_PAGE3
	.comm	_NUM_LINE_BYTE3,4,2             ; @NUM_LINE_BYTE3
	.comm	_MC2,4,2                        ; @MC2
	.comm	_MASK_04,4,2                    ; @MASK_04
	.comm	_MASK_20,4,2                    ; @MASK_20
	.comm	_CMD_WR_REG,4,2                 ; @CMD_WR_REG
	.comm	_BRS_CTRL,4,2                   ; @BRS_CTRL
	.comm	_SAA7146_USE_PORT_B_FOR_VBI,4,2 ; @SAA7146_USE_PORT_B_FOR_VBI
l_.str.1:                               ; @.str.1
	.asciz	"...using port b\n"

	.comm	_CMD_PAUSE,4,2                  ; @CMD_PAUSE
	.comm	_CMD_OAN,4,2                    ; @CMD_OAN
	.comm	_CMD_SIG1,4,2                   ; @CMD_SIG1
	.comm	_CMD_E_FID_B,4,2                ; @CMD_E_FID_B
	.comm	_CMD_O_FID_B,4,2                ; @CMD_O_FID_B
l_.str.2:                               ; @.str.2
	.asciz	"...using port a\n"

	.comm	_MASK_10,4,2                    ; @MASK_10
	.comm	_CMD_UPLOAD,4,2                 ; @CMD_UPLOAD
	.comm	_MASK_08,4,2                    ; @MASK_08
	.comm	_MASK_19,4,2                    ; @MASK_19
	.comm	_MC1,4,2                        ; @MC1
	.comm	_CMD_INTERRUPT,4,2              ; @CMD_INTERRUPT
	.comm	_CMD_STOP,4,2                   ; @CMD_STOP
	.comm	_MASK_31,4,2                    ; @MASK_31
	.comm	_MASK_15,4,2                    ; @MASK_15
	.comm	_MASK_28,4,2                    ; @MASK_28
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_RPS_ADDR1,4,2                  ; @RPS_ADDR1
	.comm	_MASK_13,4,2                    ; @MASK_13
	.comm	_MASK_29,4,2                    ; @MASK_29
l_.str.3:                               ; @.str.3
	.asciz	"brs bug workaround %d/1\n"

	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
l_.str.4:                               ; @.str.4
	.asciz	"aborted (rps:0x%08x)\n"

	.comm	_EINTR,4,2                      ; @EINTR
	.no_dead_strip	_vbi_workaround
.subsections_via_symbols
