	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa5246a_open
_saa5246a_open:                         ## @saa5246a_open
	.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
	callq	_video_drvdata
	movq	%rax, %r14
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%rax, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	_R0_SELECT_R11@GOTPCREL(%rip), %rax
	movq	_R0_PLL_TIME_CONSTANT_LONG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_R0_ENABLE_nODD_EVEN_OUTPUT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_R0_ENABLE_HDR_POLL@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_R0_DO_NOT_FORCE_nODD_EVEN_LOW_IF_PICTURE_DISPLAYED@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_R0_NO_FREE_RUN_PLL@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_R0_NO_AUTOMATIC_FASTEXT_PROMPT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_R1_NON_INTERLACED_312_312_LINES@GOTPCREL(%rip), %rax
	movq	_R1_DEW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SAA5246A_REGISTER_R0@GOTPCREL(%rip), %rax
	movq	_R1_EXTENDED_PACKET_DISABLE@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movl	(%rax), %esi
	movq	_R1_DAUS_ALL_ON@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_R1_8_BITS_NO_PARITY@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_R1_VCS_TO_SCS@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_COMMAND_END@GOTPCREL(%rip), %r15
	movl	(%r15), %r8d
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_i2c_senddata
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_SAA5246A_REGISTER_R4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_R4_DISPLAY_PAGE_4@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_i2c_senddata
	testq	%rax, %rax
	je	LBB0_6
LBB0_4:
	xorl	%edi, %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_5:
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SAA5246A_REGISTER_R0,4,2       ## @SAA5246A_REGISTER_R0
	.comm	_R0_SELECT_R11,4,2              ## @R0_SELECT_R11
	.comm	_R0_PLL_TIME_CONSTANT_LONG,4,2  ## @R0_PLL_TIME_CONSTANT_LONG
	.comm	_R0_ENABLE_nODD_EVEN_OUTPUT,4,2 ## @R0_ENABLE_nODD_EVEN_OUTPUT
	.comm	_R0_ENABLE_HDR_POLL,4,2         ## @R0_ENABLE_HDR_POLL
	.comm	_R0_DO_NOT_FORCE_nODD_EVEN_LOW_IF_PICTURE_DISPLAYED,4,2 ## @R0_DO_NOT_FORCE_nODD_EVEN_LOW_IF_PICTURE_DISPLAYED
	.comm	_R0_NO_FREE_RUN_PLL,4,2         ## @R0_NO_FREE_RUN_PLL
	.comm	_R0_NO_AUTOMATIC_FASTEXT_PROMPT,4,2 ## @R0_NO_AUTOMATIC_FASTEXT_PROMPT
	.comm	_R1_NON_INTERLACED_312_312_LINES,4,2 ## @R1_NON_INTERLACED_312_312_LINES
	.comm	_R1_DEW,4,2                     ## @R1_DEW
	.comm	_R1_EXTENDED_PACKET_DISABLE,4,2 ## @R1_EXTENDED_PACKET_DISABLE
	.comm	_R1_DAUS_ALL_ON,4,2             ## @R1_DAUS_ALL_ON
	.comm	_R1_8_BITS_NO_PARITY,4,2        ## @R1_8_BITS_NO_PARITY
	.comm	_R1_VCS_TO_SCS,4,2              ## @R1_VCS_TO_SCS
	.comm	_COMMAND_END,4,2                ## @COMMAND_END
	.comm	_SAA5246A_REGISTER_R4,4,2       ## @SAA5246A_REGISTER_R4
	.comm	_R4_DISPLAY_PAGE_4,4,2          ## @R4_DISPLAY_PAGE_4
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_saa5246a_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa5246a_open
_saa5246a_open:                         ; @saa5246a_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_video_drvdata
	mov	x19, x0
	mov	w0, #0
	mov	x1, x19
	bl	_test_and_set_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
Lloh2:
	adrp	x8, _SAA5246A_REGISTER_R0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SAA5246A_REGISTER_R0@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _R0_SELECT_R11@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R0_SELECT_R11@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _R0_PLL_TIME_CONSTANT_LONG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _R0_PLL_TIME_CONSTANT_LONG@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _R0_ENABLE_nODD_EVEN_OUTPUT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _R0_ENABLE_nODD_EVEN_OUTPUT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _R0_ENABLE_HDR_POLL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _R0_ENABLE_HDR_POLL@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _R0_DO_NOT_FORCE_nODD_EVEN_LOW_IF_PICTURE_DISPLAYED@GOTPAGE
Lloh18:
	ldr	x9, [x9, _R0_DO_NOT_FORCE_nODD_EVEN_LOW_IF_PICTURE_DISPLAYED@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh20:
	adrp	x9, _R0_NO_FREE_RUN_PLL@GOTPAGE
Lloh21:
	ldr	x9, [x9, _R0_NO_FREE_RUN_PLL@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh23:
	adrp	x9, _R0_NO_AUTOMATIC_FASTEXT_PROMPT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _R0_NO_AUTOMATIC_FASTEXT_PROMPT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w2, w8, w9
Lloh26:
	adrp	x8, _R1_NON_INTERLACED_312_312_LINES@GOTPAGE
Lloh27:
	ldr	x8, [x8, _R1_NON_INTERLACED_312_312_LINES@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _R1_DEW@GOTPAGE
Lloh30:
	ldr	x9, [x9, _R1_DEW@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
Lloh32:
	adrp	x10, _R1_EXTENDED_PACKET_DISABLE@GOTPAGE
Lloh33:
	ldr	x10, [x10, _R1_EXTENDED_PACKET_DISABLE@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh34:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh35:
	adrp	x9, _R1_DAUS_ALL_ON@GOTPAGE
Lloh36:
	ldr	x9, [x9, _R1_DAUS_ALL_ON@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh38:
	adrp	x9, _R1_8_BITS_NO_PARITY@GOTPAGE
Lloh39:
	ldr	x9, [x9, _R1_8_BITS_NO_PARITY@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
Lloh41:
	adrp	x10, _R1_VCS_TO_SCS@GOTPAGE
Lloh42:
	ldr	x10, [x10, _R1_VCS_TO_SCS@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh43:
	ldr	w9, [x10]
	orr	w3, w8, w9
Lloh44:
	adrp	x20, _COMMAND_END@GOTPAGE
Lloh45:
	ldr	x20, [x20, _COMMAND_END@GOTPAGEOFF]
	ldr	w8, [x20]
	str	x8, [sp]
	mov	x0, x19
	bl	_i2c_senddata
	cbnz	x0, LBB0_4
; %bb.3:
Lloh46:
	adrp	x8, _SAA5246A_REGISTER_R4@GOTPAGE
Lloh47:
	ldr	x8, [x8, _SAA5246A_REGISTER_R4@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
Lloh49:
	adrp	x8, _R4_DISPLAY_PAGE_4@GOTPAGE
Lloh50:
	ldr	x8, [x8, _R4_DISPLAY_PAGE_4@GOTPAGEOFF]
Lloh51:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	bl	_i2c_senddata
	cbz	x0, LBB0_6
LBB0_4:
	mov	w0, #0
	mov	x1, x19
	bl	_clear_bit
Lloh52:
	adrp	x8, _EIO@GOTPAGE
Lloh53:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SAA5246A_REGISTER_R0,4,2       ; @SAA5246A_REGISTER_R0
	.comm	_R0_SELECT_R11,4,2              ; @R0_SELECT_R11
	.comm	_R0_PLL_TIME_CONSTANT_LONG,4,2  ; @R0_PLL_TIME_CONSTANT_LONG
	.comm	_R0_ENABLE_nODD_EVEN_OUTPUT,4,2 ; @R0_ENABLE_nODD_EVEN_OUTPUT
	.comm	_R0_ENABLE_HDR_POLL,4,2         ; @R0_ENABLE_HDR_POLL
	.comm	_R0_DO_NOT_FORCE_nODD_EVEN_LOW_IF_PICTURE_DISPLAYED,4,2 ; @R0_DO_NOT_FORCE_nODD_EVEN_LOW_IF_PICTURE_DISPLAYED
	.comm	_R0_NO_FREE_RUN_PLL,4,2         ; @R0_NO_FREE_RUN_PLL
	.comm	_R0_NO_AUTOMATIC_FASTEXT_PROMPT,4,2 ; @R0_NO_AUTOMATIC_FASTEXT_PROMPT
	.comm	_R1_NON_INTERLACED_312_312_LINES,4,2 ; @R1_NON_INTERLACED_312_312_LINES
	.comm	_R1_DEW,4,2                     ; @R1_DEW
	.comm	_R1_EXTENDED_PACKET_DISABLE,4,2 ; @R1_EXTENDED_PACKET_DISABLE
	.comm	_R1_DAUS_ALL_ON,4,2             ; @R1_DAUS_ALL_ON
	.comm	_R1_8_BITS_NO_PARITY,4,2        ; @R1_8_BITS_NO_PARITY
	.comm	_R1_VCS_TO_SCS,4,2              ; @R1_VCS_TO_SCS
	.comm	_COMMAND_END,4,2                ; @COMMAND_END
	.comm	_SAA5246A_REGISTER_R4,4,2       ; @SAA5246A_REGISTER_R4
	.comm	_R4_DISPLAY_PAGE_4,4,2          ; @R4_DISPLAY_PAGE_4
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_saa5246a_open
.subsections_via_symbols
