	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_firmware                  ## -- Begin function load_firmware
	.p2align	4, 0x90
_load_firmware:                         ## @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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_fw_fabric_serdes_load@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.1:
	movq	_CR_SBUS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_SBUS_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_acquire_chip_resource
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:
	movq	%r14, %rdi
	callq	_set_sbus_fast_mode
	movq	_all_fabric_serdes_broadcast@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_fabric_serdes_broadcast@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %edx
	movq	_fabric_serdes_addrs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %ecx
	movq	_NUM_FABRIC_SERDES@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	callq	_set_serdes_broadcast
	movq	_SPICO_FABRIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_turn_off_spicos
	movq	_fw_fabric@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_load_fabric_serdes_firmware
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_retry_firmware
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	callq	_clear_sbus_fast_mode
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_release_chip_resource
	testl	%ebx, %ebx
	jne	LBB0_10
LBB0_5:
	movq	_fw_8051_load@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.6:
	movq	_fw_8051@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_load_8051_firmware
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_retry_firmware
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:
	testl	%ebx, %ebx
	jne	LBB0_10
LBB0_9:
	movq	%r14, %rdi
	callq	_dump_fw_version
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fw_fabric_serdes_load,8,3      ## @fw_fabric_serdes_load
	.comm	_CR_SBUS,4,2                    ## @CR_SBUS
	.comm	_SBUS_TIMEOUT,4,2               ## @SBUS_TIMEOUT
	.comm	_all_fabric_serdes_broadcast,4,2 ## @all_fabric_serdes_broadcast
	.comm	_fabric_serdes_broadcast,8,3    ## @fabric_serdes_broadcast
	.comm	_fabric_serdes_addrs,8,3        ## @fabric_serdes_addrs
	.comm	_NUM_FABRIC_SERDES,4,2          ## @NUM_FABRIC_SERDES
	.comm	_SPICO_FABRIC,4,2               ## @SPICO_FABRIC
	.comm	_fw_fabric,4,2                  ## @fw_fabric
	.comm	_fw_8051_load,8,3               ## @fw_8051_load
	.comm	_fw_8051,4,2                    ## @fw_8051
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_firmware                  ; -- Begin function load_firmware
	.p2align	2
_load_firmware:                         ; @load_firmware
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _fw_fabric_serdes_load@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fw_fabric_serdes_load@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.1:
Lloh3:
	adrp	x22, _CR_SBUS@GOTPAGE
Lloh4:
	ldr	x22, [x22, _CR_SBUS@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _SBUS_TIMEOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SBUS_TIMEOUT@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_acquire_chip_resource
	mov	x20, x0
	cbnz	w0, LBB0_10
; %bb.2:
	mov	x0, x19
	bl	_set_sbus_fast_mode
Lloh8:
	adrp	x8, _all_fabric_serdes_broadcast@GOTPAGE
Lloh9:
	ldr	x8, [x8, _all_fabric_serdes_broadcast@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _fabric_serdes_broadcast@GOTPAGE
Lloh12:
	ldr	x8, [x8, _fabric_serdes_broadcast@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [x19]
	lsl	x9, x9, #2
	ldr	w2, [x8, x9]
Lloh14:
	adrp	x8, _fabric_serdes_addrs@GOTPAGE
Lloh15:
	ldr	x8, [x8, _fabric_serdes_addrs@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	w3, [x8, x9]
Lloh17:
	adrp	x8, _NUM_FABRIC_SERDES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NUM_FABRIC_SERDES@GOTPAGEOFF]
Lloh19:
	ldr	w4, [x8]
	mov	x0, x19
	bl	_set_serdes_broadcast
Lloh20:
	adrp	x8, _SPICO_FABRIC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SPICO_FABRIC@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_turn_off_spicos
Lloh23:
	adrp	x21, _fw_fabric@GOTPAGE
Lloh24:
	ldr	x21, [x21, _fw_fabric@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_load_fabric_serdes_firmware
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_retry_firmware
	cbnz	x0, LBB0_3
; %bb.4:
	mov	x0, x19
	bl	_clear_sbus_fast_mode
	ldr	w1, [x22]
	mov	x0, x19
	bl	_release_chip_resource
	cbnz	w20, LBB0_10
LBB0_5:
Lloh25:
	adrp	x8, _fw_8051_load@GOTPAGE
Lloh26:
	ldr	x8, [x8, _fw_8051_load@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.6:
Lloh28:
	adrp	x21, _fw_8051@GOTPAGE
Lloh29:
	ldr	x21, [x21, _fw_8051@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_load_8051_firmware
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_retry_firmware
	cbnz	x0, LBB0_7
; %bb.8:
	cbnz	w20, LBB0_10
LBB0_9:
	mov	x0, x19
	bl	_dump_fw_version
	mov	w20, #0
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_fw_fabric_serdes_load,8,3      ; @fw_fabric_serdes_load
	.comm	_CR_SBUS,4,2                    ; @CR_SBUS
	.comm	_SBUS_TIMEOUT,4,2               ; @SBUS_TIMEOUT
	.comm	_all_fabric_serdes_broadcast,4,2 ; @all_fabric_serdes_broadcast
	.comm	_fabric_serdes_broadcast,8,3    ; @fabric_serdes_broadcast
	.comm	_fabric_serdes_addrs,8,3        ; @fabric_serdes_addrs
	.comm	_NUM_FABRIC_SERDES,4,2          ; @NUM_FABRIC_SERDES
	.comm	_SPICO_FABRIC,4,2               ; @SPICO_FABRIC
	.comm	_fw_fabric,4,2                  ; @fw_fabric
	.comm	_fw_8051_load,8,3               ; @fw_8051_load
	.comm	_fw_8051,4,2                    ; @fw_8051
.subsections_via_symbols
