	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rga_probe
_rga_probe:                             ## @rga_probe
	.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
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$72, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movq	%r13, 16(%rax)
	leaq	68(%rax), %rdi
	callq	_spin_lock_init
	leaq	60(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	callq	_rga_parse_dt
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
LBB0_7:
	movq	16(%r12), %rdi
	callq	_pm_runtime_enable
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	16(%r12), %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 64(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	64(%r12), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
LBB0_21:
	movq	16(%r12), %rdi
	callq	_pm_runtime_disable
	jmp	LBB0_22
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_21
## %bb.10:
	movq	16(%r12), %r14
	movq	_rga_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_dev_name
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	movl	%eax, %r8d
	movq	%r12, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	leaq	24(%r12), %r14
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_v4l2_device_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.13:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_video_device_alloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	_rga_videodev@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movq	%r15, 16(%rax)
	movq	%r14, 8(%rax)
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_video_set_drvdata
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, 32(%r12)
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	movq	_rga_m2m_ops@GOTPCREL(%rip), %rdi
	callq	_v4l2_m2m_init
	movl	%eax, 56(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
	movl	56(%r12), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_19
LBB0_11:
	movl	%eax, %ebx
	movq	16(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_21
LBB0_14:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_17:
	movq	16(%r12), %rdi
	callq	_pm_runtime_get_sync
	movq	_RGA_VERSION_INFO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rga_read
	shrl	$24, %eax
	movl	%eax, 48(%r12)
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rga_read
	shrl	$20, %eax
	andl	$15, %eax
	movl	%eax, 52(%r12)
	movl	48(%r12), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_v4l2_info
	movq	16(%r12), %rdi
	callq	_pm_runtime_put
	movq	16(%r12), %rdi
	movq	_RGA_CMDBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	addq	$40, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	_DMA_ATTR_WRITE_COMBINE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	callq	_dma_alloc_attrs
	movl	%eax, 44(%r12)
	movq	___GFP_ZERO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	orl	(%r15), %edi
	movl	$3, %esi
	callq	___get_free_pages
	movq	%rax, (%r12)
	movl	(%rbx), %edi
	orl	(%r15), %edi
	movl	$3, %esi
	callq	___get_free_pages
	movq	%rax, 8(%r12)
	movq	_def_frame@GOTPCREL(%rip), %rax
	movq	16(%rax), %rcx
	movl	(%rcx), %ecx
	imull	4(%rax), %ecx
	sarl	$3, %ecx
	movl	%ecx, (%rax)
	imull	12(%rax), %ecx
	movl	%ecx, 8(%rax)
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$-1, %edx
	callq	_video_register_device
	testl	%eax, %eax
	je	LBB0_23
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_video_device_release
LBB0_19:
	movq	32(%r12), %rdi
	callq	_video_unregister_device
LBB0_20:
	movq	%r14, %rdi
	callq	_v4l2_device_unregister
	jmp	LBB0_21
LBB0_23:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %ebx
	callq	_video_device_node_name
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_v4l2_info
	xorl	%ebx, %ebx
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to parse OF data\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_rga_isr,4,2                    ## @rga_isr
L_.str.1:                               ## @.str.1
	.asciz	"failed to request irq\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to allocate video device\n"

	.comm	_rga_videodev,24,3              ## @rga_videodev
	.comm	_rga_m2m_ops,4,2                ## @rga_m2m_ops
L_.str.3:                               ## @.str.3
	.asciz	"Failed to init mem2mem device\n"

	.comm	_RGA_VERSION_INFO,4,2           ## @RGA_VERSION_INFO
L_.str.4:                               ## @.str.4
	.asciz	"HW Version: 0x%02x.%02x\n"

	.comm	_RGA_CMDBUF_SIZE,4,2            ## @RGA_CMDBUF_SIZE
	.comm	_DMA_ATTR_WRITE_COMBINE,4,2     ## @DMA_ATTR_WRITE_COMBINE
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	_def_frame,24,3                 ## @def_frame
	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
L_.str.5:                               ## @.str.5
	.asciz	"Failed to register video device\n"

L_.str.6:                               ## @.str.6
	.asciz	"Registered %s as /dev/%s\n"

	.no_dead_strip	_rga_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rga_probe
_rga_probe:                             ; @rga_probe
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w8, [x0]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	w1, #72
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.2:
	mov	x19, x0
	str	x22, [x0, #16]
	add	x0, x0, #68
	bl	_spin_lock_init
	add	x23, x19, #60
	mov	x0, x23
	bl	_mutex_init
	mov	x0, x19
	bl	_rga_parse_dt
	cbz	w0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
LBB0_4:
	ldr	x0, [x19, #16]
	bl	_pm_runtime_enable
Lloh4:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	ldr	x0, [x19, #16]
	bl	_devm_ioremap_resource
	str	w0, [x19, #64]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.5:
	ldr	w0, [x19, #64]
	bl	_PTR_ERR
	mov	x24, x0
LBB0_6:
	ldr	x0, [x19, #16]
	bl	_pm_runtime_disable
	b	LBB0_10
LBB0_7:
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_10:
	mov	x0, x24
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x0, x22
	mov	w1, #0
	bl	_platform_get_irq
	mov	x24, x0
	tbnz	w0, #31, LBB0_6
; %bb.12:
	ldr	x20, [x19, #16]
Lloh11:
	adrp	x8, _rga_isr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _rga_isr@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_dev_name
	mov	x4, x0
	mov	x0, x20
	mov	x1, x24
	mov	x2, x21
	mov	w3, #0
	mov	x5, x19
	bl	_devm_request_irq
	tbnz	w0, #31, LBB0_17
; %bb.13:
	add	x20, x19, #24
	mov	x0, x22
	mov	x1, x20
	bl	_v4l2_device_register
	mov	x24, x0
	cbnz	w0, LBB0_6
; %bb.14:
	bl	_video_device_alloc
	cbz	x0, LBB0_18
; %bb.15:
	mov	x21, x0
Lloh14:
	adrp	x8, _rga_videodev@GOTPAGE
Lloh15:
	ldr	x8, [x8, _rga_videodev@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	stp	x20, x23, [x0, #8]
	str	x8, [x0]
	mov	x1, x19
	bl	_video_set_drvdata
	str	x21, [x19, #32]
	mov	x0, x22
	mov	x1, x19
	bl	_platform_set_drvdata
Lloh17:
	adrp	x0, _rga_m2m_ops@GOTPAGE
Lloh18:
	ldr	x0, [x0, _rga_m2m_ops@GOTPAGEOFF]
	bl	_v4l2_m2m_init
	str	w0, [x19, #56]
	bl	_IS_ERR
	cbz	x0, LBB0_19
; %bb.16:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_v4l2_err
	ldr	w0, [x19, #56]
	bl	_PTR_ERR
	mov	x24, x0
	b	LBB0_21
LBB0_17:
	mov	x24, x0
	ldr	x0, [x19, #16]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_6
LBB0_18:
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_v4l2_err
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_22
LBB0_19:
	ldr	x0, [x19, #16]
	bl	_pm_runtime_get_sync
Lloh28:
	adrp	x22, _RGA_VERSION_INFO@GOTPAGE
Lloh29:
	ldr	x22, [x22, _RGA_VERSION_INFO@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rga_read
	lsr	w8, w0, #24
	str	w8, [x19, #48]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rga_read
	ubfx	w3, w0, #20, #4
	str	w3, [x19, #52]
	ldr	w2, [x19, #48]
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_v4l2_info
	ldr	x0, [x19, #16]
	bl	_pm_runtime_put
	ldr	x0, [x19, #16]
Lloh32:
	adrp	x8, _RGA_CMDBUF_SIZE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _RGA_CMDBUF_SIZE@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	add	x2, x19, #40
	ldr	w3, [x25]
Lloh35:
	adrp	x8, _DMA_ATTR_WRITE_COMBINE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _DMA_ATTR_WRITE_COMBINE@GOTPAGEOFF]
Lloh37:
	ldr	w4, [x8]
	bl	_dma_alloc_attrs
	str	w0, [x19, #44]
	ldr	w8, [x25]
Lloh38:
	adrp	x22, ___GFP_ZERO@GOTPAGE
Lloh39:
	ldr	x22, [x22, ___GFP_ZERO@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w0, w9, w8
	mov	w1, #3
	bl	___get_free_pages
	str	x0, [x19]
	ldr	w8, [x25]
	ldr	w9, [x22]
	orr	w0, w9, w8
	mov	w1, #3
	bl	___get_free_pages
	str	x0, [x19, #8]
Lloh40:
	adrp	x8, _def_frame@GOTPAGE
Lloh41:
	ldr	x8, [x8, _def_frame@GOTPAGEOFF]
	ldr	w9, [x8, #4]
	ldr	x10, [x8, #16]
	ldr	w10, [x10]
	mul	w9, w10, w9
	asr	w9, w9, #3
	str	w9, [x8]
	ldr	w10, [x8, #12]
	mul	w9, w9, w10
	str	w9, [x8, #8]
Lloh42:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh43:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #-1
	bl	_video_register_device
	mov	x24, x0
	cbz	w0, LBB0_23
; %bb.20:
Lloh45:
	adrp	x1, l_.str.5@PAGE
Lloh46:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_v4l2_err
	mov	x0, x21
	bl	_video_device_release
LBB0_21:
	ldr	x0, [x19, #32]
	bl	_video_unregister_device
LBB0_22:
	mov	x0, x20
	bl	_v4l2_device_unregister
	b	LBB0_6
LBB0_23:
	ldr	w19, [x21]
	mov	x0, x21
	bl	_video_device_node_name
	mov	x3, x0
Lloh47:
	adrp	x1, l_.str.6@PAGE
Lloh48:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_v4l2_info
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to parse OF data\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_rga_isr,4,2                    ; @rga_isr
l_.str.1:                               ; @.str.1
	.asciz	"failed to request irq\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to allocate video device\n"

	.comm	_rga_videodev,24,3              ; @rga_videodev
	.comm	_rga_m2m_ops,4,2                ; @rga_m2m_ops
l_.str.3:                               ; @.str.3
	.asciz	"Failed to init mem2mem device\n"

	.comm	_RGA_VERSION_INFO,4,2           ; @RGA_VERSION_INFO
l_.str.4:                               ; @.str.4
	.asciz	"HW Version: 0x%02x.%02x\n"

	.comm	_RGA_CMDBUF_SIZE,4,2            ; @RGA_CMDBUF_SIZE
	.comm	_DMA_ATTR_WRITE_COMBINE,4,2     ; @DMA_ATTR_WRITE_COMBINE
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	_def_frame,24,3                 ; @def_frame
	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
l_.str.5:                               ; @.str.5
	.asciz	"Failed to register video device\n"

l_.str.6:                               ; @.str.6
	.asciz	"Registered %s as /dev/%s\n"

	.no_dead_strip	_rga_probe
.subsections_via_symbols
