	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidpad_ps3_packet_handler
_hidpad_ps3_packet_handler:             ## @hidpad_ps3_packet_handler
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_hidpad_ps3_send_control
	movl	$1, (%rbx)
LBB0_3:
	movq	8(%rbx), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movl	$0, 16(%rbx)
	movq	8(%rbx), %rax
	movl	16(%rax), %ecx
	movl	20(%rax), %edx
	shll	$8, %ecx
	orl	12(%rax), %ecx
	shll	$16, %edx
	orl	%ecx, %edx
	andl	$65536, %edx                    ## imm = 0x10000
	movl	%edx, 16(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
LBB0_4:
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_hidpad_ps3_packet_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidpad_ps3_packet_handler
_hidpad_ps3_packet_handler:             ; @hidpad_ps3_packet_handler
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_4
; %bb.1:
	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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x0]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_hidpad_ps3_send_control
	mov	w8, #1
	str	w8, [x19]
LBB0_3:
	ldr	x0, [x19, #8]
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	str	wzr, [x19, #16]
	ldr	x8, [x19, #8]
	ldp	w9, w10, [x8, #12]
	orr	w9, w9, w10, lsl #8
	ldr	w8, [x8, #20]
	orr	w8, w9, w8, lsl #16
	and	w8, w8, #0x10000
	str	w8, [x19, #16]
	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
LBB0_4:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_hidpad_ps3_packet_handler
.subsections_via_symbols
