	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sii8620_mr_devcap
_sii8620_mr_devcap:                     ## @sii8620_mr_devcap
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MHL_DCAP_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %r12d
	movq	%r12, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	16(%r14), %r15
	movq	_REG_EDID_FIFO_RD_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	callq	_sii8620_read_buf
	cmpq	$0, (%r14)
	js	LBB0_2
## %bb.1:
	movq	_MHL_DCAP_MHL_VERSION@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %ecx
	leal	15(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	movl	%edx, %eax
	andl	$-16, %eax
	subl	%eax, %ecx
	sarl	$4, %edx
	movq	_MHL_DCAP_ADOPTER_ID_H@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %r8d
	movq	_MHL_DCAP_ADOPTER_ID_L@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %r9d
	movq	_MHL_DCAP_DEVICE_ID_H@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %r10d
	movq	_MHL_DCAP_DEVICE_ID_L@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rbx,%rsi,4), %eax
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	pushq	%rax
	pushq	%r10
	callq	_dev_info
	addq	$16, %rsp
	movl	12(%r14), %edi
	movl	(%r13), %edx
	movq	%rbx, %rsi
	callq	_sii8620_update_array
	movl	$1, 8(%r14)
	movq	%r14, %rdi
	callq	_sii8620_identify_sink
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MHL_DCAP_SIZE,4,2              ## @MHL_DCAP_SIZE
	.comm	_REG_EDID_FIFO_RD_DATA,4,2      ## @REG_EDID_FIFO_RD_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"detected dongle MHL %d.%d, ChipID %02x%02x:%02x%02x\n"

	.comm	_MHL_DCAP_MHL_VERSION,8,3       ## @MHL_DCAP_MHL_VERSION
	.comm	_MHL_DCAP_ADOPTER_ID_H,8,3      ## @MHL_DCAP_ADOPTER_ID_H
	.comm	_MHL_DCAP_ADOPTER_ID_L,8,3      ## @MHL_DCAP_ADOPTER_ID_L
	.comm	_MHL_DCAP_DEVICE_ID_H,8,3       ## @MHL_DCAP_DEVICE_ID_H
	.comm	_MHL_DCAP_DEVICE_ID_L,8,3       ## @MHL_DCAP_DEVICE_ID_L
	.no_dead_strip	_sii8620_mr_devcap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sii8620_mr_devcap
_sii8620_mr_devcap:                     ; @sii8620_mr_devcap
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x22, _MHL_DCAP_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MHL_DCAP_SIZE@GOTPAGEOFF]
	ldr	w3, [x22]
	lsl	x8, x3, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x21, [x0, #16]
Lloh7:
	adrp	x8, _REG_EDID_FIFO_RD_DATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _REG_EDID_FIFO_RD_DATA@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x2, x20
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_sii8620_read_buf
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_2
; %bb.1:
Lloh10:
	adrp	x8, _MHL_DCAP_MHL_VERSION@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MHL_DCAP_MHL_VERSION@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	w8, [x20, x8, lsl #2]
	add	w9, w8, #15
	cmp	w8, #0
	csel	w9, w9, w8, lt
Lloh13:
	adrp	x10, _MHL_DCAP_ADOPTER_ID_H@GOTPAGE
Lloh14:
	ldr	x10, [x10, _MHL_DCAP_ADOPTER_ID_H@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	ldr	w4, [x20, x10, lsl #2]
	asr	w2, w9, #4
Lloh16:
	adrp	x10, _MHL_DCAP_ADOPTER_ID_L@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MHL_DCAP_ADOPTER_ID_L@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	ldr	w5, [x20, x10, lsl #2]
	and	w9, w9, #0xfffffff0
Lloh19:
	adrp	x10, _MHL_DCAP_DEVICE_ID_H@GOTPAGE
Lloh20:
	ldr	x10, [x10, _MHL_DCAP_DEVICE_ID_H@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	ldr	w6, [x20, x10, lsl #2]
	sub	w3, w8, w9
Lloh22:
	adrp	x8, _MHL_DCAP_DEVICE_ID_L@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MHL_DCAP_DEVICE_ID_L@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldr	w7, [x20, x8, lsl #2]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_info
	ldr	w0, [x19, #12]
	ldr	w2, [x22]
	mov	x1, x20
	bl	_sii8620_update_array
	mov	w8, #1
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_sii8620_identify_sink
LBB0_2:
	ldur	x8, [x29, #-40]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MHL_DCAP_SIZE,4,2              ; @MHL_DCAP_SIZE
	.comm	_REG_EDID_FIFO_RD_DATA,4,2      ; @REG_EDID_FIFO_RD_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"detected dongle MHL %d.%d, ChipID %02x%02x:%02x%02x\n"

	.comm	_MHL_DCAP_MHL_VERSION,8,3       ; @MHL_DCAP_MHL_VERSION
	.comm	_MHL_DCAP_ADOPTER_ID_H,8,3      ; @MHL_DCAP_ADOPTER_ID_H
	.comm	_MHL_DCAP_ADOPTER_ID_L,8,3      ; @MHL_DCAP_ADOPTER_ID_L
	.comm	_MHL_DCAP_DEVICE_ID_H,8,3       ; @MHL_DCAP_DEVICE_ID_H
	.comm	_MHL_DCAP_DEVICE_ID_L,8,3       ; @MHL_DCAP_DEVICE_ID_L
	.no_dead_strip	_sii8620_mr_devcap
.subsections_via_symbols
