	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdn_dp_load_firmware           ## -- Begin function cdn_dp_load_firmware
	.p2align	4, 0x90
_cdn_dp_load_firmware:                  ## @cdn_dp_load_firmware
	.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	_APB_IRAM_PATH@GOTPCREL(%rip), %rbx
	movq	_APB_DRAM_PATH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rbx), %eax
	movl	%r8d, %r14d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	_APB_XT_RESET@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_APB_CTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	8(%rdi), %rsi
	movl	%eax, %edi
	callq	_writel
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.1:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%r15), %edi
	movq	8(%r12), %rsi
	movq	_ADDR_IMEM@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	addq	%r15, %rsi
	callq	_writel
	addq	$4, %r15
	cmpl	%ebx, %r15d
	jl	LBB0_2
LBB0_3:
	testl	%r14d, %r14d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	movq	_ADDR_DMEM@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx), %edi
	movq	8(%r12), %rsi
	addq	(%r15), %rsi
	addq	%rbx, %rsi
	callq	_writel
	addq	$4, %rbx
	cmpl	%r14d, %ebx
	jl	LBB0_5
LBB0_6:
	movq	_APB_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_writel
	movq	_KEEP_ALIVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	movq	_FW_ALIVE_TIMEOUT_US@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_readl@GOTPCREL(%rip), %rdi
	movl	$2000, %r8d                     ## imm = 0x7D0
	callq	_readx_poll_timeout
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	_VER_L@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movzbl	%al, %eax
	movl	%eax, (%r12)
	movq	_VER_H@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	shll	$8, %eax
	movzwl	%ax, %eax
	orl	%eax, (%r12)
	movq	_VER_LIB_L_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movzbl	%al, %eax
	shll	$16, %eax
	orl	%eax, (%r12)
	movq	_VER_LIB_H_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	shll	$24, %eax
	orl	(%r12), %eax
	movl	%eax, (%r12)
	movl	4(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_DEBUG
	jmp	LBB0_9
LBB0_7:
	movl	4(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APB_IRAM_PATH,4,2              ## @APB_IRAM_PATH
	.comm	_APB_DRAM_PATH,4,2              ## @APB_DRAM_PATH
	.comm	_APB_XT_RESET,4,2               ## @APB_XT_RESET
	.comm	_APB_CTRL,8,3                   ## @APB_CTRL
	.comm	_ADDR_IMEM,8,3                  ## @ADDR_IMEM
	.comm	_ADDR_DMEM,8,3                  ## @ADDR_DMEM
	.comm	_KEEP_ALIVE,8,3                 ## @KEEP_ALIVE
	.comm	_FW_ALIVE_TIMEOUT_US,4,2        ## @FW_ALIVE_TIMEOUT_US
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to loaded the FW reg = %x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VER_L,8,3                      ## @VER_L
	.comm	_VER_H,8,3                      ## @VER_H
	.comm	_VER_LIB_L_ADDR,8,3             ## @VER_LIB_L_ADDR
	.comm	_VER_LIB_H_ADDR,8,3             ## @VER_LIB_H_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"firmware version: %x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdn_dp_load_firmware           ; -- Begin function cdn_dp_load_firmware
	.p2align	2
_cdn_dp_load_firmware:                  ; @cdn_dp_load_firmware
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _APB_IRAM_PATH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _APB_IRAM_PATH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _APB_DRAM_PATH@GOTPAGE
Lloh4:
	ldr	x10, [x10, _APB_DRAM_PATH@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh6:
	adrp	x10, _APB_XT_RESET@GOTPAGE
Lloh7:
	ldr	x10, [x10, _APB_XT_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w0, w9, w10
Lloh9:
	adrp	x24, _APB_CTRL@GOTPAGE
Lloh10:
	ldr	x24, [x24, _APB_CTRL@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x1, x9, x8
	bl	_writel
	cmp	w22, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x25, #0
Lloh11:
	adrp	x26, _ADDR_IMEM@GOTPAGE
Lloh12:
	ldr	x26, [x26, _ADDR_IMEM@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23, x25]
	ldr	x8, [x19, #8]
	ldr	x9, [x26]
	add	x8, x8, x9
	add	x1, x25, x8
	bl	_writel
	add	x25, x25, #4
	cmp	w25, w22
	b.lt	LBB0_2
LBB0_3:
	cmp	w20, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x22, #0
Lloh13:
	adrp	x23, _ADDR_DMEM@GOTPAGE
Lloh14:
	ldr	x23, [x23, _ADDR_DMEM@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, x22]
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	add	x8, x8, x9
	add	x1, x22, x8
	bl	_writel
	add	x22, x22, #4
	cmp	w22, w20
	b.lt	LBB0_5
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x9, [x24]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
Lloh15:
	adrp	x8, _KEEP_ALIVE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KEEP_ALIVE@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh17:
	ldr	x8, [x8]
	add	x1, x8, x9
Lloh18:
	adrp	x8, _FW_ALIVE_TIMEOUT_US@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FW_ALIVE_TIMEOUT_US@GOTPAGEOFF]
Lloh20:
	ldr	w5, [x8]
Lloh21:
	adrp	x0, _readl@GOTPAGE
Lloh22:
	ldr	x0, [x0, _readl@GOTPAGEOFF]
	mov	w4, #2000
	bl	_readx_poll_timeout
	tbnz	w0, #31, LBB0_8
; %bb.7:
	ldr	x8, [x19, #8]
Lloh23:
	adrp	x9, _VER_L@GOTPAGE
Lloh24:
	ldr	x9, [x9, _VER_L@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	and	w8, w0, #0xff
	str	w8, [x19]
	ldr	x8, [x19, #8]
Lloh26:
	adrp	x9, _VER_H@GOTPAGE
Lloh27:
	ldr	x9, [x9, _VER_H@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ubfiz	w8, w0, #8, #8
	ldr	w9, [x19]
	orr	w8, w8, w9
	str	w8, [x19]
	ldr	x8, [x19, #8]
Lloh29:
	adrp	x9, _VER_LIB_L_ADDR@GOTPAGE
Lloh30:
	ldr	x9, [x9, _VER_LIB_L_ADDR@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ubfiz	w8, w0, #16, #8
	ldr	w9, [x19]
	orr	w8, w8, w9
	str	w8, [x19]
	ldr	x8, [x19, #8]
Lloh32:
	adrp	x9, _VER_LIB_H_ADDR@GOTPAGE
Lloh33:
	ldr	x9, [x9, _VER_LIB_H_ADDR@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ldp	w9, w8, [x19]
	orr	w2, w9, w0, lsl #24
	str	w2, [x19]
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_DRM_DEV_DEBUG
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	ldr	w0, [x19, #4]
Lloh37:
	adrp	x1, l_.str@PAGE
Lloh38:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_APB_IRAM_PATH,4,2              ; @APB_IRAM_PATH
	.comm	_APB_DRAM_PATH,4,2              ; @APB_DRAM_PATH
	.comm	_APB_XT_RESET,4,2               ; @APB_XT_RESET
	.comm	_APB_CTRL,8,3                   ; @APB_CTRL
	.comm	_ADDR_IMEM,8,3                  ; @ADDR_IMEM
	.comm	_ADDR_DMEM,8,3                  ; @ADDR_DMEM
	.comm	_KEEP_ALIVE,8,3                 ; @KEEP_ALIVE
	.comm	_FW_ALIVE_TIMEOUT_US,4,2        ; @FW_ALIVE_TIMEOUT_US
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to loaded the FW reg = %x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VER_L,8,3                      ; @VER_L
	.comm	_VER_H,8,3                      ; @VER_H
	.comm	_VER_LIB_L_ADDR,8,3             ; @VER_LIB_L_ADDR
	.comm	_VER_LIB_H_ADDR,8,3             ; @VER_LIB_H_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"firmware version: %x\n"

.subsections_via_symbols
