	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function k90_store_current_profile
_k90_store_current_profile:             ## @k90_store_current_profile
	.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	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rdi, %r12
	movl	(%rdi), %edi
	callq	_to_usb_interface
	movq	%rax, %rdi
	callq	_interface_to_usbdev
	movq	%rax, %r15
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtoint
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movl	-36(%rbp), %eax
	addl	$-4, %eax
	cmpl	$-4, %eax
	ja	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rdx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_K90_REQUEST_PROFILE@GOTPCREL(%rip), %rdx
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movl	(%rdx), %edx
	movl	-36(%rbp), %r8d
	movq	_USB_CTRL_SET_TIMEOUT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ebx
	subq	$8, %rsp
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	$0
	pushq	$0
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_dev_warn
	jmp	LBB0_6
LBB0_5:
	movl	%r14d, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_K90_REQUEST_PROFILE,4,2        ## @K90_REQUEST_PROFILE
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.comm	_USB_CTRL_SET_TIMEOUT,4,2       ## @USB_CTRL_SET_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to change current profile (error %d).\n"

	.no_dead_strip	_k90_store_current_profile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function k90_store_current_profile
_k90_store_current_profile:             ; @k90_store_current_profile
	.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	x20, x3
	mov	x22, x2
	mov	x19, x0
	ldr	w0, [x0]
	bl	_to_usb_interface
	bl	_interface_to_usbdev
	mov	x21, x0
	add	x2, sp, #12
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtoint
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w8, [sp, #12]
	sub	w8, w8, #4
	cmn	w8, #4
	b.hi	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
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
LBB0_4:
	mov	x0, x21
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh3:
	adrp	x8, _K90_REQUEST_PROFILE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _K90_REQUEST_PROFILE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _USB_DIR_OUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USB_DIR_OUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w3, w8, w9
	ldr	w4, [sp, #12]
Lloh15:
	adrp	x8, _USB_CTRL_SET_TIMEOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _USB_CTRL_SET_TIMEOUT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x21
	mov	w5, #0
	mov	x6, #0
	mov	w7, #0
	bl	_usb_control_msg
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_warn
	b	LBB0_3
LBB0_6:
	mov	x21, x20
	b	LBB0_3
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_K90_REQUEST_PROFILE,4,2        ; @K90_REQUEST_PROFILE
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.comm	_USB_CTRL_SET_TIMEOUT,4,2       ; @USB_CTRL_SET_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to change current profile (error %d).\n"

	.no_dead_strip	_k90_store_current_profile
.subsections_via_symbols
