	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sony_led_set_brightness
_sony_led_set_brightness:               ## @sony_led_set_brightness
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	callq	_to_hid_device
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_hid_get_drvdata
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movl	4(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.2:
	movq	_SIXAXIS_CONTROLLER_USB@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	andl	(%rax), %r8d
	movq	32(%rax), %rdi
	xorl	%edx, %edx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	je	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r12, (%rdi,%rdx,8)
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rax), %rsi
	testl	%r8d, %r8d
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r14d, (%rsi,%rdx,4)
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%rax), %rbx
	cmpq	$0, (%rbx,%rdx,8)
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rax), %rbx
	cmpq	$0, (%rbx,%rdx,8)
	je	LBB0_8
LBB0_11:
	movl	%r14d, (%rsi,%rdx,4)
	movq	24(%rax), %rcx
	movq	$0, (%rcx,%rdx,8)
	movq	16(%rax), %rcx
	movq	$0, (%rcx,%rdx,8)
	movq	%rax, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sony_set_leds                  ## TAILCALL
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hid_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No device data\n"

	.comm	_SIXAXIS_CONTROLLER_USB,4,2     ## @SIXAXIS_CONTROLLER_USB
	.no_dead_strip	_sony_led_set_brightness
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sony_led_set_brightness
_sony_led_set_brightness:               ; @sony_led_set_brightness
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x0, [x8]
	bl	_to_hid_device
	mov	x21, x0
	bl	_hid_get_drvdata
	cbz	x0, LBB0_11
; %bb.1:
	ldr	w8, [x0, #4]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	mov	x9, #0
	ldr	w10, [x0]
Lloh0:
	adrp	x11, _SIXAXIS_CONTROLLER_USB@GOTPAGE
Lloh1:
	ldr	x11, [x11, _SIXAXIS_CONTROLLER_USB@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	and	w10, w11, w10
	ldr	x11, [x0, #32]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11, x9, lsl #3]
	cmp	x12, x20
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x0, #8]
	cbnz	w10, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w13, [x12, x9, lsl #2]
	cmp	w13, w19
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x13, [x0, #24]
	ldr	x13, [x13, x9, lsl #3]
	cbnz	x13, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x13, [x0, #16]
	ldr	x13, [x13, x9, lsl #3]
	cbz	x13, LBB0_3
LBB0_9:
	str	w19, [x12, x9, lsl #2]
	lsl	x8, x9, #3
	ldp	x10, x9, [x0, #16]
	str	xzr, [x9, x8]
	str	xzr, [x10, x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_sony_set_leds
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_hid_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No device data\n"

	.comm	_SIXAXIS_CONTROLLER_USB,4,2     ; @SIXAXIS_CONTROLLER_USB
	.no_dead_strip	_sony_led_set_brightness
.subsections_via_symbols
