	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function cx231xx_init_bulk
LCPI0_0:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	186                             ## 0xba
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_cx231xx_init_bulk
	.p2align	4, 0x90
_cx231xx_init_bulk:                     ## @cx231xx_init_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
	movq	%r8, %rbx
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movl	(%rdi), %eax
	cmpl	$2, %eax
	movl	$2, %esi
	cmovll	%eax, %esi
	movl	%esi, (%rdi)
	leaq	L_.str(%rip), %rdi
	callq	_cx231xx_coredbg
	movl	(%r12), %esi
	movq	%r12, %rdi
	callq	_video_mux
	movq	%r12, %rdi
	callq	_cx231xx_uninit_bulk
	movq	%rbx, 32(%r12)
	movl	%r13d, 40(%r12)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 152(%r12)
	movq	$0, 168(%r12)
	movl	$-1, 72(%r12)
	movq	$0, 144(%r12)
	movl	4(%r12), %eax
	movl	8(%r12), %ecx
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	movl	%edx, 76(%r12)
	addl	%ecx, %ecx
	movl	%ecx, 80(%r12)
	movups	%xmm0, 112(%r12)
	movups	%xmm0, 128(%r12)
	movq	88(%r12), %rax
	movaps	LCPI0_0(%rip), %xmm1            ## xmm1 = [0,0,1,186]
	movups	%xmm1, (%rax)
	movq	104(%r12), %rax
	movups	%xmm0, (%rax)
	movups	%xmm0, 16(%rax)
	movups	%xmm0, 32(%rax)
	movups	%xmm0, 48(%rax)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	%r13d, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 48(%r12)
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movl	(%r15), %edx
	movl	%r13d, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 56(%r12)
	testq	%rax, %rax
	je	LBB0_15
## %bb.2:
	movl	%r14d, 44(%r12)
	movq	$0, 64(%r12)
	xorl	%eax, %eax
	cmpl	$1, 12(%r12)
	setne	%al
	leal	(%rax,%rax,2), %eax
	addl	$129, %eax
	movl	%eax, 24(%r12)
	cmpl	$0, 40(%r12)
	jle	LBB0_7
## %bb.3:
	leaq	72(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	imull	-44(%rbp), %r14d                ## 4-byte Folded Reload
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	movq	48(%r12), %rax
	movq	%rbx, (%rax,%r13,8)
	movq	_URB_NO_TRANSFER_DMA_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	176(%r12), %edi
	movl	(%r15), %edx
	movq	%rbx, %rcx
	addq	$4, %rcx
	movl	%r14d, %esi
	callq	_usb_alloc_coherent
	movq	56(%r12), %rcx
	movl	%eax, (%rcx,%r13,4)
	testl	%eax, %eax
	je	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movl	24(%r12), %esi
	movl	176(%r12), %edi
	callq	_usb_rcvbulkpipe
	movl	176(%r12), %esi
	movq	56(%r12), %rcx
	movl	(%rcx,%r13,4), %ecx
	movq	_cx231xx_bulk_irq_callback@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rsp)
	movq	%rbx, %rdi
	movl	%eax, %edx
	movl	%r14d, %r8d
	callq	_usb_fill_bulk_urb
	incq	%r13
	movslq	40(%r12), %rax
	cmpq	%rax, %r13
	jl	LBB0_4
LBB0_7:
	movl	176(%r12), %edi
	movq	48(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	callq	_usb_clear_halt
	testl	%eax, %eax
	js	LBB0_21
## %bb.8:
	leaq	96(%r12), %rdi
	callq	_init_waitqueue_head
	cmpl	$0, 40(%r12)
	jle	LBB0_12
## %bb.9:
	xorl	%ebx, %ebx
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movl	(%r14), %esi
	callq	_usb_submit_urb
	testl	%eax, %eax
	jne	LBB0_22
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movslq	40(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_10
LBB0_12:
	cmpl	$0, 12(%r12)
	je	LBB0_24
## %bb.13:
	movq	_TS1_serial_mode@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_14:
	movl	16(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_18
LBB0_15:
	movl	16(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
	movq	48(%r12), %rdi
	callq	_kfree
	jmp	LBB0_18
LBB0_16:
	movq	%r12, %rdi
	callq	_cx231xx_uninit_bulk
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_19
LBB0_17:
	movl	16(%r12), %ebx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_in_interrupt
	testq	%rax, %rax
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r12, %rdi
	callq	_cx231xx_uninit_bulk
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_19:
	subl	(%rax), %r15d
LBB0_20:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movl	%eax, %r15d
	movl	16(%r12), %edi
	leaq	L_.str.6(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_23
LBB0_22:
	movl	%eax, %r15d
	movl	16(%r12), %edi
	leaq	L_.str.7(%rip), %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_23:
	movq	%r12, %rdi
	callq	_cx231xx_uninit_bulk
	jmp	LBB0_20
LBB0_24:
	movq	_Raw_Video@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_cx231xx_capture_start
	xorl	%r15d, %r15d
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting Video mux to %d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"cannot alloc memory for usb buffers\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"cannot allocate memory for usbtransfer\n"

	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ## @URB_NO_TRANSFER_DMA_MAP
L_.str.3:                               ## @.str.3
	.asciz	"unable to allocate %i bytes for transfer buffer %i%s\n"

L_.str.4:                               ## @.str.4
	.asciz	" while in int"

L_.str.5:                               ## @.str.5
	.space	1

	.comm	_cx231xx_bulk_irq_callback,4,2  ## @cx231xx_bulk_irq_callback
L_.str.6:                               ## @.str.6
	.asciz	"failed to clear USB bulk endpoint stall/halt condition (error=%i)\n"

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.7:                               ## @.str.7
	.asciz	"submit of urb %i failed (error=%i)\n"

	.comm	_Raw_Video,4,2                  ## @Raw_Video
	.comm	_TS1_serial_mode,4,2            ## @TS1_serial_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function cx231xx_init_bulk
lCPI0_0:
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	186                             ; 0xba
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_cx231xx_init_bulk
	.p2align	2
_cx231xx_init_bulk:                     ; @cx231xx_init_bulk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x24, x4
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w8, [x0]
	mov	w9, #2
	cmp	w8, #2
	csel	w1, w8, w9, lt
	str	w1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_cx231xx_coredbg
	ldr	w1, [x19]
	mov	x0, x19
	bl	_video_mux
	mov	x0, x19
	bl	_cx231xx_uninit_bulk
	mov	w8, #-1
	mov	x20, x19
	str	w8, [x20, #72]!
	stur	x24, [x20, #-40]
	stur	w23, [x20, #-32]
	stp	xzr, xzr, [x20, #88]
	stp	xzr, xzr, [x20, #72]
	ldp	w8, w9, [x20, #-68]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	lsl	w9, w9, #1
	stp	w8, w9, [x20, #4]
	movi.2d	v0, #0000000000000000
	stur	q0, [x20, #40]
	stur	q0, [x20, #56]
	ldr	x8, [x20, #16]
Lloh2:
	adrp	x9, lCPI0_0@PAGE
Lloh3:
	ldr	q1, [x9, lCPI0_0@PAGEOFF]
	str	q1, [x8]
	ldr	x8, [x20, #32]
	stp	q0, q0, [x8, #32]
	stp	q0, q0, [x8]
Lloh4:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x23
	mov	w1, #8
	bl	_kcalloc
	stur	x0, [x20, #-24]
	cbz	x0, LBB0_14
; %bb.1:
	ldr	w2, [x24]
	mov	x0, x23
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x19, #56]
	cbz	x0, LBB0_15
; %bb.2:
	str	w21, [x19, #44]
	str	xzr, [x19, #64]
	ldr	w8, [x19, #12]
	mov	w9, #132
	mov	w10, #129
	cmp	w8, #1
	csel	w8, w10, w9, eq
	str	w8, [x19, #24]
	ldr	w8, [x19, #40]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x23, #0
	mul	w21, w21, w22
Lloh6:
	adrp	x25, _URB_NO_TRANSFER_DMA_MAP@GOTPAGE
Lloh7:
	ldr	x25, [x25, _URB_NO_TRANSFER_DMA_MAP@GOTPAGEOFF]
Lloh8:
	adrp	x26, _cx231xx_bulk_irq_callback@GOTPAGE
Lloh9:
	ldr	x26, [x26, _cx231xx_bulk_irq_callback@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	w0, #0
	bl	_usb_alloc_urb
	cbz	x0, LBB0_17
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x0
	ldr	x8, [x19, #48]
	str	x0, [x8, x23, lsl #3]
	ldr	w8, [x25]
	str	w8, [x0, #8]
	ldr	w0, [x19, #176]
	ldr	w2, [x24]
	add	x3, x22, #4
	mov	x1, x21
	bl	_usb_alloc_coherent
	ldr	x8, [x19, #56]
	str	w0, [x8, x23, lsl #2]
	cbz	w0, LBB0_16
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	ldr	w0, [x19, #176]
	ldr	w1, [x19, #24]
	bl	_usb_rcvbulkpipe
	mov	x2, x0
	ldr	w1, [x19, #176]
	ldr	x8, [x19, #56]
	ldr	w3, [x8, x23, lsl #2]
	ldr	w5, [x26]
	mov	x0, x22
	mov	x4, x21
	mov	x6, x20
	bl	_usb_fill_bulk_urb
	add	x23, x23, #1
	ldrsw	x8, [x19, #40]
	cmp	x23, x8
	b.lt	LBB0_4
LBB0_7:
	ldr	w0, [x19, #176]
	ldr	x8, [x19, #48]
	ldr	x8, [x8]
	ldr	w1, [x8]
	bl	_usb_clear_halt
	tbnz	w0, #31, LBB0_20
; %bb.8:
	add	x0, x19, #96
	bl	_init_waitqueue_head
	ldr	w8, [x19, #40]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.9:
	mov	x21, #0
Lloh10:
	adrp	x22, _GFP_ATOMIC@GOTPAGE
Lloh11:
	ldr	x22, [x22, _GFP_ATOMIC@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #48]
	ldr	x0, [x8, x21, lsl #3]
	ldr	w1, [x22]
	bl	_usb_submit_urb
	cbnz	w0, LBB0_21
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19, #40]
	cmp	x21, x8
	b.lt	LBB0_10
LBB0_12:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_22
; %bb.13:
Lloh12:
	adrp	x8, _TS1_serial_mode@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TS1_serial_mode@GOTPAGEOFF]
	b	LBB0_23
LBB0_14:
	ldr	w0, [x19, #16]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_18
LBB0_15:
	ldr	w0, [x19, #16]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	ldr	x0, [x19, #48]
	bl	_kfree
	b	LBB0_18
LBB0_16:
	ldr	w20, [x19, #16]
	bl	_in_interrupt
Lloh18:
	adrp	x8, l_.str.4@PAGE
Lloh19:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh20:
	adrp	x9, l_.str.5@PAGE
Lloh21:
	add	x9, x9, l_.str.5@PAGEOFF
	cmp	x0, #0
	csel	x8, x9, x8, eq
	stp	x23, x8, [sp, #8]
	str	x21, [sp]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_17:
	mov	x0, x19
	bl	_cx231xx_uninit_bulk
LBB0_18:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_20:
	mov	x20, x0
	ldr	w0, [x19, #16]
	str	x20, [sp]
Lloh27:
	adrp	x1, l_.str.6@PAGE
Lloh28:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_cx231xx_uninit_bulk
	b	LBB0_19
LBB0_21:
	mov	x20, x0
	ldr	w0, [x19, #16]
	stp	x21, x20, [sp]
Lloh29:
	adrp	x1, l_.str.7@PAGE
Lloh30:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_cx231xx_uninit_bulk
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	b	LBB0_19
LBB0_22:
Lloh31:
	adrp	x8, _Raw_Video@GOTPAGE
Lloh32:
	ldr	x8, [x8, _Raw_Video@GOTPAGEOFF]
LBB0_23:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_cx231xx_capture_start
	mov	w20, #0
	b	LBB0_19
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting Video mux to %d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"cannot alloc memory for usb buffers\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"cannot allocate memory for usbtransfer\n"

	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ; @URB_NO_TRANSFER_DMA_MAP
l_.str.3:                               ; @.str.3
	.asciz	"unable to allocate %i bytes for transfer buffer %i%s\n"

l_.str.4:                               ; @.str.4
	.asciz	" while in int"

l_.str.5:                               ; @.str.5
	.space	1

	.comm	_cx231xx_bulk_irq_callback,4,2  ; @cx231xx_bulk_irq_callback
l_.str.6:                               ; @.str.6
	.asciz	"failed to clear USB bulk endpoint stall/halt condition (error=%i)\n"

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.7:                               ; @.str.7
	.asciz	"submit of urb %i failed (error=%i)\n"

	.comm	_Raw_Video,4,2                  ; @Raw_Video
	.comm	_TS1_serial_mode,4,2            ; @TS1_serial_mode
.subsections_via_symbols
