	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hw_atl_utils_fw_downld_dwords  ## -- Begin function hw_atl_utils_fw_downld_dwords
	.p2align	4, 0x90
_hw_atl_utils_fw_downld_dwords:         ## @hw_atl_utils_fw_downld_dwords
	.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
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	_hw_atl_sem_ram_get@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$10000, %r9d                    ## imm = 0x2710
	callq	_readx_poll_timeout_atomic
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_3
## %bb.1:
	movq	_HW_ATL_FW_SM_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_hw_atl_reg_glb_cpu_sem_set
	movq	%r12, %rdi
	callq	_hw_atl_sem_ram_get
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	_HW_ATL_MIF_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_aq_hw_write_reg
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.4:
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.5:
	decl	%r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_HW_ATL_MIF_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_aq_hw_write_reg
	movq	_REVISION_B1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_CHIP_FEATURE
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_hw_atl_utils_mif_addr_get@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_hw_atl_utils_mif_cmd_get@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	movl	$1, %ecx
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %r8d
	movl	$1000, %r9d                     ## imm = 0x3E8
	callq	_readx_poll_timeout_atomic
	movl	%eax, %ebx
	movq	_HW_ATL_MIF_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_aq_hw_read_reg
	movl	%eax, (%r15,%r13,4)
	cmpl	%r13d, %r14d
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	testl	%ebx, %ebx
	je	LBB0_6
LBB0_11:
	movq	_HW_ATL_FW_SM_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_hw_atl_reg_glb_cpu_sem_set
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_ETIME@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_HW_ATL_FW_SM_RAM,4,2           ## @HW_ATL_FW_SM_RAM
	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_HW_ATL_MIF_ADDR,4,2            ## @HW_ATL_MIF_ADDR
	.comm	_HW_ATL_MIF_CMD,4,2             ## @HW_ATL_MIF_CMD
	.comm	_REVISION_B1,4,2                ## @REVISION_B1
	.comm	_HW_ATL_MIF_VAL,4,2             ## @HW_ATL_MIF_VAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hw_atl_utils_fw_downld_dwords  ; -- Begin function hw_atl_utils_fw_downld_dwords
	.p2align	2
_hw_atl_utils_fw_downld_dwords:         ; @hw_atl_utils_fw_downld_dwords
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _hw_atl_sem_ram_get@GOTPAGE
Lloh1:
	ldr	x0, [x0, _hw_atl_sem_ram_get@GOTPAGEOFF]
	mov	x1, x19
	mov	w3, #0
	mov	w4, #1
	mov	w5, #10000
	bl	_readx_poll_timeout_atomic
	mov	x21, x0
Lloh2:
	adrp	x24, _HW_ATL_FW_SM_RAM@GOTPAGE
Lloh3:
	ldr	x24, [x24, _HW_ATL_FW_SM_RAM@GOTPAGEOFF]
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w2, [x24]
	mov	x0, x19
	mov	w1, #1
	bl	_hw_atl_reg_glb_cpu_sem_set
	mov	x0, x19
	bl	_hw_atl_sem_ram_get
	cbz	w0, LBB0_12
LBB0_2:
Lloh4:
	adrp	x8, _HW_ATL_MIF_ADDR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HW_ATL_MIF_ADDR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_aq_hw_write_reg
	cbz	w22, LBB0_10
; %bb.3:
	cbnz	w21, LBB0_10
; %bb.4:
	sub	w25, w22, #1
Lloh7:
	adrp	x26, _HW_ATL_MIF_CMD@GOTPAGE
Lloh8:
	ldr	x26, [x26, _HW_ATL_MIF_CMD@GOTPAGEOFF]
Lloh9:
	adrp	x27, _REVISION_B1@GOTPAGE
Lloh10:
	ldr	x27, [x27, _REVISION_B1@GOTPAGEOFF]
Lloh11:
	adrp	x22, _hw_atl_utils_mif_cmd_get@GOTPAGE
Lloh12:
	ldr	x22, [x22, _hw_atl_utils_mif_cmd_get@GOTPAGEOFF]
Lloh13:
	adrp	x28, _HW_ATL_MIF_VAL@GOTPAGE
Lloh14:
	ldr	x28, [x28, _HW_ATL_MIF_VAL@GOTPAGEOFF]
Lloh15:
	adrp	x23, _hw_atl_utils_mif_addr_get@GOTPAGE
Lloh16:
	ldr	x23, [x23, _hw_atl_utils_mif_addr_get@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	mov	w2, #32768
	bl	_aq_hw_write_reg
	ldr	w0, [x27]
	bl	_IS_CHIP_FEATURE
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	mov	x1, x19
	mov	w3, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	mov	x1, x19
	mov	w3, #1
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w4, #1
	mov	w5, #1000
	bl	_readx_poll_timeout_atomic
	mov	x21, x0
	ldr	w1, [x28]
	mov	x0, x19
	bl	_aq_hw_read_reg
	str	w0, [x20], #4
	subs	w25, w25, #1
	b.lo	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	w21, LBB0_5
LBB0_10:
	ldr	w2, [x24]
	mov	x0, x19
	mov	w1, #1
	bl	_hw_atl_reg_glb_cpu_sem_set
LBB0_11:
	mov	x0, x21
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh17:
	adrp	x8, _ETIME@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_ATL_FW_SM_RAM,4,2           ; @HW_ATL_FW_SM_RAM
	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_HW_ATL_MIF_ADDR,4,2            ; @HW_ATL_MIF_ADDR
	.comm	_HW_ATL_MIF_CMD,4,2             ; @HW_ATL_MIF_CMD
	.comm	_REVISION_B1,4,2                ; @REVISION_B1
	.comm	_HW_ATL_MIF_VAL,4,2             ; @HW_ATL_MIF_VAL
.subsections_via_symbols
