	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function SmpcINTBACKPeripheral
_SmpcINTBACKPeripheral:                 ## @SmpcINTBACKPeripheral
	.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
	movq	_SmpcInternalVars@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	xorl	%eax, %eax
	cmpq	$0, 48(%rdi)
	setne	%al
	movq	_SmpcRegs@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	8(%rcx), %rdx
	movl	4(%rdx), %edx
	sarl	$4, %edx
	shll	$6, %eax
	orl	%edx, %eax
	orl	$128, %eax
	movl	%eax, (%rcx)
	movq	$0, 48(%rdi)
	cmpq	$0, 24(%rdi)
	jne	LBB0_3
## %bb.1:
	cmpq	$0, (%rdi)
	jne	LBB0_3
## %bb.2:
	addq	$24, %rdi
	movq	_PORTDATA1@GOTPCREL(%rip), %r14
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	(%r15), %rdi
	movq	_PORTDATA2@GOTPCREL(%rip), %rbx
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%r14, %rdi
	callq	_PerFlush
	movq	%rbx, %rdi
	callq	_PerFlush
	movq	(%r15), %rdi
	movl	$0, 32(%rdi)
	movl	$0, 8(%rdi)
	movq	_LagFrameFlag@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_3:
	movq	24(%rdi), %rdx
	testq	%rdx, %rdx
	jle	LBB0_4
## %bb.5:
	movslq	32(%rdi), %rcx
	subq	%rcx, %rdx
	movq	(%r12), %rax
	movq	16(%rax), %rax
	movq	40(%rdi), %rsi
	cmpq	$31, %rdx
	jg	LBB0_13
## %bb.6:
	leaq	(%rsi,%rcx,4), %rsi
	movq	%rax, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	(%r15), %rdi
	movl	24(%rdi), %eax
	subl	32(%rdi), %eax
	movq	$0, 24(%rdi)
	jmp	LBB0_7
LBB0_4:
	xorl	%eax, %eax
LBB0_7:
	movq	(%rdi), %rdx
	testq	%rdx, %rdx
	jle	LBB0_12
## %bb.8:
	cmpl	$31, %eax
	jg	LBB0_12
## %bb.9:
	movslq	8(%rdi), %rcx
	subq	%rcx, %rdx
	movl	$32, %ebx
	subl	%eax, %ebx
	movq	(%r12), %rsi
	cltq
	leaq	(%rax,%rax,2), %rax
	shlq	$3, %rax
	addq	16(%rsi), %rax
	movq	16(%rdi), %rsi
	cmpq	%rbx, %rdx
	jge	LBB0_11
## %bb.10:
	leaq	(%rsi,%rcx,4), %rsi
	movq	%rax, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	(%r15), %rax
	movq	$0, (%rax)
	jmp	LBB0_12
LBB0_13:
	movq	%rax, %rdi
	movl	$32, %edx
	callq	_memcpy
	movq	(%r15), %rax
	addl	$32, 32(%rax)
	jmp	LBB0_12
LBB0_11:
	movq	%rax, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	movq	(%r15), %rax
	addl	%ebx, 8(%rax)
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SmpcInternalVars,8,3           ## @SmpcInternalVars
	.comm	_SmpcRegs,8,3                   ## @SmpcRegs
	.comm	_PORTDATA1,4,2                  ## @PORTDATA1
	.comm	_PORTDATA2,4,2                  ## @PORTDATA2
	.comm	_LagFrameFlag,8,3               ## @LagFrameFlag
	.no_dead_strip	_SmpcINTBACKPeripheral
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SmpcINTBACKPeripheral
_SmpcINTBACKPeripheral:                 ; @SmpcINTBACKPeripheral
	.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
Lloh0:
	adrp	x21, _SmpcInternalVars@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SmpcInternalVars@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x8, #48]
Lloh2:
	adrp	x22, _SmpcRegs@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SmpcRegs@GOTPAGEOFF]
	ldr	x10, [x22]
	ldr	x11, [x10, #8]
	ldr	w11, [x11, #4]
	cmp	x9, #0
	mov	w9, #192
	mov	w12, #128
	csel	w9, w12, w9, eq
	orr	w9, w9, w11, asr #4
	str	w9, [x10]
	str	xzr, [x8, #48]
	mov	x0, x8
	ldr	x9, [x0, #24]!
	cbnz	x9, LBB0_3
; %bb.1:
	ldr	x9, [x8]
	cbnz	x9, LBB0_3
; %bb.2:
Lloh4:
	adrp	x19, _PORTDATA1@GOTPAGE
Lloh5:
	ldr	x19, [x19, _PORTDATA1@GOTPAGEOFF]
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
	ldr	x0, [x21]
Lloh6:
	adrp	x20, _PORTDATA2@GOTPAGE
Lloh7:
	ldr	x20, [x20, _PORTDATA2@GOTPAGEOFF]
	mov	x1, x20
	mov	w2, #4
	bl	_memcpy
	mov	x0, x19
	bl	_PerFlush
	mov	x0, x20
	bl	_PerFlush
	ldr	x8, [x21]
	str	wzr, [x8, #32]
	str	wzr, [x8, #8]
Lloh8:
	adrp	x9, _LagFrameFlag@GOTPAGE
Lloh9:
	ldr	x9, [x9, _LagFrameFlag@GOTPAGEOFF]
Lloh10:
	str	xzr, [x9]
LBB0_3:
	ldr	x10, [x8, #24]
	cmp	x10, #1
	b.lt	LBB0_6
; %bb.4:
	ldrsw	x9, [x8, #32]
	sub	x2, x10, x9
	ldr	x10, [x22]
	ldr	x0, [x10, #16]
	ldr	x1, [x8, #40]
	cmp	x2, #31
	b.gt	LBB0_10
; %bb.5:
	add	x1, x1, x9, lsl #2
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
	ldr	x8, [x21]
	ldr	w9, [x8, #24]
	ldr	w10, [x8, #32]
	sub	w9, w9, w10
	str	xzr, [x8, #24]
	b	LBB0_7
LBB0_6:
	mov	w9, #0
LBB0_7:
	ldr	x11, [x8]
	cmp	x11, #1
	ccmp	w9, #31, #0, ge
	b.gt	LBB0_12
; %bb.8:
	ldrsw	x10, [x8, #8]
	sub	x2, x11, x10
	mov	w11, #32
	ldr	x12, [x22]
	ldr	x12, [x12, #16]
	mov	w13, #24
	smaddl	x0, w9, w13, x12
	ldr	x1, [x8, #16]
	sub	w19, w11, w9
	cmp	x2, x19
	b.ge	LBB0_11
; %bb.9:
	add	x1, x1, x10, lsl #2
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
	ldr	x8, [x21]
	str	xzr, [x8]
	b	LBB0_12
LBB0_10:
	mov	w2, #32
	bl	_memcpy
	ldr	x8, [x21]
	ldr	w9, [x8, #32]
	add	w9, w9, #32
	str	w9, [x8, #32]
	b	LBB0_12
LBB0_11:
	mov	x2, x19
	bl	_memcpy
	ldr	x8, [x21]
	ldr	w9, [x8, #8]
	add	w9, w9, w19
	str	w9, [x8, #8]
LBB0_12:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SmpcInternalVars,8,3           ; @SmpcInternalVars
	.comm	_SmpcRegs,8,3                   ; @SmpcRegs
	.comm	_PORTDATA1,4,2                  ; @PORTDATA1
	.comm	_PORTDATA2,4,2                  ; @PORTDATA2
	.comm	_LagFrameFlag,8,3               ; @LagFrameFlag
	.no_dead_strip	_SmpcINTBACKPeripheral
.subsections_via_symbols
