	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_usb_dl_cmd
_brcmf_usb_dl_cmd:                      ## @brcmf_usb_dl_cmd
	.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
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r13
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.4:
	movl	%ecx, %r12d
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, -44(%rbp)
	movq	8(%r13), %rax
	movl	%r12d, (%rax)
	leaq	-44(%rbp), %rdi
	callq	_cpu_to_le16p
	movl	%eax, 24(%r13)
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rax
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	16(%r13), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_USB_RECIP_INTERFACE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 16(%r13)
	movl	%r14d, 20(%r13)
	movq	8(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movl	28(%r13), %r14d
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movl	-44(%rbp), %r9d
	movq	_brcmf_usb_sync_complete@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, %r8
	pushq	%r13
	pushq	%rbx
	callq	_usb_fill_control_urb
	addq	$16, %rsp
	movl	$0, (%r13)
	movq	8(%r13), %rdi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_submit_urb
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	%r13, %rdi
	callq	_brcmf_usb_ioctl_resp_wait
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	jmp	LBB0_11
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_brcmf_err
	jmp	LBB0_11
LBB0_9:
	movq	8(%r13), %rdi
	callq	_usb_kill_urb
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
LBB0_12:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_INTERFACE,4,2        ## @USB_RECIP_INTERFACE
	.comm	_brcmf_usb_sync_complete,8,3    ## @brcmf_usb_sync_complete
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usb_submit_urb failed %d\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_brcmf_usb_dl_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_usb_dl_cmd
_brcmf_usb_dl_cmd:                      ; @brcmf_usb_dl_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x22, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
Lloh0:
	adrp	x26, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x26, [x26, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x3
	bl	_kmalloc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x19, x0
	str	w20, [sp, #12]
	ldr	x8, [x22, #8]
	str	w20, [x8]
	add	x0, sp, #12
	bl	_cpu_to_le16p
Lloh2:
	adrp	x8, _USB_DIR_IN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USB_DIR_IN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _USB_RECIP_INTERFACE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _USB_RECIP_INTERFACE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
	mov	x24, x22
	str	w8, [x24, #16]!
	stp	w23, w0, [x22, #20]
	ldr	x23, [x22, #8]
	ldr	w25, [x22, #28]
	mov	x0, x25
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x2, x0
	ldr	w5, [sp, #12]
Lloh11:
	adrp	x8, _brcmf_usb_sync_complete@GOTPAGE
Lloh12:
	ldr	x8, [x8, _brcmf_usb_sync_complete@GOTPAGEOFF]
Lloh13:
	ldr	w6, [x8]
	mov	x0, x23
	mov	x1, x25
	mov	x3, x24
	mov	x4, x19
	mov	x7, x22
	bl	_usb_fill_control_urb
	str	wzr, [x22]
	ldr	x0, [x22, #8]
	ldr	w1, [x26]
	bl	_usb_submit_urb
	mov	x23, x0
	tbnz	w0, #31, LBB0_9
; %bb.4:
	mov	x0, x22
	bl	_brcmf_usb_ioctl_resp_wait
	cbz	w0, LBB0_10
; %bb.5:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_memcpy
	b	LBB0_11
LBB0_6:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_12
LBB0_8:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_9:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_brcmf_err
	b	LBB0_11
LBB0_10:
	ldr	x0, [x22, #8]
	bl	_usb_kill_urb
Lloh20:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_11:
	mov	x0, x19
	bl	_kfree
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_INTERFACE,4,2        ; @USB_RECIP_INTERFACE
	.comm	_brcmf_usb_sync_complete,8,3    ; @brcmf_usb_sync_complete
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usb_submit_urb failed %d\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_brcmf_usb_dl_cmd
.subsections_via_symbols
