	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sixaxis_parse_report
_sixaxis_parse_report:                  ## @sixaxis_parse_report
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_MOTION_CONTROLLER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	48(%rsi), %rcx
	leaq	120(%rsi), %rdx
	testl	%eax, (%rdi)
	cmoveq	%rdx, %rcx
	movl	(%rcx), %ebx
	cmpl	$238, %ebx
	jl	LBB0_2
## %bb.1:
	notl	%ebx
	andl	$1, %ebx
	movl	$1, %r13d
	movl	$100, -44(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_3
LBB0_2:
	cmpl	$5, %ebx
	movl	$5, %eax
	cmovll	%ebx, %eax
	cltq
	leaq	_sixaxis_parse_report.sixaxis_battery_capacity(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
LBB0_3:
	leaq	20(%r15), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	%r13d, 4(%r15)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r15)
	movl	%ebx, 12(%r15)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	_SIXAXIS_CONTROLLER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.5:
	movq	_SIXAXIS_INPUT_REPORT_ACC_X_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movl	4(%r14,%rbx,4), %edx
	shll	$8, %edx
	orl	(%r14,%rbx,4), %edx
	addl	$-511, %edx                     ## imm = 0xFE01
	movl	16(%r15), %edi
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_input_report_abs
	movl	20(%r14,%rbx,4), %eax
	shll	$8, %eax
	orl	16(%r14,%rbx,4), %eax
	movl	$511, %r12d                     ## imm = 0x1FF
	movl	$511, %edx                      ## imm = 0x1FF
	subl	%eax, %edx
	movl	16(%r15), %edi
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_input_report_abs
	movl	12(%r14,%rbx,4), %eax
	shll	$8, %eax
	orl	8(%r14,%rbx,4), %eax
	subl	%eax, %r12d
	movl	16(%r15), %edi
	movq	_ABS_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	callq	_input_report_abs
	movl	16(%r15), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @sixaxis_parse_report.sixaxis_battery_capacity
_sixaxis_parse_report.sixaxis_battery_capacity:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	25                              ## 0x19
	.long	50                              ## 0x32
	.long	75                              ## 0x4b
	.long	100                             ## 0x64

	.comm	_MOTION_CONTROLLER,4,2          ## @MOTION_CONTROLLER
	.comm	_SIXAXIS_CONTROLLER,4,2         ## @SIXAXIS_CONTROLLER
	.comm	_SIXAXIS_INPUT_REPORT_ACC_X_OFFSET,4,2 ## @SIXAXIS_INPUT_REPORT_ACC_X_OFFSET
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_ABS_Z,4,2                      ## @ABS_Z
	.no_dead_strip	_sixaxis_parse_report
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sixaxis_parse_report
_sixaxis_parse_report:                  ; @sixaxis_parse_report
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MOTION_CONTROLLER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MOTION_CONTROLLER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #48
	mov	w9, #120
	csel	x8, x9, x8, eq
	ldr	w8, [x1, x8]
	cmp	w8, #238
	b.lt	LBB0_2
; %bb.1:
	mvn	w8, w8
	and	w22, w8, #0x1
	mov	w23, #1
	mov	w24, #100
	b	LBB0_3
LBB0_2:
	mov	w22, #0
	mov	w23, #0
	mov	w9, #5
	cmp	w8, #5
	csel	w8, w8, w9, lt
Lloh3:
	adrp	x9, _sixaxis_parse_report.sixaxis_battery_capacity@PAGE
Lloh4:
	add	x9, x9, _sixaxis_parse_report.sixaxis_battery_capacity@PAGEOFF
	ldr	w24, [x9, w8, sxtw #2]
LBB0_3:
	add	x21, x19, #20
	mov	x0, x21
	bl	_spin_lock_irqsave
	stp	w23, w24, [x19, #4]
	str	w22, [x19, #12]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _SIXAXIS_CONTROLLER@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SIXAXIS_CONTROLLER@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _SIXAXIS_INPUT_REPORT_ACC_X_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SIXAXIS_INPUT_REPORT_ACC_X_OFFSET@GOTPAGEOFF]
Lloh10:
	ldrsw	x21, [x8]
	add	w8, w21, #1
	ldr	w8, [x20, w8, sxtw #2]
	ldr	w9, [x20, x21, lsl #2]
	orr	w8, w9, w8, lsl #8
	sub	w2, w8, #511
	ldr	w0, [x19, #16]
Lloh11:
	adrp	x8, _ABS_X@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_input_report_abs
	add	w8, w21, #5
	ldr	w8, [x20, w8, sxtw #2]
	add	w9, w21, #4
	ldr	w9, [x20, w9, sxtw #2]
	orr	w8, w9, w8, lsl #8
	mov	w22, #511
	sub	w2, w22, w8
	ldr	w0, [x19, #16]
Lloh14:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_input_report_abs
	add	w8, w21, #3
	ldr	w8, [x20, w8, sxtw #2]
	add	w9, w21, #2
	ldr	w9, [x20, w9, sxtw #2]
	orr	w8, w9, w8, lsl #8
	sub	w2, w22, w8
	ldr	w0, [x19, #16]
Lloh17:
	adrp	x8, _ABS_Z@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ABS_Z@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_input_report_abs
	ldr	w0, [x19, #16]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_input_sync
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @sixaxis_parse_report.sixaxis_battery_capacity
_sixaxis_parse_report.sixaxis_battery_capacity:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	25                              ; 0x19
	.long	50                              ; 0x32
	.long	75                              ; 0x4b
	.long	100                             ; 0x64

	.comm	_MOTION_CONTROLLER,4,2          ; @MOTION_CONTROLLER
	.comm	_SIXAXIS_CONTROLLER,4,2         ; @SIXAXIS_CONTROLLER
	.comm	_SIXAXIS_INPUT_REPORT_ACC_X_OFFSET,4,2 ; @SIXAXIS_INPUT_REPORT_ACC_X_OFFSET
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_ABS_Z,4,2                      ; @ABS_Z
	.no_dead_strip	_sixaxis_parse_report
.subsections_via_symbols
