	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap24xxcam_device_register
_omap24xxcam_device_register:           ## @omap24xxcam_device_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	cmpq	$0, 16(%r12)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_2:
	movq	%rdi, %r14
	movq	%rdi, 16(%r12)
	movl	(%r12), %edi
	movq	_dev_attr_streaming@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_omap24xxcam_device_unregister
LBB0_13:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_video_device_alloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:
	movq	%rax, %r15
	movq	_video_device_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movl	(%r12), %eax
	movl	%eax, 28(%r15)
	movl	24(%r15), %edi
	movq	_CAM_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	callq	_strlcpy
	movq	_omap24xxcam_fops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r15)
	movl	$-1, (%r15)
	movq	_omap24xxcam_ioctl_fops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r15)
	movq	%r12, %rdi
	callq	_omap24xxcam_hwinit
	movq	%r12, %rdi
	callq	_omap24xxcam_sensor_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.10:
	movq	_VFL_TYPE_GRABBER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_video_nr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_video_register_device
	testq	%rax, %rax
	js	LBB0_11
## %bb.12:
	movq	%r12, %rdi
	callq	_omap24xxcam_poweron_reset
	movl	(%r12), %edi
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_6:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_11:
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movl	$-1, (%r15)
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_dev_attr_streaming,4,2         ## @dev_attr_streaming
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not register sysfs entry\n"

L_.str.1:                               ## @.str.1
	.asciz	"could not allocate video device struct\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_video_device_release,4,2       ## @video_device_release
	.comm	_CAM_NAME,4,2                   ## @CAM_NAME
	.comm	_omap24xxcam_fops,4,2           ## @omap24xxcam_fops
	.comm	_omap24xxcam_ioctl_fops,4,2     ## @omap24xxcam_ioctl_fops
	.comm	_VFL_TYPE_GRABBER,4,2           ## @VFL_TYPE_GRABBER
	.comm	_video_nr,4,2                   ## @video_nr
L_.str.2:                               ## @.str.2
	.asciz	"could not register V4L device\n"

L_.str.3:                               ## @.str.3
	.asciz	"registered device video%d\n"

	.no_dead_strip	_omap24xxcam_device_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap24xxcam_device_register
_omap24xxcam_device_register:           ; @omap24xxcam_device_register
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x20, [x8]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_2:
	mov	x19, x0
	str	x0, [x20, #16]
	ldr	w0, [x20]
Lloh3:
	adrp	x1, _dev_attr_streaming@GOTPAGE
Lloh4:
	ldr	x1, [x1, _dev_attr_streaming@GOTPAGEOFF]
	bl	_device_create_file
	cbz	x0, LBB0_8
; %bb.3:
	ldr	w0, [x20]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_4:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x19
	bl	_omap24xxcam_device_unregister
LBB0_7:
	mov	x0, x22
	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
LBB0_8:
	bl	_video_device_alloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_12
; %bb.9:
	mov	x21, x0
Lloh9:
	adrp	x8, _video_device_release@GOTPAGE
Lloh10:
	ldr	x8, [x8, _video_device_release@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20]
	stp	w9, w8, [x0, #28]
	ldr	w0, [x0, #24]
Lloh12:
	adrp	x8, _CAM_NAME@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CAM_NAME@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	w2, #4
	bl	_strlcpy
Lloh15:
	adrp	x8, _omap24xxcam_fops@GOTPAGE
Lloh16:
	ldr	x8, [x8, _omap24xxcam_fops@GOTPAGEOFF]
	mov	w9, #-1
	str	w9, [x21]
Lloh17:
	adrp	x9, _omap24xxcam_ioctl_fops@GOTPAGE
Lloh18:
	ldr	x9, [x9, _omap24xxcam_ioctl_fops@GOTPAGEOFF]
	stp	x9, x8, [x21, #8]
	mov	x0, x20
	bl	_omap24xxcam_hwinit
	mov	x0, x20
	bl	_omap24xxcam_sensor_init
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.10:
Lloh19:
	adrp	x8, _VFL_TYPE_GRABBER@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VFL_TYPE_GRABBER@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _video_nr@GOTPAGE
Lloh23:
	ldr	x8, [x8, _video_nr@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_video_register_device
	tbnz	x0, #63, LBB0_13
; %bb.11:
	mov	x0, x20
	bl	_omap24xxcam_poweron_reset
	ldr	w0, [x20]
	ldr	w2, [x21]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
	mov	w22, #0
	b	LBB0_7
LBB0_12:
	ldr	w0, [x20]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_5
LBB0_13:
	ldr	w0, [x20]
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	mov	w8, #-1
	str	w8, [x21]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_dev_attr_streaming,4,2         ; @dev_attr_streaming
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not register sysfs entry\n"

l_.str.1:                               ; @.str.1
	.asciz	"could not allocate video device struct\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_video_device_release,4,2       ; @video_device_release
	.comm	_CAM_NAME,4,2                   ; @CAM_NAME
	.comm	_omap24xxcam_fops,4,2           ; @omap24xxcam_fops
	.comm	_omap24xxcam_ioctl_fops,4,2     ; @omap24xxcam_ioctl_fops
	.comm	_VFL_TYPE_GRABBER,4,2           ; @VFL_TYPE_GRABBER
	.comm	_video_nr,4,2                   ; @video_nr
l_.str.2:                               ; @.str.2
	.asciz	"could not register V4L device\n"

l_.str.3:                               ; @.str.3
	.asciz	"registered device video%d\n"

	.no_dead_strip	_omap24xxcam_device_register
.subsections_via_symbols
