	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ql_mb_get_fw_state             ## -- Begin function ql_mb_get_fw_state
	.p2align	4, 0x90
_ql_mb_get_fw_state:                    ## @ql_mb_get_fw_state
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	-48(%rbp), %rbx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movabsq	$8589934593, %rax               ## imm = 0x200000001
	movq	%rax, -48(%rbp)
	movq	_MB_CMD_GET_FW_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-32(%rbp), %rcx
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ql_mailbox_command
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	-40(%rbp), %rax
	movl	(%rax), %ecx
	movq	_MB_CMD_STS_GOOD@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_3
## %bb.2:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	-40(%rbp), %rax
LBB0_3:
	testb	$1, 4(%rax)
	movl	%r15d, %eax
	je	LBB0_5
## %bb.4:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_CMD_GET_FW_STATE,4,2        ## @MB_CMD_GET_FW_STATE
	.comm	_MB_CMD_STS_GOOD,4,2            ## @MB_CMD_STS_GOOD
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed Get Firmware State.\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Firmware waiting for initialization.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ql_mb_get_fw_state
lCPI0_0:
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ql_mb_get_fw_state
	.p2align	2
_ql_mb_get_fw_state:                    ; @ql_mb_get_fw_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #8]
Lloh2:
	adrp	x8, _MB_CMD_GET_FW_STATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MB_CMD_GET_FW_STATE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	x9, [sp, #24]
	str	w8, [x9]
	add	x1, sp, #8
	mov	x0, x19
	bl	_ql_mailbox_command
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x8, [sp, #16]
	ldr	w9, [x8]
Lloh5:
	adrp	x10, _MB_CMD_STS_GOOD@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MB_CMD_STS_GOOD@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	adrp	x21, _drv@GOTPAGE
Lloh9:
	ldr	x21, [x21, _drv@GOTPAGEOFF]
Lloh10:
	adrp	x20, _EIO@GOTPAGE
Lloh11:
	ldr	x20, [x20, _EIO@GOTPAGEOFF]
	cmp	w9, w10
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	ldrb	w8, [x8, #4]
	tbnz	w8, #0, LBB0_4
	b	LBB0_5
LBB0_3:
	ldr	w1, [x21]
	ldr	w2, [x19]
Lloh12:
	adrp	x3, l_.str@PAGE
Lloh13:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	ldr	w8, [x20]
	neg	w0, w8
	ldr	x8, [sp, #16]
	ldrb	w8, [x8, #4]
	tbz	w8, #0, LBB0_5
LBB0_4:
	ldr	w1, [x21]
	ldr	w2, [x19]
Lloh14:
	adrp	x3, l_.str.1@PAGE
Lloh15:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	ldr	w8, [x20]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_CMD_GET_FW_STATE,4,2        ; @MB_CMD_GET_FW_STATE
	.comm	_MB_CMD_STS_GOOD,4,2            ; @MB_CMD_STS_GOOD
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed Get Firmware State.\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Firmware waiting for initialization.\n"

.subsections_via_symbols
