	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_usb_tx_ctlpkt
_brcmf_usb_tx_ctlpkt:                   ## @brcmf_usb_tx_ctlpkt
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r13
	callq	_brcmf_usb_get_businfo
	movq	%rax, %r12
	movq	_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_brcmf_dbg
	movq	8(%r12), %rax
	movq	_BRCMFMAC_USB_STATE_UP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	leaq	4(%r12), %r15
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_3
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_8:
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$0, (%r12)
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_brcmf_usb_send_ctl
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_brcmf_err
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	_clear_bit
	jmp	LBB0_9
LBB0_5:
	movq	%r12, %rdi
	callq	_brcmf_usb_ioctl_resp_wait
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	_clear_bit
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_brcmf_err
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_USB,4,2                        ## @USB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter\n"

	.comm	_BRCMFMAC_USB_STATE_UP,8,3      ## @BRCMFMAC_USB_STATE_UP
	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"fail %d bytes: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Txctl wait timed out\n"

	.no_dead_strip	_brcmf_usb_tx_ctlpkt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_usb_tx_ctlpkt
_brcmf_usb_tx_ctlpkt:                   ; @brcmf_usb_tx_ctlpkt
	.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, x2
	mov	x22, x1
	bl	_brcmf_usb_get_businfo
	mov	x21, x0
Lloh0:
	adrp	x8, _USB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USB@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	ldr	x8, [x21, #8]
Lloh5:
	adrp	x9, _BRCMFMAC_USB_STATE_UP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BRCMFMAC_USB_STATE_UP@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	add	x20, x21, #4
	mov	w0, #0
	mov	x1, x20
	bl	_test_and_set_bit
	cbz	x0, LBB0_4
LBB0_2:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_3:
	mov	x0, x22
	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
LBB0_4:
	str	wzr, [x21]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_brcmf_usb_send_ctl
	mov	x22, x0
	cbz	w0, LBB0_6
; %bb.5:
	stp	x22, x19, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_brcmf_err
	mov	w0, #0
	mov	x1, x20
	bl	_clear_bit
	b	LBB0_3
LBB0_6:
	mov	x0, x21
	bl	_brcmf_usb_ioctl_resp_wait
	mov	x19, x0
	mov	w0, #0
	mov	x1, x20
	bl	_clear_bit
	cbnz	w19, LBB0_3
; %bb.7:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_brcmf_err
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_USB,4,2                        ; @USB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter\n"

	.comm	_BRCMFMAC_USB_STATE_UP,8,3      ; @BRCMFMAC_USB_STATE_UP
	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"fail %d bytes: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Txctl wait timed out\n"

	.no_dead_strip	_brcmf_usb_tx_ctlpkt
.subsections_via_symbols
