	.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	%rdi, %rbx
	movq	8(%rdi), %rax
	movslq	%esi, %rsi
	movq	%rsi, %rdx
	shlq	$4, %rdx
	movq	8(%rax,%rdx), %rdi
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	leaq	(%rax,%rdx), %r13
	movq	_ivtv_stream_info@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rsi,8), %r14d
	leaq	(%rax,%rdx), %r12
	addq	$8, %r12
	movl	(%rdi), %r15d
	movq	_IVTV_ENC_STREAM_TYPE_MPG@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	cmpl	%esi, %edx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.2:
	shlq	$4, %rdx
	movq	8(%rax,%rdx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	4(%rcx,%rsi,8), %r15d
	addl	(%rax), %r15d
LBB0_4:
	movq	%rsi, %rbx
	movq	%r13, %rsi
	callq	_video_set_drvdata
	movq	(%r12), %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_video_register_device_no_warn
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%r13), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %edx
	callq	_IVTV_ERR
	movq	(%r12), %rdi
	callq	_video_device_release
	movq	$0, (%r12)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_14
LBB0_6:
	movq	(%r12), %rdi
	callq	_video_device_node_name
	cmpl	$128, %r14d
	je	LBB0_10
## %bb.7:
	cmpl	$129, %r14d
	je	LBB0_12
## %bb.8:
	cmpl	$130, %r14d
	movl	$0, %r14d
	jne	LBB0_14
## %bb.9:
	movl	(%r13), %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	(%rcx,%rbx,4), %ecx
	jmp	LBB0_11
LBB0_10:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	(%rcx,%rbx,4), %ecx
	movl	(%r13), %edx
	testl	%ecx, %ecx
	je	LBB0_13
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_IVTV_INFO
	jmp	LBB0_14
LBB0_12:
	movl	(%r13), %edx
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_IVTV_INFO
LBB0_14:
	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
	.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
	mov	x20, x0
	ldr	x8, [x0, #8]
	add	x19, x8, w1, sxtw #4
	mov	x23, x19
	ldr	x0, [x23, #8]!
	cbz	x0, LBB0_16
; %bb.1:
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]
	sxtw	x24, w1
	ldr	w22, [x0]
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	x8, x8, x10, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w8, [x8]
	add	x9, x9, x24, lsl #3
	ldr	w9, [x9, #4]
	add	w22, w9, w8
LBB0_4:
	mov	x1, x19
	bl	_video_set_drvdata
	ldr	x0, [x23]
	mov	x1, x21
	mov	x2, x22
	bl	_video_register_device_no_warn
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w1, [x19]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x22
	bl	_IVTV_ERR
	ldr	x0, [x23]
	bl	_video_device_release
	str	xzr, [x23]
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_6:
	ldr	x0, [x23]
	bl	_video_device_node_name
	mov	x1, x0
	cmp	w21, #128
	b.eq	LBB0_10
; %bb.7:
	cmp	w21, #129
	b.eq	LBB0_12
; %bb.8:
	cmp	w21, #130
	b.ne	LBB0_15
; %bb.9:
	ldr	w2, [x19]
	ldr	x8, [x20]
	ldr	w8, [x8, x24, lsl #2]
	b	LBB0_11
LBB0_10:
	ldr	x8, [x20]
	ldr	w8, [x8, x24, lsl #2]
	ldr	w2, [x19]
	cbz	w8, LBB0_13
LBB0_11:
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_12:
	ldr	w2, [x19]
LBB0_13:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_14:
	bl	_IVTV_INFO
LBB0_15:
	mov	w0, #0
LBB0_16:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.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
	.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
