	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uvc_scan_chain_backward
_uvc_scan_chain_backward:               ## @uvc_scan_chain_backward
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rsi), %r13
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_UVC_ENTITY_TYPE
                                        ## kill: def $eax killed $eax def $rax
	leal	-131(%rax), %ecx
	cmpl	$7, %ecx
	jae	LBB0_1
## %bb.17:
	movq	%r13, %rdi
	callq	_UVC_ENTITY_IS_OTERM
	testl	%eax, %eax
	jne	LBB0_18
	jmp	LBB0_21
LBB0_1:
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_2
LBB0_18:
	movq	(%r13), %rax
	movl	(%rax), %ebx
LBB0_19:
	testl	%ebx, %ebx
	jle	LBB0_20
## %bb.22:
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_uvc_entity_by_id
	testq	%rax, %rax
	je	LBB0_23
## %bb.24:
	movq	%rax, (%r15)
	xorl	%r12d, %r12d
	jmp	LBB0_25
LBB0_20:
	movl	%ebx, %r12d
LBB0_21:
	movq	$0, (%r15)
	jmp	LBB0_25
LBB0_2:
	cmpl	$128, %eax
	jne	LBB0_19
## %bb.3:
	movl	8(%r13), %eax
	cmpl	$1, %eax
	je	LBB0_18
## %bb.4:
	movq	_uvc_trace_param@GOTPCREL(%rip), %rdx
	movq	_UVC_TRACE_PROBE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdx)
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	movl	8(%r13), %eax
LBB0_6:
	movq	%r13, 8(%r14)
	testl	%eax, %eax
	jle	LBB0_14
## %bb.7:
	leaq	4(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	addq	$12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add_tail
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_uvc_scan_chain_forward
	incq	%r12
	movslq	8(%r13), %rax
	cmpq	%rax, %r12
	jge	LBB0_14
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%r12,4), %esi
	movl	(%r14), %edi
	callq	_uvc_entity_by_id
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_UVC_ENTITY_IS_ITERM
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_UVC_TRACE_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_uvc_trace_param@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	16(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	jmp	LBB0_13
LBB0_23:
	movq	_UVC_TRACE_DESCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_uvc_trace
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_25:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_UVC_TRACE_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_uvc_trace_param@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.16:
	leaq	L_.str.3(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_printk
	movq	$0, (%r15)
	jmp	LBB0_25
LBB0_10:
	movq	_UVC_TRACE_DESCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_uvc_trace
	movl	$-1, %r12d
	jmp	LBB0_25
LBB0_15:
	xorl	%r12d, %r12d
	movq	$0, (%r15)
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_uvc_trace_param,4,2            ## @uvc_trace_param
	.comm	_UVC_TRACE_PROBE,4,2            ## @UVC_TRACE_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" <- IT"

	.comm	_UVC_TRACE_DESCR,4,2            ## @UVC_TRACE_DESCR
L_.str.1:                               ## @.str.1
	.asciz	"Selector unit %d input %d isn't connected to an input terminal\n"

L_.str.2:                               ## @.str.2
	.asciz	" %d"

L_.str.3:                               ## @.str.3
	.asciz	"\n"

L_.str.4:                               ## @.str.4
	.asciz	"Found reference to unknown entity %d.\n"

	.no_dead_strip	_uvc_scan_chain_backward
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uvc_scan_chain_backward
_uvc_scan_chain_backward:               ; @uvc_scan_chain_backward
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x1]
Lloh0:
	adrp	x22, _EINVAL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EINVAL@GOTPAGEOFF]
	ldr	w23, [x22]
	mov	x0, x21
	bl	_UVC_ENTITY_TYPE
	sub	w8, w0, #131
	cmp	w8, #7
	b.hs	LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_UVC_ENTITY_IS_OTERM
	cbnz	w0, LBB0_4
LBB0_2:
	mov	w21, #0
	b	LBB0_20
LBB0_3:
	sub	w8, w0, #129
	cmp	w8, #2
	b.hs	LBB0_7
LBB0_4:
	ldr	x8, [x21]
	ldr	w21, [x8]
	cmp	w21, #0
	b.le	LBB0_20
LBB0_5:
	ldr	w0, [x20]
	mov	x1, x21
	bl	_uvc_entity_by_id
	cbz	x0, LBB0_18
; %bb.6:
	mov	w21, #0
	str	x0, [x19]
	b	LBB0_21
LBB0_7:
	cmp	w0, #128
	b.ne	LBB0_19
; %bb.8:
	ldr	w8, [x21, #8]
	cmp	w8, #1
	b.eq	LBB0_4
; %bb.9:
Lloh2:
	adrp	x25, _uvc_trace_param@GOTPAGE
Lloh3:
	ldr	x25, [x25, _uvc_trace_param@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh4:
	adrp	x26, _UVC_TRACE_PROBE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _UVC_TRACE_PROBE@GOTPAGEOFF]
	ldr	w10, [x26]
	tst	w10, w9
	b.eq	LBB0_11
; %bb.10:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	ldr	w8, [x21, #8]
LBB0_11:
	str	x21, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.12:
	mov	x27, #0
	add	x22, x20, #4
Lloh8:
	adrp	x23, l_.str.2@PAGE
Lloh9:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x0, x24, #12
	mov	x1, x22
	bl	_list_add_tail
	mov	x0, x20
	mov	x1, x24
	mov	x2, x21
	bl	_uvc_scan_chain_forward
	add	x27, x27, #1
	ldrsw	x8, [x21, #8]
	cmp	x27, x8
	b.ge	LBB0_22
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w1, [x8, x27, lsl #2]
	ldr	w0, [x20]
	bl	_uvc_entity_by_id
	cbz	x0, LBB0_24
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x24, x0
	bl	_UVC_ENTITY_IS_ITERM
	cbz	w0, LBB0_24
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x25]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x24, #16]
	str	x8, [sp]
	mov	x0, x23
	bl	_printk
	b	LBB0_13
LBB0_18:
Lloh10:
	adrp	x8, _UVC_TRACE_DESCR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _UVC_TRACE_DESCR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x21
	bl	_uvc_trace
	ldr	w8, [x22]
	neg	w21, w8
	b	LBB0_21
LBB0_19:
	neg	w21, w23
	cmp	w21, #0
	b.gt	LBB0_5
LBB0_20:
	str	xzr, [x19]
LBB0_21:
	mov	x0, x21
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_22:
	ldr	w8, [x25]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.23:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printk
	b	LBB0_2
LBB0_24:
Lloh17:
	adrp	x8, _UVC_TRACE_DESCR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _UVC_TRACE_DESCR@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w2, [x21, #16]
	str	x27, [sp]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_uvc_trace
	mov	w21, #-1
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_uvc_trace_param,4,2            ; @uvc_trace_param
	.comm	_UVC_TRACE_PROBE,4,2            ; @UVC_TRACE_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" <- IT"

	.comm	_UVC_TRACE_DESCR,4,2            ; @UVC_TRACE_DESCR
l_.str.1:                               ; @.str.1
	.asciz	"Selector unit %d input %d isn't connected to an input terminal\n"

l_.str.2:                               ; @.str.2
	.asciz	" %d"

l_.str.3:                               ; @.str.3
	.asciz	"\n"

l_.str.4:                               ; @.str.4
	.asciz	"Found reference to unknown entity %d.\n"

	.no_dead_strip	_uvc_scan_chain_backward
.subsections_via_symbols
