	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PAD_ControlMotor               ## -- Begin function PAD_ControlMotor
	.p2align	4, 0x90
_PAD_ControlMotor:                      ## @PAD_ControlMotor
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	callq	__CPU_ISR_Disable
	movl	%ebx, %edi
	callq	_PAD_ENABLEDMASK
	movq	___pad_enabledbits@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	movl	%ebx, %edi
	callq	_SI_GetType
	movq	_SI_GC_NOMOTOR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_3
## %bb.2:
	movq	___pad_spec@GOTPCREL(%rip), %rax
	movq	_PAD_MOTOR_STOP_HARD@GOTPCREL(%rip), %rcx
	movl	%r14d, %edx
	andl	$3, %edx
	xorl	%edi, %edi
	cmpl	%r14d, (%rcx)
	movl	%edx, %esi
	cmovel	%edi, %esi
	cmpl	$2, (%rax)
	cmovgel	%edx, %esi
	movq	___pad_analogmode@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	orl	$4194304, %esi                  ## imm = 0x400000
	movl	%ebx, %edi
	callq	_SI_SetCommand
	xorl	%eax, %eax
	callq	_SI_TransferCommands
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	__CPU_ISR_Restore               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	___pad_enabledbits,4,2          ## @__pad_enabledbits
	.comm	_SI_GC_NOMOTOR,4,2              ## @SI_GC_NOMOTOR
	.comm	___pad_spec,4,2                 ## @__pad_spec
	.comm	_PAD_MOTOR_STOP_HARD,4,2        ## @PAD_MOTOR_STOP_HARD
	.comm	___pad_analogmode,4,2           ## @__pad_analogmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PAD_ControlMotor               ; -- Begin function PAD_ControlMotor
	.p2align	2
_PAD_ControlMotor:                      ; @PAD_ControlMotor
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	__CPU_ISR_Disable
	mov	x0, x19
	bl	_PAD_ENABLEDMASK
Lloh0:
	adrp	x8, ___pad_enabledbits@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___pad_enabledbits@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_SI_GetType
Lloh3:
	adrp	x8, _SI_GC_NOMOTOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SI_GC_NOMOTOR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, ___pad_spec@GOTPAGE
Lloh7:
	ldr	x8, [x8, ___pad_spec@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _PAD_MOTOR_STOP_HARD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PAD_MOTOR_STOP_HARD@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w9, w20
Lloh12:
	adrp	x9, ___pad_analogmode@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___pad_analogmode@GOTPAGEOFF]
	ccmp	w8, #2, #0, eq
Lloh14:
	ldr	w8, [x9]
	and	w9, w20, #0x3
	csel	w9, wzr, w9, lt
	orr	w8, w8, w9
	orr	w1, w8, #0x400000
	mov	x0, x19
	bl	_SI_SetCommand
	bl	_SI_TransferCommands
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	__CPU_ISR_Restore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	___pad_enabledbits,4,2          ; @__pad_enabledbits
	.comm	_SI_GC_NOMOTOR,4,2              ; @SI_GC_NOMOTOR
	.comm	___pad_spec,4,2                 ; @__pad_spec
	.comm	_PAD_MOTOR_STOP_HARD,4,2        ; @PAD_MOTOR_STOP_HARD
	.comm	___pad_analogmode,4,2           ; @__pad_analogmode
.subsections_via_symbols
