	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_v4l2_create               ## -- Begin function pvr2_v4l2_create
	.p2align	4, 0x90
_pvr2_v4l2_create:                      ## @pvr2_v4l2_create
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$8, %rdi
	movq	%r14, %rsi
	callq	_pvr2_channel_init
	movq	_PVR2_TRACE_STRUCT@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_pvr2_trace
	movq	_pvr2_v4l2_internal_check@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	(%r15), %esi
	movl	$1, %edi
	callq	_kzalloc
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_pvr2_v4l2_dev_init
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_pvr2_hdw_get_input_available
	movq	_PVR2_CVAL_INPUT_RADIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %eax
	jae	LBB0_7
## %bb.3:
	movl	(%r15), %esi
	movl	$1, %edi
	callq	_kzalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_VFL_TYPE_RADIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_pvr2_v4l2_dev_init
	jmp	LBB0_7
LBB0_5:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_pvr2_trace
	movq	%rbx, %rdi
	callq	_pvr2_v4l2_destroy_no_lock
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_PVR2_TRACE_STRUCT,4,2          ## @PVR2_TRACE_STRUCT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Creating pvr2_v4l2 id=%p"

	.comm	_pvr2_v4l2_internal_check,4,2   ## @pvr2_v4l2_internal_check
	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
	.comm	_PVR2_CVAL_INPUT_RADIO,4,2      ## @PVR2_CVAL_INPUT_RADIO
	.comm	_VFL_TYPE_RADIO,4,2             ## @VFL_TYPE_RADIO
L_.str.1:                               ## @.str.1
	.asciz	"Failure creating pvr2_v4l2 id=%p"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_v4l2_create               ; -- Begin function pvr2_v4l2_create
	.p2align	2
_pvr2_v4l2_create:                      ; @pvr2_v4l2_create
	.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, x0
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #32
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	add	x0, x19, #8
	mov	x1, x20
	bl	_pvr2_channel_init
Lloh2:
	adrp	x20, _PVR2_TRACE_STRUCT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _PVR2_TRACE_STRUCT@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_pvr2_trace
Lloh6:
	adrp	x8, _pvr2_v4l2_internal_check@GOTPAGE
Lloh7:
	ldr	x8, [x8, _pvr2_v4l2_internal_check@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	w1, [x21]
	mov	w0, #1
	bl	_kzalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_5
; %bb.2:
Lloh9:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_pvr2_v4l2_dev_init
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_pvr2_hdw_get_input_available
Lloh12:
	adrp	x8, _PVR2_CVAL_INPUT_RADIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PVR2_CVAL_INPUT_RADIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	lsr	w8, w0, w8
	tbz	w8, #0, LBB0_6
; %bb.3:
	ldr	w1, [x21]
	mov	w0, #1
	bl	_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.4:
Lloh15:
	adrp	x8, _VFL_TYPE_RADIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VFL_TYPE_RADIO@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_pvr2_v4l2_dev_init
	b	LBB0_6
LBB0_5:
	ldr	w0, [x20]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_pvr2_trace
	mov	x0, x19
	bl	_pvr2_v4l2_destroy_no_lock
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_PVR2_TRACE_STRUCT,4,2          ; @PVR2_TRACE_STRUCT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Creating pvr2_v4l2 id=%p"

	.comm	_pvr2_v4l2_internal_check,4,2   ; @pvr2_v4l2_internal_check
	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
	.comm	_PVR2_CVAL_INPUT_RADIO,4,2      ; @PVR2_CVAL_INPUT_RADIO
	.comm	_VFL_TYPE_RADIO,4,2             ; @VFL_TYPE_RADIO
l_.str.1:                               ; @.str.1
	.asciz	"Failure creating pvr2_v4l2 id=%p"

.subsections_via_symbols
