	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uvc_alloc_entity
_uvc_alloc_entity:                      ## @uvc_alloc_entity
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movl	%edi, %r15d
	movl	%ecx, %edi
	movl	$4, %esi
	callq	_roundup
	movl	%eax, %r13d
	movq	_UVC_TERM_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r15d, %eax
	leal	-1(%rbx), %ecx
	testl	%eax, %eax
	movl	%ebx, %r12d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	cmovel	%ecx, %r12d
	leal	(%r13,%rbx,4), %eax
	leal	(%r12,%rax), %edi
	addl	$48, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_23
## %bb.1:
	movl	%ebx, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %r10d
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 40(%r14)
	movl	%r15d, (%r14)
	movq	$0, 32(%r14)
	movl	%ebx, 4(%r14)
	leaq	(%r14,%r10), %rsi
	addq	$48, %rsi
	movq	%rsi, 16(%r14)
	testl	%r12d, %r12d
	je	LBB0_19
## %bb.2:
	movl	%r12d, %eax
	cmpl	$8, %r12d
	jb	LBB0_3
## %bb.4:
	movq	_MEDIA_PAD_FL_SINK@GOTPCREL(%rip), %r8
	leaq	4(%r8), %rcx
	cmpq	%rcx, %rsi
	jae	LBB0_7
## %bb.5:
	leaq	(%r14,%rax,4), %rcx
	addq	$48, %rcx
	addq	%r10, %rcx
	cmpq	_MEDIA_PAD_FL_SINK@GOTPCREL(%rip), %rcx
	jbe	LBB0_7
LBB0_3:
	xorl	%edx, %edx
LBB0_13:
	movq	%rdx, %r8
	notq	%r8
	addq	%rax, %r8
	movq	%rax, %rcx
	andq	$3, %rcx
	je	LBB0_16
## %bb.14:
	movq	_MEDIA_PAD_FL_SINK@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movl	%edi, (%rsi,%rdx,4)
	incq	%rdx
	decq	%rcx
	jne	LBB0_15
LBB0_16:
	cmpq	$3, %r8
	jb	LBB0_19
## %bb.17:
	leaq	(%r14,%r10), %rcx
	addq	$60, %rcx
	movq	_MEDIA_PAD_FL_SINK@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rsi), %edi
	movl	%edi, -12(%rcx,%rdx,4)
	movl	(%rsi), %edi
	movl	%edi, -8(%rcx,%rdx,4)
	movl	(%rsi), %edi
	movl	%edi, -4(%rcx,%rdx,4)
	movl	(%rsi), %edi
	movl	%edi, (%rcx,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_18
	jmp	LBB0_19
LBB0_7:
	movl	%eax, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rcx
	movq	%rcx, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rcx, %rcx
	je	LBB0_24
## %bb.8:
	movq	%r9, %rbx
	andq	$-2, %rbx
	movd	(%r8), %xmm0                    ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	(%r14,%r10), %rcx
	addq	$96, %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, -48(%rcx,%rdi,4)
	movdqu	%xmm0, -32(%rcx,%rdi,4)
	movdqu	%xmm0, -16(%rcx,%rdi,4)
	movdqu	%xmm0, (%rcx,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rbx
	jne	LBB0_9
## %bb.10:
	testb	$1, %r9b
	je	LBB0_12
LBB0_11:
	movd	(%r8), %xmm0                    ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqu	%xmm0, (%rsi,%rdi,4)
	movdqu	%xmm0, 16(%rsi,%rdi,4)
LBB0_12:
	cmpq	%rax, %rdx
	jne	LBB0_13
LBB0_19:
	movq	%r14, %rdi
	callq	_UVC_ENTITY_IS_OTERM
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movq	16(%r14), %rax
	jmp	LBB0_22
LBB0_21:
	movq	_MEDIA_PAD_FL_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	16(%r14), %rax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%ecx, (%rax,%rdx,4)
LBB0_22:
	movl	%r12d, 8(%r14)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 24(%r14)
LBB0_23:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	xorl	%edi, %edi
	testb	$1, %r9b
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_UVC_TERM_OUTPUT,4,2            ## @UVC_TERM_OUTPUT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_MEDIA_PAD_FL_SINK,4,2          ## @MEDIA_PAD_FL_SINK
	.comm	_MEDIA_PAD_FL_SOURCE,4,2        ## @MEDIA_PAD_FL_SOURCE
	.no_dead_strip	_uvc_alloc_entity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uvc_alloc_entity
_uvc_alloc_entity:                      ; @uvc_alloc_entity
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	mov	x0, x3
	mov	w1, #4
	bl	_roundup
	mov	x23, x0
Lloh0:
	adrp	x8, _UVC_TERM_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UVC_TERM_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w25, w20, #1
	tst	w8, w21
	csel	w24, w25, w20, eq
	add	w8, w0, w20, lsl #2
	add	w8, w8, w24
	add	w0, w8, #48
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_14
; %bb.1:
	mov	w26, w20
	mov	w9, w23
	str	w22, [x19, #40]
	str	xzr, [x19, #32]
	stp	w21, w20, [x19]
	add	x8, x19, x9
	add	x8, x8, #48
	str	x8, [x19, #16]
	cbz	w24, LBB0_10
; %bb.2:
Lloh6:
	adrp	x8, _MEDIA_PAD_FL_SINK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEDIA_PAD_FL_SINK@GOTPAGEOFF]
	cmp	w24, #16
	b.lo	LBB0_7
; %bb.3:
	add	x10, x19, #48
	add	x11, x10, x24, lsl #2
	add	x11, x11, x9
	add	x12, x8, #4
	add	x10, x10, x9
	cmp	x10, x12
	ccmp	x11, x8, #0, lo
	b.hi	LBB0_7
; %bb.4:
	and	x10, x24, #0xfffffff0
	ld1r.4s	{ v0 }, [x8]
	add	x11, x19, x9
	add	x11, x11, #96
	mov	x12, x10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x11, #-48]
	stp	q0, q0, [x11, #-16]
	add	x11, x11, #64
	subs	x12, x12, #16
	b.ne	LBB0_5
; %bb.6:
	cmp	x10, x24
	b.ne	LBB0_8
	b	LBB0_10
LBB0_7:
	mov	x10, #0
LBB0_8:
	add	x11, x19, x10, lsl #2
	add	x9, x11, x9
	add	x9, x9, #48
	sub	x10, x24, x10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x8]
	str	w11, [x9], #4
	subs	x10, x10, #1
	b.ne	LBB0_9
LBB0_10:
	mov	x0, x19
	bl	_UVC_ENTITY_IS_OTERM
	cbz	w0, LBB0_12
; %bb.11:
	ldr	x8, [x19, #16]
	b	LBB0_13
LBB0_12:
Lloh8:
	adrp	x8, _MEDIA_PAD_FL_SOURCE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MEDIA_PAD_FL_SOURCE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x8]
	ldr	x8, [x19, #16]
	str	w9, [x8, w25, uxtw #2]
LBB0_13:
	str	w24, [x19, #8]
	add	x8, x8, x26, lsl #2
	str	x8, [x19, #24]
LBB0_14:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_UVC_TERM_OUTPUT,4,2            ; @UVC_TERM_OUTPUT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_MEDIA_PAD_FL_SINK,4,2          ; @MEDIA_PAD_FL_SINK
	.comm	_MEDIA_PAD_FL_SOURCE,4,2        ; @MEDIA_PAD_FL_SOURCE
	.no_dead_strip	_uvc_alloc_entity
.subsections_via_symbols
