	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdpvr_register_videodev        ## -- Begin function hdpvr_register_videodev
	.p2align	4, 0x90
_hdpvr_register_videodev:               ## @hdpvr_register_videodev
	.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	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_video_device_alloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_hdpvr_video_template@GOTPCREL(%rip), %rcx
	movups	(%rcx), %xmm0
	movups	%xmm0, (%rax)
	movq	8(%rbx), %rax
	movl	8(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcpy
	movq	8(%rbx), %rdi
	movq	%r12, (%rdi)
	movq	%rbx, %rsi
	callq	_video_set_drvdata
	movq	8(%rbx), %rdi
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	callq	_video_register_device
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_4:
	movq	%rbx, %rdi
	callq	_v4l2_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"video_device_alloc() failed\n"

	.comm	_hdpvr_video_template,16,3      ## @hdpvr_video_template
L_.str.1:                               ## @.str.1
	.asciz	"Hauppauge HD PVR"

	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
L_.str.2:                               ## @.str.2
	.asciz	"video_device registration failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdpvr_register_videodev        ; -- Begin function hdpvr_register_videodev
	.p2align	2
_hdpvr_register_videodev:               ; @hdpvr_register_videodev
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_video_device_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _hdpvr_video_template@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hdpvr_video_template@GOTPAGEOFF]
Lloh2:
	ldr	q0, [x8]
	str	q0, [x0]
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #8]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcpy
	ldr	x0, [x19, #8]
	str	x21, [x0]
	mov	x1, x19
	bl	_video_set_drvdata
	ldr	x0, [x19, #8]
Lloh5:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_video_register_device
	cbz	x0, LBB0_5
; %bb.2:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_v4l2_err
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"video_device_alloc() failed\n"

	.comm	_hdpvr_video_template,16,3      ; @hdpvr_video_template
l_.str.1:                               ; @.str.1
	.asciz	"Hauppauge HD PVR"

	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
l_.str.2:                               ; @.str.2
	.asciz	"video_device registration failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
