* Z:\home\khalils\Downloads\files\data\raw_asc\1851b46e88b4_Draft20.asc
* Generated by LTspice 26.0.1 for Windows.
* works
* Library below included based on ModelFile attribute of instance XU1, XU3 (C:\users\khalils\AppData\Local\LTspice\lib\sym\OpAmps\LT1006.asy)
;dc V1 0 10 0.01
VIN N001 0 SINE(2 1 50)
M1 VOUT N005 N002 N002 PMOS
XU3 VOUT N003 VCC2 VEE3 N006 LT1006 ;pnba In+)In-)V+)V-)OUT
V1 0 VEE2 15
R1 VOUT VEE3 10k
V4 VEE2 VEE3 5
XU1 0 N004 VCC2 VEE2 N005 LT1006 ;pnba In+)In-)V+)V-)OUT
R2 N003 VEE3 10k
R3 N004 N001 10k
V2 VCC2 0 15
I1 VCC2 N003 1mA
Q1 N003 N006 P001 0 NPN
C1 N003 VOUT 1n
R7 P001 VEE3 20R
R4 N002 N004 10k
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.tran 0.1
.lib LTC.lib
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1576 680
WIRE 256 16 0 16
WIRE 592 16 416 16
WIRE 1264 16 848 16
WIRE 0 32 0 16
WIRE 336 80 336 16
WIRE 384 80 336 80
WIRE 592 80 592 16
WIRE 544 96 448 96
WIRE 384 112 304 112
WIRE 1088 208 960 208
WIRE 1264 208 1264 16
WIRE 1264 208 1152 208
WIRE 592 224 592 176
WIRE 1264 224 1264 208
WIRE -64 256 -192 256
WIRE 848 256 848 16
WIRE 1008 256 848 256
WIRE 1200 272 1072 272
WIRE 592 288 592 224
WIRE 960 288 960 208
WIRE 960 288 592 288
WIRE 1008 288 960 288
WIRE 16 336 -192 336
WIRE 592 336 592 288
WIRE 848 336 848 256
WIRE 1040 416 1040 304
SYMBOL res 352 0 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL res 1280 304 M0
SYMATTR InstName R7
SYMATTR Value 20R
SYMBOL res 576 320 R0
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL npn 1200 224 R0
SYMATTR InstName Q1
SYMBOL cap 1152 192 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C1
SYMATTR Value 1n
SYMBOL OpAmps\\LT1006 1040 208 R0
SYMATTR InstName U3
SYMBOL voltage -192 320 R0
WINDOW 0 54 29 Left 2
WINDOW 3 50 56 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V4
SYMATTR Value 5
SYMBOL current 1264 -64 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName I1
SYMATTR Value 1mA
SYMBOL voltage -192 160 R0
WINDOW 0 54 29 Left 2
WINDOW 3 50 56 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 15
SYMBOL voltage -192 240 R0
WINDOW 0 54 29 Left 2
WINDOW 3 50 56 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 15
SYMBOL pmos 544 176 M180
SYMATTR InstName M1
SYMBOL res 432 0 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R4
SYMATTR Value 10k
SYMBOL res 864 320 M0
SYMATTR InstName R2
SYMATTR Value 10k
SYMBOL OpAmps\\LT1006 416 32 R0
SYMATTR InstName U1
SYMBOL voltage 0 16 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 24 44 Left 2
SYMATTR Value SINE(2 1 50)
SYMATTR InstName VIN
FLAG 16 336 VEE2
FLAG -192 176 VCC2
FLAG 416 128 VEE2
FLAG 416 64 VCC2
FLAG 592 224 VOUT
FLAG 1040 240 VCC2
FLAG 1040 416 VEE3
FLAG 1264 -64 VCC2
FLAG -192 416 VEE3
FLAG 592 416 VEE3
FLAG 848 416 VEE3
FLAG 1264 400 VEE3
FLAG 0 112 0
FLAG 304 112 0
FLAG -64 256 0
TEXT -336 -112 Left 2 !;dc V1 0 10 0.01
TEXT 304 448 Left 2 !.tran 0.1
TEXT 816 -40 Left 2 ;works