	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_msgbuf_query_dcmd
_brcmf_msgbuf_query_dcmd:               ## @brcmf_msgbuf_query_dcmd
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	_MSGBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	movq	%r14, %rcx
	callq	_brcmf_dbg
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	$0, (%rbx)
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	$0, (%r15)
	movq	%r13, %r15
	movq	%r13, %rdi
	movl	%r12d, %esi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %r8
	callq	_brcmf_msgbuf_tx_ioctl
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_brcmf_msgbuf_ioctl_resp_wait
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	32(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	20(%r12), %edx
	movl	24(%r12), %esi
	callq	_brcmf_msgbuf_get_pktid
	movq	%rax, %rbx
	movq	8(%r12), %rax
	testq	%rax, %rax
	movq	%r13, %r15
	je	LBB0_8
## %bb.4:
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.7:
	movl	(%rbx), %esi
	cmpq	%r14, %rax
	cmovlq	%rax, %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_memcpy
LBB0_8:
	movq	%rbx, %rdi
	callq	_brcmu_pkt_buf_free_skb
	movl	16(%r12), %eax
	movl	%eax, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_bphy_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_5:
	movq	_EBADF@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSGBUF,4,2                     ## @MSGBUF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ifidx=%d, cmd=%d, len=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Timeout on response for query command\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_EBADF,4,2                      ## @EBADF
	.no_dead_strip	_brcmf_msgbuf_query_dcmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_msgbuf_query_dcmd
_brcmf_msgbuf_query_dcmd:               ; @brcmf_msgbuf_query_dcmd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x5
	mov	x22, x4
	mov	x21, x3
	mov	x24, x2
	mov	x25, x1
	mov	x23, x0
	ldr	x8, [x0]
	ldr	x20, [x8]
Lloh0:
	adrp	x8, _MSGBUF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSGBUF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	mov	x3, x24
	bl	_brcmf_dbg
	str	wzr, [x19]
	str	wzr, [x20]
	mov	x0, x23
	mov	x1, x25
	mov	x2, x24
	mov	x3, x21
	mov	x4, x22
	bl	_brcmf_msgbuf_tx_ioctl
	cbnz	w0, LBB0_9
; %bb.1:
	mov	x0, x20
	bl	_brcmf_msgbuf_ioctl_resp_wait
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldp	w2, w1, [x20, #20]
	bl	_brcmf_msgbuf_get_pktid
	mov	x23, x0
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.3:
	cbz	x23, LBB0_7
; %bb.4:
	ldr	w1, [x23]
	cmp	x8, x22
	csel	x2, x8, x22, lt
	mov	x0, x21
	bl	_memcpy
LBB0_5:
	mov	x0, x23
	bl	_brcmu_pkt_buf_free_skb
	mov	w0, #0
	ldr	w8, [x20, #16]
	str	w8, [x19]
	b	LBB0_9
LBB0_6:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_bphy_err
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x8, _EBADF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MSGBUF,4,2                     ; @MSGBUF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ifidx=%d, cmd=%d, len=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Timeout on response for query command\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_EBADF,4,2                      ; @EBADF
	.no_dead_strip	_brcmf_msgbuf_query_dcmd
.subsections_via_symbols
