	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7134_video_init1            ## -- Begin function saa7134_video_init1
	.p2align	4, 0x90
_saa7134_video_init1:                   ## @saa7134_video_init1
	.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	%rdi, %rbx
	movq	_gbuffers@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	$2, %ecx
	jl	LBB0_2
## %bb.1:
	movq	_VIDEO_MAX_FRAME@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jle	LBB0_3
LBB0_2:
	movl	$2, (%rax)
LBB0_3:
	movq	_gbufsize@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_gbufsize_max@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %ecx
	movl	%ecx, %esi
	cmovgl	%edx, %esi
	testl	%ecx, %ecx
	cmovsl	%edx, %esi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%esi, %ecx
	decl	%ecx
	movq	_PAGE_MASK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movq	_V4L2_CID_BRIGHTNESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ctrl_by_id
	movq	(%rax), %rax
	movq	%rax, 112(%rbx)
	movq	_V4L2_CID_CONTRAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ctrl_by_id
	movq	(%rax), %rax
	movq	%rax, 104(%rbx)
	movq	_V4L2_CID_HUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ctrl_by_id
	movq	(%rax), %rax
	movq	%rax, 96(%rbx)
	movq	_V4L2_CID_SATURATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ctrl_by_id
	movq	(%rax), %rax
	movq	%rax, 88(%rbx)
	movq	_V4L2_CID_AUDIO_VOLUME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ctrl_by_id
	movq	(%rax), %rax
	movq	%rax, 80(%rbx)
	movl	$1, (%rbx)
	movq	_V4L2_CID_PRIVATE_INVERT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ctrl_by_id
	movq	(%rax), %rax
	movq	%rax, 72(%rbx)
	movq	_V4L2_CID_PRIVATE_AUTOMUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ctrl_by_id
	movq	(%rax), %rcx
	movq	%rcx, 64(%rbx)
	movl	56(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	movq	_TDA9887_AUTOMUTE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 56(%rbx)
LBB0_6:
	movq	$0, 48(%rbx)
	leaq	16(%rbx), %r14
	leaq	40(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	24(%rbx), %rdi
	callq	_init_timer
	movq	_saa7134_buffer_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	%r14, 24(%rbx)
	movq	%rbx, 16(%rbx)
	movq	_saa7134_boards@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rbx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_saa7134_videoport_init
LBB0_8:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gbuffers,4,2                   ## @gbuffers
	.comm	_VIDEO_MAX_FRAME,4,2            ## @VIDEO_MAX_FRAME
	.comm	_gbufsize,4,2                   ## @gbufsize
	.comm	_gbufsize_max,4,2               ## @gbufsize_max
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_V4L2_CID_BRIGHTNESS,4,2        ## @V4L2_CID_BRIGHTNESS
	.comm	_V4L2_CID_CONTRAST,4,2          ## @V4L2_CID_CONTRAST
	.comm	_V4L2_CID_HUE,4,2               ## @V4L2_CID_HUE
	.comm	_V4L2_CID_SATURATION,4,2        ## @V4L2_CID_SATURATION
	.comm	_V4L2_CID_AUDIO_VOLUME,4,2      ## @V4L2_CID_AUDIO_VOLUME
	.comm	_V4L2_CID_PRIVATE_INVERT,4,2    ## @V4L2_CID_PRIVATE_INVERT
	.comm	_V4L2_CID_PRIVATE_AUTOMUTE,4,2  ## @V4L2_CID_PRIVATE_AUTOMUTE
	.comm	_TDA9887_AUTOMUTE,4,2           ## @TDA9887_AUTOMUTE
	.comm	_saa7134_buffer_timeout,4,2     ## @saa7134_buffer_timeout
	.comm	_saa7134_boards,8,3             ## @saa7134_boards
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7134_video_init1            ; -- Begin function saa7134_video_init1
	.p2align	2
_saa7134_video_init1:                   ; @saa7134_video_init1
	.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, x0
Lloh0:
	adrp	x8, _gbuffers@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gbuffers@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh2:
	adrp	x10, _VIDEO_MAX_FRAME@GOTPAGE
Lloh3:
	ldr	x10, [x10, _VIDEO_MAX_FRAME@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	w9, #2
	ccmp	w9, w10, #0, ge
	b.le	LBB0_2
; %bb.1:
	mov	w9, #2
	str	w9, [x8]
LBB0_2:
Lloh5:
	adrp	x8, _gbufsize@GOTPAGE
Lloh6:
	ldr	x8, [x8, _gbufsize@GOTPAGEOFF]
Lloh7:
	adrp	x9, _gbufsize_max@GOTPAGE
Lloh8:
	ldr	x9, [x9, _gbufsize_max@GOTPAGEOFF]
	ldr	w10, [x8]
Lloh9:
	ldr	w9, [x9]
	cmp	w10, w9
	ccmp	w10, #0, #8, le
Lloh10:
	adrp	x11, _PAGE_SIZE@GOTPAGE
Lloh11:
	ldr	x11, [x11, _PAGE_SIZE@GOTPAGEOFF]
	csel	w9, w9, w10, lt
Lloh12:
	ldr	w10, [x11]
	add	w9, w9, w10
	sub	w9, w9, #1
Lloh13:
	adrp	x10, _PAGE_MASK@GOTPAGE
Lloh14:
	ldr	x10, [x10, _PAGE_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	and	w9, w9, w10
	str	w9, [x8]
Lloh16:
	adrp	x8, _V4L2_CID_BRIGHTNESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _V4L2_CID_BRIGHTNESS@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_ctrl_by_id
	ldr	x8, [x0]
	str	x8, [x19, #112]
Lloh19:
	adrp	x8, _V4L2_CID_CONTRAST@GOTPAGE
Lloh20:
	ldr	x8, [x8, _V4L2_CID_CONTRAST@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_ctrl_by_id
	ldr	x8, [x0]
	str	x8, [x19, #104]
Lloh22:
	adrp	x8, _V4L2_CID_HUE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _V4L2_CID_HUE@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_ctrl_by_id
	ldr	x8, [x0]
	str	x8, [x19, #96]
Lloh25:
	adrp	x8, _V4L2_CID_SATURATION@GOTPAGE
Lloh26:
	ldr	x8, [x8, _V4L2_CID_SATURATION@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_ctrl_by_id
	ldr	x8, [x0]
	str	x8, [x19, #88]
Lloh28:
	adrp	x8, _V4L2_CID_AUDIO_VOLUME@GOTPAGE
Lloh29:
	ldr	x8, [x8, _V4L2_CID_AUDIO_VOLUME@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	bl	_ctrl_by_id
	ldr	x8, [x0]
	str	x8, [x19, #80]
	mov	w8, #1
	str	w8, [x19]
Lloh31:
	adrp	x8, _V4L2_CID_PRIVATE_INVERT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _V4L2_CID_PRIVATE_INVERT@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_ctrl_by_id
	ldr	x8, [x0]
	str	x8, [x19, #72]
Lloh34:
	adrp	x8, _V4L2_CID_PRIVATE_AUTOMUTE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _V4L2_CID_PRIVATE_AUTOMUTE@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_ctrl_by_id
	ldr	x9, [x0]
	str	x9, [x19, #64]
	ldr	w8, [x19, #56]
	cbz	w8, LBB0_5
; %bb.3:
	cbz	x9, LBB0_5
; %bb.4:
Lloh37:
	adrp	x9, _TDA9887_AUTOMUTE@GOTPAGE
Lloh38:
	ldr	x9, [x9, _TDA9887_AUTOMUTE@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #56]
LBB0_5:
	str	xzr, [x19, #48]
	add	x20, x19, #16
	add	x0, x19, #40
	bl	_INIT_LIST_HEAD
	add	x0, x19, #24
	bl	_init_timer
Lloh40:
	adrp	x8, _saa7134_buffer_timeout@GOTPAGE
Lloh41:
	ldr	x8, [x8, _saa7134_buffer_timeout@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	stp	x19, x20, [x19, #16]
Lloh43:
	adrp	x8, _saa7134_boards@GOTPAGE
Lloh44:
	ldr	x8, [x8, _saa7134_boards@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_saa7134_videoport_init
LBB0_7:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_gbuffers,4,2                   ; @gbuffers
	.comm	_VIDEO_MAX_FRAME,4,2            ; @VIDEO_MAX_FRAME
	.comm	_gbufsize,4,2                   ; @gbufsize
	.comm	_gbufsize_max,4,2               ; @gbufsize_max
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_V4L2_CID_BRIGHTNESS,4,2        ; @V4L2_CID_BRIGHTNESS
	.comm	_V4L2_CID_CONTRAST,4,2          ; @V4L2_CID_CONTRAST
	.comm	_V4L2_CID_HUE,4,2               ; @V4L2_CID_HUE
	.comm	_V4L2_CID_SATURATION,4,2        ; @V4L2_CID_SATURATION
	.comm	_V4L2_CID_AUDIO_VOLUME,4,2      ; @V4L2_CID_AUDIO_VOLUME
	.comm	_V4L2_CID_PRIVATE_INVERT,4,2    ; @V4L2_CID_PRIVATE_INVERT
	.comm	_V4L2_CID_PRIVATE_AUTOMUTE,4,2  ; @V4L2_CID_PRIVATE_AUTOMUTE
	.comm	_TDA9887_AUTOMUTE,4,2           ; @TDA9887_AUTOMUTE
	.comm	_saa7134_buffer_timeout,4,2     ; @saa7134_buffer_timeout
	.comm	_saa7134_boards,8,3             ; @saa7134_boards
.subsections_via_symbols
