	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lg4ff_alternate_modes_store
_lg4ff_alternate_modes_store:           ## @lg4ff_alternate_modes_store
	.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	$40, %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, %rbx
	callq	_to_hid_device
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_hid_get_drvdata
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	callq	_kasprintf
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_strlen
	movslq	%eax, %rcx
	cmpb	$10, -1(%rcx,%r12)
	jne	LBB0_15
## %bb.4:
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.5:
	movq	%r12, %rdi
	callq	_kfree
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_6:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
LBB0_8:
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_hid_err
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%r14d, %r14d
LBB0_12:
	subq	(%rax), %r14
LBB0_13:
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movb	$0, -1(%r12,%rcx)
LBB0_15:
	movq	_LG4FF_MODE_MAX_IDX@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_24
## %bb.16:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	$8, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	movq	_LG4FF_MODE_MAX_IDX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$24, %r15
	cmpq	%rax, %rbx
	jge	LBB0_22
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	_lg4ff_alternate_modes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-8(%rax,%r15), %r12
	movq	(%rax,%r15), %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r13d
	movl	%ebx, %edi
	callq	_BIT
	testl	%r13d, %eax
	je	LBB0_17
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_17
## %bb.20:
	testq	%r12, %r12
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_34
## %bb.21:
	movq	%r12, %r13
	jmp	LBB0_23
LBB0_22:
	xorl	%r13d, %r13d
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_23:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_24:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
LBB0_25:
	movq	_LG4FF_MODE_MAX_IDX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_27
## %bb.26:
	leaq	L_.str.3(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_hid_info
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_9
LBB0_27:
	movq	%r12, %rdi
	callq	_kfree
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	cmpq	%rax, %r13
	je	LBB0_13
## %bb.28:
	movq	_USB_DEVICE_ID_LOGITECH_WHEEL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r13
	jne	LBB0_31
## %bb.29:
	movq	_lg4ff_no_autoswitch@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_31
## %bb.30:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movslq	24(%rax), %rdx
	leaq	L_.str.4(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_hid_info
	jmp	LBB0_9
LBB0_31:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rdi
	movq	_USB_DEVICE_ID_LOGITECH_DFP_WHEEL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdi
	sete	%cl
	movq	_USB_DEVICE_ID_LOGITECH_G25_WHEEL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rdi
	sete	%dl
	orb	%cl, %dl
	cmpb	$1, %dl
	jne	LBB0_35
## %bb.32:
	cmpq	%r13, %rax
	jle	LBB0_35
## %bb.33:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movslq	24(%rax), %rdx
	movq	_lg4ff_alternate_modes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %ecx
	leaq	L_.str.5(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_hid_info
	jmp	LBB0_9
LBB0_34:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r13
	jmp	LBB0_23
LBB0_35:
	movq	%r13, %rsi
	callq	_lg4ff_get_mode_switch_command
	testq	%rax, %rax
	je	LBB0_37
## %bb.36:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_lg4ff_switch_compatibility_mode
	testl	%eax, %eax
	cltq
	cmovneq	%rax, %r14
	jmp	LBB0_13
LBB0_37:
	leaq	L_.str.6(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_hid_err
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Private driver data not found!\n"

	.comm	_EINVAL,8,3                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Device properties not found!\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"%s"

	.comm	_ENOMEM,8,3                     ## @ENOMEM
	.comm	_LG4FF_MODE_MAX_IDX,4,2         ## @LG4FF_MODE_MAX_IDX
	.comm	_lg4ff_alternate_modes,8,3      ## @lg4ff_alternate_modes
L_.str.3:                               ## @.str.3
	.asciz	"Requested mode \"%s\" is not supported by the device\n"

	.comm	_USB_DEVICE_ID_LOGITECH_WHEEL,8,3 ## @USB_DEVICE_ID_LOGITECH_WHEEL
	.comm	_lg4ff_no_autoswitch,4,2        ## @lg4ff_no_autoswitch
L_.str.4:                               ## @.str.4
	.asciz	"\"%s\" cannot be switched to \"DF-EX\" mode. Load the \"hid_logitech\" module with \"lg4ff_no_autoswitch=1\" parameter set and try again\n"

	.comm	_USB_DEVICE_ID_LOGITECH_DFP_WHEEL,8,3 ## @USB_DEVICE_ID_LOGITECH_DFP_WHEEL
	.comm	_USB_DEVICE_ID_LOGITECH_G25_WHEEL,8,3 ## @USB_DEVICE_ID_LOGITECH_G25_WHEEL
L_.str.5:                               ## @.str.5
	.asciz	"\"%s\" cannot be switched back into \"%s\" mode\n"

L_.str.6:                               ## @.str.6
	.asciz	"Invalid target product ID %X\n"

	.no_dead_strip	_lg4ff_alternate_modes_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lg4ff_alternate_modes_store
_lg4ff_alternate_modes_store:           ; @lg4ff_alternate_modes_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x21, x2
	bl	_to_hid_device
	mov	x20, x0
	bl	_hid_get_drvdata
	cbz	x0, LBB0_13
; %bb.1:
	ldr	x25, [x0]
	cbz	x25, LBB0_14
; %bb.2:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_kasprintf
	cbz	x0, LBB0_19
; %bb.3:
	mov	x21, x0
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	sub	x8, x8, #1
	ldrb	w9, [x21, x8]
	cmp	w9, #10
	b.ne	LBB0_6
; %bb.4:
	cmp	w0, #1
	b.eq	LBB0_24
; %bb.5:
	strb	wzr, [x21, x8]
LBB0_6:
Lloh5:
	adrp	x26, _LG4FF_MODE_MAX_IDX@GOTPAGE
Lloh6:
	ldr	x26, [x26, _LG4FF_MODE_MAX_IDX@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.7:
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	mov	x27, #0
	mov	x22, #0
Lloh7:
	adrp	x28, _lg4ff_alternate_modes@GOTPAGE
Lloh8:
	ldr	x28, [x28, _lg4ff_alternate_modes@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x26]
	add	x27, x27, #24
	cmp	x22, x8
	b.ge	LBB0_20
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x28]
	add	x8, x8, x27
	ldp	x23, x24, [x8]
	ldr	w19, [x25]
	mov	x0, x22
	bl	_BIT
	tst	w0, w19
	b.eq	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x24
	mov	x1, x21
	bl	_strcmp
	cbnz	w0, LBB0_8
; %bb.11:
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	cbnz	x23, LBB0_22
; %bb.12:
	ldr	x23, [x25, #8]
	b	LBB0_22
LBB0_13:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_15:
	mov	x0, x20
	bl	_hid_err
LBB0_16:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_17:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_18:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_19:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_17
LBB0_20:
	mov	x23, #0
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_22
LBB0_21:
	mov	w22, #0
	mov	x23, #0
LBB0_22:
	ldr	w8, [x26]
	cmp	w22, w8
	b.ne	LBB0_25
; %bb.23:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_hid_info
LBB0_24:
	mov	x0, x21
	bl	_kfree
	b	LBB0_16
LBB0_25:
	mov	x0, x21
	bl	_kfree
	ldr	x8, [x25, #16]
	cmp	x23, x8
	b.eq	LBB0_18
; %bb.26:
Lloh19:
	adrp	x9, _USB_DEVICE_ID_LOGITECH_WHEEL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _USB_DEVICE_ID_LOGITECH_WHEEL@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x10, _lg4ff_no_autoswitch@GOTPAGE
Lloh23:
	ldr	x10, [x10, _lg4ff_no_autoswitch@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	cmp	x23, x9
	ccmp	w10, #0, #0, eq
	b.eq	LBB0_30
; %bb.27:
	ldr	x0, [x25, #8]
Lloh25:
	adrp	x9, _USB_DEVICE_ID_LOGITECH_DFP_WHEEL@GOTPAGE
Lloh26:
	ldr	x9, [x9, _USB_DEVICE_ID_LOGITECH_DFP_WHEEL@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
Lloh28:
	adrp	x10, _USB_DEVICE_ID_LOGITECH_G25_WHEEL@GOTPAGE
Lloh29:
	ldr	x10, [x10, _USB_DEVICE_ID_LOGITECH_G25_WHEEL@GOTPAGEOFF]
Lloh30:
	ldr	x10, [x10]
	cmp	x0, x10
	ccmp	x0, x9, #4, ne
	ccmp	x8, x23, #4, eq
	b.gt	LBB0_31
; %bb.28:
	mov	x1, x23
	bl	_lg4ff_get_mode_switch_command
	cbz	x0, LBB0_33
; %bb.29:
	mov	x1, x0
	mov	x0, x20
	bl	_lg4ff_switch_compatibility_mode
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	w0, #0
	csel	x19, x19, x8, eq
	b	LBB0_18
LBB0_30:
	ldrsw	x2, [x25, #24]
Lloh31:
	adrp	x1, l_.str.4@PAGE
Lloh32:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_32
LBB0_31:
	ldrsw	x2, [x25, #24]
Lloh33:
	adrp	x8, _lg4ff_alternate_modes@GOTPAGE
Lloh34:
	ldr	x8, [x8, _lg4ff_alternate_modes@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	mov	w9, #24
	umaddl	x8, w22, w9, x8
	ldr	w8, [x8, #16]
	str	x8, [sp]
Lloh36:
	adrp	x1, l_.str.5@PAGE
Lloh37:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_32:
	mov	x0, x20
	bl	_hid_info
	b	LBB0_16
LBB0_33:
	str	x23, [sp]
Lloh38:
	adrp	x1, l_.str.6@PAGE
Lloh39:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_15
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Private driver data not found!\n"

	.comm	_EINVAL,8,3                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Device properties not found!\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"%s"

	.comm	_ENOMEM,8,3                     ; @ENOMEM
	.comm	_LG4FF_MODE_MAX_IDX,4,2         ; @LG4FF_MODE_MAX_IDX
	.comm	_lg4ff_alternate_modes,8,3      ; @lg4ff_alternate_modes
l_.str.3:                               ; @.str.3
	.asciz	"Requested mode \"%s\" is not supported by the device\n"

	.comm	_USB_DEVICE_ID_LOGITECH_WHEEL,8,3 ; @USB_DEVICE_ID_LOGITECH_WHEEL
	.comm	_lg4ff_no_autoswitch,4,2        ; @lg4ff_no_autoswitch
l_.str.4:                               ; @.str.4
	.asciz	"\"%s\" cannot be switched to \"DF-EX\" mode. Load the \"hid_logitech\" module with \"lg4ff_no_autoswitch=1\" parameter set and try again\n"

	.comm	_USB_DEVICE_ID_LOGITECH_DFP_WHEEL,8,3 ; @USB_DEVICE_ID_LOGITECH_DFP_WHEEL
	.comm	_USB_DEVICE_ID_LOGITECH_G25_WHEEL,8,3 ; @USB_DEVICE_ID_LOGITECH_G25_WHEEL
l_.str.5:                               ; @.str.5
	.asciz	"\"%s\" cannot be switched back into \"%s\" mode\n"

l_.str.6:                               ; @.str.6
	.asciz	"Invalid target product ID %X\n"

	.no_dead_strip	_lg4ff_alternate_modes_store
.subsections_via_symbols
