	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cal_create_instance
_cal_create_instance:                   ## @cal_create_instance
	.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
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	8(%rdi), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	%r12, 32(%rax)
	leaq	8(%rax), %r14
	movl	16(%rax), %edi
	movq	_CAL_MODULE_NAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	movl	%r15d, %r8d
	callq	_snprintf
	movq	8(%r12), %rdi
	movq	%r14, %rsi
	callq	_v4l2_device_register
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movq	%rbx, %r13
	addq	$28, %r13
	movq	%r13, %rdi
	movl	$11, %esi
	callq	_v4l2_ctrl_handler_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ctx_err
	jmp	LBB0_6
LBB0_4:
	movq	%r13, 8(%rbx)
	movq	(%r12), %rax
	movslq	%r15d, %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 24(%rbx)
	leal	1(%r15), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_of_cal_create_instance
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movq	%r13, %rdi
	callq	_v4l2_ctrl_handler_free
LBB0_6:
	movq	%r14, %rdi
	callq	_v4l2_device_unregister
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-%03d"

	.comm	_CAL_MODULE_NAME,8,3            ## @CAL_MODULE_NAME
L_.str.1:                               ## @.str.1
	.asciz	"Failed to init ctrl handler\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cal_create_instance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cal_create_instance
_cal_create_instance:                   ; @cal_create_instance
	.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	x21, x1
	mov	x22, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #40
	bl	_devm_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_8
; %bb.1:
	str	x22, [x20, #32]
	add	x19, x20, #8
	ldr	w0, [x20, #16]
Lloh3:
	adrp	x8, _CAL_MODULE_NAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAL_MODULE_NAME@GOTPAGEOFF]
Lloh5:
	ldr	x3, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	mov	x4, x21
	bl	_snprintf
	ldr	x0, [x22, #8]
	mov	x1, x19
	bl	_v4l2_device_register
	cbnz	w0, LBB0_7
; %bb.2:
	add	x23, x20, #28
	mov	x0, x23
	mov	w1, #11
	bl	_v4l2_ctrl_handler_init
	cbz	w0, LBB0_4
; %bb.3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_ctx_err
	b	LBB0_6
LBB0_4:
	str	x23, [x20, #8]
	ldr	x8, [x22]
	ldr	w8, [x8, w21, sxtw #2]
	str	w8, [x20, #24]
	add	w8, w21, #1
	str	w8, [x20]
	mov	x0, x20
	mov	x1, x21
	bl	_of_cal_create_instance
	cbz	w0, LBB0_8
; %bb.5:
	mov	x0, x23
	bl	_v4l2_ctrl_handler_free
LBB0_6:
	mov	x0, x19
	bl	_v4l2_device_unregister
LBB0_7:
	mov	x20, #0
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-%03d"

	.comm	_CAL_MODULE_NAME,8,3            ; @CAL_MODULE_NAME
l_.str.1:                               ; @.str.1
	.asciz	"Failed to init ctrl handler\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cal_create_instance
.subsections_via_symbols
