	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function which_bandwidth
_which_bandwidth:                       ## @which_bandwidth
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	8(%rdi), %r14d
	cmpl	$0, 32(%rdi)
	jne	LBB0_3
## %bb.1:
	movl	16(%r15), %eax
	imull	12(%r15), %eax
	cmpl	%eax, %r14d
	jge	LBB0_3
## %bb.2:
	leal	(%r14,%r14,2), %eax
	leal	(%r14,%r14,2), %r14d
	addl	$7, %r14d
	testl	%eax, %eax
	cmovnsl	%eax, %r14d
	sarl	$3, %r14d
LBB0_3:
	movq	24(%r15), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	-32(%rbp), %rsi
	movq	%r15, %rdi
	callq	*%rax
	imull	-32(%rbp), %r14d
	movl	%r14d, %eax
	cltd
	idivl	-28(%rbp)
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_5:
	cmpl	$640, 12(%r15)                  ## imm = 0x280
	jl	LBB0_8
## %bb.6:
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	_USB_SPEED_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	leal	(%r14,%r14,4), %eax
	leal	(%rax,%rax,2), %ebx
	jmp	LBB0_9
LBB0_8:
	movl	%r14d, %ebx
	shll	$5, %ebx
	subl	%r14d, %ebx
	subl	%r14d, %ebx
LBB0_9:
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %ecx
	callq	_gspca_dbg
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_SPEED_FULL,8,3             ## @USB_SPEED_FULL
	.comm	_D_STREAM,4,2                   ## @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"min bandwidth: %d\n"

	.no_dead_strip	_which_bandwidth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function which_bandwidth
_which_bandwidth:                       ; @which_bandwidth
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w20, [x0, #8]
	ldr	w8, [x0, #32]
	cbnz	w8, LBB0_2
; %bb.1:
	ldp	w8, w9, [x19, #12]
	mul	w8, w9, w8
	add	w9, w20, w20, lsl #1
	add	w10, w9, #7
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #3
	cmp	w20, w8
	csel	w20, w20, w9, ge
LBB0_2:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	add	x1, sp, #8
	mov	x0, x19
	blr	x8
	ldp	w8, w9, [sp, #8]
	mul	w8, w8, w20
	sdiv	w20, w8, w9
	b	LBB0_8
LBB0_4:
	ldr	w8, [x19, #12]
	cmp	w8, #640
	b.lt	LBB0_7
; %bb.5:
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _USB_SPEED_FULL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _USB_SPEED_FULL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	lsl	w8, w20, #4
	sub	w20, w8, w20
	b	LBB0_8
LBB0_7:
	mov	w8, #30
	mul	w20, w20, w8
LBB0_8:
Lloh3:
	adrp	x8, _D_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_gspca_dbg
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_SPEED_FULL,8,3             ; @USB_SPEED_FULL
	.comm	_D_STREAM,4,2                   ; @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"min bandwidth: %d\n"

	.no_dead_strip	_which_bandwidth
.subsections_via_symbols
