	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_drif_sdr_register
_rcar_drif_sdr_register:                ## @rcar_drif_sdr_register
	.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, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_video_device_alloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	64(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	8(%rbx), %rdi
	movq	_rcar_drif_fops@GOTPCREL(%rip), %rax
	movq	%rax, 56(%rdi)
	movq	_rcar_drif_ioctl_ops@GOTPCREL(%rip), %rax
	movq	%rax, 48(%rdi)
	movq	_video_device_release@GOTPCREL(%rip), %rax
	movq	%rax, 40(%rdi)
	leaq	40(%rbx), %rax
	movq	%rax, 32(%rdi)
	leaq	32(%rbx), %rax
	movq	%rax, 24(%rdi)
	leaq	24(%rbx), %rax
	movq	%rax, 32(%rbx)
	leaq	20(%rbx), %rax
	movq	%rax, 16(%rdi)
	leaq	16(%rbx), %rax
	movq	%rax, 8(%rdi)
	movq	_V4L2_CAP_SDR_CAPTURE@GOTPCREL(%rip), %rax
	movq	_V4L2_CAP_TUNER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_V4L2_CAP_STREAMING@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_V4L2_CAP_READWRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%rdi)
	movq	%rbx, %rsi
	callq	_video_set_drvdata
	movq	8(%rbx), %rdi
	movq	_VFL_TYPE_SDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-1, %edx
	callq	_video_register_device
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movq	8(%rbx), %rdi
	callq	_video_device_release
	movq	$0, 8(%rbx)
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	movl	%r15d, %r14d
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"R-Car DRIF"

	.comm	_rcar_drif_fops,4,2             ## @rcar_drif_fops
	.comm	_rcar_drif_ioctl_ops,4,2        ## @rcar_drif_ioctl_ops
	.comm	_V4L2_CAP_SDR_CAPTURE,4,2       ## @V4L2_CAP_SDR_CAPTURE
	.comm	_V4L2_CAP_TUNER,4,2             ## @V4L2_CAP_TUNER
	.comm	_V4L2_CAP_STREAMING,4,2         ## @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_READWRITE,4,2         ## @V4L2_CAP_READWRITE
	.comm	_VFL_TYPE_SDR,4,2               ## @VFL_TYPE_SDR
L_.str.1:                               ## @.str.1
	.asciz	"failed video_register_device (%d)\n"

	.no_dead_strip	_rcar_drif_sdr_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_drif_sdr_register
_rcar_drif_sdr_register:                ; @rcar_drif_sdr_register
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_video_device_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x0, #64]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	ldr	x0, [x19, #8]
Lloh2:
	adrp	x8, _rcar_drif_fops@GOTPAGE
Lloh3:
	ldr	x8, [x8, _rcar_drif_fops@GOTPAGEOFF]
	str	x8, [x0, #56]
Lloh4:
	adrp	x8, _rcar_drif_ioctl_ops@GOTPAGE
Lloh5:
	ldr	x8, [x8, _rcar_drif_ioctl_ops@GOTPAGEOFF]
	add	x9, x19, #24
	mov	x10, x19
	str	x9, [x10, #32]!
Lloh6:
	adrp	x9, _video_device_release@GOTPAGE
Lloh7:
	ldr	x9, [x9, _video_device_release@GOTPAGEOFF]
	stp	x9, x8, [x0, #40]
	add	x8, x19, #40
	stp	x10, x8, [x0, #24]
	add	x8, x19, #20
	add	x9, x19, #16
	stp	x9, x8, [x0, #8]
Lloh8:
	adrp	x8, _V4L2_CAP_SDR_CAPTURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_CAP_SDR_CAPTURE@GOTPAGEOFF]
Lloh10:
	adrp	x9, _V4L2_CAP_TUNER@GOTPAGE
Lloh11:
	ldr	x9, [x9, _V4L2_CAP_TUNER@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _V4L2_CAP_STREAMING@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_CAP_STREAMING@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _V4L2_CAP_READWRITE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _V4L2_CAP_READWRITE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x0]
	mov	x1, x19
	bl	_video_set_drvdata
	ldr	x0, [x19, #8]
Lloh20:
	adrp	x8, _VFL_TYPE_SDR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VFL_TYPE_SDR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	w2, #-1
	bl	_video_register_device
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	x0, [x19, #8]
	bl	_video_device_release
	str	xzr, [x19, #8]
	ldr	w0, [x19]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_4
LBB0_3:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"R-Car DRIF"

	.comm	_rcar_drif_fops,4,2             ; @rcar_drif_fops
	.comm	_rcar_drif_ioctl_ops,4,2        ; @rcar_drif_ioctl_ops
	.comm	_V4L2_CAP_SDR_CAPTURE,4,2       ; @V4L2_CAP_SDR_CAPTURE
	.comm	_V4L2_CAP_TUNER,4,2             ; @V4L2_CAP_TUNER
	.comm	_V4L2_CAP_STREAMING,4,2         ; @V4L2_CAP_STREAMING
	.comm	_V4L2_CAP_READWRITE,4,2         ; @V4L2_CAP_READWRITE
	.comm	_VFL_TYPE_SDR,4,2               ; @VFL_TYPE_SDR
l_.str.1:                               ; @.str.1
	.asciz	"failed video_register_device (%d)\n"

	.no_dead_strip	_rcar_drif_sdr_register
.subsections_via_symbols
