	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usbvision_alloc
_usbvision_alloc:                       ## @usbvision_alloc
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%r15, 24(%rax)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_v4l2_device_register
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_v4l2_ctrl_handler_init
	testq	%rax, %rax
	je	LBB0_3
LBB0_4:
	movq	%r14, %rdi
	callq	_v4l2_ctrl_handler_free
	movq	%rbx, %rdi
	callq	_v4l2_device_unregister
LBB0_5:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, (%rbx)
	movq	%rbx, %rdi
	addq	$16, %rdi
	callq	_mutex_init
	movq	_USBVISION_URB_FRAMES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_usb_alloc_urb
	movl	%eax, 12(%rbx)
	testl	%eax, %eax
	jne	LBB0_7
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_USBVISION_URB_FRAMES,4,2       ## @USBVISION_URB_FRAMES
	.no_dead_strip	_usbvision_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usbvision_alloc
_usbvision_alloc:                       ; @usbvision_alloc
	.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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #32
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.1:
	str	x21, [x19, #24]
	mov	x0, x20
	mov	x1, x19
	bl	_v4l2_device_register
	cbnz	x0, LBB0_4
; %bb.2:
	add	x20, x19, #8
	mov	x0, x20
	mov	w1, #4
	bl	_v4l2_ctrl_handler_init
	cbz	x0, LBB0_6
LBB0_3:
	mov	x0, x20
	bl	_v4l2_ctrl_handler_free
	mov	x0, x19
	bl	_v4l2_device_unregister
LBB0_4:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	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_6:
	str	x20, [x19]
	add	x0, x19, #16
	bl	_mutex_init
Lloh2:
	adrp	x8, _USBVISION_URB_FRAMES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USBVISION_URB_FRAMES@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w1, [x22]
	bl	_usb_alloc_urb
	str	w0, [x19, #12]
	cbnz	w0, LBB0_5
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_USBVISION_URB_FRAMES,4,2       ; @USBVISION_URB_FRAMES
	.no_dead_strip	_usbvision_alloc
.subsections_via_symbols
