	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pd_video_init                  ## -- Begin function pd_video_init
	.p2align	4, 0x90
_pd_video_init:                         ## @pd_video_init
	.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	_ENOMEM@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	subl	(%r15), %ebx
	movq	_pd_video_template@GOTPCREL(%rip), %rsi
	callq	_vdev_init
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	movl	$-1, %edx
	callq	_video_register_device
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_log
	movq	%r14, %rdi
	callq	_pd_video_exit
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_pd_video_template@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_vdev_init
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	_VFL_TYPE_VBI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	movl	$-1, %edx
	callq	_video_register_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.6:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_log
	jmp	LBB0_7
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%r15), %ebx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_pd_video_template,4,2          ## @pd_video_template
	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
	.comm	_VFL_TYPE_VBI,4,2               ## @VFL_TYPE_VBI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"register VIDEO/VBI devices"

L_.str.1:                               ## @.str.1
	.asciz	"VIDEO/VBI devices register failed, : %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pd_video_init                  ; -- Begin function pd_video_init
	.p2align	2
_pd_video_init:                         ; @pd_video_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
Lloh0:
	adrp	x21, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ENOMEM@GOTPAGEOFF]
	ldr	w20, [x21]
Lloh2:
	adrp	x1, _pd_video_template@GOTPAGE
Lloh3:
	ldr	x1, [x1, _pd_video_template@GOTPAGEOFF]
	bl	_vdev_init
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.1:
Lloh4:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w2, #-1
	bl	_video_register_device
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.2:
Lloh7:
	adrp	x1, _pd_video_template@GOTPAGE
Lloh8:
	ldr	x1, [x1, _pd_video_template@GOTPAGEOFF]
	mov	x0, x19
	bl	_vdev_init
	str	x0, [x19]
	cbz	x0, LBB0_8
; %bb.3:
Lloh9:
	adrp	x8, _VFL_TYPE_VBI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VFL_TYPE_VBI@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #-1
	bl	_video_register_device
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log
	b	LBB0_7
LBB0_5:
	neg	w20, w20
LBB0_6:
	str	x20, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_log
	mov	x0, x19
	bl	_pd_video_exit
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_8:
	ldr	w8, [x21]
	neg	w20, w8
	b	LBB0_6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_pd_video_template,4,2          ; @pd_video_template
	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
	.comm	_VFL_TYPE_VBI,4,2               ; @VFL_TYPE_VBI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"register VIDEO/VBI devices"

l_.str.1:                               ; @.str.1
	.asciz	"VIDEO/VBI devices register failed, : %d"

.subsections_via_symbols
