	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7164_port_init
_saa7164_port_init:                     ## @saa7164_port_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	testl	%esi, %esi
	js	LBB0_2
## %bb.1:
	movq	_SAA7164_MAX_PORTS@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jg	LBB0_3
LBB0_2:
	xorl	%eax, %eax
	callq	_BUG
LBB0_3:
	movq	(%r14), %r15
	movslq	%r12d, %rbx
	shlq	$6, %rbx
	movq	%r14, 56(%r15,%rbx)
	movl	%r12d, (%r15,%rbx)
	movq	_SAA7164_PORT_TS1@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_SAA7164_PORT_TS2@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_5
## %bb.6:
	movq	_SAA7164_PORT_ENC1@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_SAA7164_PORT_ENC2@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_8
## %bb.10:
	movq	_SAA7164_PORT_VBI1@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_SAA7164_PORT_VBI2@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_12
## %bb.13:
	xorl	%eax, %eax
	callq	_BUG
	jmp	LBB0_14
LBB0_5:
	movq	_SAA7164_MPEG_DVB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r15,%rbx)
	jmp	LBB0_14
LBB0_8:
	movq	_SAA7164_MPEG_ENCODER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r15,%rbx)
	leaq	(%r15,%rbx), %rdi
	addq	$48, %rdi
	movq	_saa7164_work_enchandler@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_12:
	movq	_SAA7164_MPEG_VBI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r15,%rbx)
	leaq	(%r15,%rbx), %rdi
	addq	$48, %rdi
	movq	_saa7164_work_vbihandler@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	callq	_INIT_WORK
LBB0_14:
	leaq	(%r15,%rbx), %rdi
	addq	$44, %rdi
	callq	_mutex_init
	leaq	(%r15,%rbx), %rdi
	addq	$40, %rdi
	callq	_INIT_LIST_HEAD
	leaq	(%r15,%rbx), %rdi
	addq	$36, %rdi
	callq	_mutex_init
	leaq	(%r15,%rbx), %rdi
	addq	$32, %rdi
	callq	_INIT_LIST_HEAD
	leaq	(%r15,%rbx), %rdi
	addq	$28, %rdi
	callq	_INIT_LIST_HEAD
	leaq	(%r15,%rbx), %rdi
	addq	$24, %rdi
	callq	_init_waitqueue_head
	leaq	(%r15,%rbx), %rdi
	addq	$20, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_saa7164_histogram_reset
	leaq	(%r15,%rbx), %rdi
	addq	$16, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_saa7164_histogram_reset
	leaq	(%r15,%rbx), %rdi
	addq	$12, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_saa7164_histogram_reset
	leaq	(%r15,%rbx), %rdi
	addq	$8, %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_saa7164_histogram_reset
	leaq	(%r15,%rbx), %rdi
	addq	$4, %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_saa7164_histogram_reset
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7164_MAX_PORTS,4,2          ## @SAA7164_MAX_PORTS
	.comm	_SAA7164_PORT_TS1,4,2           ## @SAA7164_PORT_TS1
	.comm	_SAA7164_PORT_TS2,4,2           ## @SAA7164_PORT_TS2
	.comm	_SAA7164_MPEG_DVB,4,2           ## @SAA7164_MPEG_DVB
	.comm	_SAA7164_PORT_ENC1,4,2          ## @SAA7164_PORT_ENC1
	.comm	_SAA7164_PORT_ENC2,4,2          ## @SAA7164_PORT_ENC2
	.comm	_SAA7164_MPEG_ENCODER,4,2       ## @SAA7164_MPEG_ENCODER
	.comm	_saa7164_work_enchandler,4,2    ## @saa7164_work_enchandler
	.comm	_SAA7164_PORT_VBI1,4,2          ## @SAA7164_PORT_VBI1
	.comm	_SAA7164_PORT_VBI2,4,2          ## @SAA7164_PORT_VBI2
	.comm	_SAA7164_MPEG_VBI,4,2           ## @SAA7164_MPEG_VBI
	.comm	_saa7164_work_vbihandler,4,2    ## @saa7164_work_vbihandler
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"irq intervals"

L_.str.1:                               ## @.str.1
	.asciz	"deferred intervals"

L_.str.2:                               ## @.str.2
	.asciz	"irq to deferred intervals"

L_.str.3:                               ## @.str.3
	.asciz	"encoder/vbi read() intervals"

L_.str.4:                               ## @.str.4
	.asciz	"encoder/vbi poll() intervals"

	.no_dead_strip	_saa7164_port_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7164_port_init
_saa7164_port_init:                     ; @saa7164_port_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	tbnz	w1, #31, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _SAA7164_MAX_PORTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SAA7164_MAX_PORTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.gt	LBB0_3
LBB0_2:
	bl	_BUG
LBB0_3:
	ldr	x21, [x20]
	sxtw	x22, w19
	add	x8, x21, x22, lsl #6
	str	x20, [x8, #56]
	str	w19, [x8]
Lloh3:
	adrp	x9, _SAA7164_PORT_TS1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SAA7164_PORT_TS1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _SAA7164_PORT_TS2@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SAA7164_PORT_TS2@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w19
	ccmp	w10, w19, #4, ne
	b.ne	LBB0_5
; %bb.4:
Lloh9:
	adrp	x9, _SAA7164_MPEG_DVB@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SAA7164_MPEG_DVB@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	str	w9, [x8, #52]
	b	LBB0_11
LBB0_5:
Lloh12:
	adrp	x8, _SAA7164_PORT_ENC1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SAA7164_PORT_ENC1@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _SAA7164_PORT_ENC2@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SAA7164_PORT_ENC2@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w19
	ccmp	w9, w19, #4, ne
	b.ne	LBB0_7
; %bb.6:
Lloh18:
	adrp	x8, _SAA7164_MPEG_ENCODER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SAA7164_MPEG_ENCODER@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	add	x9, x21, x22, lsl #6
	str	w8, [x9, #52]
	add	x0, x9, #48
Lloh21:
	adrp	x8, _saa7164_work_enchandler@GOTPAGE
Lloh22:
	ldr	x8, [x8, _saa7164_work_enchandler@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh23:
	adrp	x8, _SAA7164_PORT_VBI1@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SAA7164_PORT_VBI1@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _SAA7164_PORT_VBI2@GOTPAGE
Lloh27:
	ldr	x9, [x9, _SAA7164_PORT_VBI2@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	cmp	w8, w19
	ccmp	w9, w19, #4, ne
	b.ne	LBB0_10
; %bb.8:
Lloh29:
	adrp	x8, _SAA7164_MPEG_VBI@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SAA7164_MPEG_VBI@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	add	x9, x21, x22, lsl #6
	str	w8, [x9, #52]
	add	x0, x9, #48
Lloh32:
	adrp	x8, _saa7164_work_vbihandler@GOTPAGE
Lloh33:
	ldr	x8, [x8, _saa7164_work_vbihandler@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	bl	_INIT_WORK
	b	LBB0_11
LBB0_10:
	bl	_BUG
LBB0_11:
	add	x19, x21, x22, lsl #6
	add	x0, x19, #44
	bl	_mutex_init
	add	x0, x19, #40
	bl	_INIT_LIST_HEAD
	add	x0, x19, #36
	bl	_mutex_init
	add	x0, x19, #32
	bl	_INIT_LIST_HEAD
	add	x0, x19, #28
	bl	_INIT_LIST_HEAD
	add	x0, x19, #24
	bl	_init_waitqueue_head
	add	x0, x19, #20
Lloh34:
	adrp	x1, l_.str@PAGE
Lloh35:
	add	x1, x1, l_.str@PAGEOFF
	bl	_saa7164_histogram_reset
	add	x0, x19, #16
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_saa7164_histogram_reset
	add	x0, x19, #12
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_saa7164_histogram_reset
	add	x0, x19, #8
Lloh40:
	adrp	x1, l_.str.3@PAGE
Lloh41:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_saa7164_histogram_reset
	add	x0, x19, #4
Lloh42:
	adrp	x1, l_.str.4@PAGE
Lloh43:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_saa7164_histogram_reset
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7164_MAX_PORTS,4,2          ; @SAA7164_MAX_PORTS
	.comm	_SAA7164_PORT_TS1,4,2           ; @SAA7164_PORT_TS1
	.comm	_SAA7164_PORT_TS2,4,2           ; @SAA7164_PORT_TS2
	.comm	_SAA7164_MPEG_DVB,4,2           ; @SAA7164_MPEG_DVB
	.comm	_SAA7164_PORT_ENC1,4,2          ; @SAA7164_PORT_ENC1
	.comm	_SAA7164_PORT_ENC2,4,2          ; @SAA7164_PORT_ENC2
	.comm	_SAA7164_MPEG_ENCODER,4,2       ; @SAA7164_MPEG_ENCODER
	.comm	_saa7164_work_enchandler,4,2    ; @saa7164_work_enchandler
	.comm	_SAA7164_PORT_VBI1,4,2          ; @SAA7164_PORT_VBI1
	.comm	_SAA7164_PORT_VBI2,4,2          ; @SAA7164_PORT_VBI2
	.comm	_SAA7164_MPEG_VBI,4,2           ; @SAA7164_MPEG_VBI
	.comm	_saa7164_work_vbihandler,4,2    ; @saa7164_work_vbihandler
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"irq intervals"

l_.str.1:                               ; @.str.1
	.asciz	"deferred intervals"

l_.str.2:                               ; @.str.2
	.asciz	"irq to deferred intervals"

l_.str.3:                               ; @.str.3
	.asciz	"encoder/vbi read() intervals"

l_.str.4:                               ; @.str.4
	.asciz	"encoder/vbi poll() intervals"

	.no_dead_strip	_saa7164_port_init
.subsections_via_symbols
