	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_proto_bcdc_query_dcmd
_brcmf_proto_bcdc_query_dcmd:           ## @brcmf_proto_bcdc_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, %r12
	movl	%r8d, %r14d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	_BCDC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r8d, %ecx
	callq	_brcmf_dbg
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	$0, (%r12)
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	callq	_brcmf_proto_bcdc_msg
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	(%r15), %esi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_brcmf_proto_bcdc_cmplt
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	20(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	movq	_BCDC_DCMD_ID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	%r14d, %r13d
	movq	_BCDC_DCMD_ID_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	sarl	%cl, %r13d
	movl	(%r15), %esi
	cmpl	%esi, %r13d
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	movq	_RETRIES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jl	LBB0_2
LBB0_5:
	cmpl	%esi, %r13d
	jne	LBB0_6
## %bb.7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	movq	8(%r15), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, %ebx
	cmovll	%ebx, %edx
	callq	_memcpy
LBB0_9:
	movq	_BCDC_DCMD_ERROR@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	testl	%r14d, (%rax)
	je	LBB0_11
## %bb.10:
	movl	16(%r15), %edi
	callq	_le32_to_cpu
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_11
LBB0_12:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_bphy_err
	jmp	LBB0_11
LBB0_6:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_brcmf_get_ifp
	movl	%eax, %edi
	callq	_brcmf_ifname
	movl	(%r15), %r8d
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%eax, %edx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_bphy_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCDC,4,2                       ## @BCDC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter, cmd %d len %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"brcmf_proto_bcdc_msg failed w/status %d\n"

	.comm	_BCDC_DCMD_ID_MASK,4,2          ## @BCDC_DCMD_ID_MASK
	.comm	_BCDC_DCMD_ID_SHIFT,4,2         ## @BCDC_DCMD_ID_SHIFT
	.comm	_RETRIES,4,2                    ## @RETRIES
L_.str.2:                               ## @.str.2
	.asciz	"%s: unexpected request id %d (expected %d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BCDC_DCMD_ERROR,4,2            ## @BCDC_DCMD_ERROR
	.no_dead_strip	_brcmf_proto_bcdc_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_proto_bcdc_query_dcmd
_brcmf_proto_bcdc_query_dcmd:           ; @brcmf_proto_bcdc_query_dcmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x5
	mov	x22, x4
	mov	x21, x3
	mov	x24, x2
	mov	x23, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x26, [x8]
Lloh0:
	adrp	x8, _BCDC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BCDC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x4
	bl	_brcmf_dbg
	str	wzr, [x19]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x24
	mov	x3, x21
	mov	x4, x22
	mov	w5, #0
	bl	_brcmf_proto_bcdc_msg
	tbnz	w0, #31, LBB0_10
; %bb.1:
	str	w23, [sp, #36]                  ; 4-byte Folded Spill
	str	x21, [sp, #40]                  ; 8-byte Folded Spill
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
	mov	w27, #0
	ldr	w1, [x26]
Lloh5:
	adrp	x28, _BCDC_DCMD_ID_MASK@GOTPAGE
Lloh6:
	ldr	x28, [x28, _BCDC_DCMD_ID_MASK@GOTPAGEOFF]
Lloh7:
	adrp	x19, _BCDC_DCMD_ID_SHIFT@GOTPAGE
Lloh8:
	ldr	x19, [x19, _BCDC_DCMD_ID_SHIFT@GOTPAGEOFF]
Lloh9:
	adrp	x21, _RETRIES@GOTPAGE
Lloh10:
	ldr	x21, [x21, _RETRIES@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x2, x22
	bl	_brcmf_proto_bcdc_cmplt
	mov	x24, x0
	tbnz	w0, #31, LBB0_13
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26, #20]
	bl	_le32_to_cpu
	mov	x25, x0
	ldr	w8, [x28]
	and	w8, w8, w0
	ldr	w9, [x19]
	asr	w23, w8, w9
	ldr	w1, [x26]
	cmp	w23, w1
	b.ge	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w27, w27, #1
	ldr	w8, [x21]
	cmp	w27, w8
	b.lt	LBB0_2
LBB0_5:
	cmp	w23, w1
	b.ne	LBB0_11
; %bb.6:
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x1, [x26, #8]
	cmp	w24, w22
	csel	w2, w24, w22, lt
	bl	_memcpy
LBB0_8:
Lloh11:
	adrp	x8, _BCDC_DCMD_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BCDC_DCMD_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w25
	b.eq	LBB0_12
; %bb.9:
	ldr	w0, [x26, #16]
	bl	_le32_to_cpu
	mov	w24, #0
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	w0, [x8]
	b	LBB0_13
LBB0_10:
	mov	x24, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x24
	bl	_bphy_err
	b	LBB0_13
LBB0_11:
	mov	x0, x20
	ldr	w1, [sp, #36]                   ; 4-byte Folded Reload
	bl	_brcmf_get_ifp
	bl	_brcmf_ifname
	mov	x2, x0
	ldr	w8, [x26]
	stp	x23, x8, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_bphy_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_13
LBB0_12:
	mov	w24, #0
LBB0_13:
	mov	x0, x24
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BCDC,4,2                       ; @BCDC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter, cmd %d len %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"brcmf_proto_bcdc_msg failed w/status %d\n"

	.comm	_BCDC_DCMD_ID_MASK,4,2          ; @BCDC_DCMD_ID_MASK
	.comm	_BCDC_DCMD_ID_SHIFT,4,2         ; @BCDC_DCMD_ID_SHIFT
	.comm	_RETRIES,4,2                    ; @RETRIES
l_.str.2:                               ; @.str.2
	.asciz	"%s: unexpected request id %d (expected %d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BCDC_DCMD_ERROR,4,2            ; @BCDC_DCMD_ERROR
	.no_dead_strip	_brcmf_proto_bcdc_query_dcmd
.subsections_via_symbols
