	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ushc_hw_get_caps
_ushc_hw_get_caps:                      ## @ushc_hw_get_caps
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movq	_USHC_GET_CAPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_USHC_GET_CAPS_TYPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$100
	pushq	$4
	pushq	%r15
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, (%r15)
	movq	_USHC_GET_CAPS_VERSION_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	$2, %eax
	je	LBB0_4
## %bb.3:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_4
LBB0_1:
	movl	%eax, %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USHC_GET_CAPS,4,2              ## @USHC_GET_CAPS
	.comm	_USHC_GET_CAPS_TYPE,4,2         ## @USHC_GET_CAPS_TYPE
	.comm	_USHC_GET_CAPS_VERSION_MASK,4,2 ## @USHC_GET_CAPS_VERSION_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"controller version %d is not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ushc_hw_get_caps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ushc_hw_get_caps
_ushc_hw_get_caps:                      ; @ushc_hw_get_caps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #8]
	mov	x0, x20
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh0:
	adrp	x8, _USHC_GET_CAPS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USHC_GET_CAPS@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _USHC_GET_CAPS_TYPE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USHC_GET_CAPS_TYPE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	w8, #100
	str	w8, [sp]
	mov	x0, x20
	mov	w4, #0
	mov	w5, #0
	mov	x6, x19
	mov	w7, #4
	bl	_usb_control_msg
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w0, [x19]
	bl	_le32_to_cpu
	str	w0, [x19]
Lloh6:
	adrp	x8, _USHC_GET_CAPS_VERSION_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USHC_GET_CAPS_VERSION_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w2, w8, w0
	cmp	w2, #2
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	ldr	x0, [x19, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_USHC_GET_CAPS,4,2              ; @USHC_GET_CAPS
	.comm	_USHC_GET_CAPS_TYPE,4,2         ; @USHC_GET_CAPS_TYPE
	.comm	_USHC_GET_CAPS_VERSION_MASK,4,2 ; @USHC_GET_CAPS_VERSION_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"controller version %d is not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ushc_hw_get_caps
.subsections_via_symbols
