	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7134_ts_init1               ## -- Begin function saa7134_ts_init1
	.p2align	4, 0x90
_saa7134_ts_init1:                      ## @saa7134_ts_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_tsbufs@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	cmpl	$1, %eax
	jg	LBB0_2
## %bb.1:
	movl	$2, (%rcx)
	movl	$2, %eax
LBB0_2:
	movq	_VIDEO_MAX_FRAME@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %eax
	jle	LBB0_4
## %bb.3:
	movl	%edx, (%rcx)
	movl	%edx, %eax
LBB0_4:
	movq	_ts_nr_packets@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	movl	$4, %esi
	cmpl	$4, %ecx
	jl	LBB0_6
## %bb.5:
	movl	$312, %esi                      ## imm = 0x138
	cmpl	$313, %ecx                      ## imm = 0x139
	jb	LBB0_7
LBB0_6:
	movl	%esi, (%rdx)
	movl	%esi, %ecx
LBB0_7:
	movl	%eax, 40(%rbx)
	movl	%ecx, 44(%rbx)
	leaq	20(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	16(%rbx), %rdi
	movq	_saa7134_buffer_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	movq	%rbx, 8(%rbx)
	movl	$1, (%rbx)
	movq	$0, 32(%rbx)
	movl	24(%rbx), %edi
	leaq	4(%rbx), %rsi
	callq	_saa7134_pgtable_alloc
	movq	%rbx, %rdi
	callq	_saa7134_ts_init_hw
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tsbufs,4,2                     ## @tsbufs
	.comm	_VIDEO_MAX_FRAME,4,2            ## @VIDEO_MAX_FRAME
	.comm	_ts_nr_packets,4,2              ## @ts_nr_packets
	.comm	_saa7134_buffer_timeout,4,2     ## @saa7134_buffer_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7134_ts_init1               ; -- Begin function saa7134_ts_init1
	.p2align	2
_saa7134_ts_init1:                      ; @saa7134_ts_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	x9, _tsbufs@GOTPAGE
Lloh1:
	ldr	x9, [x9, _tsbufs@GOTPAGEOFF]
	ldr	w8, [x9]
	cmp	w8, #1
	b.gt	LBB0_2
; %bb.1:
	mov	w8, #2
	str	w8, [x9]
LBB0_2:
Lloh2:
	adrp	x10, _VIDEO_MAX_FRAME@GOTPAGE
Lloh3:
	ldr	x10, [x10, _VIDEO_MAX_FRAME@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	w8, w10
	b.le	LBB0_4
; %bb.3:
	str	w10, [x9]
	mov	x8, x10
LBB0_4:
Lloh5:
	adrp	x10, _ts_nr_packets@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ts_nr_packets@GOTPAGEOFF]
	ldr	w9, [x10]
	cmp	w9, #4
	b.ge	LBB0_6
; %bb.5:
	mov	w9, #4
	b	LBB0_8
LBB0_6:
	cmp	w9, #313
	b.lo	LBB0_9
; %bb.7:
	mov	w9, #312
LBB0_8:
	str	w9, [x10]
LBB0_9:
	stp	w8, w9, [x19, #40]
	add	x0, x19, #20
	bl	_INIT_LIST_HEAD
	add	x0, x19, #16
Lloh7:
	adrp	x8, _saa7134_buffer_timeout@GOTPAGE
Lloh8:
	ldr	x8, [x8, _saa7134_buffer_timeout@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	str	x19, [x19, #8]
	mov	w8, #1
	str	w8, [x19]
	str	xzr, [x19, #32]
	ldr	w0, [x19, #24]
	add	x1, x19, #4
	bl	_saa7134_pgtable_alloc
	mov	x0, x19
	bl	_saa7134_ts_init_hw
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_tsbufs,4,2                     ; @tsbufs
	.comm	_VIDEO_MAX_FRAME,4,2            ; @VIDEO_MAX_FRAME
	.comm	_ts_nr_packets,4,2              ; @ts_nr_packets
	.comm	_saa7134_buffer_timeout,4,2     ; @saa7134_buffer_timeout
.subsections_via_symbols
