	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msm_hdmi_hdcp_write_ksv_fifo
_msm_hdmi_hdcp_write_ksv_fifo:          ## @msm_hdmi_hdcp_write_ksv_fifo
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	leal	(%rax,%rax,4), %r15d
	cmpl	$0, 4(%rdi)
	je	LBB0_1
## %bb.2:
	movq	16(%rbx), %rdi
	movq	_REG_HDMI_HDCP_SHA_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hdmi_read
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DBG
	cmpl	%r15d, 4(%rbx)
	jne	LBB0_5
## %bb.3:
	movq	_HDMI_HDCP_SHA_STATUS_COMP_DONE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_16
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DBG
	jmp	LBB0_17
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movq	_HDMI_HDCP_SHA_STATUS_BLOCK_DONE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_16
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DBG
	movl	4(%rbx), %eax
LBB0_7:
	subl	%eax, %r15d
	cmpl	$65, %r15d
	movl	$64, %ecx
	cmovll	%r15d, %ecx
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.8:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movslq	%eax, %r14
	shlq	$2, %r14
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	addq	8(%rbx), %r14
	leal	-1(%rcx), %r15d
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%r12,4), %eax
	shll	$16, %eax
	movl	$0, %ecx
	cmpl	$65, -44(%rbp)                  ## 4-byte Folded Reload
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_HDMI_HDCP_SHA_DATA_DONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r12, %r15
	movl	$0, %edx
	cmovnel	%edx, %ecx
	orl	%eax, %ecx
	movq	_REG_HDMI_HDCP_SHA_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	%ecx, -52(%rbp)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	-48(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	movl	$1, %ecx
	callq	_msm_hdmi_hdcp_scm_wr
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	incq	%r12
	cmpq	%r12, %r13
	jne	LBB0_10
## %bb.14:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
LBB0_15:
	addl	%ecx, %eax
	movl	%eax, 4(%rbx)
LBB0_16:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_13:
	movl	%eax, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_HDMI_HDCP_SHA_STATUS,4,2   ## @REG_HDMI_HDCP_SHA_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HDCP_SHA_STATUS=%08x"

	.comm	_HDMI_HDCP_SHA_STATUS_COMP_DONE,4,2 ## @HDMI_HDCP_SHA_STATUS_COMP_DONE
L_.str.1:                               ## @.str.1
	.asciz	"COMP_DONE"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_HDMI_HDCP_SHA_STATUS_BLOCK_DONE,4,2 ## @HDMI_HDCP_SHA_STATUS_BLOCK_DONE
L_.str.2:                               ## @.str.2
	.asciz	"BLOCK_DONE"

	.comm	_HDMI_HDCP_SHA_DATA_DONE,4,2    ## @HDMI_HDCP_SHA_DATA_DONE
	.comm	_REG_HDMI_HDCP_SHA_DATA,4,2     ## @REG_HDMI_HDCP_SHA_DATA
	.no_dead_strip	_msm_hdmi_hdcp_write_ksv_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msm_hdmi_hdcp_write_ksv_fifo
_msm_hdmi_hdcp_write_ksv_fifo:          ; @msm_hdmi_hdcp_write_ksv_fifo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	ldp	w8, w9, [x0]
	add	w21, w8, w8, lsl #2
	cbz	w9, LBB0_4
; %bb.1:
	ldr	x0, [x19, #16]
Lloh0:
	adrp	x8, _REG_HDMI_HDCP_SHA_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_HDMI_HDCP_SHA_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_hdmi_read
	mov	x20, x0
	str	x20, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	ldr	w8, [x19, #4]
	cmp	w8, w21
	b.ne	LBB0_5
; %bb.2:
Lloh5:
	adrp	x8, _HDMI_HDCP_SHA_STATUS_COMP_DONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDMI_HDCP_SHA_STATUS_COMP_DONE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_13
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DBG
	mov	w0, #0
	b	LBB0_14
LBB0_4:
	mov	w8, #0
	b	LBB0_7
LBB0_5:
Lloh10:
	adrp	x8, _HDMI_HDCP_SHA_STATUS_BLOCK_DONE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HDMI_HDCP_SHA_STATUS_BLOCK_DONE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_13
; %bb.6:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DBG
	ldr	w8, [x19, #4]
LBB0_7:
	sub	w21, w21, w8
	mov	w9, #64
	cmp	w21, #65
	csel	w20, w21, w9, lt
	subs	w22, w20, #1
	b.lt	LBB0_12
; %bb.8:
	ldr	x9, [x19, #8]
	add	x23, x9, w8, sxtw #2
Lloh15:
	adrp	x24, _HDMI_HDCP_SHA_DATA_DONE@GOTPAGE
Lloh16:
	ldr	x24, [x24, _HDMI_HDCP_SHA_DATA_DONE@GOTPAGEOFF]
Lloh17:
	adrp	x25, _REG_HDMI_HDCP_SHA_DATA@GOTPAGE
Lloh18:
	ldr	x25, [x25, _REG_HDMI_HDCP_SHA_DATA@GOTPAGEOFF]
	mov	x26, x20
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w21, #65
	ldr	w8, [x23]
	ccmp	x22, #0, #0, lt
	ldr	w9, [x24]
	csel	w9, w9, wzr, eq
	orr	w8, w9, w8, lsl #16
	ldr	w9, [x25]
	stp	w9, w8, [sp, #8]
	add	x1, sp, #8
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_msm_hdmi_hdcp_scm_wr
	cbnz	w0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	sub	x22, x22, #1
	add	x23, x23, #4
	subs	x26, x26, #1
	b.ne	LBB0_9
; %bb.11:
	ldr	w8, [x19, #4]
LBB0_12:
	add	w8, w8, w20
	str	w8, [x19, #4]
LBB0_13:
Lloh19:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_HDMI_HDCP_SHA_STATUS,4,2   ; @REG_HDMI_HDCP_SHA_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HDCP_SHA_STATUS=%08x"

	.comm	_HDMI_HDCP_SHA_STATUS_COMP_DONE,4,2 ; @HDMI_HDCP_SHA_STATUS_COMP_DONE
l_.str.1:                               ; @.str.1
	.asciz	"COMP_DONE"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_HDMI_HDCP_SHA_STATUS_BLOCK_DONE,4,2 ; @HDMI_HDCP_SHA_STATUS_BLOCK_DONE
l_.str.2:                               ; @.str.2
	.asciz	"BLOCK_DONE"

	.comm	_HDMI_HDCP_SHA_DATA_DONE,4,2    ; @HDMI_HDCP_SHA_DATA_DONE
	.comm	_REG_HDMI_HDCP_SHA_DATA,4,2     ; @REG_HDMI_HDCP_SHA_DATA
	.no_dead_strip	_msm_hdmi_hdcp_write_ksv_fifo
.subsections_via_symbols
