	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uclogic_params_get_str_desc
_uclogic_params_get_str_desc:           ## @uclogic_params_get_str_desc
	.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, %r14
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_hid_to_usb_dev
	testq	%r13, %r13
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movq	_USB_REQ_GET_DESCRIPTOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_USB_DT_STRING@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	shll	$8, %esi
	movslq	%esi, %r8
	addq	-48(%rbp), %r8                  ## 8-byte Folded Reload
	movq	_USB_CTRL_GET_TIMEOUT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r10d
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$1033, %r9d                     ## imm = 0x409
	pushq	%r10
	pushq	%r14
	pushq	%r15
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	movq	_EPIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_hid_dbg
	jmp	LBB0_11
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movq	%r15, %rdi
	callq	_kfree
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	testl	%ebx, %ebx
	js	LBB0_8
## %bb.9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r15, (%rax)
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%ebx, %ecx
	callq	_hid_err
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_USB_REQ_GET_DESCRIPTOR,4,2     ## @USB_REQ_GET_DESCRIPTOR
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_USB_DT_STRING,4,2              ## @USB_DT_STRING
	.comm	_USB_CTRL_GET_TIMEOUT,4,2       ## @USB_CTRL_GET_TIMEOUT
	.comm	_EPIPE,4,2                      ## @EPIPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"string descriptor #%hhu not found\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed retrieving string descriptor #%hhu: %d\n"

	.no_dead_strip	_uclogic_params_get_str_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uclogic_params_get_str_desc
_uclogic_params_get_str_desc:           ; @uclogic_params_get_str_desc
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	x0, x1
	bl	_hid_to_usb_dev
	cbz	x21, LBB0_4
; %bb.1:
	mov	x24, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_kmalloc
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x24
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh3:
	adrp	x8, _USB_REQ_GET_DESCRIPTOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_REQ_GET_DESCRIPTOR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _USB_DIR_IN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USB_DIR_IN@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x8, _USB_DT_STRING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _USB_DT_STRING@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	w8, w8, #8
	add	x4, x20, w8, sxtw
Lloh12:
	adrp	x8, _USB_CTRL_GET_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _USB_CTRL_GET_TIMEOUT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x24
	mov	w5, #1033
	mov	x6, x19
	mov	x7, x23
	bl	_usb_control_msg
	mov	x23, x0
Lloh15:
	adrp	x8, _EPIPE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EPIPE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_8
; %bb.3:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_hid_dbg
	b	LBB0_7
LBB0_4:
	mov	x19, #0
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_7:
	mov	x0, x19
	bl	_kfree
	mov	x0, x23
	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_8:
	tbnz	w23, #31, LBB0_11
; %bb.9:
	cbz	x22, LBB0_7
; %bb.10:
	str	x19, [x22]
	mov	x19, #0
	b	LBB0_7
LBB0_11:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	mov	x3, x23
	bl	_hid_err
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_USB_REQ_GET_DESCRIPTOR,4,2     ; @USB_REQ_GET_DESCRIPTOR
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_USB_DT_STRING,4,2              ; @USB_DT_STRING
	.comm	_USB_CTRL_GET_TIMEOUT,4,2       ; @USB_CTRL_GET_TIMEOUT
	.comm	_EPIPE,4,2                      ; @EPIPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"string descriptor #%hhu not found\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed retrieving string descriptor #%hhu: %d\n"

	.no_dead_strip	_uclogic_params_get_str_desc
.subsections_via_symbols
