	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_usb_hif_diag_read
_ath10k_usb_hif_diag_read:              ## @ath10k_usb_hif_diag_read
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movl	%esi, %r13d
	movq	%rdi, %r12
	callq	_ath10k_usb_priv
	cmpq	$3, %rbx
	ja	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_3:
	movq	%rax, %r15
	movq	8(%rax), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_ATH10K_USB_CTRL_DIAG_CC_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	%r13d, %edi
	callq	_cpu_to_le32
	movl	%eax, (%rbx)
	movl	$4, -44(%rbp)
	movq	_ATH10K_USB_CONTROL_REQ_DIAG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ATH10K_USB_CONTROL_REQ_DIAG_RESP@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	(%r15), %r9d
	leaq	-44(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movl	$8, %ecx
	callq	_ath10k_usb_ctrl_msg_exchange
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	cmpl	$4, -44(%rbp)
	jne	LBB0_5
## %bb.6:
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_memcpy
	xorl	%eax, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATH10K_USB_CTRL_DIAG_CC_READ,4,2 ## @ATH10K_USB_CTRL_DIAG_CC_READ
	.comm	_ATH10K_USB_CONTROL_REQ_DIAG_CMD,4,2 ## @ATH10K_USB_CONTROL_REQ_DIAG_CMD
	.comm	_ATH10K_USB_CONTROL_REQ_DIAG_RESP,4,2 ## @ATH10K_USB_CONTROL_REQ_DIAG_RESP
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.no_dead_strip	_ath10k_usb_hif_diag_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_usb_hif_diag_read
_ath10k_usb_hif_diag_read:              ; @ath10k_usb_hif_diag_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x23, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	bl	_ath10k_usb_priv
	cmp	x23, #3
	b.hi	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_3:
	mov	x20, x0
	ldr	x23, [x0, #8]
	mov	x0, x23
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh2:
	adrp	x8, _ATH10K_USB_CTRL_DIAG_CC_READ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATH10K_USB_CTRL_DIAG_CC_READ@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x23, #4]
	mov	x0, x22
	bl	_cpu_to_le32
	str	w0, [x23]
	mov	w8, #4
Lloh5:
	adrp	x9, _ATH10K_USB_CONTROL_REQ_DIAG_CMD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ATH10K_USB_CONTROL_REQ_DIAG_CMD@GOTPAGEOFF]
	str	w8, [sp, #12]
Lloh7:
	ldr	w1, [x9]
Lloh8:
	adrp	x8, _ATH10K_USB_CONTROL_REQ_DIAG_RESP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATH10K_USB_CONTROL_REQ_DIAG_RESP@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
	ldr	w5, [x20]
	add	x6, sp, #12
	mov	x0, x21
	mov	x2, x23
	mov	w3, #8
	bl	_ath10k_usb_ctrl_msg_exchange
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	w8, [sp, #12]
	cmp	w8, #4
	b.ne	LBB0_7
; %bb.5:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #4
	bl	_memcpy
	mov	w0, #0
LBB0_6:
	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
	add	sp, sp, #80
	ret
LBB0_7:
Lloh11:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATH10K_USB_CTRL_DIAG_CC_READ,4,2 ; @ATH10K_USB_CTRL_DIAG_CC_READ
	.comm	_ATH10K_USB_CONTROL_REQ_DIAG_CMD,4,2 ; @ATH10K_USB_CONTROL_REQ_DIAG_CMD
	.comm	_ATH10K_USB_CONTROL_REQ_DIAG_RESP,4,2 ; @ATH10K_USB_CONTROL_REQ_DIAG_RESP
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.no_dead_strip	_ath10k_usb_hif_diag_read
.subsections_via_symbols
