	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uvc_alloc_urb_buffers
_uvc_alloc_urb_buffers:                 ## @uvc_alloc_urb_buffers
	.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, %r12d
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	xorl	%edx, %edx
	divl	%r12d
	movl	%eax, %r15d
	jmp	LBB0_15
LBB0_2:
	movq	%rdi, %rbx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, %edi
	movl	%r12d, %esi
	callq	_DIV_ROUND_UP
	movq	_UVC_MAX_PACKETS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	cmpl	%r15d, %eax
	cmovbl	%eax, %r15d
	cmpl	$2, %r15d
	jb	LBB0_14
## %bb.3:
	movq	_UVC_URBS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	imull	%r12d, %r15d
	movl	$12, %r13d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rax
	movq	16(%rbx), %r12
	movl	%r15d, (%rbx)
	movl	(%rax), %edi
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	-52(%rbp), %edx                 ## 4-byte Folded Reload
	leaq	(%r12,%r13), %rcx
	movl	%r15d, %esi
	callq	_usb_alloc_coherent
	movl	%eax, -4(%r12,%r13)
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	%rbx, -12(%r12,%r13)
	incq	%r14
	movq	_UVC_URBS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$16, %r13
	cmpq	%rax, %r14
	jb	LBB0_7
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_uvc_free_urb_buffers
	movq	_UVC_URBS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	cmpl	%r14d, %eax
	je	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, %ecx
	shrl	%ecx
	cmpl	$3, %r15d
	movl	%ecx, %r15d
	ja	LBB0_4
LBB0_14:
	movq	_UVC_TRACE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_uvc_trace
	jmp	LBB0_15
LBB0_5:
	xorl	%edx, %edx
	jmp	LBB0_12
LBB0_11:
	movl	%eax, %edx
LBB0_12:
	movq	_UVC_TRACE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_uvc_trace
LBB0_15:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UVC_MAX_PACKETS,4,2            ## @UVC_MAX_PACKETS
	.comm	_UVC_URBS,4,2                   ## @UVC_URBS
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	_UVC_TRACE_VIDEO,4,2            ## @UVC_TRACE_VIDEO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Allocated %u URB buffers of %ux%u bytes each.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate URB buffers (%u bytes per packet).\n"

	.no_dead_strip	_uvc_alloc_urb_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uvc_alloc_urb_buffers
_uvc_alloc_urb_buffers:                 ; @uvc_alloc_urb_buffers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	udiv	w20, w8, w19
	b	LBB0_13
LBB0_2:
	mov	x21, x3
	mov	x22, x0
	mov	x0, x1
	mov	x1, x19
	bl	_DIV_ROUND_UP
Lloh0:
	adrp	x8, _UVC_MAX_PACKETS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UVC_MAX_PACKETS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	csel	w20, w0, w8, lo
	cmp	w20, #2
	b.lo	LBB0_11
; %bb.3:
Lloh3:
	adrp	x24, _UVC_URBS@GOTPAGE
Lloh4:
	ldr	x24, [x24, _UVC_URBS@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh5:
	adrp	x25, ___GFP_NOWARN@GOTPAGE
Lloh6:
	ldr	x25, [x25, ___GFP_NOWARN@GOTPAGEOFF]
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cbz	w2, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x27, #0
	mov	x26, #0
	mul	w23, w20, w19
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	w23, [x22]
	ldp	x8, x28, [x22, #8]
	ldr	w0, [x8]
	ldr	w8, [x25]
	orr	w2, w8, w21
	add	x19, x28, x27
	add	x3, x19, #12
	mov	x1, x23
	bl	_usb_alloc_coherent
	str	w0, [x19, #8]
	cbz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	str	x22, [x28, x27]
	add	x26, x26, #1
	ldr	w2, [x24]
	add	x27, x27, #16
	cmp	x26, x2
	b.lo	LBB0_6
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_uvc_free_urb_buffers
	ldr	w2, [x24]
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x19, [sp, #24]                  ; 8-byte Folded Reload
	cmp	w2, w26
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	lsr	w8, w20, #1
	cmp	w20, #3
	mov	x20, x8
	b.hi	LBB0_4
LBB0_11:
Lloh7:
	adrp	x8, _UVC_TRACE_VIDEO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _UVC_TRACE_VIDEO@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_uvc_trace
	mov	w20, #0
	b	LBB0_13
LBB0_12:
Lloh12:
	adrp	x8, _UVC_TRACE_VIDEO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _UVC_TRACE_VIDEO@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	stp	x20, x19, [sp]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_uvc_trace
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_UVC_MAX_PACKETS,4,2            ; @UVC_MAX_PACKETS
	.comm	_UVC_URBS,4,2                   ; @UVC_URBS
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	_UVC_TRACE_VIDEO,4,2            ; @UVC_TRACE_VIDEO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Allocated %u URB buffers of %ux%u bytes each.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate URB buffers (%u bytes per packet).\n"

	.no_dead_strip	_uvc_alloc_urb_buffers
.subsections_via_symbols
