	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uvc_init_video_bulk
_uvc_init_video_bulk:                   ## @uvc_init_video_bulk
	.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, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	4(%rsi), %edi
	callq	_le16_to_cpu
	movl	%eax, %ebx
	andl	$2047, %ebx                     ## imm = 0x7FF
	movl	44(%r13), %esi
	movl	%esi, 40(%r13)
	movq	%r13, %rdi
	movl	%ebx, %edx
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %ecx
	callq	_uvc_alloc_urb_buffers
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	imull	%ebx, %r15d
	movq	%r12, %rdi
	callq	_usb_endpoint_dir_in
	movq	32(%r13), %rcx
	movl	(%rcx), %edi
	movl	(%r12), %esi
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	callq	_usb_rcvbulkpipe
	jmp	LBB0_5
LBB0_4:
	callq	_usb_sndbulkpipe
LBB0_5:
	movl	%eax, %r12d
	movq	(%r13), %rcx
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	cmovel	%eax, %r15d
	movq	_UVC_URBS@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_11
## %bb.6:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rbx
	movq	24(%r13), %rax
	movq	32(%r13), %rcx
	movl	(%rcx), %esi
	movl	(%rax,%r14,4), %ecx
	movq	_uvc_video_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r13, (%rsp)
	movq	%rbx, %rdi
	movl	%r12d, %edx
	movl	%r15d, %r8d
	callq	_usb_fill_bulk_urb
	movq	_URB_NO_TRANSFER_DMA_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	16(%r13), %rax
	movl	(%rax,%r14,4), %eax
	movl	%eax, (%rbx)
	movq	8(%r13), %rax
	movq	%rbx, (%rax,%r14,8)
	incq	%r14
	movq	_UVC_URBS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	%rax, %r14
	jb	LBB0_7
## %bb.10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_8:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_uvc_uninit_video
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_UVC_URBS,4,2                   ## @UVC_URBS
	.comm	_uvc_video_complete,4,2         ## @uvc_video_complete
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ## @URB_NO_TRANSFER_DMA_MAP
	.no_dead_strip	_uvc_init_video_bulk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uvc_init_video_bulk
_uvc_init_video_bulk:                   ; @uvc_init_video_bulk
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x1, #4]
	bl	_le16_to_cpu
	and	w22, w0, #0x7ff
	ldr	w1, [x19, #44]
	str	w1, [x19, #40]
	mov	x0, x19
	mov	x2, x22
	mov	x3, x20
	bl	_uvc_alloc_urb_buffers
	cbz	w0, LBB0_10
; %bb.1:
	mul	w22, w0, w22
	mov	x0, x21
	bl	_usb_endpoint_dir_in
	mov	x8, x0
	ldr	x9, [x19, #32]
	ldr	w0, [x9]
	ldr	w1, [x21]
	cbz	x8, LBB0_3
; %bb.2:
	bl	_usb_rcvbulkpipe
	b	LBB0_4
LBB0_3:
	bl	_usb_sndbulkpipe
LBB0_4:
	mov	x21, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	w22, wzr, w22, eq
Lloh3:
	adrp	x24, _UVC_URBS@GOTPAGE
Lloh4:
	ldr	x24, [x24, _UVC_URBS@GOTPAGEOFF]
	ldr	w8, [x24]
	cbz	w8, LBB0_8
; %bb.5:
	mov	x25, #0
Lloh5:
	adrp	x26, _uvc_video_complete@GOTPAGE
Lloh6:
	ldr	x26, [x26, _uvc_video_complete@GOTPAGEOFF]
Lloh7:
	adrp	x27, _URB_NO_TRANSFER_DMA_MAP@GOTPAGE
Lloh8:
	ldr	x27, [x27, _URB_NO_TRANSFER_DMA_MAP@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	mov	x1, x20
	bl	_usb_alloc_urb
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x23, x0
	ldp	x9, x8, [x19, #24]
	ldr	w1, [x8]
	lsl	x28, x25, #2
	ldr	w3, [x9, x28]
	ldr	w5, [x26]
	mov	x2, x21
	mov	x4, x22
	mov	x6, x19
	bl	_usb_fill_bulk_urb
	ldr	w8, [x27]
	str	w8, [x23, #4]
	ldp	x9, x8, [x19, #8]
	ldr	w8, [x8, x28]
	str	w8, [x23]
	str	x23, [x9, x25, lsl #3]
	add	x25, x25, #1
	ldr	w8, [x24]
	cmp	x25, x8
	b.lo	LBB0_6
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	mov	w1, #1
	bl	_uvc_uninit_video
LBB0_10:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_UVC_URBS,4,2                   ; @UVC_URBS
	.comm	_uvc_video_complete,4,2         ; @uvc_video_complete
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ; @URB_NO_TRANSFER_DMA_MAP
	.no_dead_strip	_uvc_init_video_bulk
.subsections_via_symbols
