"It was just a grinding day," Ryu said. "And I just grinded and grinded and grinded. ... I was pretty mentally tough."
Ryu was at 7-under 137 on the tree-lined course with tricky greens made tougher by shifting wind.
"It would feel like the wind was strong into it, then all of a sudden it stopped," Ryu said. "So, I guess pin position and wind direction made it really tough to play today. But I shot 2-under par, never complain about that."
She has six LPGA Tour victories, winning major titles in the 2011 U.S. Women's Open and 2017 ANA Inspiration.
"I always just keep telling myself, 'You've done it enough, you've done it enough to know how to do it, so you can do it.'" Ryu said.
O'Toole birdied three of her last three holes in the afternoon in a bogey-free 65, matching the best score the first two days.
"I probably struck it the best I had all year yesterday and I just couldn't buy a putt," O'Toole said. "And then today I just struck it even better and a little closer even, and stayed patient and just collected birdies along the way."
Kim had a bogey-free 66, playing through back pain. The South Korean player closed her afternoon round with a birdie on the par-5 ninth.
"I'm putting well and second shot, drive, tee shot, this course is really important tee shot," Kim said. "I'm very aggressive at play, but some hole I have to avoid the pin. That's not my style, but I have to."
Fellow South Koreans Ji (72), Inbee Park (69), Na Yeon Choi (67) and He Yong Choi(65) were two strokes back at 5 under with Englishwoman Charley Hull (70).
"I know the greens get a little bit bumpy with the poa annua," Park said. "But if you stay patient on these greens, I think you can score."
O'Toole and Megan Khang — tied for 15th at 3 under after a 66 — were the only other U.S. players. Lexi Thompson was tied for 21st at 1 under after a 70.
Van Dam had a 77 to drop into a tie for 31st at even par. The long-hitting Dutchwoman had three bogeys and a double bogey on her first seven holes on her second nine.
Minjee Lee, coming off a victory Sunday in Los Angeles that moved her to No. 2 in the world, rebounded from an opening 76 with a 69 to reach 1 over. Defending champion Lydia Ko was 2 over, following an opening 75 with a 71. She also won at Lake Merced in 2014 and 2015 when it hosted the Swinging Skirts LPGA Classic.
Canadian Brooke Henderson, the winner two weeks ago in Hawaii, missed the cut with rounds of 72 and 76. Jessica Korda and Stacy Lewis also failed to advance. Korda shot 79-73, and Lewis 76-79 — with Lewis playing alongside Ryu.