	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jpu_open
_jpu_open:                              ## @jpu_open
	.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
	movq	%rdi, %rbx
	callq	_video_drvdata
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_video_devdata
	movq	%rax, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r13
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_v4l2_fh_init
	leaq	48(%r13), %rax
	movq	%rax, 16(%r13)
	movq	%r14, (%rbx)
	movq	%r14, %rdi
	callq	_v4l2_fh_add
	movq	%r15, 40(%r13)
	leaq	20(%r15), %rax
	xorl	%ecx, %ecx
	cmpq	%rax, %r12
	sete	%cl
	movl	%ecx, (%r13)
	leaq	36(%r13), %rsi
	leaq	32(%r13), %rdx
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	___jpu_try_fmt
	leaq	28(%r13), %rsi
	movq	%r13, %rdx
	addq	$24, %rdx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	___jpu_try_fmt
	movl	16(%r15), %edi
	movq	_jpu_queue_init@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rsi
	callq	_v4l2_m2m_ctx_init
	movl	%eax, 8(%r13)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movl	(%r14), %edi
	callq	_PTR_ERR
LBB0_3:
	movl	%eax, %r12d
LBB0_4:
	movq	%r14, %rdi
	callq	_v4l2_fh_del
	movq	%r14, %rdi
	callq	_v4l2_fh_exit
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_6
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_6:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r13, %rdi
	callq	_jpu_controls_create
	testl	%eax, %eax
	js	LBB0_3
## %bb.8:
	movq	%r15, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_4
LBB0_11:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_13
LBB0_12:
	incq	%rax
	movq	%rax, (%r15)
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_13:
	movl	12(%r15), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	js	LBB0_16
## %bb.14:
	movq	%r15, %rdi
	callq	_jpu_reset
	testl	%eax, %eax
	je	LBB0_18
## %bb.15:
	movl	%eax, %r12d
	movl	12(%r15), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_17
LBB0_16:
	movl	%eax, %r12d
LBB0_17:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_4
LBB0_18:
	movq	(%r15), %rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_jpu_queue_init,4,2             ## @jpu_queue_init
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.no_dead_strip	_jpu_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jpu_open
_jpu_open:                              ; @jpu_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x0
	bl	_video_drvdata
	mov	x21, x0
	mov	x0, x22
	bl	_video_devdata
	mov	x23, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	mov	x1, x23
	bl	_v4l2_fh_init
	add	x8, x19, #48
	str	x8, [x19, #16]
	str	x20, [x22]
	mov	x0, x20
	bl	_v4l2_fh_add
	str	x21, [x19, #40]
	add	x8, x21, #20
	cmp	x23, x8
	cset	w8, eq
	str	w8, [x19]
	add	x1, x19, #36
	add	x2, x19, #32
Lloh3:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x19
	bl	___jpu_try_fmt
	add	x1, x19, #28
	add	x2, x19, #24
Lloh6:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	bl	___jpu_try_fmt
	ldr	w0, [x21, #16]
Lloh9:
	adrp	x8, _jpu_queue_init@GOTPAGE
Lloh10:
	ldr	x8, [x8, _jpu_queue_init@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_v4l2_m2m_ctx_init
	str	w0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w0, [x20]
	bl	_PTR_ERR
LBB0_3:
	mov	x22, x0
LBB0_4:
	mov	x0, x20
	bl	_v4l2_fh_del
	mov	x0, x20
	bl	_v4l2_fh_exit
	mov	x0, x19
	bl	_kfree
	b	LBB0_6
LBB0_5:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	bl	_jpu_controls_create
	tbnz	w0, #31, LBB0_3
; %bb.8:
	add	x23, x21, #8
	mov	x0, x23
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_10
; %bb.9:
Lloh15:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_4
LBB0_10:
	ldr	x8, [x21]
	cbz	x8, LBB0_12
LBB0_11:
	add	x8, x8, #1
	str	x8, [x21]
	mov	x0, x23
	bl	_mutex_unlock
	mov	w22, #0
	b	LBB0_6
LBB0_12:
	ldr	w0, [x21, #12]
	bl	_clk_prepare_enable
	tbnz	w0, #31, LBB0_15
; %bb.13:
	mov	x0, x21
	bl	_jpu_reset
	cbz	w0, LBB0_17
; %bb.14:
	mov	x22, x0
	ldr	w0, [x21, #12]
	bl	_clk_disable_unprepare
	b	LBB0_16
LBB0_15:
	mov	x22, x0
LBB0_16:
	mov	x0, x23
	bl	_mutex_unlock
	b	LBB0_4
LBB0_17:
	ldr	x8, [x21]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_jpu_queue_init,4,2             ; @jpu_queue_init
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.no_dead_strip	_jpu_open
.subsections_via_symbols
