	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_init_struct2
_ivtv_init_struct2:                     ## @ivtv_init_struct2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_IVTV_CARD_MAX_VIDEO_INPUTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	movl	$0, %eax
	testl	%edx, %edx
	jle	LBB0_5
## %bb.1:
	movq	16(%rdi), %rax
	movq	8(%rax), %rsi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rsi)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	addq	$16, %rsi
	cmpq	%rax, %rdx
	jne	LBB0_2
## %bb.4:
	movl	%edx, %eax
LBB0_5:
	movl	%eax, (%rdi)
	movq	_IVTV_CARD_MAX_AUDIO_INPUTS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movq	16(%rdi), %r8
	testl	%esi, %esi
	jle	LBB0_10
## %bb.6:
	movq	16(%r8), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rcx,8)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rcx
	cmpq	%rcx, %rsi
	jne	LBB0_7
## %bb.9:
	movl	%esi, %ecx
LBB0_10:
	movl	%ecx, 4(%rdi)
	movq	_IVTV_HW_CX25840@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%r8), %ecx
	movl	$64, %ecx
	movl	$288, %edx                      ## imm = 0x120
	cmovel	%ecx, %edx
	movl	%edx, 28(%rdi)
	movq	8(%r8), %r8
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	movq	_IVTV_CARD_INPUT_VID_TUNER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movl	%eax, %esi
	xorl	%eax, %eax
	movq	%r8, %rcx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rcx)
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rax
	addq	$16, %rcx
	cmpq	%rax, %rsi
	jne	LBB0_12
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	movl	%eax, 8(%rdi)
	movl	%eax, %eax
	shlq	$4, %rax
	movl	8(%r8,%rax), %eax
	movl	%eax, 24(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IVTV_CARD_MAX_VIDEO_INPUTS,4,2 ## @IVTV_CARD_MAX_VIDEO_INPUTS
	.comm	_IVTV_CARD_MAX_AUDIO_INPUTS,4,2 ## @IVTV_CARD_MAX_AUDIO_INPUTS
	.comm	_IVTV_HW_CX25840,4,2            ## @IVTV_HW_CX25840
	.comm	_IVTV_CARD_INPUT_VID_TUNER,8,3  ## @IVTV_CARD_INPUT_VID_TUNER
	.no_dead_strip	_ivtv_init_struct2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_init_struct2
_ivtv_init_struct2:                     ; @ivtv_init_struct2
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _IVTV_CARD_MAX_VIDEO_INPUTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IVTV_CARD_MAX_VIDEO_INPUTS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x8, #0
	ldr	x10, [x0, #16]
	ldr	x10, [x10, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	cbz	x11, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x8, #1
	add	x10, x10, #16
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.4:
	mov	x8, x9
	b	LBB0_6
LBB0_5:
	mov	w8, #0
LBB0_6:
	str	w8, [x0]
Lloh3:
	adrp	x9, _IVTV_CARD_MAX_AUDIO_INPUTS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IVTV_CARD_MAX_AUDIO_INPUTS@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x9]
	ldr	x9, [x0, #16]
	cmp	w10, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x11, #0
	ldr	x12, [x9, #16]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x12, x11, lsl #3]
	cbz	x13, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x11, x11, #1
	cmp	x10, x11
	b.ne	LBB0_8
; %bb.10:
	mov	x11, x10
	b	LBB0_12
LBB0_11:
	mov	w11, #0
LBB0_12:
	str	w11, [x0, #4]
	ldr	w10, [x9]
Lloh6:
	adrp	x11, _IVTV_HW_CX25840@GOTPAGE
Lloh7:
	ldr	x11, [x11, _IVTV_HW_CX25840@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w10
	mov	w10, #288
	mov	w11, #64
	csel	w10, w11, w10, eq
	str	w10, [x0, #28]
	ldr	x9, [x9, #8]
	cbz	w8, LBB0_16
; %bb.13:
	mov	x10, #0
Lloh9:
	adrp	x11, _IVTV_CARD_INPUT_VID_TUNER@GOTPAGE
Lloh10:
	ldr	x11, [x11, _IVTV_CARD_INPUT_VID_TUNER@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	mov	w8, w8
	mov	x12, x9
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x12]
	cmp	x13, x11
	b.eq	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x10, x10, #1
	add	x12, x12, #16
	cmp	x8, x10
	b.ne	LBB0_14
LBB0_16:
	mov	w10, #0
LBB0_17:
	str	w10, [x0, #8]
	add	x8, x9, w10, uxtw #4
	ldr	w8, [x8, #8]
	str	w8, [x0, #24]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IVTV_CARD_MAX_VIDEO_INPUTS,4,2 ; @IVTV_CARD_MAX_VIDEO_INPUTS
	.comm	_IVTV_CARD_MAX_AUDIO_INPUTS,4,2 ; @IVTV_CARD_MAX_AUDIO_INPUTS
	.comm	_IVTV_HW_CX25840,4,2            ; @IVTV_HW_CX25840
	.comm	_IVTV_CARD_INPUT_VID_TUNER,8,3  ; @IVTV_CARD_INPUT_VID_TUNER
	.no_dead_strip	_ivtv_init_struct2
.subsections_via_symbols
