	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hw_atl_utils_fw_upload_dwords
_hw_atl_utils_fw_upload_dwords:         ## @hw_atl_utils_fw_upload_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, %r12d
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_hw_atl_sem_ram_get@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$10, %r8d
	movl	$100000, %r9d                   ## imm = 0x186A0
	callq	_readx_poll_timeout_atomic
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	movq	_REVISION_B1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_CHIP_FEATURE
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.3:
	movl	%r12d, %r12d
	shlq	$2, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx), %edx
	movq	%r15, %rdi
	movl	$808, %esi                      ## imm = 0x328
	callq	_aq_hw_write_reg
	movl	%ebx, %edx
	andl	$65532, %edx                    ## imm = 0xFFFC
	orl	$-2147483648, %edx              ## imm = 0x80000000
	movq	%r15, %rdi
	movl	$812, %esi                      ## imm = 0x32C
	callq	_aq_hw_write_reg
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_hw_atl_mcp_up_force_intr_set
	movq	_hw_atl_scrpad12_get@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	movl	$1, %ecx
	movl	$10, %r8d
	movl	$10000, %r9d                    ## imm = 0x2710
	callq	_readx_poll_timeout_atomic
	addq	$4, %rbx
	cmpq	%rbx, %r12
	jne	LBB0_4
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	movl	$520, %esi                      ## imm = 0x208
	movl	%ebx, %edx
	callq	_aq_hw_write_reg
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.6:
	movl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %edx
	movq	%r15, %rdi
	movl	$524, %esi                      ## imm = 0x20C
	callq	_aq_hw_write_reg
	movq	%r15, %rdi
	movl	$512, %esi                      ## imm = 0x200
	movl	$49152, %edx                    ## imm = 0xC000
	callq	_aq_hw_write_reg
	movq	_hw_atl_utils_mif_cmd_get@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	movl	$1, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	movl	$10000, %r9d                    ## imm = 0x2710
	callq	_readx_poll_timeout_atomic
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_7
LBB0_8:
	movl	%eax, %r13d
LBB0_9:
	movq	_HW_ATL_FW_SM_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_hw_atl_reg_glb_cpu_sem_set
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hw_atl_sem_ram_get,4,2         ## @hw_atl_sem_ram_get
	.comm	_REVISION_B1,4,2                ## @REVISION_B1
	.comm	_hw_atl_scrpad12_get,4,2        ## @hw_atl_scrpad12_get
	.comm	_hw_atl_utils_mif_cmd_get,4,2   ## @hw_atl_utils_mif_cmd_get
	.comm	_HW_ATL_FW_SM_RAM,4,2           ## @HW_ATL_FW_SM_RAM
	.no_dead_strip	_hw_atl_utils_fw_upload_dwords
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hw_atl_utils_fw_upload_dwords
_hw_atl_utils_fw_upload_dwords:         ; @hw_atl_utils_fw_upload_dwords
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _hw_atl_sem_ram_get@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hw_atl_sem_ram_get@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	mov	w3, #0
	mov	w4, #10
	mov	w5, #34464
	movk	w5, #1, lsl #16
	bl	_readx_poll_timeout_atomic
	mov	x21, x0
	tbnz	w0, #31, LBB0_10
; %bb.1:
Lloh3:
	adrp	x8, _REVISION_B1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REVISION_B1@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_IS_CHIP_FEATURE
	cbz	x0, LBB0_5
; %bb.2:
	cbz	w22, LBB0_9
; %bb.3:
	mov	x23, #0
	mov	w8, w22
	lsl	x22, x8, #2
Lloh6:
	adrp	x24, _hw_atl_scrpad12_get@GOTPAGE
Lloh7:
	ldr	x24, [x24, _hw_atl_scrpad12_get@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x20, x23]
	mov	x0, x19
	mov	w1, #808
	bl	_aq_hw_write_reg
	and	w8, w23, #0xfffc
	orr	w2, w8, #0x80000000
	mov	x0, x19
	mov	w1, #812
	bl	_aq_hw_write_reg
	mov	x0, x19
	mov	w1, #1
	bl	_hw_atl_mcp_up_force_intr_set
	ldr	w0, [x24]
	mov	x1, x19
	mov	w3, #1
	mov	w4, #10
	mov	w5, #10000
	bl	_readx_poll_timeout_atomic
	add	x23, x23, #4
	cmp	x22, x23
	b.ne	LBB0_4
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	mov	w1, #520
	mov	x2, x23
	bl	_aq_hw_write_reg
	cbz	w22, LBB0_9
; %bb.6:
	mov	w22, w22
Lloh8:
	adrp	x23, _hw_atl_utils_mif_cmd_get@GOTPAGE
Lloh9:
	ldr	x23, [x23, _hw_atl_utils_mif_cmd_get@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x20], #4
	mov	x0, x19
	mov	w1, #524
	bl	_aq_hw_write_reg
	mov	x0, x19
	mov	w1, #512
	mov	w2, #49152
	bl	_aq_hw_write_reg
	ldr	w0, [x23]
	mov	x1, x19
	mov	w3, #1
	mov	w4, #1000
	mov	w5, #10000
	bl	_readx_poll_timeout_atomic
	subs	x22, x22, #1
	b.ne	LBB0_7
LBB0_8:
	mov	x21, x0
LBB0_9:
Lloh10:
	adrp	x8, _HW_ATL_FW_SM_RAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HW_ATL_FW_SM_RAM@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_hw_atl_reg_glb_cpu_sem_set
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_hw_atl_sem_ram_get,4,2         ; @hw_atl_sem_ram_get
	.comm	_REVISION_B1,4,2                ; @REVISION_B1
	.comm	_hw_atl_scrpad12_get,4,2        ; @hw_atl_scrpad12_get
	.comm	_hw_atl_utils_mif_cmd_get,4,2   ; @hw_atl_utils_mif_cmd_get
	.comm	_HW_ATL_FW_SM_RAM,4,2           ; @HW_ATL_FW_SM_RAM
	.no_dead_strip	_hw_atl_utils_fw_upload_dwords
.subsections_via_symbols
