	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_flash
_set_flash:                             ## @set_flash
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_netdev2adap
	movq	%rax, %r12
	movq	_PCIE_FW_MASTER_M@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_PCIE_FW_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_t4_read_reg
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_PCIE_FW_MASTER_G
	movq	_PCIE_FW_MASTER_VLD_F@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_3
## %bb.1:
	cmpl	(%r12), %eax
	jne	LBB0_2
LBB0_3:
	movq	(%r14), %rax
	movb	$0, 7(%rax)
	movq	(%r14), %rsi
	movl	12(%r12), %edx
	leaq	-40(%rbp), %rdi
	callq	_request_firmware
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_CXGB4_FULL_INIT_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_6
## %bb.7:
	movl	8(%r12), %r15d
	jmp	LBB0_8
LBB0_2:
	movl	12(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_6:
	incl	%r15d
LBB0_8:
	movq	-40(%rbp), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %edx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	$1, %r8d
	callq	_t4_fw_upgrade
	movl	%eax, %ebx
	movq	-40(%rbp), %rdi
	callq	_release_firmware
	testl	%ebx, %ebx
	jne	LBB0_10
## %bb.9:
	movl	12(%r12), %edi
	movq	(%r14), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIE_FW_MASTER_M,4,2           ## @PCIE_FW_MASTER_M
	.comm	_PCIE_FW_A,4,2                  ## @PCIE_FW_A
	.comm	_PCIE_FW_MASTER_VLD_F,4,2       ## @PCIE_FW_MASTER_VLD_F
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cxgb4 driver needs to be loaded as MASTER to support FW flash\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_CXGB4_FULL_INIT_DONE,4,2       ## @CXGB4_FULL_INIT_DONE
L_.str.1:                               ## @.str.1
	.asciz	"loaded firmware %s, reload cxgb4 driver\n"

	.no_dead_strip	_set_flash
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_flash
_set_flash:                             ; @set_flash
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	bl	_netdev2adap
	mov	x20, x0
Lloh0:
	adrp	x8, _PCIE_FW_MASTER_M@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIE_FW_MASTER_M@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _PCIE_FW_A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCIE_FW_A@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_t4_read_reg
	mov	x21, x0
	bl	_PCIE_FW_MASTER_G
Lloh6:
	adrp	x8, _PCIE_FW_MASTER_VLD_F@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCIE_FW_MASTER_VLD_F@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_5
LBB0_2:
	ldr	x8, [x19]
	strb	wzr, [x8, #7]
	ldr	x1, [x19]
	ldr	w2, [x20, #12]
	add	x0, sp, #8
	bl	_request_firmware
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w8, [x20, #4]
Lloh9:
	adrp	x9, _CXGB4_FULL_INIT_DONE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CXGB4_FULL_INIT_DONE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	ldr	w1, [x20, #8]
	b	LBB0_8
LBB0_5:
	ldr	w0, [x20, #12]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
Lloh14:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_6:
	mov	x21, x0
	b	LBB0_10
LBB0_7:
	add	w1, w22, #1
LBB0_8:
	ldr	x8, [sp, #8]
	ldp	w3, w2, [x8]
	mov	x0, x20
	mov	w4, #1
	bl	_t4_fw_upgrade
	mov	x21, x0
	ldr	x0, [sp, #8]
	bl	_release_firmware
	cbnz	w21, LBB0_10
; %bb.9:
	ldr	w0, [x20, #12]
	ldr	x2, [x19]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIE_FW_MASTER_M,4,2           ; @PCIE_FW_MASTER_M
	.comm	_PCIE_FW_A,4,2                  ; @PCIE_FW_A
	.comm	_PCIE_FW_MASTER_VLD_F,4,2       ; @PCIE_FW_MASTER_VLD_F
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cxgb4 driver needs to be loaded as MASTER to support FW flash\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_CXGB4_FULL_INIT_DONE,4,2       ; @CXGB4_FULL_INIT_DONE
l_.str.1:                               ; @.str.1
	.asciz	"loaded firmware %s, reload cxgb4 driver\n"

	.no_dead_strip	_set_flash
.subsections_via_symbols
