	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_process_firmware_header
_ci_process_firmware_header:            ## @ci_process_firmware_header
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	movq	16(%rdi), %r13
	movq	$0, -48(%rbp)
	callq	_ci_upload_firmware
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_2:
	movq	_SMU7_FIRMWARE_HEADER_LOCATION@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_SMU7_Firmware_Header@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DpmTable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	addq	%rax, %rbx
	movq	_SMC_RAM_END@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ci_read_smc_sram_dword
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	-48(%rbp), %rax
	movq	%rax, 32(%r14)
LBB0_4:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_SMU7_FIRMWARE_HEADER_LOCATION@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_SMU7_Firmware_Header@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SoftRegisters@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	addq	%rax, %rbx
	movq	_SMC_RAM_END@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ci_read_smc_sram_dword
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	-48(%rbp), %rax
	movq	%rax, (%r13)
	movq	-48(%rbp), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 24(%rcx)
LBB0_6:
	movq	_SMU7_FIRMWARE_HEADER_LOCATION@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movq	_SMU7_Firmware_Header@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mcRegisterTable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	addq	%rax, %rbx
	movq	_SMC_RAM_END@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ci_read_smc_sram_dword
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	-48(%rbp), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 16(%rcx)
LBB0_8:
	orl	%r15d, %r14d
	movq	(%r13), %rbx
	movq	_SMU7_Firmware_Header@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_FanTable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	addq	%rax, %rbx
	movq	_SMC_RAM_END@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ci_read_smc_sram_dword
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	-48(%rbp), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, 8(%rdx)
LBB0_10:
	orl	%eax, %r14d
	movq	(%r13), %rbx
	movl	(%r15), %edi
	movq	_mcArbDramTimingTable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	addq	%rax, %rbx
	movq	_SMC_RAM_END@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ci_read_smc_sram_dword
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	-48(%rbp), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, (%rdx)
LBB0_12:
	orl	%eax, %r14d
	movq	(%r13), %rbx
	movl	(%r15), %edi
	movq	_Version@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	addq	%rax, %rbx
	movq	_SMC_RAM_END@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ci_read_smc_sram_dword
	movl	%eax, %ecx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	-48(%rbp), %rax
	movq	%rax, (%r12)
LBB0_14:
	xorl	%eax, %eax
	orl	%ecx, %r14d
	setne	%al
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMU7_FIRMWARE_HEADER_LOCATION,8,3 ## @SMU7_FIRMWARE_HEADER_LOCATION
	.comm	_SMU7_Firmware_Header,4,2       ## @SMU7_Firmware_Header
	.comm	_DpmTable,4,2                   ## @DpmTable
	.comm	_SMC_RAM_END,4,2                ## @SMC_RAM_END
	.comm	_SoftRegisters,4,2              ## @SoftRegisters
	.comm	_mcRegisterTable,4,2            ## @mcRegisterTable
	.comm	_FanTable,4,2                   ## @FanTable
	.comm	_mcArbDramTimingTable,4,2       ## @mcArbDramTimingTable
	.comm	_Version,4,2                    ## @Version
	.no_dead_strip	_ci_process_firmware_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ci_process_firmware_header
_ci_process_firmware_header:            ; @ci_process_firmware_header
	.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	x22, x26, [x0, #8]
	str	xzr, [sp, #8]
	bl	_ci_upload_firmware
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_2:
Lloh3:
	adrp	x23, _SMU7_FIRMWARE_HEADER_LOCATION@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SMU7_FIRMWARE_HEADER_LOCATION@GOTPAGEOFF]
	ldr	x20, [x23]
Lloh5:
	adrp	x24, _SMU7_Firmware_Header@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SMU7_Firmware_Header@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh7:
	adrp	x8, _DpmTable@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DpmTable@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_offsetof
	add	x1, x0, x20
Lloh10:
	adrp	x25, _SMC_RAM_END@GOTPAGE
Lloh11:
	ldr	x25, [x25, _SMC_RAM_END@GOTPAGEOFF]
	ldr	w3, [x25]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ci_read_smc_sram_dword
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	x8, [sp, #8]
	str	x8, [x22, #32]
LBB0_4:
	ldr	x21, [x23]
	ldr	w0, [x24]
Lloh12:
	adrp	x8, _SoftRegisters@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SoftRegisters@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_offsetof
	add	x1, x0, x21
	ldr	w3, [x25]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ci_read_smc_sram_dword
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	x8, [sp, #8]
	str	x8, [x26]
	ldr	x8, [sp, #8]
	str	x8, [x22, #24]
LBB0_6:
	ldr	x26, [x23]
	ldr	w0, [x24]
Lloh15:
	adrp	x8, _mcRegisterTable@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mcRegisterTable@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_offsetof
	add	x1, x0, x26
	ldr	w3, [x25]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ci_read_smc_sram_dword
	cbnz	w0, LBB0_8
; %bb.7:
	ldr	x8, [sp, #8]
	str	x8, [x22, #16]
LBB0_8:
	orr	w20, w21, w20
	ldr	x21, [x23]
	ldr	w0, [x24]
Lloh18:
	adrp	x8, _FanTable@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FanTable@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_offsetof
	add	x1, x0, x21
	ldr	w3, [x25]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ci_read_smc_sram_dword
	cbnz	w0, LBB0_10
; %bb.9:
	ldr	x8, [sp, #8]
	str	x8, [x22, #8]
LBB0_10:
	orr	w20, w20, w0
	ldr	x21, [x23]
	ldr	w0, [x24]
Lloh21:
	adrp	x8, _mcArbDramTimingTable@GOTPAGE
Lloh22:
	ldr	x8, [x8, _mcArbDramTimingTable@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_offsetof
	add	x1, x0, x21
	ldr	w3, [x25]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ci_read_smc_sram_dword
	cbnz	w0, LBB0_12
; %bb.11:
	ldr	x8, [sp, #8]
	str	x8, [x22]
LBB0_12:
	orr	w20, w20, w0
	ldr	x21, [x23]
	ldr	w0, [x24]
Lloh24:
	adrp	x8, _Version@GOTPAGE
Lloh25:
	ldr	x8, [x8, _Version@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_offsetof
	add	x1, x0, x21
	ldr	w3, [x25]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ci_read_smc_sram_dword
	cbnz	w0, LBB0_14
; %bb.13:
	ldr	x8, [sp, #8]
	str	x8, [x19]
LBB0_14:
	orr	w8, w20, w0
	cmp	w8, #0
	cset	w0, ne
LBB0_15:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMU7_FIRMWARE_HEADER_LOCATION,8,3 ; @SMU7_FIRMWARE_HEADER_LOCATION
	.comm	_SMU7_Firmware_Header,4,2       ; @SMU7_Firmware_Header
	.comm	_DpmTable,4,2                   ; @DpmTable
	.comm	_SMC_RAM_END,4,2                ; @SMC_RAM_END
	.comm	_SoftRegisters,4,2              ; @SoftRegisters
	.comm	_mcRegisterTable,4,2            ; @mcRegisterTable
	.comm	_FanTable,4,2                   ; @FanTable
	.comm	_mcArbDramTimingTable,4,2       ; @mcArbDramTimingTable
	.comm	_Version,4,2                    ; @Version
	.no_dead_strip	_ci_process_firmware_header
.subsections_via_symbols
