	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_reg_dev
_ivtv_reg_dev:                          ## @ivtv_reg_dev
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	movslq	%esi, %rbx
	movq	%rbx, %rcx
	shlq	$5, %rcx
	xorl	%r14d, %r14d
	cmpq	$0, 16(%rax,%rcx)
	je	LBB0_16
## %bb.1:
	movq	_ivtv_stream_info@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r8
	leaq	(%rax,%rcx), %r13
	addq	$8, %r13
	movl	(%r13), %r14d
	movq	_IVTV_ENC_STREAM_TYPE_MPG@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	cmpl	%esi, %edx
	je	LBB0_4
## %bb.2:
	shlq	$5, %rdx
	cmpq	$0, 16(%rax,%rdx)
	je	LBB0_4
## %bb.3:
	movl	4(%r8,%rbx,8), %r14d
	addl	8(%rax,%rdx), %r14d
LBB0_4:
	leaq	(%rax,%rcx), %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	(%r8,%rbx,8), %r12d
	movl	24(%rax,%rcx), %edx
	movl	%edx, 12(%rax,%rcx)
	cmpq	$0, 24(%rdi)
	je	LBB0_6
## %bb.5:
	movq	_V4L2_CAP_VIDEO_OUTPUT_OVERLAY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_IVTV_DEC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	shlq	$5, %rbx
	orl	%edx, 12(%rax,%rbx)
	movl	(%rcx), %edx
	movq	_IVTV_DEC_STREAM_TYPE_MPG@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	shlq	$5, %rbx
	orl	%edx, 12(%rax,%rbx)
	movl	(%rcx), %eax
	orl	%eax, 8(%rdi)
LBB0_6:
	movq	%rdi, %rbx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_video_set_drvdata
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_video_register_device_no_warn
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	callq	_IVTV_ERR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_16
LBB0_8:
	movq	%r13, %rdi
	callq	_video_device_node_name
	cmpl	$128, %r12d
	je	LBB0_12
## %bb.9:
	cmpl	$129, %r12d
	je	LBB0_14
## %bb.10:
	cmpl	$130, %r12d
	movl	$0, %r14d
	jne	LBB0_16
## %bb.11:
	movl	(%r15), %edx
	movq	(%rbx), %rcx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rcx,%rsi,4), %ecx
	jmp	LBB0_13
LBB0_12:
	movq	(%rbx), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rcx,%rdx,4), %ecx
	movl	(%r15), %edx
	testl	%ecx, %ecx
	je	LBB0_15
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_IVTV_INFO
	jmp	LBB0_16
LBB0_14:
	movl	(%r15), %edx
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_IVTV_INFO
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ivtv_stream_info,8,3           ## @ivtv_stream_info
	.comm	_IVTV_ENC_STREAM_TYPE_MPG,4,2   ## @IVTV_ENC_STREAM_TYPE_MPG
	.comm	_V4L2_CAP_VIDEO_OUTPUT_OVERLAY,4,2 ## @V4L2_CAP_VIDEO_OUTPUT_OVERLAY
	.comm	_IVTV_DEC_STREAM_TYPE_YUV,8,3   ## @IVTV_DEC_STREAM_TYPE_YUV
	.comm	_IVTV_DEC_STREAM_TYPE_MPG,8,3   ## @IVTV_DEC_STREAM_TYPE_MPG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't register v4l2 device for %s (device node number %d)\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Registered device %s for %s (%d kB)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Registered device %s for %s\n"

	.no_dead_strip	_ivtv_reg_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_reg_dev
_ivtv_reg_dev:                          ; @ivtv_reg_dev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	x8, [x0, #16]
	sxtw	x24, w1
	add	x20, x8, x24, lsl #5
	ldr	x9, [x20, #16]
	cbz	x9, LBB0_17
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x9, _ivtv_stream_info@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ivtv_stream_info@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	sbfiz	x10, x1, #3, #32
	ldr	w21, [x9, x10]
	add	x22, x20, #8
	ldr	w23, [x22]
Lloh3:
	adrp	x10, _IVTV_ENC_STREAM_TYPE_MPG@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IVTV_ENC_STREAM_TYPE_MPG@GOTPAGEOFF]
Lloh5:
	ldrsw	x10, [x10]
	cmp	w10, w1
	b.eq	LBB0_4
; %bb.2:
	add	x10, x8, x10, lsl #5
	ldr	x11, [x10, #16]
	cbz	x11, LBB0_4
; %bb.3:
	ldr	w10, [x10, #8]
	add	x9, x9, x24, lsl #3
	ldr	w9, [x9, #4]
	add	w23, w9, w10
LBB0_4:
	add	x9, x8, x24, lsl #5
	ldr	w10, [x9, #24]
	str	w10, [x9, #12]
	ldr	x9, [x19, #24]
	cbz	x9, LBB0_6
; %bb.5:
Lloh6:
	adrp	x9, _V4L2_CAP_VIDEO_OUTPUT_OVERLAY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_CAP_VIDEO_OUTPUT_OVERLAY@GOTPAGEOFF]
Lloh8:
	adrp	x10, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGEOFF]
	ldr	w11, [x9]
Lloh10:
	ldr	x10, [x10]
	add	x10, x8, x10, lsl #5
	ldr	w12, [x10, #12]
	orr	w11, w12, w11
	str	w11, [x10, #12]
	ldr	w10, [x9]
Lloh11:
	adrp	x11, _IVTV_DEC_STREAM_TYPE_MPG@GOTPAGE
Lloh12:
	ldr	x11, [x11, _IVTV_DEC_STREAM_TYPE_MPG@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
	add	x8, x8, x11, lsl #5
	ldr	w11, [x8, #12]
	orr	w10, w11, w10
	str	w10, [x8, #12]
	ldr	w8, [x9]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_6:
	mov	x0, x22
	mov	x1, x20
	bl	_video_set_drvdata
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_video_register_device_no_warn
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w1, [x20]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x23
	bl	_IVTV_ERR
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_8:
	mov	x0, x22
	bl	_video_device_node_name
	mov	x1, x0
	cmp	w21, #128
	b.eq	LBB0_12
; %bb.9:
	cmp	w21, #129
	b.eq	LBB0_14
; %bb.10:
	cmp	w21, #130
	b.ne	LBB0_17
; %bb.11:
	ldr	w2, [x20]
	ldr	x8, [x19]
	ldr	w8, [x8, x24, lsl #2]
	b	LBB0_13
LBB0_12:
	ldr	x8, [x19]
	ldr	w8, [x8, x24, lsl #2]
	ldr	w2, [x20]
	cbz	w8, LBB0_15
LBB0_13:
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_14:
	ldr	w2, [x20]
LBB0_15:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_16:
	bl	_IVTV_INFO
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ivtv_stream_info,8,3           ; @ivtv_stream_info
	.comm	_IVTV_ENC_STREAM_TYPE_MPG,4,2   ; @IVTV_ENC_STREAM_TYPE_MPG
	.comm	_V4L2_CAP_VIDEO_OUTPUT_OVERLAY,4,2 ; @V4L2_CAP_VIDEO_OUTPUT_OVERLAY
	.comm	_IVTV_DEC_STREAM_TYPE_YUV,8,3   ; @IVTV_DEC_STREAM_TYPE_YUV
	.comm	_IVTV_DEC_STREAM_TYPE_MPG,8,3   ; @IVTV_DEC_STREAM_TYPE_MPG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't register v4l2 device for %s (device node number %d)\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Registered device %s for %s (%d kB)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Registered device %s for %s\n"

	.no_dead_strip	_ivtv_reg_dev
.subsections_via_symbols
