	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_usb_diag_read32
_ath6kl_usb_diag_read32:                ## @ath6kl_usb_diag_read32
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	(%rdi), %r15
	movq	8(%r15), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_ATH6KL_USB_CTRL_DIAG_CC_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	%r12d, %edi
	callq	_cpu_to_le32
	movl	%eax, (%rbx)
	movl	$4, -36(%rbp)
	movq	_ATH6KL_USB_CONTROL_REQ_DIAG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ATH6KL_USB_CONTROL_REQ_DIAG_RESP@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	(%r15), %r9
	leaq	-36(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r15, %rdi
	movq	%rbx, %rdx
	movl	$4, %ecx
	callq	_ath6kl_usb_ctrl_msg_exchange
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_ath6kl_warn
	jmp	LBB0_3
LBB0_2:
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	movl	%eax, (%r14)
LBB0_3:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH6KL_USB_CTRL_DIAG_CC_READ,4,2 ## @ATH6KL_USB_CTRL_DIAG_CC_READ
	.comm	_ATH6KL_USB_CONTROL_REQ_DIAG_CMD,4,2 ## @ATH6KL_USB_CONTROL_REQ_DIAG_CMD
	.comm	_ATH6KL_USB_CONTROL_REQ_DIAG_RESP,4,2 ## @ATH6KL_USB_CONTROL_REQ_DIAG_RESP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"diag read32 failed: %d\n"

	.no_dead_strip	_ath6kl_usb_diag_read32
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_usb_diag_read32
_ath6kl_usb_diag_read32:                ; @ath6kl_usb_diag_read32
	.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	x21, x1
	ldr	x20, [x0]
	ldr	x22, [x20, #8]
	mov	x0, x22
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x8, _ATH6KL_USB_CTRL_DIAG_CC_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH6KL_USB_CTRL_DIAG_CC_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x22, #4]
	mov	x0, x21
	bl	_cpu_to_le32
	str	w0, [x22]
	mov	w8, #4
Lloh3:
	adrp	x9, _ATH6KL_USB_CONTROL_REQ_DIAG_CMD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATH6KL_USB_CONTROL_REQ_DIAG_CMD@GOTPAGEOFF]
	str	w8, [sp, #12]
Lloh5:
	ldr	w1, [x9]
Lloh6:
	adrp	x8, _ATH6KL_USB_CONTROL_REQ_DIAG_RESP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATH6KL_USB_CONTROL_REQ_DIAG_RESP@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	ldr	x5, [x20]
	add	x6, sp, #12
	mov	x0, x20
	mov	x2, x22
	mov	w3, #4
	bl	_ath6kl_usb_ctrl_msg_exchange
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_ath6kl_warn
	b	LBB0_3
LBB0_2:
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	str	w0, [x19]
LBB0_3:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH6KL_USB_CTRL_DIAG_CC_READ,4,2 ; @ATH6KL_USB_CTRL_DIAG_CC_READ
	.comm	_ATH6KL_USB_CONTROL_REQ_DIAG_CMD,4,2 ; @ATH6KL_USB_CONTROL_REQ_DIAG_CMD
	.comm	_ATH6KL_USB_CONTROL_REQ_DIAG_RESP,4,2 ; @ATH6KL_USB_CONTROL_REQ_DIAG_RESP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"diag read32 failed: %d\n"

	.no_dead_strip	_ath6kl_usb_diag_read32
.subsections_via_symbols
